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.
The SBML specification beginning with Level 2 Version 2 defines a standard approach to recording optional model history and model creator information in a form that complies with MIRIAM ("Minimum Information Requested in the Annotation of biochemical Models", Nature Biotechnology, vol. 23, no. 12, Dec. 2005). LibSBML provides the ModelHistory_t class as a convenient high-level interface for working with model history data.
Model_t histories in SBML consist of one or more model creators, a single date of creation, and one or more modification dates. The overall XML form of this data takes the following form:
<dc:creator> <rdf:Bag> <rdf:li rdf:parseType="Resource"> +++ <vCard:N rdf:parseType="Resource"> <vCard:Family>family name</vCard:Family> <vCard:Given>given name</vCard:Given> </vCard:N> +++ <vCard:EMAIL>email address</vCard:EMAIL> +++ <vCard:ORG rdf:parseType="Resource"> <vCard:Orgname>organization name</vCard:Orgname> </vCard:ORG> +++ </rdf:li> ... </rdf:Bag> </dc:creator> <dcterms:created rdf:parseType="Resource"> <dcterms:W3CDTF>creation date</dcterms:W3CDTF> </dcterms:created> <dcterms:modified rdf:parseType="Resource"> <dcterms:W3CDTF>modification date</dcterms:W3CDTF> </dcterms:modified> ...
In the template above, the underlined portions are optional, the symbol +++ is a placeholder for either no content or valid XML content that is not defined by the annotation scheme, and the ellipses ... are placeholders for zero or more elements of the same form as the immediately preceding element. The various placeholders for content, namely family name, given name, email address, organization, creation date, and modification date are data that can be filled in using the various methods on the ModelHistory_t class described below.
int ModelHistory_addCreator | ( | ModelHistory_t * | mh, |
ModelCreator_t * | mc | ||
) |
Adds a copy of a ModelCreator_t structure to the ModelHistory_t structure.
mh | the ModelHistory_t structure. |
mc | the ModelCreator_t structure to add. |
int ModelHistory_addModifiedDate | ( | ModelHistory_t * | mh, |
Date_t * | date | ||
) |
Adds a copy of a Date_t structure to the list of modifiedDates in the ModelHistory_t structure.
mh | the ModelHistory_t structure. |
date | the Date_t structure to add. |
ModelHistory_t * ModelHistory_clone | ( | const ModelHistory_t * | mh | ) |
Creates a deep copy of the given ModelHistory_t structure.
mh | the ModelHistory_t structure to be copied. |
ModelHistory_t * ModelHistory_create | ( | ) |
Creates a new ModelHistory_t structure and returns a pointer to it.
void ModelHistory_free | ( | ModelHistory_t * | mh | ) |
Destroys this ModelHistory_t.
mh | ModelHistory_t structure to be freed. |
Date_t * ModelHistory_getCreatedDate | ( | ModelHistory_t * | mh | ) |
Returns the createdDate from the ModelHistory_t.
mh | the ModelHistory_t structure. |
ModelCreator_t * ModelHistory_getCreator | ( | ModelHistory_t * | mh, |
unsigned int | n | ||
) |
Get the nth ModelCreator_t structure in this ModelHistory_t.
mh | the ModelHistory_t structure. |
n | an unsigned int indicating which ModelCreator_t. |
NULL
if no such object exists. List_t * ModelHistory_getListCreators | ( | ModelHistory_t * | mh | ) |
Get the List_t of ModelCreator_t structures in this ModelHistory_t.
mh | the ModelHistory_t structure. |
List_t * ModelHistory_getListModifiedDates | ( | ModelHistory_t * | mh | ) |
Get the List_t of Date_t structures in the list of ModifiedDates in this ModelHistory_t.
mh | the ModelHistory_t structure. |
Date_t * ModelHistory_getModifiedDate | ( | ModelHistory_t * | mh | ) |
Returns the modifiedDate from the ModelHistory_t.
mh | the ModelHistory_t structure. |
Date_t * ModelHistory_getModifiedDateFromList | ( | ModelHistory_t * | mh, |
unsigned int | n | ||
) |
Get the nth Date_t structure in the list of ModifiedDates in this ModelHistory_t.
mh | the ModelHistory_t structure. |
n | an unsigned int indicating which Date_t. |
NULL
if no such object exists.unsigned int ModelHistory_getNumCreators | ( | ModelHistory_t * | mh | ) |
Get the number of ModelCreator_t structures in this ModelHistory_t.
mh | the ModelHistory_t structure. |
unsigned int ModelHistory_getNumModifiedDates | ( | ModelHistory_t * | mh | ) |
Get the number of modified Date_t structures in the list of ModifiedDates in this ModelHistory_t.
mh | the ModelHistory_t structure. |
int ModelHistory_hasRequiredAttributes | ( | ModelHistory_t * | mh | ) |
Checks if the model history has all the required attributes.
mh | the ModelHistory_t structure. |
1
(true) if this ModelHistory_t has all the required elements, otherwise 0
(false) will be returned, including if an invalid CVTerm_t was provided. int ModelHistory_isSetCreatedDate | ( | ModelHistory_t * | mh | ) |
Predicate indicating whether this ModelHistory_t's createdDate is set.
mh | the ModelHistory_t structure to be queried. |
1
(true) if the createdDate of this ModelHistory_t structure is set, 0
(false) otherwise. int ModelHistory_isSetModifiedDate | ( | ModelHistory_t * | mh | ) |
Predicate indicating whether this ModelHistory_t's modifiedDate is set.
mh | the ModelHistory_t structure to be queried. |
1
(true) if the modifiedDate of this ModelHistory_t structure is set, 0
(false) otherwise. int ModelHistory_setCreatedDate | ( | ModelHistory_t * | mh, |
Date_t * | date | ||
) |
Sets the createdDate.
mh | the ModelHistory_t structure. |
date | the Date_t structure representing the date the ModelHistory_t was created. |
int ModelHistory_setModifiedDate | ( | ModelHistory_t * | mh, |
Date_t * | date | ||
) |
Sets the modifiedDate.
mh | the ModelHistory_t structure. |
date | the Date_t structure representing the date the ModelHistory_t was modified. |