libSBML C API  5.18.0
ModelCreator_t Class Reference

Detailed Description

MIRIAM-compliant data about a model's creator.

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 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). For the model creator, this form involves the use of parts of the vCard representation. LibSBML provides the ModelCreator_t class as a convenience high-level interface for working with model creator data. Objects of class ModelCreator_t can be used to store and carry around creator data within a program, and the various methods in this object class let callers manipulate the different parts of the model creator representation.

The different parts of a model creator definition

The ModelCreator_t class mirrors the structure of the MIRIAM model creator annotations in SBML. The following template illustrates these different fields when they are written in XML form:

<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</vCard:Orgname>
</vCard:ORG>

Each of the separate data values family name, given name, email address, and organization can be set and retrieved via corresponding methods in the ModelCreator_t class. These methods are documented in more detail below.

Examples:
addModelHistory.c.

Public Member Functions

ModelCreator_tModelCreator_clone (const ModelCreator_t *mc)
 Creates a deep copy of the given ModelCreator_t structure. More...
 
ModelCreator_tModelCreator_create ()
 Creates a new ModelCreator_t structure and returns a pointer to it. More...
 
ModelCreator_tModelCreator_createFromNode (const XMLNode_t *node)
 Creates a new ModelCreator_t structure from an XMLNode_t structure and returns a pointer to it. More...
 
void ModelCreator_free (ModelCreator_t *mc)
 Destroys this ModelCreator_t. More...
 
const char * ModelCreator_getEmail (ModelCreator_t *mc)
 Returns the email from the ModelCreator_t. More...
 
const char * ModelCreator_getFamilyName (ModelCreator_t *mc)
 Returns the familyName from the ModelCreator_t. More...
 
const char * ModelCreator_getGivenName (ModelCreator_t *mc)
 Returns the givenName from the ModelCreator_t. More...
 
const char * ModelCreator_getName (ModelCreator_t *mc)
 Returns the fn from the ModelCreator_t (when using vCard4). More...
 
const char * ModelCreator_getOrganisation (ModelCreator_t *mc)
 Returns the organization from the ModelCreator_t. More...
 
const char * ModelCreator_getOrganization (ModelCreator_t *mc)
 Returns the organization from the ModelCreator_t. More...
 
int ModelCreator_hasRequiredAttributes (ModelCreator_t *mc)
 Checks if the model creator has all the required attributes. More...
 
int ModelCreator_isSetEmail (ModelCreator_t *mc)
 Predicate indicating whether this ModelCreator_t's email is set. More...
 
int ModelCreator_isSetFamilyName (ModelCreator_t *mc)
 Predicate indicating whether this ModelCreator_t's familyName is set. More...
 
int ModelCreator_isSetGivenName (ModelCreator_t *mc)
 Predicate indicating whether this ModelCreator_t's givenName is set. More...
 
int ModelCreator_isSetName (ModelCreator_t *mc)
 Predicate indicating whether this ModelCreator_t's fn is set (when using vCard4). More...
 
int ModelCreator_isSetOrganisation (ModelCreator_t *mc)
 Predicate indicating whether this ModelCreator_t's organization is set. More...
 
int ModelCreator_isSetOrganization (ModelCreator_t *mc)
 Predicate indicating whether this ModelCreator_t's organization is set. More...
 
int ModelCreator_setEmail (ModelCreator_t *mc, const char *email)
 Sets the email. More...
 
int ModelCreator_setFamilyName (ModelCreator_t *mc, const char *name)
 Sets the family name. More...
 
int ModelCreator_setGivenName (ModelCreator_t *mc, const char *name)
 Sets the given name. More...
 
int ModelCreator_setName (ModelCreator_t *mc, const char *name)
 Sets the name. More...
 
int ModelCreator_setOrganisation (ModelCreator_t *mc, const char *org)
 Sets the organization. More...
 
int ModelCreator_setOrganization (ModelCreator_t *mc, const char *org)
 Sets the organization. More...
 
