libSBML Python API  5.8.0
 All Classes Namespaces Files Functions Variables Pages
libsbml.ModelHistory Class Reference
Inheritance diagram for libsbml.ModelHistory:
[legend]

Detailed Description

Representation of MIRIAM-compliant model history data.

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 class as a convenient high-level interface for working with model history data.

Model 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 class described below.

Public Member Functions

def addCreator
 
def addModifiedDate
 
def clone
 
def getCreatedDate
 
def getCreator
 
def getListCreators
 
def getListModifiedDates
 
def getModifiedDate
 
def getNumCreators
 
def getNumModifiedDates
 
def hasRequiredAttributes
 
def isSetCreatedDate
 
def isSetModifiedDate
 
def setCreatedDate
 
def setModifiedDate
 

Member Function Documentation

def libsbml.ModelHistory.addCreator (   self,
  args 
)

Python method signature(s):

addCreator(ModelHistory self, ModelCreator mc)   int

Adds a copy of a ModelCreator object to the list of 'model creator' values stored in this ModelHistory object.

In the MIRIAM format for annotations, there can be multiple model creators. The libSBML ModelHistory class supports this by storing a list of 'model creator' values.

Parameters
mcthe ModelCreator to add
Returns
integer value indicating success/failure of the function. The possible values returned by this function are:
def libsbml.ModelHistory.addModifiedDate (   self,
  args 
)

Python method signature(s):

addModifiedDate(ModelHistory self, Date date)   int

Adds a copy of a Date object to the list of 'modified date' values stored in this ModelHistory object.

In the MIRIAM format for annotations, there can be multiple modification dates. The libSBML ModelHistory class supports this by storing a list of 'modified date' values.

Parameters
datea Date object representing the 'modified date' that should be added to this ModelHistory object.
Returns
integer value indicating success/failure of the function. The possible values returned by this function are:
def libsbml.ModelHistory.clone (   self)

Representation of MIRIAM-compliant model history data.

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 class as a convenient high-level interface for working with model history data.

Model 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 class described below. Python method signature(s):

clone(ModelHistory self)   ModelHistory

Creates and returns a copy of this ModelHistory object

Returns
a (deep) copy of this ModelHistory object.
def libsbml.ModelHistory.getCreatedDate (   self)

Python method signature(s):

getCreatedDate(ModelHistory self)   Date

Returns the 'creation date' portion of this ModelHistory object.

Returns
a Date object representing the creation date stored in this ModelHistory object.
def libsbml.ModelHistory.getCreator (   self,
  args 
)

Python method signature(s):

getCreator(ModelHistory self, long n)   ModelCreator

Get the nth ModelCreator object stored in this ModelHistory object.

In the MIRIAM format for annotations, there can be multiple model creators. The libSBML ModelHistory class supports this by storing a list of 'model creator' values.

Returns
the nth ModelCreator object.
def libsbml.ModelHistory.getListCreators (   self)

Python method signature(s):

getListCreators()   ModelCreatorList

Get the ModelCreatorList of ModelCreator objects in this ModelHistory.

Returns the ModelCreatorList for this ModelHistory.

def libsbml.ModelHistory.getListModifiedDates (   self)

Python method signature(s):

getListModifiedDates()   DateList

Get the DateList of Date objects in this ModelHistory.

Returns the DateList for this ModelHistory.

def libsbml.ModelHistory.getModifiedDate (   self,
  args 
)

Python method signature(s):

getModifiedDate(ModelHistory self)   Date
getModifiedDate(ModelHistory self, long n)   Date

This method has multiple variants that differ in the arguments they accept. Each is described separately below.


Method variant with the following signature:

getModifiedDate()

Returns the 'modified date' portion of this ModelHistory object.

Note that in the MIRIAM format for annotations, there can be multiple modification dates. The libSBML ModelHistory class supports this by storing a list of 'modified date' values. If this ModelHistory object contains more than one 'modified date' value in the list, this method will return the first one in the list.

Returns
a Date object representing the date of modification stored in this ModelHistory object.

Method variant with the following signature:

getModifiedDate(long n)

Get the nth Date object in the list of 'modified date' values stored in this ModelHistory object.

In the MIRIAM format for annotations, there can be multiple modification dates. The libSBML ModelHistory class supports this by storing a list of 'modified date' values.

Returns
the nth Date in the list of ModifiedDates of this ModelHistory.
def libsbml.ModelHistory.getNumCreators (   self)

Python method signature(s):

getNumCreators(ModelHistory self)   long

Get the number of ModelCreator objects stored in this ModelHistory object.

In the MIRIAM format for annotations, there can be multiple model creators. The libSBML ModelHistory class supports this by storing a list of 'model creator' values.

Returns
the number of ModelCreators objects.
def libsbml.ModelHistory.getNumModifiedDates (   self)

Python method signature(s):

getNumModifiedDates(ModelHistory self)   long

Get the number of Date objects in this ModelHistory object's list of 'modified dates'.

In the MIRIAM format for annotations, there can be multiple modification dates. The libSBML ModelHistory class supports this by storing a list of 'modified date' values.

Returns
the number of ModifiedDates in this ModelHistory.
def libsbml.ModelHistory.hasRequiredAttributes (   self)

Python method signature(s):

hasRequiredAttributes(ModelHistory self)   bool

Predicate returning True if all the required elements for this ModelHistory object have been set.

The required elements for a ModelHistory object are 'created name', 'modified date', and at least one 'model creator'.

Returns
a boolean value indicating whether all the required elements for this object have been defined.
def libsbml.ModelHistory.isSetCreatedDate (   self)

Python method signature(s):

isSetCreatedDate(ModelHistory self)   bool

Predicate returning True or False depending on whether this ModelHistory's 'creation date' is set.

Returns
True if the creation date value of this ModelHistory is set, False otherwise.
def libsbml.ModelHistory.isSetModifiedDate (   self)

Python method signature(s):

isSetModifiedDate(ModelHistory self)   bool

Predicate returning True or False depending on whether this ModelHistory's 'modified date' is set.

Returns
True if the modification date value of this ModelHistory object is set, False otherwise.
def libsbml.ModelHistory.setCreatedDate (   self,
  args 
)

Python method signature(s):

setCreatedDate(ModelHistory self, Date date)   int

Sets the creation date of this ModelHistory object.

Parameters
datea Date object representing the date to which the 'created date' portion of this ModelHistory should be set.
Returns
integer value indicating success/failure of the function. The possible values returned by this function are:
def libsbml.ModelHistory.setModifiedDate (   self,
  args 
)

Python method signature(s):

setModifiedDate(ModelHistory self, Date date)   int

Sets the modification date of this ModelHistory object.

Parameters
datea Date object representing the date to which the 'modified date' portion of this ModelHistory should be set.
Returns
integer value indicating success/failure of the function. The possible values returned by this function are: