libSBML C API
5.18.0
|
This class of objects is defined by libSBML only and has no direct equivalent in terms of SBML components. This class is not prescribed by the SBML specifications, although it is used to implement features defined in SBML.
RDFAnnotationParser_t is a libSBML construct used as part of the libSBML support for annotations conforming to the guidelines specified by MIRIAM ("Minimum
Information Requested in the Annotation of biochemical Models", Nature Biotechnology, vol. 23, no. 12, Dec. 2005). Section 6 of the SBML Level 2 and Level 3 specification documents defines a recommended way of encoding MIRIAM information using a subset of RDF (Resource Description Format). The general scheme is as follows. A set of RDF-based annotations attached to a given SBML <annotation>
element are read by RDFAnnotationParser_t and converted into a list of CVTerm_t objects. There are different versions of the main method, RDFAnnotationParser_t::parseRDFAnnotation(const XMLNode_t *annotation, List *CVTerms) and RDFAnnotationParser_t::parseRDFAnnotation(const XMLNode_t *annotation), used depending on whether the annotation in question concerns the MIRIAM model history or other MIRIAM resource annotations. A special object class, ModelHistory_t, is used to make it easier to manipulate model history annotations.
All of the methods on RDFAnnotationParser_t are static; the class exists only to encapsulate the annotation and CVTerm_t parsing and manipulation functionality.
Public Member Functions | |
XMLNode_t * | RDFAnnotationParser_createAnnotation () |
Creates a blank annotation and returns the XMLNode_t corresonding to it. More... | |
XMLNode_t * | RDFAnnotationParser_createCVTerms (const SBase_t *obj) |
Takes a list of CVTerms from an SBML object and creates a the RDF "Description" element. More... | |
XMLNode_t * | RDFAnnotationParser_createRDFAnnotation () |
Creates blank RDF annotation content organized in the form defined in Section 6 of the SBML Level 2 Version 4 and the SBML Level 3 specifications. More... | |
XMLNode_t * | RDFAnnotationParser_createRDFAnnotationForLevelAndVersion (unsigned int level, unsigned int version) |
Creates blank RDF annotation content organized in the form defined in Section 6 of the SBML Level 2 Version 4 and the SBML Level 3 specifications. More... | |
XMLNode_t * | RDFAnnotationParser_createRDFDescription (const SBase_t *obj) |
Takes an SBML object and creates an XMLNode_t corresponding to an RDF "Description" element. More... | |
XMLNode_t * | RDFAnnotationParser_deleteRDFAnnotation (XMLNode_t *annotation) |
Deletes any RDF annotation found in the given XMLNode_t tree and returns any remaining annotation content. More... | |
XMLNode_t * | RDFAnnotationParser_parseCVTerms (const SBase_t *obj) |
Takes a list of CVTerms from an SBML object and creates a complete SBML annotation around it. More... | |
XMLNode_t * | RDFAnnotationParser_parseModelHistory (const SBase_t *obj) |
Takes an SBML Model_t structure, reads off the model history information stored in it, and creates a complete SBML annotation to store that history. More... | |
void | RDFAnnotationParser_parseRDFAnnotation (const XMLNode_t *annotation, List_t *CVTerms) |
Parses an annotation (given as an XMLNode_t tree) into a list of CVTerms. More... | |
ModelHistory_t * | RDFAnnotationParser_parseRDFAnnotationWithModelHistory (const XMLNode_t *annotation) |
Parses an annotation into a ModelHistory_t structure. More... | |
XMLNode_t * RDFAnnotationParser_createAnnotation | ( | ) |
Creates a blank annotation and returns the XMLNode_t corresonding to it.
The annotation created by this method is a completely empty SBML <annotation>
element. One use for this is to then call createRDFAnnotation() to construct RDF content for this empty annotation.
Takes a list of CVTerms from an SBML object and creates a the RDF "Description" element.
This essentially takes the given SBML object, reads out the CVTerms attached to it, calls createRDFDescription() to create an RDF "Description" element to hold the terms and adds each term with appropriate qualifiers.
obj | the SBML object to start from. |
XMLNode_t * RDFAnnotationParser_createRDFAnnotation | ( | ) |
Creates blank RDF annotation content organized in the form defined in Section 6 of the SBML Level 2 Version 4 and the SBML Level 3 specifications.
The annotation created by this method has namespace declarations for all the relevant XML namespaces used in RDF annotations and also has an empty RDF element. Note that this is not the containing <annotation>
element; the method RDFAnnotationParser_createAnnotation() is available for that purpose.
XMLNode_t * RDFAnnotationParser_createRDFAnnotationForLevelAndVersion | ( | unsigned int | level, |
unsigned int | version | ||
) |
Creates blank RDF annotation content organized in the form defined in Section 6 of the SBML Level 2 Version 4 and the SBML Level 3 specifications.
The annotation created by this method has namespace declarations for all the relevant XML namespaces used in RDF annotations and also has an empty RDF element. Note that this is not the containing <annotation>
element; the method RDFAnnotationParser_createAnnotation() is available for that purpose.
level | unsigned int giving the SBML level to target. |
version | unsigned int giving the SBML version to target. |
Takes an SBML object and creates an XMLNode_t corresponding to an RDF "Description" element.
This method is a handy way of creating RDF description objects linked by the appropriate "metaid" field, for insertion into RDF annotations in a model. (Note that this method does not create a complete annotation; it only creates a description element. For creating empty RDF annotations that can serve as containers for RDF descriptions, see RDFAnnotationParser_createRDFAnnotation().
obj | the object to be annotated. |
Deletes any RDF annotation found in the given XMLNode_t tree and returns any remaining annotation content.
The name of the given XMLNode_t must be "annotation", or else this method returns NULL.
annotation | the XMLNode_t tree within which the RDF annotation is to be found and deleted. |
Takes a list of CVTerms from an SBML object and creates a complete SBML annotation around it.
This essentially takes the given SBML object, calls RDFAnnotationParser_createRDFDescriptionWithCVTerms() to read out the CVTerms attached to it, calls RDFAnnotationParser_createAnnotation() to create an RDF annotation to hold the terms, and finally calls RDFAnnotationParser_createAnnotation() to wrap the result as an SBML <annotation>
element.
obj | the SBML object to start from. |
Parses an annotation (given as an XMLNode_t tree) into a list of CVTerms.
This is used to take an annotation that has been read into an SBML model, identify the RDF elements within it, and create a list of corresponding CVTerms.
annotation | XMLNode_t containing the annotation. |
CVTerms | list of CVTerms to be created. |
ModelHistory_t * RDFAnnotationParser_parseRDFAnnotationWithModelHistory | ( | const XMLNode_t * | annotation | ) |
Parses an annotation into a ModelHistory_t structure.
This is used to take an annotation that has been read into an SBML model, identify the RDF elements representing model history information, and create a list of corresponding CVTerms.
annotation | XMLNode_t containing the annotation. |