libSBML C API  5.18.0
SBase_t Class Reference

Detailed Description

SBML's SBase class, base class of most SBML objects.

Most components in SBML are derived from a single abstract base type, SBase_t. In addition to serving as the parent class for most other classes of objects in SBML, this base type is designed to allow a modeler or a software package to attach arbitrary information to each major element or list in an SBML model.

SBase_t has an optional subelement called "notes". It is intended to serve as a place for storing optional information intended to be seen by humans. An example use of the "notes" element would be to contain formatted user comments about the model element in which the "notes" element is enclosed. There are certain conditions on the XHTML content permitted inside the "notes" element; please consult the SBML specification document corresponding to the SBML Level and Version of your model for more information about the requirements for "notes" content.

SBase_t has another optional subelement called "annotation". Whereas the "notes" element described above is a container for content to be shown directly to humans, the "annotation" element is a container for optional software-generated content not meant to be shown to humans. The element's content type is XML type "any", allowing essentially arbitrary data content. SBML places only a few restrictions on the organization of the content; these are intended to help software tools read and write the data as well as help reduce conflicts between annotations added by different tools. As is the case with "notes", it is important to refer to the SBML specification document corresponding to the SBML Level and Version of your model for more information about the requirements for "annotation" content.

It is worth pointing out that the "annotation" element in the definition of SBase_t exists in order that software developers may attach optional application-specific data to the elements in an SBML model. However, it is important that this facility not be misused. In particular, it is critical that data essential to a model definition or that can be encoded in existing SBML elements is not stored in "annotation". Parameter_t values, functional dependencies between model elements, etc., should not be recorded as annotations. It is crucial to keep in mind the fact that data placed in annotations can be freely ignored by software applications. If such data affects the interpretation of a model, then software interoperability is greatly impeded.

SBML Level 2 introduced an optional SBase_t attribute named "metaid" for supporting metadata annotations using RDF (Resource Description Format). The attribute value has the data type XML ID, the XML identifier type, which means each "metaid" value must be globally unique within an SBML file. (Importantly, this uniqueness criterion applies across any attribute with type XML ID, not just the "metaid" attribute used by SBML—something to be aware of if your application-specific XML content inside the "annotation" subelement happens to use XML ID.) The "metaid" value serves to identify a model component for purposes such as referencing that component from metadata placed within "annotation" subelements.

Beginning with SBML Level 2 Version 2, SBase_t has an optional attribute named "sboTerm" for supporting the use of the Systems Biology Ontology. In SBML proper, the data type of the attribute is a string of the form "SBO_t: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_t identifiers are stored simply as integers. (For convenience, SBase_t offers methods for returning both the integer form and a text-string form of the SBO_t identifier.) SBO_t 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". More details can be found in SBML specifications for Level 2 Version 2 and above.

Finally, note that, in the list of methods on SBase_t, there is no public constructor because SBase_t is an abstract class. The constructors reside in the subclasses derived from SBase_t.

Standard format for annotations linking data resources

SBML Level 2 Versions 2, 3 and 4, and Level 3, define a proposed regular format for encoding two particular categories of annotations: (a) references to controlled vocabulary terms and database identifiers which define and describe biological and biochemical entities in a model; and (b) descriptions of the provenance of a model, including its author(s) and modification history.

Examples:
addCVTerms.c, addingEvidenceCodes_1.c, addingEvidenceCodes_2.c, appendAnnotation.c, createExampleSBML.c, printAnnotation.c, printNotes.c, spec_example1.c, unsetAnnotation.c, and unsetNotes.c.

Public Member Functions

int SBase_addCVTerm (SBase_t *sb, CVTerm_t *term)
 Adds a copy of the given CVTerm_t to this SBML structure. More...
 
int SBase_addCVTermNewBag (SBase_t *sb, CVTerm_t *term)
 Adds a copy of the given CVTerm_t to this SBML structure creating a new bBag element with the same identifier. More...
 
int SBase_appendAnnotation (SBase_t *sb, XMLNode_t *annotation)
 Appends the annotation for the given SBML structure. More...
 
int SBase_appendAnnotationString (SBase_t *sb, const char *annotation)
 Appends the annotation for the given SBML structure. More...
 
int SBase_appendNotes (SBase_t *sb, XMLNode_t *notes)
 Appends the notes for the given SBML structure. More...
 
int SBase_appendNotesString (SBase_t *sb, const char *notes)
 Appends the notes for the given SBML structure. More...
 
List_tSBase_getAllElements (SBase_t *sb)
 Returns a List_t structure of all child SBase_t structures, including those nested to an arbitrary depth. More...
 
List_tSBase_getAllElementsFromPlugins (SBase_t *sb)
 Returns a List_t of all child SBase_t structures contained in SBML package plug-ins. More...
 
const SBase_tSBase_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. More...
 
XMLNode_tSBase_getAnnotation (SBase_t *sb)
 Returns the annotation from given SBML structure. More...
 
char * SBase_getAnnotationString (SBase_t *sb)
 Returns the annotation string from given SBML structure. More...
 
unsigned int SBase_getColumn (const SBase_t *sb)
 Returns the column number on which the given structure first appears in the XML representation of the SBML document, or 0 if the object was created, not read from a file. More...
 
CVTerm_tSBase_getCVTerm (SBase_t *sb, unsigned int n)
 Returns the nth CVTerm_t in the list of CVTerm_t's of this SBML structure. More...
 
List_tSBase_getCVTerms (SBase_t *sb)
 Returns a list of CVTerm_t structures in the annotations of this SBML structure. More...
 
SBase_tSBase_getElementByMetaId (SBase_t *sb, const char *metaid)
 Returns the first child element it can find with a specific "metaid" attribute value, or NULL if no such structure is found. More...
 
SBase_tSBase_getElementBySId (SBase_t *sb, const char *id)
 Returns the first child element found that has the given id in the model-wide SId namespace, or NULL if no such structure is found. More...
 
