Examples of BELAnnotationDefinition


Examples of org.openbel.bel.model.BELAnnotationDefinition

            }


                    final String name = an.getText();

                    BELAnnotationDefinition ad = definedAnnotations.get(name);
                    if (ad != null) {
                        // read annotation value
                        final BELAnnotation annotation;
                        if (qv != null) {
                            annotation = new BELAnnotation(ad, qv.getText());
View Full Code Here

Examples of org.openbel.bel.model.BELAnnotationDefinition

                    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);
                    }
View Full Code Here

Examples of org.openbel.bel.model.BELAnnotationDefinition

        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.");
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.