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

Detailed Description

Representation of a qualified XML name.

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.

A 'triple' in the libSBML XML layer encapsulates the notion of qualified name, meaning an element name or an attribute name with an optional namespace qualifier. An XMLTriple instance carries up to three data items:

  • The name of the attribute or element; that is, the attribute name as it appears in an XML document or data stream;

  • The XML namespace prefix (if any) of the attribute. For example, in the following fragment of XML, the namespace prefix is the string mysim and it appears on both the element someelement and the attribute attribA. When both the element and the attribute are stored as XMLTriple objects, their prefix is mysim.

     <mysim:someelement mysim:attribA='value' />

  • The XML namespace URI with which the prefix is associated. In XML, every namespace used must be declared and mapped to a URI.

XMLTriple objects are the lowest-level data item in the XML layer of libSBML. Other objects such as XMLToken make use of XMLTriple objects.

Public Member Functions

def clone
 
def getName
 
def getPrefix
 
def getPrefixedName
 
def getURI
 
def isEmpty
 

Member Function Documentation

def libsbml.XMLTriple.clone (   self)

Representation of a qualified XML name.

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.

A 'triple' in the libSBML XML layer encapsulates the notion of qualified name, meaning an element name or an attribute name with an optional namespace qualifier. An XMLTriple instance carries up to three data items:

  • The name of the attribute or element; that is, the attribute name as it appears in an XML document or data stream;

  • The XML namespace prefix (if any) of the attribute. For example, in the following fragment of XML, the namespace prefix is the string mysim and it appears on both the element someelement and the attribute attribA. When both the element and the attribute are stored as XMLTriple objects, their prefix is mysim.

     <mysim:someelement mysim:attribA='value' />

  • The XML namespace URI with which the prefix is associated. In XML, every namespace used must be declared and mapped to a URI.

XMLTriple objects are the lowest-level data item in the XML layer of libSBML. Other objects such as XMLToken make use of XMLTriple objects. Python method signature(s):

clone(XMLTriple self)   XMLTriple

Creates and returns a deep copy of this XMLTriple set.

Returns
a (deep) copy of this XMLTriple set.
def libsbml.XMLTriple.getName (   self)

Python method signature(s):

getName(XMLTriple self)   string

Returns the name portion of this XMLTriple.

Returns
a string, the name from this XMLTriple.
def libsbml.XMLTriple.getPrefix (   self)

Python method signature(s):

getPrefix(XMLTriple self)   string

Returns the prefix portion of this XMLTriple.

Returns
a string, the prefix portion of this XMLTriple.
def libsbml.XMLTriple.getPrefixedName (   self)

Python method signature(s):

getPrefixedName(XMLTriple self)   string

Returns the prefixed name from this XMLTriple.

Returns
a string, the prefixed name from this XMLTriple.
def libsbml.XMLTriple.getURI (   self)

Python method signature(s):

getURI(XMLTriple self)   string

Returns the URI portion of this XMLTriple.

Returns
URI a string, the prefix portion of this XMLTriple.
def libsbml.XMLTriple.isEmpty (   self)

Python method signature(s):

isEmpty(XMLTriple self)   bool

Predicate returning True or False depending on whether this XMLTriple is empty.

Returns
True if this XMLTriple is empty, False otherwise.