SBase_tSBase_getElementFromPluginsByMetaId (SBase_t *sb, const char *metaid)
 Returns the first child element it can find with the given metaid from all plug-ins associated with this element, or NULL if no such structure is found. More...
 
SBase_tSBase_getElementFromPluginsBySId (SBase_t *sb, const char *id)
 Returns the first child element found that has the given id in the model-wide SId namespace from all plug-ins associated with this element, or NULL if no such structure is found. More...
 
const char * SBase_getElementName (const SBase_t *sb)
 Returns the XML element name of the given structure. More...
 
const char * SBase_getIdAttribute (SBase_t *sb)
 Returns the value of the "id" attribute of the given SBase_t structure. More...
 
unsigned int SBase_getLevel (const SBase_t *sb)
 Returns the SBML Level of the overall SBML document. More...
 
unsigned int SBase_getLine (const SBase_t *sb)
 Returns the line number on which the given structure first appears in the XML representation of the SBML document, or 0 if the object was created, not read from a file. More...
 
const char * SBase_getMetaId (SBase_t *sb)
 Returns the value of the "metaid" attribute of the given SBase_t structure. More...
 
const Model_tSBase_getModel (const SBase_t *sb)
 Returns the Model_t structure in which the given instance is located. More...
 
ModelHistory_tSBase_getModelHistory (SBase_t *sb)
 Returns the ModelHistory_t of the given SBase_t structure. More...
 
const char * SBase_getName (SBase_t *sb)
 Returns the value of the "name" attribute of the given SBase_t structure. More...
 
XMLNode_tSBase_getNotes (SBase_t *sb)
 Returns the notes from given SBML structure. More...
 
char * SBase_getNotesString (SBase_t *sb)
 Returns the notes string from given SBML structure. More...
 
unsigned int SBase_getNumCVTerms (SBase_t *sb)
 Returns the number of CVTerm_t structures in the annotations of this SBML structure. More...
 
int SBase_getNumPlugins (SBase_t *sb)
 Returns the number of plug-in structures (extenstion interfaces) for SBML Level 3 package extensions known. More...
 
char * SBase_getPackageName (const SBaseExtensionPoint_t *sb)
 Returns the package name for the given SBase_t structure. More...
 
const SBase_tSBase_getParentSBMLObject (SBase_t *sb)
 Returns the parent SBase_t structure of the given SBase_t structure. More...
 
SBasePlugin_tSBase_getPlugin (SBase_t *sb, const char *package)
 Returns a plug-in structure (extension interface) for an SBML Level 3 package extension with the given package name or URI. More...
 
BiolQualifierType_t SBase_getResourceBiologicalQualifier (SBase_t *sb, const char *resource)
 Returns the Biological Qualifier associated with this resource, BQB_UNKNOWN if the resource does not exist. More...
 
ModelQualifierType_t SBase_getResourceModelQualifier (SBase_t *sb, const char *resource)
 Returns the Model_t Qualifier associated with this resource, BQM_UNKNOWN if the resource does not exist. More...
 
const SBMLDocument_tSBase_getSBMLDocument (SBase_t *sb)
 Returns the parent SBMLDocument_t structure of the given SBase_t structure. More...
 
int SBase_getSBOTerm (const SBase_t *sb)
 Returns the integer portion of the value of the "sboTerm" attribute of the given SBase_t structure. More...
 
char * SBase_getSBOTermAsURL (const SBase_t *sb)
 Returns the identifiers.org URL representation of the "sboTerm" attribute of this structure. More...
 
char * SBase_getSBOTermID (const SBase_t *sb)
 Returns the string representation of the "sboTerm" attribute of this structure. More...
 
int SBase_getTypeCode (const SBase_t *sb)
 Returns the libSBML type code for this structure. More...
 
void * SBase_getUserData (const SBase_t *sb)
 Returns the user data that has been previously set by setUserData(). More...
 
unsigned int SBase_getVersion (const SBase_t *sb)
 Returns the Version within the SBML Level of the overall SBML document. More...
 
int SBase_hasValidLevelVersionNamespaceCombination (SBase_t *sb)
 Predicate returning 1 (true) or 0 (false) depending on whether the structure's level/version and namespace values correspond to a valid SBML specification. More...
 
int SBase_isSetAnnotation (const SBase_t *sb)
 Predicate returning 1 (true) or 0 (false) depending on whether the given structure's "annotation" subelement is set. More...
 
int SBase_isSetIdAttribute (const SBase_t *sb)
 Predicate returning 1 (true) or 0 (false) depending on whether the given structure's "id" attribute is set. More...
 
int SBase_isSetMetaId (const SBase_t *sb)
 Predicate returning 1 (true) or 0 (false) depending on whether the given structure's "metaid" attribute is set. More...
 
int SBase_isSetModelHistory (SBase_t *sb)
 Predicate for testing whether the ModelHistory_t of a given SBase_t structure is assigned. More...
 
int SBase_isSetName (const SBase_t *sb)
 Predicate returning 1 (true) or 0 (false) depending on whether the given structure's "name" attribute is set. More...
 
int SBase_isSetNotes (const SBase_t *sb)
 Predicate returning 1 (true) or 0 (false) depending on whether the given structure's "notes" subelement is set. More...
 
int SBase_isSetSBOTerm (const SBase_t *sb)
 Predicate returning 1 (true) or 0 (false) depending on whether the given structure's "sboTerm" attribute is set. More...
 
int SBase_isSetUserData (const SBase_t *sb)
 Predicate returning 1 (true) or 0 (false) depending on whether the structure's user data object has been set. More...
 
int SBase_removeTopLevelAnnotationElement (SBase_t *sb, const char *name)
 Removes the top-level element within the "annotation" subelement of this SBML structure with the given name. More...
 
int SBase_removeTopLevelAnnotationElementWithURI (SBase_t *sb, const char *name, const char *uri)
 Removes the top-level element within the "annotation" subelement of this SBML structure with the given name and URI. More...
 
void SBase_renameMetaIdRefs (SBase_t *sb, const char *oldid, const char *newid)
 Renames all the meta-identifier attributes on this element. More...
 
