RDFAnnotation.cpp File Reference

Detailed Description

RDFAnnotation I/O.

Author:
Sarah Keating

Copyright (C) 2009-2011 jointly by the following organizations: 1. California Institute of Technology, Pasadena, CA, USA 2. EMBL European Bioinformatics Institute (EBML-EBI), Hinxton, UK

Copyright (C) 2006-2008 by the California Institute of Technology, Pasadena, CA, USA

Copyright (C) 2002-2005 jointly by the following organizations: 1. California Institute of Technology, Pasadena, CA, USA 2. Japan Science and Technology Agency, Japan

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation. A copy of the license agreement is provided in the file named "LICENSE.txt" included with this software distribution. It is also available online at http://sbml.org/software/libsbml/license.html

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Include dependency graph for RDFAnnotation.cpp:

Functions

XMLNode_t * RDFAnnotationParser_createAnnotation ()
 Creates a blank annotation and returns the XMLNode_t corresonding to it.
XMLNode_t * RDFAnnotationParser_createCVTerms (const SBase_t *object)
 Takes a list of CVTerms form an SBML object and creates a the RDF "Description" element.
XMLNode_t * RDFAnnotationParser_createRDFAnnotation ()
 Creates blank RDF annotation content organized in the form defined in Section 6 of the SBML Level 2 Version 4 specification .
XMLNode_t * RDFAnnotationParser_createRDFDescription (const SBase_t *object)
 Takes an SBML object and creates an XMLNode_t corresponding to an RDF "Description" element.
XMLNode_t * RDFAnnotationParser_deleteRDFAnnotation (XMLNode_t *annotation)
 Deletes any RDF annotation found in the given XMLNode_t tree and returns any remaining annotation content.
XMLNode_t * RDFAnnotationParser_parseCVTerms (const SBase_t *object)
 Takes a list of CVTerms from an SBML object and creates a complete SBML annotation around it.
XMLNode_t * RDFAnnotationParser_parseModelHistory (const SBase_t *object)
 Takes an SBML Model_t object, reads off the model history information stored in it, and creates a complete SBML annotation to store that history.
void RDFAnnotationParser_parseRDFAnnotation (const XMLNode_t *annotation, List_t *CVTerms)
 Parses an annotation (given as an XMLNode_t tree) into a list of CVTerms.
ModelHistory_t * RDFAnnotationParser_parseRDFAnnotationWithModelHistory (const XMLNode_t *annotation)
 Parses an annotation into a ModelHistory_t structure.

Function Documentation

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.

Returns:
a pointer to an XMLNode_t for the annotation
See also:
RDFAnnotationParser_createRDFAnnotation()
XMLNode_t* RDFAnnotationParser_createCVTerms ( const SBase_t *  object)

Takes a list of CVTerms form 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 createRDFDescriptiom() to create an RDF "Description" element to hold the terms and adds each term with appropriate qualifiers.

Parameters:
objectthe SBML object to start from
Returns:
the XMLNode_t tree corresponding to the Description element of an RDF annotation.

Creates blank RDF annotation content organized in the form defined in Section 6 of the SBML Level 2 Version 4 specification .

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 createAnnotation() is available for that purpose.

Returns:
a pointer to an XMLNode_t represting the annotation.
XMLNode_t* RDFAnnotationParser_createRDFDescription ( const SBase_t *  object)

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().

Parameters:
objectthe object to be annotated
Returns:
a new XMLNode_t containing the "rdf:about" structure for an RDF "Description" element.
See also:
RDFAnnotationParser_createRDFAnnotation()
XMLNode_t* RDFAnnotationParser_deleteRDFAnnotation ( XMLNode_t *  annotation)

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.

Parameters:
annotationthe XMLNode_t tree within which the RDF annotation is to be found and deleted
Returns:
the XMLNode_t structure with any RDF annotations deleted
XMLNode_t* RDFAnnotationParser_parseCVTerms ( const SBase_t *  object)

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 createCVTerms to read out the CVTerms attached to it, calls createRDFAnnotation() to create an RDF annotation to hold the terms, and finally calls createAnnotation() to wrap the result as an SBML <annotation> element.

Parameters:
objectthe SBML object to start from
Returns:
the XMLNode_t tree corresponding to the annotation.
XMLNode_t* RDFAnnotationParser_parseModelHistory ( const SBase_t *  object)

Takes an SBML Model_t object, reads off the model history information stored in it, and creates a complete SBML annotation to store that history.

Parameters:
objecta Model_t
Returns:
the XMLNode_t corresponding to an annotation containing MIRIAM-compliant model history information in RDF format
void RDFAnnotationParser_parseRDFAnnotation ( const XMLNode_t *  annotation,
List_t *  CVTerms 
)

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.

Parameters:
annotationXMLNode_t containing the annotation.
CVTermslist of CVTerms to be created.
See also:
RDFAnnotationParser_parseRDFAnnotationWithModelHistory (const XMLNode_t *annotation)
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.

Parameters:
annotationXMLNode_t containing the annotation.
Returns:
a pointer to the ModelHistory_t created.
See also:
RDFAnnotationParser_parseRDFAnnotation (const XMLNode *annotation, List *CVTerms)
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines