libsbml.XMLAttributes Class Reference

Inheritance diagram for libsbml.XMLAttributes:

Inheritance graph
[legend]

List of all members.


Detailed Description

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.

Definition at line 26919 of file libsbml.py.


Public Member Functions

def __eq__
def __init__
def __ne__
def add
def clear
def clone
def getIndex
def getLength
def getName
def getPrefix
def getPrefixedName
def getURI
def getValue
def hasAttribute
def isEmpty
def remove
def removeResource

Public Attributes

 this

Member Function Documentation

def libsbml.XMLAttributes.__eq__ (   self,
  rhs 
)

Definition at line 27245 of file libsbml.py.

def libsbml.XMLAttributes.__init__ (   self,
  args 
)

Python method signature(s):

__init__(self)    XMLAttributes
__init__(self, XMLAttributes orig)    XMLAttributes

Copy constructor; creates a copy of this XMLAttributes set.

Definition at line 26934 of file libsbml.py.

def libsbml.XMLAttributes.__ne__ (   self,
  rhs 
)

Definition at line 27252 of file libsbml.py.

def libsbml.XMLAttributes.add (   self,
  args 
)

Python method signature(s):

add(self, string name, string value, string namespaceURI = "", 
    string prefix = "")    int
add(self, string name, string value, string namespaceURI = "")    int
add(self, string name, string value)    int
add(self, XMLTriple triple, string value)    int

Adds an attribute with the given XMLTriple/value pair to this XMLAttributes set.

Note:
if local name with the same namespace URI already exists in this attribute set, its value and prefix will be replaced.
Parameters:
triple an XMLTriple, the XML triple of the attribute.
value a string, the value of the attribute.
Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBSBML_OPERATION_SUCCESS

Definition at line 26964 of file libsbml.py.

def libsbml.XMLAttributes.clear (   self  ) 

Python method signature(s):

clear(self)    int

Clears (deletes) all attributes in this XMLAttributes object.

Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBSBML_OPERATION_SUCCESS

Definition at line 27039 of file libsbml.py.

def libsbml.XMLAttributes.clone (   self  ) 

Python method signature(s):

clone(self)    XMLAttributes

Creates and returns a deep copy of this XMLAttributes set.

Returns:
a (deep) copy of this XMLAttributes set.

Definition at line 26949 of file libsbml.py.

def libsbml.XMLAttributes.getIndex (   self,
  args 
)

Python method signature(s):

getIndex(self, string name)    int
getIndex(self, string name, string uri)    int
getIndex(self, XMLTriple triple)    int

Return the index of an attribute with the given XMLTriple.

Parameters:
triple an XMLTriple, the XML triple of the attribute for which the index is required.
Returns:
the index of an attribute with the given XMLTriple, or -1 if not present.

Definition at line 27058 of file libsbml.py.

def libsbml.XMLAttributes.getLength (   self  ) 

Python method signature(s):

getLength(self)    int

Return the number of attributes in the set.

Returns:
the number of attributes in this XMLAttributes set.

Definition at line 27078 of file libsbml.py.

def libsbml.XMLAttributes.getName (   self,
  args 
)

Python method signature(s):

getName(self, int index)    string

Return the local name of an attribute in this XMLAttributes set (by position).

Parameters:
index an integer, the position of the attribute whose local name is required.
Returns:
the local name of an attribute in this list (by position).
Note:
If index is out of range, an empty string will be returned. Use XMLAttributes.hasAttribute(int index) to test for the attribute existence.

Definition at line 27093 of file libsbml.py.

def libsbml.XMLAttributes.getPrefix (   self,
  args 
)

Python method signature(s):

getPrefix(self, int index)    string

Return the prefix of an attribute in this XMLAttributes set (by position).

Parameters:
index an integer, the position of the attribute whose prefix is required.
Returns:
the namespace prefix of an attribute in this list (by position).
Note:
If index is out of range, an empty string will be returned. Use XMLAttributes.hasAttribute(int index) to test for the attribute existence.

