libSBML Python API
5.10.0
|
{core}
Representation of attributes on an XML node.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.
Public Member Functions | |
def | add |
def | clear |
def | clone |
def | getIndex |
def | getLength |
def | getName |
def | getNumAttributes |
def | getPrefix |
def | getPrefixedName |
def | getURI |
def | getValue |
def | hasAttribute |
def | isEmpty |
def | remove |
def | removeResource |
def libsbml.XMLAttributes.add | ( | self, | |
args | |||
) |
Python method signature(s):
add(XMLAttributes self, string name, string value, string namespaceURI="", string prefix="")int add(XMLAttributes self, string name, string value, string namespaceURI="")
int add(XMLAttributes self, string name, string value)
int add(XMLAttributes self, XMLTriple triple, string value)
int
This method has multiple variants that differ in the arguments they accept. Each is described separately below.
add( XMLTriple triple, string value)
Adds an attribute with the given XMLTriple/value pair to this XMLAttributes set.
triple | an XMLTriple, the XML triple of the attribute. |
value | a string, the value of the attribute. |
add( string name , string value , string namespaceURI = '' , string prefix = '')
Adds an attribute (a name/value pair) to this XMLAttributes object, optionally with a prefix and URI defining a namespace.
name | a string, the local name of the attribute. |
value | a string, the value of the attribute. |
namespaceURI | a string, the namespace URI of the attribute. |
prefix | a string, the prefix of the namespace |
def libsbml.XMLAttributes.clear | ( | self | ) |
Python method signature(s):
clear(XMLAttributes self)int
Clears (deletes) all attributes in this XMLAttributes object.
def libsbml.XMLAttributes.clone | ( | self | ) |
{core}
Representation of attributes on an XML node.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.
Python method signature(s):clone(XMLAttributes self)XMLAttributes
Creates and returns a deep copy of this XMLAttributes set.
def libsbml.XMLAttributes.getIndex | ( | self, | |
args | |||
) |
Python method signature(s):
getIndex(XMLAttributes self, string name)int getIndex(XMLAttributes self, string name, string uri)
int getIndex(XMLAttributes self, XMLTriple triple)
int
This method has multiple variants that differ in the arguments they accept. Each is described separately below.
getIndex(XMLTriple triple)
Return the index of an attribute with the given XMLTriple.
triple | an XMLTriple, the XML triple of the attribute for which the index is required. |
getIndex(string name, string uri)
Return the index of an attribute with the given local name and namespace URI.
name | a string, the local name of the attribute. |
uri | a string, the namespace URI of the attribute. |
getIndex(string name)
Return the index of an attribute with the given name.
name | a string, the local name of the attribute for which the index is required. |
def libsbml.XMLAttributes.getLength | ( | self | ) |
Python method signature(s):
getLength(XMLAttributes self)int
Return the number of attributes in the set.
def libsbml.XMLAttributes.getName | ( | self, | |
args | |||
) |
Python method signature(s):
getName(XMLAttributes self, int index)string
Return the local name of an attribute in this XMLAttributes set (by position).
index | an integer, the position of the attribute whose local name is required. |
def libsbml.XMLAttributes.getNumAttributes | ( | self | ) |
Python method signature(s):
getNumAttributes(XMLAttributes self)int
Return the number of attributes in the set.
This function is an alias for getLength introduced for consistency with other XML classes.
def libsbml.XMLAttributes.getPrefix | ( | self, | |
args | |||
) |
Python method signature(s):
getPrefix(XMLAttributes self, int index)string
Return the prefix of an attribute in this XMLAttributes set (by position).
index | an integer, the position of the attribute whose prefix is required. |
def libsbml.XMLAttributes.getPrefixedName | ( | self, | |
args | |||
) |
Python method signature(s):
getPrefixedName(XMLAttributes self, int index)string
Return the prefixed name of an attribute in this XMLAttributes set (by position).
index | an integer, the position of the attribute whose prefixed name is required. |
def libsbml.XMLAttributes.getURI | ( | self, | |
args | |||
) |
Python method signature(s):
getURI(XMLAttributes self, int index)string
Return the namespace URI of an attribute in this XMLAttributes set (by position).
index | an integer, the position of the attribute whose namespace URI is required. |
def libsbml.XMLAttributes.getValue | ( | self, | |
args | |||
) |
Python method signature(s):
getValue(XMLAttributes self, int index)string getValue(XMLAttributes self, string name)
string getValue(XMLAttributes self, string name, string uri)
string getValue(XMLAttributes self, XMLTriple triple)
string
This method has multiple variants that differ in the arguments they accept. Each is described separately below.
getValue(XMLTriple triple)
Return a value of an attribute with the given XMLTriple.
triple | an XMLTriple, the XML triple of the attribute whose value is required. |
getValue(int index)
Return the value of an attribute in this XMLAttributes set (by position).
index | an integer, the position of the attribute whose value is required. |
getValue(string name)
Return an attribute's value by name.
name | a string, the local name of the attribute whose value is required. |
getValue(string name, string uri)
Return a value of an attribute with the given local name and namespace URI.
name | a string, the local name of the attribute whose value is required. |
uri | a string, the namespace URI of the attribute. |
def libsbml.XMLAttributes.hasAttribute | ( | self, | |
args | |||
) |
Python method signature(s):
hasAttribute(XMLAttributes self, int index)bool hasAttribute(XMLAttributes self, string name, string uri="")
bool hasAttribute(XMLAttributes self, string name)
bool hasAttribute(XMLAttributes self, XMLTriple triple)
bool
This method has multiple variants that differ in the arguments they accept. Each is described separately below.
hasAttribute(XMLTriple triple)
Predicate returning True
or False
depending on whether an attribute with the given XML triple exists in this XMLAttributes.
triple | an XMLTriple, the XML triple of the attribute |
True
if an attribute with the given XML triple exists in this XMLAttributes, False
otherwise.hasAttribute(int index)
Predicate returning True
or False
depending on whether an attribute with the given index exists in this XMLAttributes.
index | an integer, the position of the attribute. |
True
if an attribute with the given index exists in this XMLAttributes, False
otherwise.hasAttribute(string name, string uri='')
Predicate returning True
or False
depending on whether an attribute with the given local name and namespace URI exists in this XMLAttributes.
name | a string, the local name of the attribute. |
uri | a string, the namespace URI of the attribute. |
True
if an attribute with the given local name and namespace URI exists in this XMLAttributes, False
otherwise. def libsbml.XMLAttributes.isEmpty | ( | self | ) |
Python method signature(s):
isEmpty(XMLAttributes self)bool
Predicate returning True
or False
depending on whether this XMLAttributes set is empty.
True
if this XMLAttributes set is empty, False
otherwise. def libsbml.XMLAttributes.remove | ( | self, | |
args | |||
) |
Python method signature(s):
remove(XMLAttributes self, int n)int remove(XMLAttributes self, string name, string uri="")
int remove(XMLAttributes self, string name)
int remove(XMLAttributes self, XMLTriple triple)
int
This method has multiple variants that differ in the arguments they accept. Each is described separately below.
remove(XMLTriple triple)
Removes an attribute with the given XMLTriple from this XMLAttributes set.
triple | an XMLTriple, the XML triple of the attribute. |
remove(int n)
Removes an attribute with the given index from this XMLAttributes set. (This function is an alias of XMLAttributes.removeResource() ).
n | an integer the index of the resource to be deleted |
remove(string name, string uri = '')
Removes an attribute with the given local name and namespace URI from this XMLAttributes set.
name | a string, the local name of the attribute. |
uri | a string, the namespace URI of the attribute. |
def libsbml.XMLAttributes.removeResource | ( | self, | |
args | |||
) |
Python method signature(s):
removeResource(XMLAttributes self, int n)int
Removes an attribute with the given index from this XMLAttributes set.
n | an integer the index of the resource to be deleted |