Package org.sbml.jsbml

Examples of org.sbml.jsbml.Annotation


          SBase sbase = (SBase) contextObject;
          sbase.setNotes(new XMLNode(new XMLTriple("notes", null, null), new XMLAttributes()));
        } else if (elementName.equals("annotation")
            && contextObject instanceof SBase) {
          SBase sbase = (SBase) contextObject;
          Annotation annotation = (Annotation) newContextObject;
          sbase.setAnnotation(annotation);

          return annotation;
        } else if (contextObject instanceof SBMLDocument) {
          SBMLDocument sbmlDocument = (SBMLDocument) contextObject;
View Full Code Here


    Object contextObject) {

    // The namespace of this parser is declared in a RDF subnode of an annotation.
    // adds the namespace to the RDFAnnotationNamespaces HashMap of annotation.
    if (elementName.equals("RDF") && (contextObject instanceof Annotation)) {
      Annotation annotation = (Annotation) contextObject;

      annotation.addRDFAnnotationNamespace(localName, prefix, URI);
    }
  }
View Full Code Here

    // A CreatorParser can only modify a contextObject which is an Annotation instance.
    // The namespace of this parser should be associated with the creator subnode of an annotation.
    // Creates a ModelHistory instance and set the modelHistory of annotation.
    if (elementName.equals("creator") && (contextObject instanceof Annotation)) {
      Annotation annotation = (Annotation) contextObject;
      History modelHistory = new History();
      annotation.setHistory(modelHistory);

      return modelHistory;
    }
    else {
      // TODO: !elementName.equals("creator"), SBML syntax error?
View Full Code Here

    // The namespace of this parser should be declared in a 'RDF' subNode of
    // an annotation.
    // Sets the namespace to the RDFAnnotationNamespaces HashMap of
    // annotation.
    if (elementName.equals("RDF") && contextObject instanceof Annotation) {
      Annotation annotation = (Annotation) contextObject;

      annotation.addRDFAnnotationNamespace(localName, prefix, URI);
    }
  }
View Full Code Here

    logger.debug("processStartElement: " + elementName);
   
    // When this parser read a starting element tag, it can modify a
    // contextObject which is an Annotation instance.
    if (contextObject instanceof Annotation) {
      Annotation annotation = (Annotation) contextObject;

      if (!annotation.isSetHistory()) {
        annotation.setHistory(new History());
      }
     
      if (annotation.isSetHistory()) {
        History history = annotation.getHistory();

        // If the localName of the node is 'created' and if it has not
        // been read yet,
        // the previousElement of this parser is set to 'created' and
        // hasReadCreated is set
View Full Code Here

    // The namespace of this parser should be declared in the RDF subnode of
    // the annotation.
    // Adds the namespace to the RDFAnnotationNamespaces HashMap of
    // annotation.
    if (elementName.equals("RDF") && contextObject instanceof Annotation) {
      Annotation annotation = (Annotation) contextObject;

      annotation.addRDFAnnotationNamespace(localName, prefix, URI);
    }
  }
View Full Code Here

    // A BiologicalQualifierParser can only modify a contextObject which is
    // an instance of Annotation.
    // That will probably change in SBML level 3 with the Annotation package
    if (contextObject instanceof Annotation) {
      Annotation annotation = (Annotation) contextObject;

      // This parser can parse only biological MIRIAM qualifiers. This
      // element should not have attributes or namespace declarations.
      // Creates a new CVTerm and
      // sets the qualifierType and biologicalQualifierType of this
      // CVTerm. Then, adds the
      // initialized CVTerm to annotation.
      if (biologicalQualifierMap.containsKey(elementName)
          && !hasAttributes && !hasNamespaces) {
        CVTerm cvTerm = new CVTerm();
        cvTerm.setQualifierType(Type.BIOLOGICAL_QUALIFIER);
        cvTerm.setBiologicalQualifierType(biologicalQualifierMap
            .get(elementName));

        annotation.addCVTerm(cvTerm);
        return cvTerm;
      } else {
        // TODO: SBML syntax error, log an error
      }
    } else {
View Full Code Here

    boolean isReadAttribute = false;

    // A RDFAnnotationParser can modify a contextObject which is an Annotation instance.
    // The annotation element can contain other attributes. Try to read them.
    if (contextObject instanceof Annotation) {
      Annotation modelAnnotation = (Annotation) contextObject;
      isReadAttribute = modelAnnotation.readAttribute(attributeName, prefix, value);
    }
    // A RDFAnnotationParser can modify a contextObject which is an ModelHistory instance.
    // When this parser is parsing the model history, some rdf attributes can appear. Try to
    // read them.
    else if (contextObject instanceof History) {
View Full Code Here

      String localName, boolean hasAttributes, boolean isLastNamespace,
      Object contextObject) {

    // Adds the namespace to the RDFAnnotationNamespaces HashMap of annotation.
    if (elementName.equals("RDF") && (contextObject instanceof Annotation)) {
      Annotation annotation = (Annotation) contextObject;
      annotation.addRDFAnnotationNamespace(localName, prefix, URI);;
    }
  }
View Full Code Here

    }
    // A SBMLCoreParser can modify a contextObject which is an instance of
    // Annotation.
    // Try to read the attributes.
    else if (contextObject instanceof Annotation) {
      Annotation annotation = (Annotation) contextObject;
      isAttributeRead = annotation.readAttribute(attributeName, prefix,
          value);
    } else if (contextObject instanceof ASTNode) {
      ASTNode astNode = (ASTNode) contextObject;
     
      try {
View Full Code Here

TOP

Related Classes of org.sbml.jsbml.Annotation

Copyright © 2018 www.massapicom. 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.