Definition at line 27115 of file libsbml.py.

def libsbml.XMLAttributes.getPrefixedName (   self,
  args 
)

Python method signature(s):

getPrefixedName(self, int index)    string

Return the prefixed name of an attribute in this XMLAttributes set (by position).

Parameters:
index an integer, the position of the attribute whose prefixed name is required.
Returns:
the prefixed name of an attribute in this list (by position).
Note:
If index is out of range, an empty string will be returned. Use XMLAttributes.hasAttribute(int index) to test for attribute existence.

Definition at line 27138 of file libsbml.py.

def libsbml.XMLAttributes.getURI (   self,
  args 
)

Python method signature(s):

getURI(self, int index)    string

Return the namespace URI of an attribute in this XMLAttributes set (by position).

Parameters:
index an integer, the position of the attribute whose namespace URI is required.
Returns:
the namespace URI of an attribute in this list (by position).
Note:
If index is out of range, an empty string will be returned. Use XMLAttributes.hasAttribute(int index) to test for attribute existence.

Definition at line 27160 of file libsbml.py.

def libsbml.XMLAttributes.getValue (   self,
  args 
)

Python method signature(s):

getValue(self, int index)    string
getValue(self, string name)    string
getValue(self, string name, string uri)    string
getValue(self, XMLTriple triple)    string

Return a value of an attribute with the given XMLTriple.

Parameters:
triple an XMLTriple, the XML triple of the attribute whose value is required.
Returns:
The attribute value as a string.
Note:
If an attribute with the given XMLTriple does not exist, an empty string will be returned. Use XMLAttributes.hasAttribute(const XMLTriple& triple) to test for attribute existence.

Definition at line 27181 of file libsbml.py.

def libsbml.XMLAttributes.hasAttribute (   self,
  args 
)

Python method signature(s):

hasAttribute(self, int index)    bool
hasAttribute(self, string name, string uri = "")    bool
hasAttribute(self, string name)    bool
hasAttribute(self, XMLTriple triple)    bool

Predicate returning true or false depending on whether an attribute with the given XML triple exists in this XMLAttributes.

Parameters:
triple an XMLTriple, the XML triple of the attribute
Returns:
true if an attribute with the given XML triple exists in this XMLAttributes, false otherwise.

Definition at line 27206 of file libsbml.py.

def libsbml.XMLAttributes.isEmpty (   self  ) 

Python method signature(s):

isEmpty(self)    bool

Predicate returning true or false depending on whether this XMLAttributes set is empty.

Returns:
true if this XMLAttributes set is empty, false otherwise.

Definition at line 27229 of file libsbml.py.

def libsbml.XMLAttributes.remove (   self,
  args 
)

Python method signature(s):

remove(self, int n)    int
remove(self, string name, string uri = "")    int
remove(self, string name)    int
remove(self, XMLTriple triple)    int

Removes an attribute with the given XMLTriple from this XMLAttributes set.

Parameters:
triple an XMLTriple, the XML triple of the attribute.
Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBSBML_OPERATION_SUCCESS
  • LIBSBML_INDEX_EXCEEDS_SIZE

Definition at line 27014 of file libsbml.py.

def libsbml.XMLAttributes.removeResource (   self,
  args 
)

Python method signature(s):

removeResource(self, int n)    int

Removes an attribute with the given index from this XMLAttributes set.

Parameters:
n an integer the index of the resource to be deleted
Returns:
integer value indicating success/failure of the function. The possible values returned by this function are:
  • LIBSBML_OPERATION_SUCCESS
  • LIBSBML_INDEX_EXCEEDS_SIZE

Definition at line 26993 of file libsbml.py.


Member Data Documentation

Definition at line 26948 of file libsbml.py.




HTML documentation generated on Thu Jan 21 16:56:20 2010 using Doxygen 1.5.8.