int ModelCreator_unsetEmail (ModelCreator_t *mc)
 Unsets the email of this ModelCreator_t. More...
 
int ModelCreator_unsetFamilyName (ModelCreator_t *mc)
 Unsets the familyName of this ModelCreator_t. More...
 
int ModelCreator_unsetGivenName (ModelCreator_t *mc)
 Unsets the givenName of this ModelCreator_t. More...
 
int ModelCreator_unsetName (ModelCreator_t *mc)
 Unsets the fn of this ModelCreator_t (when using vCard4). More...
 
int ModelCreator_unsetOrganisation (ModelCreator_t *mc)
 Unsets the organization of this ModelCreator_t. More...
 
int ModelCreator_unsetOrganization (ModelCreator_t *mc)
 Unsets the organization of this ModelCreator_t. More...
 

Member Function Documentation

ModelCreator_t * ModelCreator_clone ( const ModelCreator_t mc)

Creates a deep copy of the given ModelCreator_t structure.

Parameters
mcthe ModelCreator_t structure to be copied.
Returns
a (deep) copy of the given ModelCreator_t structure.
ModelCreator_t * ModelCreator_create ( )

Creates a new ModelCreator_t structure and returns a pointer to it.

Returns
pointer to newly created ModelCreator_t structure.
Examples:
addModelHistory.c.
ModelCreator_t * ModelCreator_createFromNode ( const XMLNode_t node)

Creates a new ModelCreator_t structure from an XMLNode_t structure and returns a pointer to it.

Returns
pointer to newly created ModelCreator_t structure.
void ModelCreator_free ( ModelCreator_t mc)

Destroys this ModelCreator_t.

Parameters
mcModelCreator_t structure to be freed.
const char * ModelCreator_getEmail ( ModelCreator_t mc)

Returns the email from the ModelCreator_t.

Parameters
mcthe ModelCreator_t structure to be queried.
Returns
email from the ModelCreator_t.
const char * ModelCreator_getFamilyName ( ModelCreator_t mc)

Returns the familyName from the ModelCreator_t.

Parameters
mcthe ModelCreator_t structure to be queried.
Returns
familyName from the ModelCreator_t.
const char * ModelCreator_getGivenName ( ModelCreator_t mc)

Returns the givenName from the ModelCreator_t.

Parameters
mcthe ModelCreator_t structure to be queried.
Returns
givenName from the ModelCreator_t.
const char * ModelCreator_getName ( ModelCreator_t mc)

Returns the fn from the ModelCreator_t (when using vCard4).

Parameters
mcthe ModelCreator_t structure to be queried
Returns
fn from the ModelCreator_t.
const char * ModelCreator_getOrganisation ( ModelCreator_t mc)

Returns the organization from the ModelCreator_t.

Note
This function is an alias of ModelCreator_getOrganization().
Parameters
mcthe ModelCreator_t structure to be queried.
Returns
organization from the ModelCreator_t.
const char * ModelCreator_getOrganization ( ModelCreator_t mc)

Returns the organization from the ModelCreator_t.

Parameters
mcthe ModelCreator_t structure to be queried.
Returns
organization from the ModelCreator_t.
int ModelCreator_hasRequiredAttributes ( ModelCreator_t mc)

Checks if the model creator has all the required attributes.

Parameters
mcthe ModelCreator_t structure.
Returns
1 (true) if this ModelCreator_t has all the required elements, otherwise 0 (false) will be returned, including if an invalid CVTerm_t was provided.
int ModelCreator_isSetEmail ( ModelCreator_t mc)

Predicate indicating whether this ModelCreator_t's email is set.

Parameters
mcthe ModelCreator_t structure to be queried.
Returns
1 (true) if the email of this ModelCreator_t structure is set, 0 (false) otherwise.
int ModelCreator_isSetFamilyName ( ModelCreator_t mc)

Predicate indicating whether this ModelCreator_t's familyName is set.