void SBase_renameSIdRefs (SBase_t *sb, const char *oldid, const char *newid)
 Renames all the SIdRef attributes on this element, including any found in MathML content (if such exists). More...
 
void SBase_renameUnitSIdRefs (SBase_t *sb, const char *oldid, const char *newid)
 Renames all the UnitSIdRef attributes on this element. More...
 
int SBase_replaceTopLevelAnnotationElement (SBase_t *sb, XMLNode_t *annotation)
 Replaces the given top-level element within the "annotation" subelement of this SBML structure and with the annotation element supplied. More...
 
int SBase_replaceTopLevelAnnotationElementString (SBase_t *sb, const char *annotation)
 Replaces the given top-level element within the "annotation" subelement of this SBML structure and with the annotation element supplied. More...
 
int SBase_setAnnotation (SBase_t *sb, XMLNode_t *annotation)
 Sets the annotation for the given SBML structure. More...
 
int SBase_setAnnotationString (SBase_t *sb, const char *annotation)
 Sets the annotation for the given SBML structure. More...
 
int SBase_setIdAttribute (SBase_t *sb, const char *id)
 Sets the value of the "id" attribute of the given structure. More...
 
int SBase_setMetaId (SBase_t *sb, const char *metaid)
 Sets the value of the "metaid" attribute of the given structure. More...
 
int SBase_setModelHistory (SBase_t *sb, ModelHistory_t *history)
 Set the ModelHistory_t of the given SBase_t structure. More...
 
int SBase_setName (SBase_t *sb, const char *name)
 Sets the value of the "name" attribute of the given structure. More...
 
int SBase_setNamespaces (SBase_t *sb, XMLNamespaces_t *xmlns)
 Sets the namespaces relevant of this SBML structure. More...
 
int SBase_setNotes (SBase_t *sb, XMLNode_t *notes)
 Sets the notes for the given SBML structure. More...
 
int SBase_setNotesString (SBase_t *sb, const char *notes)
 Sets the notes for the given SBML structure. More...
 
int SBase_setNotesStringAddMarkup (SBase_t *sb, const char *notes)
 Sets the notes for the given SBML structure. More...
 
int SBase_setSBOTerm (SBase_t *sb, int value)
 Sets the value of the "sboTerm" attribute. More...
 
int SBase_setSBOTermID (SBase_t *sb, const char *sboid)
 Sets the value of the "sboTerm" attribute by string. More...
 
int SBase_setUserData (SBase_t *sb, void *userData)
 Sets the user data of this node. More...
 
int SBase_unsetAnnotation (SBase_t *sb)
 Unsets the "annotation" subelement of the given structure. More...
 
int SBase_unsetCVTerms (SBase_t *sb)
 Clears the list of CVTerm_t's of this SBML structure. More...
 
int SBase_unsetIdAttribute (SBase_t *sb)
 Unsets the "id" attribute of the given structure. More...
 
int SBase_unsetMetaId (SBase_t *sb)
 Unsets the "metaid" attribute of the given structure. More...
 
int SBase_unsetModelHistory (SBase_t *sb)
 Unsets the ModelHistory_t of the given SBase_t structure. More...
 
int SBase_unsetName (SBase_t *sb)
 Unsets the "name" attribute of the given structure. More...
 
int SBase_unsetNotes (SBase_t *sb)
 Unsets the "notes" subelement of the given structure. More...
 
int SBase_unsetSBOTerm (SBase_t *sb)
 Unsets the "sboTerm" attribute of the given structure. More...
 
int SBase_unsetUserData (SBase_t *sb)
 Unsets the user data of this node. More...
 

Member Function Documentation

int SBase_addCVTerm ( SBase_t sb,
CVTerm_t term 
)

Adds a copy of the given CVTerm_t to this SBML structure.

Parameters
sbthe structure to add the CVTerm_t to.
termthe CVTerm_t to assign.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
Note
The annotation constructed from a CVTerm_t uses the metaid of the structure to identify it. Adding a CVTerm_t to an structure where the 'metaId' attribute has not been set will fail with the return value LIBSBML_UNEXPECTED_ATTRIBUTE.
Examples:
addCVTerms.c, addingEvidenceCodes_1.c, and addingEvidenceCodes_2.c.
int SBase_addCVTermNewBag ( SBase_t sb,
CVTerm_t term 
)

Adds a copy of the given CVTerm_t to this SBML structure creating a new bBag element with the same identifier.

Parameters
sbthe structure to add the CVTerm_t to.
termthe CVTerm_t to assign.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
Note
The annotation constructed from a CVTerm_t uses the metaid of the structure to identify it. Adding a CVTerm_t to an structure where the 'metaId' attribute has not been set will fail with the return value LIBSBML_UNEXPECTED_ATTRIBUTE.
int SBase_appendAnnotation ( SBase_t sb,
XMLNode_t annotation 
)

Appends the annotation for the given SBML structure.

Parameters
sbthe given SBML structure.
annotationthe XMLNode_t structure representing the annotation.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
Examples:
addingEvidenceCodes_2.c.
int SBase_appendAnnotationString ( SBase_t sb,
const char *  annotation 
)

Appends the annotation for the given SBML structure.

Parameters
sbthe given SBML structure.
annotationthe string representing the annotation.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
Examples:
appendAnnotation.c.
int SBase_appendNotes ( SBase_t sb,
XMLNode_t notes 
)

Appends the notes for the given SBML structure.

Parameters
sbthe given SBML structure.
notesthe XMLNode_t structure representing the notes.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int SBase_appendNotesString ( SBase_t sb,
const char *  notes 
)

Appends the notes for the given SBML structure.

Parameters
sbthe given SBML structure.
notesthe string representing the notes.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
List_t * SBase_getAllElements ( SBase_t sb)

Returns a List_t structure of all child SBase_t structures, including those nested to an arbitrary depth.

Parameters
sbthe SBase_t structure in question.
Returns
a pointer to a List_t of pointers to all children structures.
List_t * SBase_getAllElementsFromPlugins ( SBase_t sb)

Returns a List_t of all child SBase_t structures contained in SBML package plug-ins.

SBML Level 3 consists of a Core definition that can be extended via optional SBML Level 3 packages. A given model may indicate that it uses one or more SBML packages, and likewise, a software tool may be able to support one or more packages. LibSBML does not come preconfigured with all possible packages included and enabled, in part because not all package specifications have been finalized. To support the ability for software systems to enable support for the Level 3 packages they choose, libSBML features a plug-in mechanism. Each SBML Level 3 package is implemented in a separate code plug-in that can be enabled by the application to support working with that SBML package. A given SBML model may thus contain not only objects defined by SBML Level 3 Core, but also objects created by libSBML plug-ins supporting additional Level 3 packages.

This method walks down the list of all SBML Level 3 packages used by this structure and returns all child structures defined by those packages.

Parameters
sbthe SBase_t structure in question.
Returns
a pointer to a List_t of pointers to all children structures from plug-ins.
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 structure to determine its exact location/function within a model. For example a StoichiometryMath_t structure has ancestors of type SpeciesReference_t, ListOf_t(Products/Reactants), Reaction_t, ListOfReactions_t and Model_t; any of which can be accessed via this function.

Parameters
sbthe SBase_t structure.
typethe typecode (int) of the structure to be returned.
pkgNamethe name of the package that defines the type .
Returns
the ancestor SBase_t structure of this SBML structure with the corresponding typecode (int), NULL if there is no ancestor of this type.
XMLNode_t * SBase_getAnnotation ( SBase_t sb)

Returns the annotation from given SBML structure.

Parameters
sbthe given SBML structure.
Returns
the XMLNode_t structure representing the annotation from this structure.
char * SBase_getAnnotationString ( SBase_t sb)

Returns the annotation string from given SBML structure.

The string is owned by the caller and should be freed (with free()) when no longer needed.

Parameters
sbthe given SBML structure.
Returns
the string (char*) representing the annotation from this structure.
Examples:
printAnnotation.c.
unsigned int SBase_getColumn ( const SBase_t sb)

Returns the column number on which the given structure first appears in the XML representation of the SBML document, or 0 if the object was created, not read from a file.

Parameters
sbthe SBase_t structure.
Returns
the column number of this SBML structure, or 0 if no such value.
See also
SBase_getLine().
CVTerm_t * SBase_getCVTerm ( SBase_t sb,
unsigned int  n 
)

Returns the nth CVTerm_t in the list of CVTerm_t's of this SBML structure.

Parameters
sbthe structure to get CVTerm_t's from.
nunsigned int the index of the CVTerm_t to retrieve.
Returns
the nth CVTerm_t in the list of CVTerm_t's for this SBML structure. If the index n is invalid, NULL is returned.
List_t * SBase_getCVTerms ( SBase_t sb)

Returns a list of CVTerm_t structures in the annotations of this SBML structure.

Parameters
sbthe structure to getCVTerms from.
Returns
the list of CVTerms for this SBML structure.
SBase_t * SBase_getElementByMetaId ( SBase_t sb,
const char *  metaid 
)

Returns the first child element it can find with a specific "metaid" attribute value, or NULL if no such structure is found.

The optional attribute named "metaid", present on every major SBML component type, is for supporting metadata annotations using RDF (Resource Description Format). The attribute value has the data type XML ID, the XML identifier type, which means each "metaid" value must be globally unique within an SBML file. The latter point is important, because the uniqueness criterion applies across any attribute with type ID anywhere in the file, not just the "metaid" attribute used by SBML—something to be aware of if your application-specific XML content inside the "annotation" subelement happens to use the XML ID type. Although SBML itself specifies the use of XML ID only for the "metaid" attribute, SBML-compatible applications 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. Finally, note that LibSBML does not provide an explicit XML ID data type; it uses ordinary character strings, which is easier for applications to support.
Parameters
sbthe SBase_t structure in question.
metaidstring representing the "metaid" attribute value of the structure to find.
Returns
pointer to the first element found with the given meta-identifier.
SBase_t * SBase_getElementBySId ( SBase_t sb,
const char *  id 
)

Returns the first child element found that has the given id in the model-wide SId namespace, or NULL if no such structure is found.

Parameters
sbthe SBase_t structure in question.
idstring representing the "id" attribute value of the structure to find.
Returns
pointer to the first element found with the given identifier.
SBase_t * SBase_getElementFromPluginsByMetaId ( SBase_t sb,
const char *  metaid 
)

Returns the first child element it can find with the given metaid from all plug-ins associated with this element, or NULL if no such structure is found.

Parameters
sbthe SBase_t structure in question.
metaidstring representing the metaid of structures to find.
Returns
pointer to the first element found with the given metaid.
SBase_t * SBase_getElementFromPluginsBySId ( SBase_t sb,
const char *  id 
)

Returns the first child element found that has the given id in the model-wide SId namespace from all plug-ins associated with this element, or NULL if no such structure is found.

Parameters
sbthe SBase_t structure in question.
idstring representing the id of structures to find.
Returns
pointer to the first element found with the given 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_t defines it as returning "model", CompartmentType_t defines it as returning "compartmentType", etc.

Parameters
sbthe SBase_t structure.
See also
SBase_getPackageName()
SBase_getTypeCode()
Examples:
printAnnotation.c, and printNotes.c.
const char * SBase_getIdAttribute ( SBase_t sb)

Returns the value of the "id" attribute of the given SBase_t structure.

Parameters
sbthe SBase_t structure
Returns
the value of the "id" attribute of sb
unsigned int SBase_getLevel ( const SBase_t sb)

Returns the SBML Level of the overall SBML document.

Parameters
sbthe SBase_t structure to query.
Returns
the SBML level of the given structure.
See also
SBase_getVersion()
unsigned int SBase_getLine ( const SBase_t sb)

Returns the line number on which the given structure first appears in the XML representation of the SBML document, or 0 if the object was created, not read from a file.

