code: @Override
      public BELAnnotationDefinition convert(AnnotationDefinition ad) {
          if (ad == null) {
              return null;
          }
  
          if (ad.getType() == null) {
              return new BELAnnotationDefinition(
                      ad.getId(), BELAnnotationType.URL, ad.getURL());
          }
  
          switch (ad.getType()) {
          case ENUMERATION:
              return new BELAnnotationDefinition(ad.getId(),
                      BELAnnotationType.LIST, ad.getEnums());
          case REGULAR_EXPRESSION:
              return new BELAnnotationDefinition(ad.getId(),
                      BELAnnotationType.PATTERN, ad.getValue());
          default:
              throw new InvalidArgument("AnnotationType '"
                      + ad.getType() + "' not known.");
          }
      }
docs: {@inheritDoc}