Parameters
mcthe ModelCreator_t structure to be queried.
Returns
1 (true) if the familyName of this ModelCreator_t structure is set, 0 (false) otherwise.
int ModelCreator_isSetGivenName ( ModelCreator_t mc)

Predicate indicating whether this ModelCreator_t's givenName is set.

Parameters
mcthe ModelCreator_t structure to be queried.
Returns
1 (true) if the givenName of this ModelCreator_t structure is set, 0 (false) otherwise.
int ModelCreator_isSetName ( ModelCreator_t mc)

Predicate indicating whether this ModelCreator_t's fn is set (when using vCard4).

Parameters
mcthe ModelCreator_t structure to be queried
Returns
1 (true) if the fn of this ModelCreator_t structure is set, 0 (false) otherwise.
int ModelCreator_isSetOrganisation ( ModelCreator_t mc)

Predicate indicating whether this ModelCreator_t's organization is set.

Note
This function is an alias of ModelCreator_isSetOrganization().
Parameters
mcthe ModelCreator_t structure to be queried.
Returns
1 (true) if the organization of this ModelCreator_t structure is set, 0 (false) otherwise.
int ModelCreator_isSetOrganization ( ModelCreator_t mc)

Predicate indicating whether this ModelCreator_t's organization is set.

Parameters
mcthe ModelCreator_t structure to be queried.
Returns
1 (true) if the organization of this ModelCreator_t structure is set, 0 (false) otherwise.
int ModelCreator_setEmail ( ModelCreator_t mc,
const char *  email 
)

Sets the email.

Parameters
mcthe ModelCreator_t structure.
emaila string representing the email of the ModelCreator_t.
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:
addModelHistory.c.
int ModelCreator_setFamilyName ( ModelCreator_t mc,
const char *  name 
)

Sets the family name.

Parameters
mcthe ModelCreator_t structure.
namea string representing the familyName of the ModelCreator_t.
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:
addModelHistory.c.
int ModelCreator_setGivenName ( ModelCreator_t mc,
const char *  name 
)

Sets the given name.

Parameters
mcthe ModelCreator_t structure.
namea string representing the givenName of the ModelCreator_t.
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:
addModelHistory.c.
int ModelCreator_setName ( ModelCreator_t mc,
const char *  name 
)

Sets the name.

Parameters
mcthe ModelCreator_t structure
namea string representing the familyName of the ModelCreator_t.
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 ModelCreator_setOrganisation ( ModelCreator_t mc,
const char *  org 
)

Sets the organization.

Parameters
mcthe ModelCreator_t structure.
orga string representing the organisation of the ModelCreator_t.
Note
This function is an alias of ModelCreator_setOrganization().
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:
addModelHistory.c.
int ModelCreator_setOrganization ( ModelCreator_t mc,
const char *  org 
)

Sets the organization.

Parameters
mcthe ModelCreator_t structure.
orga string representing the organisation of the ModelCreator_t.
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 ModelCreator_unsetEmail ( ModelCreator_t mc)

Unsets the email of this ModelCreator_t.

Parameters
mcthe ModelCreator_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 ModelCreator_unsetFamilyName ( ModelCreator_t mc)

Unsets the familyName of this ModelCreator_t.

Parameters
mcthe ModelCreator_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 ModelCreator_unsetGivenName ( ModelCreator_t mc)

Unsets the givenName of this ModelCreator_t.

Parameters
mcthe ModelCreator_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 ModelCreator_unsetName ( ModelCreator_t mc)

Unsets the fn of this ModelCreator_t (when using vCard4).

Parameters
mcthe ModelCreator_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 ModelCreator_unsetOrganisation ( ModelCreator_t mc)

Unsets the organization of this ModelCreator_t.

Parameters
mcthe ModelCreator_t structure.
Note
This function is an alias of ModelCreator_unsetOrganization().
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 ModelCreator_unsetOrganization ( ModelCreator_t mc)

Unsets the organization of this ModelCreator_t.

Parameters
mcthe ModelCreator_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: