if (type != null && value != null) {
final String typetext = type.toString();
String valuetext = value.toString();
BELAnnotationType atype;
BELAnnotationDefinition ad;
if ("URL".equals(typetext)) {
atype = BELAnnotationType.URL;
ad = new BELAnnotationDefinition(nametext, atype, valuetext);
} else if ("PATTERN".equals(typetext)) {
atype = BELAnnotationType.PATTERN;
ad = new BELAnnotationDefinition(nametext, atype, valuetext);
} else {
atype = BELAnnotationType.LIST;
valuetext = valuetext.substring(1, valuetext.length() - 1);
ad = new BELAnnotationDefinition(nametext, atype, Arrays.asList(ParserUtil.parseListRecord(valuetext)));
}
adlist.add(ad);
definedAnnotations.put(nametext, ad);
}