Parameters
sbthe SBase_t structure.
Returns
the line number of the given structure, or 0 if no such value.
See also
SBase_getColumn().
const char * SBase_getMetaId ( SBase_t sb)

Returns the value of the "metaid" attribute of the given SBase_t structure.

Parameters
sbthe SBase_t structure.
Returns
the value of the "metaid" attribute of sb
Examples:
addingEvidenceCodes_2.c.
const Model_t * SBase_getModel ( const SBase_t sb)

Returns the Model_t structure in which the given instance is located.

Parameters
sbthe SBase_t structure.
Returns
the parent Model_t structure of the given structure.
ModelHistory_t * SBase_getModelHistory ( SBase_t sb)

Returns the ModelHistory_t of the given SBase_t structure.

Returns
the ModelHistory_t of the given SBase_t structure.
Parameters
sbthe SBase_t structure.
const char * SBase_getName ( SBase_t sb)

Returns the value of the "name" attribute of the given SBase_t structure.

Parameters
sbthe SBase_t structure
Returns
the value of the "name" attribute of sb
XMLNode_t * SBase_getNotes ( SBase_t sb)

Returns the notes from given SBML structure.

Parameters
sbthe given SBML structure.
Returns
the XMLNode_t structure representing the notes from this structure.
char * SBase_getNotesString ( SBase_t sb)

Returns the notes string from given SBML structure.

The string is owned by the caller and should be freed (with free()) when no longer needed.

Parameters
sbthe given SBML structure.
Returns
the string (char*) representing the notes from this structure.
Examples:
printNotes.c.
unsigned int SBase_getNumCVTerms ( SBase_t sb)

Returns the number of CVTerm_t structures in the annotations of this SBML structure.

Parameters
sbthe structure to getCVTerms from.
Returns
the number of CVTerms for this SBML structure.
int SBase_getNumPlugins ( SBase_t sb)

Returns the number of plug-in structures (extenstion interfaces) for SBML Level 3 package extensions known.

SBML Level 3 consists of a Core definition that can be extended via optional SBML Level 3 packages. A given model may indicate that it uses one or more SBML packages, and likewise, a software tool may be able to support one or more packages. LibSBML does not come preconfigured with all possible packages included and enabled, in part because not all package specifications have been finalized. To support the ability for software systems to enable support for the Level 3 packages they choose, libSBML features a plug-in mechanism. Each SBML Level 3 package is implemented in a separate code plug-in that can be enabled by the application to support working with that SBML package. A given SBML model may thus contain not only objects defined by SBML Level 3 Core, but also objects created by libSBML plug-ins supporting additional Level 3 packages.
Parameters
sbthe SBase_t structure to query.
Returns
the number of plug-in structures (extension interfaces) of package extensions known by this instance of libSBML.
char * SBase_getPackageName ( const SBaseExtensionPoint_t sb)

Returns the package name for the given SBase_t structure.

Parameters
sbthe SBase_t structure.
Returns
the package name for the given SBase_t structure or NULL.
See also
SBase_getElementName()
SBase_getTypeCode()
const SBase_t * SBase_getParentSBMLObject ( SBase_t sb)

Returns the parent SBase_t structure of the given SBase_t structure.

Parameters
sbthe SBase_t structure.
Returns
the parent SBase_t of this SBML structure.
SBasePlugin_t * SBase_getPlugin ( SBase_t sb,
const char *  package 
)

Returns a plug-in structure (extension interface) for an SBML Level 3 package extension with the given package name or URI.

The returned plug-in will be the appropriate type of plugin requested: calling SBase_getPlugin(model, "fbc") will return an FbcModelPlugin_t; calling SBase_getPlugin(parameter, "comp") will return CompSBasePlugin_t, etc.

If no such plugin exists, NULL is returned.

SBML Level 3 consists of a Core definition that can be extended via optional SBML Level 3 packages. A given model may indicate that it uses one or more SBML packages, and likewise, a software tool may be able to support one or more packages. LibSBML does not come preconfigured with all possible packages included and enabled, in part because not all package specifications have been finalized. To support the ability for software systems to enable support for the Level 3 packages they choose, libSBML features a plug-in mechanism. Each SBML Level 3 package is implemented in a separate code plug-in that can be enabled by the application to support working with that SBML package. A given SBML model may thus contain not only objects defined by SBML Level 3 Core, but also objects created by libSBML plug-ins supporting additional Level 3 packages.
Parameters
sbthe SBase_t structure.
packagethe name or URI of the package.
Returns
the plug-in structure (the libSBML extension interface) of a package extension with the given package name or URI.
Examples:
spec_example1.c.
BiolQualifierType_t SBase_getResourceBiologicalQualifier ( SBase_t sb,
const char *  resource 
)

Returns the Biological Qualifier associated with this resource, BQB_UNKNOWN if the resource does not exist.

Parameters
sbthe structure to query.
resourcestring representing the resource; e.g., "http://www.geneontology.org/#GO:0005892".
Returns
the BiolQualifierType_t associated with the resource
ModelQualifierType_t SBase_getResourceModelQualifier ( SBase_t sb,
const char *  resource 
)

Returns the Model_t Qualifier associated with this resource, BQM_UNKNOWN if the resource does not exist.

Parameters
sbthe structure to query.
resourcestring representing the resource; e.g., "http://www.geneontology.org/#GO:0005892".
Returns
the ModelQualifierType_t associated with the resource
const SBMLDocument_t * SBase_getSBMLDocument ( SBase_t sb)

Returns the parent SBMLDocument_t structure of the given SBase_t structure.

Parameters
sbthe SBase_t structure.
Returns
the parent SBMLDocument_t of this SBML 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.

Beginning with SBML Level 2 Version 2, objects derived from SBase_t have an optional attribute named "sboTerm" for supporting the use of the Systems Biology Ontology. In SBML proper, the data type of the attribute is a string of the form "SBO_t: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_t identifiers are stored simply as integers.
SBO_t 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". More details can be found in SBML specifications for Level 2 Version 2 and above.
Parameters
sbthe SBase_t structure.
Returns
the value of the "sboTerm" attribute as an integer, or -1 if the value is not set.
char * SBase_getSBOTermAsURL ( const SBase_t sb)

