Implementation of SBase, the base object of all SBML objects.

Functions | |
| int | SBase_addCVTerm (SBase_t *sb, CVTerm_t *term) |
| Adds a copy of the given CVTerm to this SBML object. | |
| int | SBase_addCVTermNewBag (SBase_t *sb, CVTerm_t *term) |
| Adds a copy of the given CVTerm to this SBML object creating a new bBag element with the same identifier. | |
| int | SBase_appendAnnotation (SBase_t *sb, XMLNode_t *annotation) |
| Appends the annotation for the given SBML object. | |
| int | SBase_appendAnnotationString (SBase_t *sb, char *annotation) |
| Appends the annotation for the given SBML object. | |
| int | SBase_appendNotes (SBase_t *sb, XMLNode_t *notes) |
| Appends the notes for the given SBML object. | |
| int | SBase_appendNotesString (SBase_t *sb, char *notes) |
| Appends the notes for the given SBML object. | |
| List_t * | SBase_getAllElements (SBase_t *sb) |
| List_t * | SBase_getAllElementsFromPlugins (SBase_t *sb) |
| const SBase_t * | SBase_getAncestorOfType (SBase_t *sb, int type, const char *pkgName) |
| Returns the ancestor SBase_t structure of the given SBase_t structure that corresponds to the given type. | |
| XMLNode_t * | SBase_getAnnotation (SBase_t *sb) |
| Returns the annotation from given SBML object. | |
| char * | SBase_getAnnotationString (SBase_t *sb) |
| Returns the annotation string from given SBML object. | |
| unsigned int | SBase_getColumn (const SBase_t *sb) |
| Returns the column number on which the given object first appears in the XML representation of the SBML document. | |
| CVTerm_t * | SBase_getCVTerm (SBase_t *sb, unsigned int n) |
| Returns the nth CVTerm in the list of CVTerms of this SBML object. | |
| List_t * | SBase_getCVTerms (SBase_t *sb) |
| Returns a list of CVTerm objects in the annotations of this SBML object. | |
| SBase_t * | SBase_getElementByMetaId (SBase_t *sb, const char *metaid) |
| SBase_t * | SBase_getElementBySId (SBase_t *sb, const char *id) |
| SBase_t * | SBase_getElementFromPluginsByMetaId (SBase_t *sb, const char *metaid) |
| SBase_t * | SBase_getElementFromPluginsBySId (SBase_t *sb, const char *id) |
| const char * | SBase_getElementName (const SBase_t *sb) |
| Returns the XML element name of the given structure. | |
| unsigned int | SBase_getLevel (const SBase_t *sb) |
| Returns the SBML Level of the overall SBML document. | |
| unsigned int | SBase_getLine (const SBase_t *sb) |
| Returns the line number on which the given object first appears in the XML representation of the SBML document. | |
| const char * | SBase_getMetaId (SBase_t *sb) |
| Returns the value of the "metaid" attribute of the given SBase_t structure. | |
| const Model_t * | SBase_getModel (const SBase_t *sb) |
| Returns the Model_t structure in which the given instance is located. | |
| ModelHistory_t * | SBase_getModelHistory (SBase_t *sb) |
| Returns the ModelHistory of the given SBase_t structure. | |
| XMLNode_t * | SBase_getNotes (SBase_t *sb) |
| Returns the notes from given SBML object. | |
| char * | SBase_getNotesString (SBase_t *sb) |
| Returns the notes string from given SBML object. | |
| unsigned int | SBase_getNumCVTerms (SBase_t *sb) |
| Returns the number of CVTerm objects in the annotations of this SBML object. | |
| int | SBase_getNumPlugins (SBase_t *sb) |
| const SBase_t * | SBase_getParentSBMLObject (SBase_t *sb) |
| Returns the parent SBase_t structure of the given SBase_t structure. | |
| SBasePlugin_t * | SBase_getPlugin (SBase_t *sb, const char *package) |
| BiolQualifierType_t | SBase_getResourceBiologicalQualifier (SBase_t *sb, const char *resource) |
| Returns the BiologicalQualifier associated with this resource, BQB_UNKNOWN if the resource does not exist. | |
| ModelQualifierType_t | SBase_getResourceModelQualifier (SBase_t *sb, const char *resource) |
| Returns the ModelQualifier associated with this resource, BQM_UNKNOWN if the resource does not exist. | |
| const SBMLDocument_t * | SBase_getSBMLDocument (SBase_t *sb) |
| Returns the value of the "id" attribute of the given SBase_t structure. | |
| int | SBase_getSBOTerm (const SBase_t *sb) |
| Returns the integer portion of the value of the "sboTerm" attribute of the given SBase_t structure. | |
| char * | SBase_getSBOTermID (const SBase_t *sb) |
| Returns the string representation of the "sboTerm" attribute of this object. | |
| int | SBase_getTypeCode (const SBase_t *sb) |
| Returns the libSBML type code for this object. | |
| void * | SBase_getUserData (SBase_t *sb) |
| Returns the user data that has been previously set by setUserData(). | |
| unsigned int | SBase_getVersion (const SBase_t *sb) |
| Returns the Version within the SBML Level of the overall SBML document. | |
| int | SBase_hasValidLevelVersionNamespaceCombination (SBase_t *sb) |
| Predicate returning nonzero true or false depending on whether the object's level/version and namespace values correspond to a valid SBML specification. | |
| int | SBase_isSetAnnotation (const SBase_t *sb) |
| Predicate returning nonzero true or false depending on whether the given structure's "annotation" subelement is set. | |
| int | SBase_isSetMetaId (const SBase_t *sb) |
| Predicate returning nonzero true or false depending on whether the given structure's "metaid" attribute is set. | |
| int | SBase_isSetModelHistory (SBase_t *sb) |
| Predicate for testing whether the ModelHistory of a given SBase_t structure is assigned. | |
| int | SBase_isSetNotes (const SBase_t *sb) |
| Predicate returning nonzero true or false depending on whether the given structure's "id" attribute is set. | |
| int | SBase_isSetSBOTerm (const SBase_t *sb) |
| Predicate returning nonzero true or false depending on whether the given structure's "sboTerm" attribute is set. | |
| void | SBase_renameMetaIdRefs (SBase_t *sb, const char *oldid, const char *newid) |
| void | SBase_renameSIdRefs (SBase_t *sb, const char *oldid, const char *newid) |
| void | SBase_renameUnitSIdRefs (SBase_t *sb, const char *oldid, const char *newid) |
| int | SBase_setAnnotation (SBase_t *sb, XMLNode_t *annotation) |
| Sets the annotation for the given SBML object. | |
| int | SBase_setAnnotationString (SBase_t *sb, char *annotation) |
| Sets the annotation for the given SBML object. | |
| int | SBase_setMetaId (SBase_t *sb, const char *metaid) |
| Sets the value of the "metaid" attribute of the given object. | |
| int | SBase_setModelHistory (SBase_t *sb, ModelHistory_t *history) |
| Set the ModelHistory of the given SBase_t structure. | |
| int | SBase_setNamespaces (SBase_t *sb, XMLNamespaces_t *xmlns) |
| Sets the namespaces relevant of this SBML object. | |
| int | SBase_setNotes (SBase_t *sb, XMLNode_t *notes) |
| Sets the notes for the given SBML object. | |
| int | SBase_setNotesString (SBase_t *sb, char *notes) |
| Sets the notes for the given SBML object. | |
| int | SBase_setSBOTerm (SBase_t *sb, int value) |
| Sets the value of the "id" attribute of this SBML object. | |
| int | SBase_setSBOTermID (SBase_t *sb, const char *sboid) |
| int | SBase_setUserData (SBase_t *sb, void *userData) |
| Sets the user data of this node. | |
| int | SBase_unsetAnnotation (SBase_t *sb) |
| Unsets the "annotation" subelement of the given object. | |
| int | SBase_unsetCVTerms (SBase_t *sb) |
| Clears the list of CVTerms of this SBML object. | |
| int | SBase_unsetId (SBase_t *sb) |
| int | SBase_unsetMetaId (SBase_t *sb) |
| Unsets the "metaid" attribute of the given object. | |
| int | SBase_unsetModelHistory (SBase_t *sb) |
| Unsets the ModelHistory of the given SBase_t structure. | |
| int | SBase_unsetNotes (SBase_t *sb) |
| Unsets the "name" attribute of the given object. | |
| int | SBase_unsetSBOTerm (SBase_t *sb) |
| Unsets the "sboTerm" attribute of the given object. | |
| int SBase_addCVTerm | ( | SBase_t * | sb, |
| CVTerm_t * | term | ||
| ) |
Adds a copy of the given CVTerm to this SBML object.
| sb | the object to add the CVTerm to |
| term | the CVTerm_t to assign |
| int SBase_addCVTermNewBag | ( | SBase_t * | sb, |
| CVTerm_t * | term | ||
| ) |
Adds a copy of the given CVTerm to this SBML object creating a new bBag element with the same identifier.
| sb | the object to add the CVTerm to |
| term | the CVTerm_t to assign |
| int SBase_appendAnnotation | ( | SBase_t * | sb, |
| XMLNode_t * | annotation | ||
| ) |
Appends the annotation for the given SBML object.
| sb | the given SBML object. |
| annotation | the XMLNode_t structure respresenting the annotation. |
| int SBase_appendAnnotationString | ( | SBase_t * | sb, |
| char * | annotation | ||
| ) |
Appends the annotation for the given SBML object.
| sb | the given SBML object. |
| annotation | the string (const char*) respresenting the annotation. |
| int SBase_appendNotes | ( | SBase_t * | sb, |
| XMLNode_t * | notes | ||
| ) |
Appends the notes for the given SBML object.
| sb | the given SBML object. |
| notes | the XMLNode_t structure respresenting the notes. |
| int SBase_appendNotesString | ( | SBase_t * | sb, |
| char * | notes | ||
| ) |
Appends the notes for the given SBML object.
| sb | the given SBML object. |
| notes | the string (const char*) respresenting the notes. |
| List_t* SBase_getAllElements | ( | SBase_t * | sb | ) |
| List_t* SBase_getAllElementsFromPlugins | ( | SBase_t * | sb | ) |
| const SBase_t* SBase_getAncestorOfType | ( | SBase_t * | sb, |
| int | type, | ||
| const char * | pkgName | ||
| ) |
Returns the ancestor SBase_t structure of the given SBase_t structure that corresponds to the given type.
This function allows any object to determine its exact location/function within a model. For example a StoichiometryMath object has ancestors of type SpeciesReference, ListOf(Products/Reactants), Reaction, ListOfReactions and Model; any of which can be accessed via this function.
| sb | the SBase_t structure |
| type | the typecode (int) of the structure to be returned |
| XMLNode_t* SBase_getAnnotation | ( | SBase_t * | sb | ) |
Returns the annotation from given SBML object.
| sb | the given SBML object. |
| char* SBase_getAnnotationString | ( | SBase_t * | sb | ) |
Returns the annotation string from given SBML object.
The string is owned by the caller and should be freed (with free()) when no longer needed.
| sb | the given SBML object. |
| unsigned int SBase_getColumn | ( | const SBase_t * | sb | ) |
Returns the column number on which the given object first appears in the XML representation of the SBML document.
| sb | the SBase_t structure |
| CVTerm_t* SBase_getCVTerm | ( | SBase_t * | sb, |
| unsigned int | n | ||
| ) |
| List_t* SBase_getCVTerms | ( | SBase_t * | sb | ) |
Returns a list of CVTerm objects in the annotations of this SBML object.
| sb | the object to getCVTerms from |
| SBase_t* SBase_getElementByMetaId | ( | SBase_t * | sb, |
| const char * | metaid | ||
| ) |
| SBase_t* SBase_getElementBySId | ( | SBase_t * | sb, |
| const char * | id | ||
| ) |
| SBase_t* SBase_getElementFromPluginsByMetaId | ( | SBase_t * | sb, |
| const char * | metaid | ||
| ) |
| SBase_t* SBase_getElementFromPluginsBySId | ( | SBase_t * | sb, |
| const char * | id | ||
| ) |
| const char* SBase_getElementName | ( | const SBase_t * | sb | ) |
Returns the XML element name of the given structure.
This is overridden by subclasses to return a string appropriate to the SBML component. For example, Model defines it as returning "model", CompartmentType defines it as returning "compartmentType", etc.
| sb | the SBase_t structure |
| unsigned int SBase_getLevel | ( | const SBase_t * | sb | ) |
Returns the SBML Level of the overall SBML document.
| sb | the SBase_t structure to query |
| unsigned int SBase_getLine | ( | const SBase_t * | sb | ) |
Returns the line number on which the given object first appears in the XML representation of the SBML document.
| sb | the SBase_t structure |
| const char* SBase_getMetaId | ( | SBase_t * | sb | ) |
Returns the value of the "metaid" attribute of the given SBase_t structure.
| sb | the SBase_t structure |
sb | const Model_t* SBase_getModel | ( | const SBase_t * | sb | ) |
Returns the Model_t structure in which the given instance is located.
| sb | the SBase_t structure |
| ModelHistory_t* SBase_getModelHistory | ( | SBase_t * | sb | ) |
Returns the ModelHistory of the given SBase_t structure.
| m | the SBase_t structure |
| XMLNode_t* SBase_getNotes | ( | SBase_t * | sb | ) |
Returns the notes from given SBML object.
| sb | the given SBML object. |
| char* SBase_getNotesString | ( | SBase_t * | sb | ) |
Returns the notes string from given SBML object.
The string is owned by the caller and should be freed (with free()) when no longer needed.
| sb | the given SBML object. |
| unsigned int SBase_getNumCVTerms | ( | SBase_t * | sb | ) |
Returns the number of CVTerm objects in the annotations of this SBML object.
| sb | the object to getCVTerms from |
| int SBase_getNumPlugins | ( | SBase_t * | sb | ) |
| const SBase_t* SBase_getParentSBMLObject | ( | SBase_t * | sb | ) |
Returns the parent SBase_t structure of the given SBase_t structure.
| sb | the SBase_t structure |
| SBasePlugin_t* SBase_getPlugin | ( | SBase_t * | sb, |
| const char * | package | ||
| ) |
| BiolQualifierType_t SBase_getResourceBiologicalQualifier | ( | SBase_t * | sb, |
| const char * | resource | ||
| ) |
Returns the BiologicalQualifier associated with this resource, BQB_UNKNOWN if the resource does not exist.
| sb | the object to query |
| resource | string representing the resource; e.g., "http://www.geneontology.org/#GO:0005892" |
| ModelQualifierType_t SBase_getResourceModelQualifier | ( | SBase_t * | sb, |
| const char * | resource | ||
| ) |
Returns the ModelQualifier associated with this resource, BQM_UNKNOWN if the resource does not exist.
| sb | the object to query |
| resource | string representing the resource; e.g., "http://www.geneontology.org/#GO:0005892" |
| const SBMLDocument_t* SBase_getSBMLDocument | ( | SBase_t * | sb | ) |
Returns the value of the "id" attribute of the given SBase_t structure.
| sb | the SBase_t structure |
sb Returns the value of the "name" attribute of the given SBase_t structure.| sb | the SBase_t structure |
sb Returns the parent SBMLDocument_t structure of the given SBase_t structure.| sb | the SBase_t structure |
| int SBase_getSBOTerm | ( | const SBase_t * | sb | ) |
Returns the integer portion of the value of the "sboTerm" attribute of the given SBase_t structure.
In SBML Level 2 Versions 2 and 3, the data type of the attribute is a string of the form SBO:NNNNNNN, where NNNNNNN is a seven digit integer number; libSBML simplifies the representation by only storing the NNNNNNN integer portion. Thus, in libSBML, the "sboTerm" attribute on SBase_t has data type int, and SBO identifiers are stored simply as integers. SBO terms are a type of optional annotation, and each different class of SBML object derived from SBase_t imposes its own requirements about the values permitted for "sboTerm". Please consult the SBML Level 2 Version 4 specification for more information about the use of SBO and the "sboTerm" attribute.
| sb | the SBase_t structure |
-1 if the value is not set. | char* SBase_getSBOTermID | ( | const SBase_t * | sb | ) |
Returns the string representation of the "sboTerm" attribute of this object.
In SBML Level 2 Versions 2, 3 and 4, the data type of the attribute is a string of the form SBO:NNNNNNN, where NNNNNNN is a seven digit integer number; libSBML simplifies the representation by only storing the NNNNNNN integer portion. Thus, in libSBML, the "sboTerm" attribute on SBase has data type int, and SBO identifiers are stored simply as integers. This function recreates the string representation from the stored value. SBO terms are a type of optional annotation, and each different class of SBML object derived from SBase imposes its own requirements about the values permitted for "sboTerm". Please consult the SBML Level 2 Version 4 specification for more information about the use of SBO and the "sboTerm" attribute.
NULL if the value is not set. | int SBase_getTypeCode | ( | const SBase_t * | sb | ) |
Returns the libSBML type code for this object.
This method MAY return the typecode of this SBML object or it MAY return SBML_UNKNOWN. That is, subclasses of SBase are not required to implement this method to return a typecode. This method is meant primarily for the LibSBML C interface where class and subclass information is not readily available.
| sb | the SBase_t structure |
| void* SBase_getUserData | ( | SBase_t * | sb | ) |
Returns the user data that has been previously set by setUserData().
| node | defines the node of interest. |
| unsigned int SBase_getVersion | ( | const SBase_t * | sb | ) |
Returns the Version within the SBML Level of the overall SBML document.
| sb | the SBase_t structure to query |
| int SBase_hasValidLevelVersionNamespaceCombination | ( | SBase_t * | sb | ) |
Predicate returning nonzero true or false depending on whether the object's level/version and namespace values correspond to a valid SBML specification.
The valid combinations of SBML Level, Version and Namespace as of this release of libSBML are the following:
| sb | the SBase_t structure |
| int SBase_isSetAnnotation | ( | const SBase_t * | sb | ) |
Predicate returning nonzero true or false depending on whether the given structure's "annotation" subelement is set.
| sb | the SBase_t structure to query |
| int SBase_isSetMetaId | ( | const SBase_t * | sb | ) |
Predicate returning nonzero true or false depending on whether the given structure's "metaid" attribute is set.
| sb | the SBase_t structure to query |
| int SBase_isSetModelHistory | ( | SBase_t * | sb | ) |
Predicate for testing whether the ModelHistory of a given SBase_t structure is assigned.
| m | the SBase_t structure |
| int SBase_isSetNotes | ( | const SBase_t * | sb | ) |
Predicate returning nonzero true or false depending on whether the given structure's "id" attribute is set.
| sb | the SBase_t structure to query |
| sb | the SBase_t structure to query |
| sb | the SBase_t structure to query |
| int SBase_isSetSBOTerm | ( | const SBase_t * | sb | ) |
Predicate returning nonzero true or false depending on whether the given structure's "sboTerm" attribute is set.
| sb | the SBase_t structure to query |
| void SBase_renameMetaIdRefs | ( | SBase_t * | sb, |
| const char * | oldid, | ||
| const char * | newid | ||
| ) |
| void SBase_renameSIdRefs | ( | SBase_t * | sb, |
| const char * | oldid, | ||
| const char * | newid | ||
| ) |
| void SBase_renameUnitSIdRefs | ( | SBase_t * | sb, |
| const char * | oldid, | ||
| const char * | newid | ||
| ) |
| int SBase_setAnnotation | ( | SBase_t * | sb, |
| XMLNode_t * | annotation | ||
| ) |
Sets the annotation for the given SBML object.
| sb | the given SBML object. |
| annotation | the XMLNode_t structure respresenting the annotation. |
| int SBase_setAnnotationString | ( | SBase_t * | sb, |
| char * | annotation | ||
| ) |
Sets the annotation for the given SBML object.
| sb | the given SBML object. |
| annotation | the string (const char*) respresenting the annotation. |
| int SBase_setMetaId | ( | SBase_t * | sb, |
| const char * | metaid | ||
| ) |
Sets the value of the "metaid" attribute of the given object.
The string metaid is copied. The value of metaid must be an identifier conforming to the syntax defined by the XML 1.0 data type ID. Among other things, this type requires that a value is unique among all the values of type XML ID in an SBMLDocument. Although SBML only uses XML ID for the "metaid" attribute, callers should be careful if they use XML ID's in XML portions of a model that are not defined by SBML, such as in the application-specific content of the "annotation" subelement.
| sb | the SBase_t structure |
| metaid | the identifier string to use as the value of the "metaid" attribute |
| int SBase_setModelHistory | ( | SBase_t * | sb, |
| ModelHistory_t * | history | ||
| ) |
Set the ModelHistory of the given SBase_t structure.
| m | the SBase_t structure |
| history | the ModelHistory_t structure |
| int SBase_setNamespaces | ( | SBase_t * | sb, |
| XMLNamespaces_t * | xmlns | ||
| ) |
Sets the namespaces relevant of this SBML object.
| sb | the SBase_t structure |
| xmlns | the namespaces to set |
| int SBase_setNotes | ( | SBase_t * | sb, |
| XMLNode_t * | notes | ||
| ) |
Sets the notes for the given SBML object.
| sb | the given SBML object. |
| notes | the XMLNode_t structure respresenting the notes. |
| int SBase_setNotesString | ( | SBase_t * | sb, |
| char * | notes | ||
| ) |
Sets the notes for the given SBML object.
| sb | the given SBML object. |
| notes | the string (const char*) respresenting the notes. |
| int SBase_setSBOTerm | ( | SBase_t * | sb, |
| int | value | ||
| ) |
Sets the value of the "id" attribute of this SBML object.
The string sid is copied. Note that SBML has strict requirements for the syntax of identifiers. The following is summary of the definition of the SBML identifier type SId (here expressed in an extended form of BNF notation):
// * letter ::= 'a'..'z','A'..'Z' // * digit ::= '0'..'9' // * idChar ::= letter | digit | '_' // * SId ::= ( letter | '_' ) idChar* // *
The equality of SBML identifiers is determined by an exact character sequence match; i.e., comparisons must be performed in a case-sensitive manner. In addition, there are a few conditions for the uniqueness of identifiers in an SBML model. Please consult the SBML specifications for the exact formulations.
| sb | the SBase_t structure |
| sid | the string to use as the identifier of this object |
The string in name is copied.
| sb | the SBase_t structure |
| name | the new name for the object |
In SBML Level 2 Versions 2, 3 and 4, the data type of the SBML "sboTerm" attribute is a string of the form SBO:NNNNNNN, where NNNNNNN is a seven digit integer number; libSBML simplifies the representation by only storing the NNNNNNN integer portion. Thus, in libSBML, the "sboTerm" attribute on SBase_t has data type int, and SBO identifiers are stored simply as integers. SBO terms are a type of optional annotation, and each different class of SBML object derived from SBase_t imposes its own requirements about the values permitted for "sboTerm". Please consult the SBML Level 2 Version 4 specification for more information about the use of SBO and the "sboTerm" attribute.
| sb | the SBase_t structure |
| value | the NNNNNNN integer portion of the SBO identifier |
| int SBase_setSBOTermID | ( | SBase_t * | sb, |
| const char * | sboid | ||
| ) |
| int SBase_setUserData | ( | SBase_t * | sb, |
| void * | userData | ||
| ) |
Sets the user data of this node.
This can be used by the application developer to attach custom information to the node. In case of a deep copy this attribute will passed as it is. The attribute will be never interpreted by this class.
| node | defines the node of which the user data should be set. |
| userData | specifies the new user data. |
| int SBase_unsetAnnotation | ( | SBase_t * | sb | ) |
Unsets the "annotation" subelement of the given object.
| sb | the SBase_t structure |
| int SBase_unsetCVTerms | ( | SBase_t * | sb | ) |
Clears the list of CVTerms of this SBML object.
| sb | the object to clear CVTerms from |
| int SBase_unsetId | ( | SBase_t * | sb | ) |
| int SBase_unsetMetaId | ( | SBase_t * | sb | ) |
Unsets the "metaid" attribute of the given object.
| sb | the SBase_t structure |
| int SBase_unsetModelHistory | ( | SBase_t * | sb | ) |
Unsets the ModelHistory of the given SBase_t structure.
| m | the SBase_t structure |
| int SBase_unsetNotes | ( | SBase_t * | sb | ) |
Unsets the "name" attribute of the given object.
| sb | the SBase_t structure |
| sb | the SBase_t structure |
| int SBase_unsetSBOTerm | ( | SBase_t * | sb | ) |
Unsets the "sboTerm" attribute of the given object.
| sb | the SBase_t structure |