libSBML Python API  5.11.0
libsbml.XMLTriple Class Reference
Inheritance diagram for libsbml.XMLTriple:
[legend]

Detailed Description

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. Triples by themselves are not entities in an XML stream—they are not, for example, elements or attributes; rather, XMLTriple is used in libSBML to construct these other kinds of objects.

An XMLTriple instance carries up to three data items:

  1. The name of the attribute or element; that is, the attribute name as it appears in an XML document or data stream;
  2. 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' />
    
  3. 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.

See also
XMLToken
XMLNode
XMLAttributes
XMLNamespaces

Public Member Functions

def __init__ (self, args)
  A qualified XML name. More...
 
def clone (self)
 Creates and returns a deep copy of this XMLTriple object. More...
 
def getName (self)
 Returns the name portion of this XMLTriple object. More...
 
def getPrefix (self)
 Returns the prefix portion of this XMLTriple object. More...
 
def getPrefixedName (self)
 Returns the prefixed name from this XMLTriple. More...
 
def getURI (self)
 Returns the URI portion of this XMLTriple object. More...
 
def isEmpty (self)
 Returns True if this XMLTriple object is empty. More...
 

Member Function Documentation

def libsbml.XMLTriple.clone (   self)

Creates and returns a deep copy of this XMLTriple object.

clone()   XMLTriple
Returns
the (deep) copy of this XMLTriple object.
def libsbml.XMLTriple.getName (   self)

Returns the name portion of this XMLTriple object.

getName()   string
Returns
a string, the name portion of this XMLTriple object.
def libsbml.XMLTriple.getPrefix (   self)

Returns the prefix portion of this XMLTriple object.

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

Returns the prefixed name from this XMLTriple.

getPrefixedName()   string
Returns
a string, the prefixed name from this XMLTriple. This is constructed by concatenating the prefix stored in this XMLTriple object, followed by a colon character ':', followed by the name stored in this XMLTriple object.
def libsbml.XMLTriple.getURI (   self)

Returns the URI portion of this XMLTriple object.

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

Returns True if this XMLTriple object is empty.

isEmpty()   bool
Returns
True if this XMLTriple is empty, False otherwise.