Returns the identifiers.org URL representation of the "sboTerm" attribute of this structure.

Returns
the value of the "sboTerm" attribute as a string of the form http://identifiers.org/biomodels.sbo/SBO_t:NNNNNNN, or NULL if the value is not set.
char * SBase_getSBOTermID ( const SBase_t sb)

Returns the string representation of the "sboTerm" attribute of this structure.

Beginning with SBML Level 2 Version 2, objects derived from SBase_t have an optional attribute named "sboTerm" for supporting the use of the Systems Biology Ontology. In SBML proper, the data type of the attribute is a string of the form "SBO_t: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_t identifiers are stored simply as integers.
SBO_t 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". More details can be found in SBML specifications for Level 2 Version 2 and above.
Returns
the value of the "sboTerm" attribute as a string of the form SBO_t:NNNNNNN, or NULL if the value is not set.
int SBase_getTypeCode ( const SBase_t sb)

Returns the libSBML type code for this structure.

This method MAY return the typecode of this SBML structure or it MAY return SBML_UNKNOWN. That is, subclasses of SBase_t 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.

Note
In libSBML 5, the type of return value has been changed from typecode (int) to int. The return value is one of enum values defined for each package. For example, return values will be one of typecode (int) if this structure is defined in SBML core package, return values will be one of SBMLLayoutTypeCode_t if this structure is defined in Layout_t extension (i.e. similar enum types are defined in each package extension for each SBase_t subclass) The value of each typecode can be duplicated between those of different packages. Thus, to distinguish the typecodes of different packages, not only the return value of SBase_getTypeCode() but also that of SBase_getPackageName() must be checked.
Parameters
sbthe SBase_t structure.
Returns
the typecode (int value) of this SBML structure or SBML_UNKNOWN (default).
See also
SBase_getElementName()
SBase_getPackageName()
void * SBase_getUserData ( const SBase_t sb)

Returns the user data that has been previously set by setUserData().

Parameters
sbthe SBase_t structure in question.
Returns
the user data of this node. NULL if no user data has been.
See also
SBase_setUserData
unsigned int SBase_getVersion ( const SBase_t sb)

Returns the Version within the SBML Level of the overall SBML document.

Parameters
sbthe SBase_t structure to query.
Returns
the SBML version of the given structure.
See also
SBase_getLevel()
int SBase_hasValidLevelVersionNamespaceCombination ( SBase_t sb)

Predicate returning 1 (true) or 0 (false) depending on whether the structure'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:

  • Level 1 Version 2 "http://www.sbml.org/sbml/level1"
  • Level 2 Version 1 "http://www.sbml.org/sbml/level2"
  • Level 2 Version 2 "http://www.sbml.org/sbml/level2/version2"
  • Level 2 Version 3 "http://www.sbml.org/sbml/level2/version3"
  • Level 2 Version 4 "http://www.sbml.org/sbml/level2/version4"
  • Level 2 Version 5 "http://www.sbml.org/sbml/level2/version5"
  • Level 3 Version 1 "http://www.sbml.org/sbml/level3/version1"
  • Level 3 Version 2 "http://www.sbml.org/sbml/level3/version2"
Parameters
sbthe SBase_t structure.
Returns
1 (true) if the level, version and namespace values of this SBML structure correspond to a valid set of values, 0 (false) otherwise.
int SBase_isSetAnnotation ( const SBase_t sb)

Predicate returning 1 (true) or 0 (false) depending on whether the given structure's "annotation" subelement is set.

Parameters
sbthe SBase_t structure to query.
Returns
1 (true) if the "annotation" subelement of this SBML structure is set, 0 (false) otherwise.
Examples:
printAnnotation.c.
int SBase_isSetIdAttribute ( const SBase_t sb)

Predicate returning 1 (true) or 0 (false) depending on whether the given structure's "id" attribute is set.

Parameters
sbthe SBase_t structure to query
Returns
1 (true) if the "id" attribute of this SBML structure is set, 0 (false) otherwise.
int SBase_isSetMetaId ( const SBase_t sb)

Predicate returning 1 (true) or 0 (false) depending on whether the given structure's "metaid" attribute is set.

Parameters
sbthe SBase_t structure to query.
Returns
1 (true) if the "metaid" attribute of this SBML structure is set, 0 (false) otherwise.
Examples:
addingEvidenceCodes_1.c, and addingEvidenceCodes_2.c.
int SBase_isSetModelHistory ( SBase_t sb)

Predicate for testing whether the ModelHistory_t of a given SBase_t structure is assigned.

Parameters
sbthe SBase_t structure.
Returns
1 (true) if the ModelHistory_t of this SBase_t structure is set, 0 (false) otherwise.
int SBase_isSetName ( const SBase_t sb)

Predicate returning 1 (true) or 0 (false) depending on whether the given structure's "name" attribute is set.

Parameters
sbthe SBase_t structure to query
Returns
1 (true) if the "name" attribute of this SBML structure is set, 0 (false) otherwise.
int SBase_isSetNotes ( const SBase_t sb)

Predicate returning 1 (true) or 0 (false) depending on whether the given structure's "notes" subelement is set.

Parameters
sbthe SBase_t structure to query.
Returns
1 (true) if the "notes" subelement of this SBML structure is set, 0 (false) otherwise.
Examples:
printNotes.c.
int SBase_isSetSBOTerm ( const SBase_t sb)

Predicate returning 1 (true) or 0 (false) depending on whether the given structure's "sboTerm" attribute is set.

Parameters
sbthe SBase_t structure to query.
Returns
1 (true) if the "sboTerm" attribute of this SBML structure is set, 0 (false) otherwise.
int SBase_isSetUserData ( const SBase_t sb)

Predicate returning 1 (true) or 0 (false) depending on whether the structure's user data object has been set.

Parameters
sbdefines the node of which the user data should be queried.
Returns
1 (true) if the user data object of this SBML structure has been set, 0 (false) otherwise.
int SBase_removeTopLevelAnnotationElement ( SBase_t sb,
const char *  name 
)

Removes the top-level element within the "annotation" subelement of this SBML structure with the given name.

SBML places a few restrictions on the organization of the content of annotations; these are intended to help software tools read and write the data as well as help reduce conflicts between annotations added by different tools. Please see the SBML specifications for more details.

Calling this method allows a particular annotation element to be removed whilst the remaining annotations remain intact.

Parameters
sbSBase_t structure containing the annotation to be altered.
namea string representing the name of the top level annotation element that is to be removed.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
See also
SBase_removeTopLevelAnnotationElementWithURI (SBase_t *, const char *, const char *)
SBase_replaceTopLevelAnnotationElement (SBase_t *, XMLNode_t *)
SBase_replaceTopLevelAnnotationElementString (SBase_t *, char *)
int SBase_removeTopLevelAnnotationElementWithURI ( SBase_t sb,
const char *  name,
const char *  uri 
)

Removes the top-level element within the "annotation" subelement of this SBML structure with the given name and URI.

SBML places a few restrictions on the organization of the content of annotations; these are intended to help software tools read and write the data as well as help reduce conflicts between annotations added by different tools. Please see the SBML specifications for more details.

Calling this method allows a particular annotation element to be removed whilst the remaining annotations remain intact.

Parameters
sbSBase_t structure containing the annotation to be altered.
namea string representing the name of the top level annotation element that is to be removed.
uria string that is used to check both the name and URI of the top level element to be removed.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
See also
SBase_removeTopLevelAnnotationElement (SBase_t *, const char *)
SBase_replaceTopLevelAnnotationElement (SBase_t *, XMLNode_t *)
SBase_replaceTopLevelAnnotationElementString (SBase_t *, char *)
void SBase_renameMetaIdRefs ( SBase_t sb,
const char *  oldid,
const char *  newid 
)

Renames all the meta-identifier attributes on this element.

In SBML, object "meta" identifiers are of the XML data type ID; the SBML object attribute itself is typically named metaid. All attributes that hold values referring to values of type ID are of the XML data type IDREF. They are also sometimes informally referred to as "metaid refs", in analogy to the SBML-defined type SIdRef.

This method works by looking at all meta-identifier attribute values, comparing the identifiers to the value of oldid. If any matches are found, the matching identifiers are replaced with newid. The method does not descend into child elements.

Parameters
sbthe SBase_t structure in question.
oldidthe old identifier.
newidthe new identifier.
void SBase_renameSIdRefs ( SBase_t sb,
const char *  oldid,
const char *  newid 
)

Renames all the SIdRef attributes on this element, including any found in MathML content (if such exists).

In SBML, object identifiers are of a data type called SId. In SBML Level 3, an explicit data type called SIdRef was introduced for attribute values that refer to SId values; in previous Levels of SBML, this data type did not exist and attributes were simply described to as "referring to an identifier", but the effective data type was the same as SIdRef in Level 3. These and other methods of libSBML refer to the type SIdRef for all Levels of SBML, even if the corresponding SBML specification did not explicitly name the data type.

This method works by looking at all attributes and (if appropriate) mathematical formulas, comparing the identifiers to the value of oldid. If any matches are found, the matching identifiers are replaced with newid. The method does not descend into child elements.

Parameters
sbthe SBase_t structure in question.
oldidthe old identifier.
newidthe new identifier.
void SBase_renameUnitSIdRefs ( SBase_t sb,
const char *  oldid,
const char *  newid 
)

Renames all the UnitSIdRef attributes on this element.

In SBML, unit definitions have identifiers of type UnitSId. In SBML Level 3, an explicit data type called UnitSIdRef was introduced for attribute values that refer to UnitSId values; in previous Levels of SBML, this data type did not exist and attributes were simply described to as "referring to a unit identifier", but the effective data type was the same as UnitSIdRef in Level 3. These and other methods of libSBML refer to the type UnitSIdRef for all Levels of SBML, even if the corresponding SBML specification did not explicitly name the data type.

This method works by looking at all unit identifier attribute values (including, if appropriate, inside mathematical formulas), comparing the unit identifiers to the value of oldid. If any matches are found, the matching identifiers are replaced with newid. The method does not descend into child elements.

Parameters
sbthe SBase_t structure in question.
oldidthe old identifier.
newidthe new identifier.
int SBase_replaceTopLevelAnnotationElement ( SBase_t sb,
XMLNode_t annotation 
)

Replaces the given top-level element within the "annotation" subelement of this SBML structure and with the annotation element supplied.

SBML places a few restrictions on the organization of the content of annotations; these are intended to help software tools read and write the data as well as help reduce conflicts between annotations added by different tools. Please see the SBML specifications for more details.

This method determines the name of the element to be replaced from the annotation argument. Functionally it is equivalent to calling SBase_removeTopLevelAnnotationElement(sb, name); SBase_appendAnnotation(sb, annotation_with_name); with the exception that the placement of the annotation element remains the same.

Parameters
sbSBase_t structure containing the annotation to be altered.
annotationXMLNode_t representing the replacement top level annotation.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
See also
SBase_removeTopLevelAnnotationElement (SBase_t *, const char *)
SBase_removeTopLevelAnnotationElementWithURI (SBase_t *, const char *, const char *)
SBase_replaceTopLevelAnnotationElementString (SBase_t *, char *)
int SBase_replaceTopLevelAnnotationElementString ( SBase_t sb,
const char *  annotation 
)

Replaces the given top-level element within the "annotation" subelement of this SBML structure and with the annotation element supplied.

SBML places a few restrictions on the organization of the content of annotations; these are intended to help software tools read and write the data as well as help reduce conflicts between annotations added by different tools. Please see the SBML specifications for more details.

This method determines the name of the element to be replaced from the annotation argument. Functionally it is equivalent to calling SBase_removeTopLevelAnnotationElement(sb, name); SBase_appendAnnotation(sb, annotation_with_name); with the exception that the placement of the annotation element remains the same.

Parameters
sbSBase_t structure containing the annotation to be altered.
annotationstring representing the replacement top level annotation.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
See also
SBase_removeTopLevelAnnotationElement (SBase_t *, const char *)
SBase_removeTopLevelAnnotationElementWithURI (SBase_t *, const char *, const char *)
SBase_replaceTopLevelAnnotationElement (SBase_t *, XMLNode_t *)
int SBase_setAnnotation ( SBase_t sb,
XMLNode_t annotation 
)

Sets the annotation for the given SBML structure.

Parameters
sbthe given SBML structure.
annotationthe XMLNode_t structure representing the annotation.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int SBase_setAnnotationString ( SBase_t sb,
const char *  annotation 
)

Sets the annotation for the given SBML structure.

Parameters
sbthe given SBML structure.
annotationthe string representing the annotation.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int SBase_setIdAttribute ( SBase_t sb,
const char *  id 
)

Sets the value of the "id" attribute of the given structure.

The string id is copied. The value of metaid must be an identifier conforming to the syntax defined by SBML.

Parameters
sbthe SBase_t structure
idthe identifier string to use as the value of the "metaid" attribute
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
Note
Using this function with the id set to NULL is equivalent to unsetting the "id" attribute.
int SBase_setMetaId ( SBase_t sb,
const char *  metaid 
)

Sets the value of the "metaid" attribute of the given structure.

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_t. 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.

Parameters
sbthe SBase_t structure.
metaidthe identifier string to use as the value of the "metaid" attribute.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
Note
Using this function with the metaid set to NULL is equivalent to unsetting the "metaid" attribute.
Examples:
addingEvidenceCodes_1.c, and addingEvidenceCodes_2.c.
int SBase_setModelHistory ( SBase_t sb,
ModelHistory_t history 
)

Set the ModelHistory_t of the given SBase_t structure.

Parameters
sbthe SBase_t structure.
historythe ModelHistory_t structure.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int SBase_setName ( SBase_t sb,
const char *  name 
)

Sets the value of the "name" attribute of the given structure.

The string name is copied.

Parameters
sbthe SBase_t structure
namethe string to use as the value of the "name" attribute
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
Note
Using this function with the name set to NULL is equivalent to unsetting the "name" attribute.
int SBase_setNamespaces ( SBase_t sb,
XMLNamespaces_t xmlns 
)

Sets the namespaces relevant of this SBML structure.

Parameters
sbthe SBase_t structure.
xmlnsthe namespaces to set.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int SBase_setNotes ( SBase_t sb,
XMLNode_t notes 
)

Sets the notes for the given SBML structure.

Parameters
sbthe given SBML structure.
notesthe XMLNode_t structure representing the notes.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
Examples:
createExampleSBML.c.
int SBase_setNotesString ( SBase_t sb,
const char *  notes 
)

Sets the notes for the given SBML structure.

Parameters
sbthe given SBML structure.
notesthe string representing the notes.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
Examples:
createExampleSBML.c.
int SBase_setNotesStringAddMarkup ( SBase_t sb,
const char *  notes 
)

Sets the notes for the given SBML structure.

Parameters
sbthe given SBML structure.
notesthe string representing the notes.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int SBase_setSBOTerm ( SBase_t sb,
int  value 
)

Sets the value of the "sboTerm" attribute.

Beginning with SBML Level 2 Version 2, objects derived from SBase_t have an optional attribute named "sboTerm" for supporting the use of the Systems Biology Ontology. In SBML proper, the data type of the attribute is a string of the form "SBO_t: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_t identifiers are stored simply as integers.
SBO_t 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". More details can be found in SBML specifications for Level 2 Version 2 and above.
Parameters
sbthe SBase_t structure.
valuethe NNNNNNN integer portion of the SBO_t identifier.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int SBase_setSBOTermID ( SBase_t sb,
const char *  sboid 
)

Sets the value of the "sboTerm" attribute by string.

Beginning with SBML Level 2 Version 2, objects derived from SBase_t have an optional attribute named "sboTerm" for supporting the use of the Systems Biology Ontology. In SBML proper, the data type of the attribute is a string of the form "SBO_t: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_t identifiers are stored simply as integers.
SBO_t 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". More details can be found in SBML specifications for Level 2 Version 2 and above.
Parameters
sbthe SBase_t structure.
sboidthe SBO_t identifier string of the form SBO_t:NNNNNNN.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
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.

Parameters
sbdefines the node of which the user data should be set.
userDataspecifies the new user data.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int SBase_unsetAnnotation ( SBase_t sb)

Unsets the "annotation" subelement of the given structure.

Parameters
sbthe SBase_t structure.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
Examples:
unsetAnnotation.c.
int SBase_unsetCVTerms ( SBase_t sb)

Clears the list of CVTerm_t's of this SBML structure.

Parameters
sbthe structure to clear CVTerm_t's from.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int SBase_unsetIdAttribute ( SBase_t sb)

Unsets the "id" attribute of the given structure.

Parameters
sbthe SBase_t structure
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int SBase_unsetMetaId ( SBase_t sb)

Unsets the "metaid" attribute of the given structure.

Parameters
sbthe SBase_t structure.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int SBase_unsetModelHistory ( SBase_t sb)

Unsets the ModelHistory_t of the given SBase_t structure.

Parameters
sbthe SBase_t structure.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int SBase_unsetName ( SBase_t sb)

Unsets the "name" attribute of the given structure.

Parameters
sbthe SBase_t structure
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int SBase_unsetNotes ( SBase_t sb)

Unsets the "notes" subelement of the given structure.

Parameters
sbthe SBase_t structure.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
Examples:
unsetNotes.c.
int SBase_unsetSBOTerm ( SBase_t sb)

Unsets the "sboTerm" attribute of the given structure.

Parameters
sbthe SBase_t structure.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
int SBase_unsetUserData ( SBase_t sb)

Unsets the user data of this node.

Parameters
sbdefines the node of which the user data should be unset.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are: