libSBML C# API  5.18.0
libsbmlcs.XMLTriple Class Reference
Inheritance diagram for libsbmlcs.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

XMLTriple clone ()
 Creates and returns a deep copy of this XMLTriple object. More...
 
virtual void Dispose ()
 
string getName ()
 Returns the name portion of this XMLTriple object. More...
 
string getPrefix ()
 Returns the prefix portion of this XMLTriple object. More...
 
string getPrefixedName ()
 Returns the prefixed name from this XMLTriple. More...
 
string getURI ()
 Returns the URI portion of this XMLTriple object. More...
 
bool isEmpty ()
 Returns true if this XMLTriple object is empty. More...
 
 XMLTriple ()
 Creates a new, empty XMLTriple object. More...
 
 XMLTriple (string name, string uri, string prefix)
 Creates a new XMLTriple object with a given name, uri and and prefix. More...
 
 XMLTriple (string triplet, char sepchar)
 Creates an XMLTriple object by splitting a given string at a given separator character. More...
 
 XMLTriple (string triplet)
 Creates an XMLTriple object by splitting a given string at a given separator character. More...
 
 XMLTriple (XMLTriple orig)
 Copy constructor; creates a copy of this XMLTriple object. More...
 

Protected Attributes

bool swigCMemOwn
 

Constructor & Destructor Documentation

libsbmlcs.XMLTriple.XMLTriple ( )

Creates a new, empty XMLTriple object.

libsbmlcs.XMLTriple.XMLTriple ( string  name,
string  uri,
string  prefix 
)

Creates a new XMLTriple object with a given name, uri and and prefix.

Parameters
namea string, the name for the entity represented by this object.
uria string, the XML namespace URI associated with the prefix.
prefixa string, the XML namespace prefix for this triple.
libsbmlcs.XMLTriple.XMLTriple ( string  triplet,
char  sepchar 
)

Creates an XMLTriple object by splitting a given string at a given separator character.

The 'triplet' in this case is a string that may be in one of the following three possible formats:

  1. name
  2. URIxname
  3. URIxnamexprefix

where x represents the separator character, sepchar.

Parameters
tripleta string representing the triplet as shown above.
sepchara character, the sepchar used in the triplet.
Documentation note:
The native C++ implementation of this method defines a default argument value. In the documentation generated for different libSBML language bindings, you may or may not see corresponding arguments in the method declarations. For example, in Java and C#, a default argument is handled by declaring two separate methods, with one of them having the argument and the other one lacking the argument. However, the libSBML documentation will be identical for both methods. Consequently, if you are reading this and do not see an argument even though one is described, please look for descriptions of other variants of this method near where this one appears in the documentation.
libsbmlcs.XMLTriple.XMLTriple ( string  triplet)

Creates an XMLTriple object by splitting a given string at a given separator character.

The 'triplet' in this case is a string that may be in one of the following three possible formats:

  1. name
  2. URIxname
  3. URIxnamexprefix

where x represents the separator character, sepchar.

Parameters
tripleta string representing the triplet as shown above.
sepchara character, the sepchar used in the triplet.
Documentation note:
The native C++ implementation of this method defines a default argument value. In the documentation generated for different libSBML language bindings, you may or may not see corresponding arguments in the method declarations. For example, in Java and C#, a default argument is handled by declaring two separate methods, with one of them having the argument and the other one lacking the argument. However, the libSBML documentation will be identical for both methods. Consequently, if you are reading this and do not see an argument even though one is described, please look for descriptions of other variants of this method near where this one appears in the documentation.
libsbmlcs.XMLTriple.XMLTriple ( XMLTriple  orig)

Copy constructor; creates a copy of this XMLTriple object.

Parameters
origthe XMLTriple object to copy.

Member Function Documentation

XMLTriple libsbmlcs.XMLTriple.clone ( )

Creates and returns a deep copy of this XMLTriple object.

Returns
the (deep) copy of this XMLTriple object.
virtual void libsbmlcs.XMLTriple.Dispose ( )
virtual
string libsbmlcs.XMLTriple.getName ( )

Returns the name portion of this XMLTriple object.

Returns
a string, the name portion of this XMLTriple object.
string libsbmlcs.XMLTriple.getPrefix ( )

Returns the prefix portion of this XMLTriple object.

Returns
a string, the prefix portion of this XMLTriple object.
string libsbmlcs.XMLTriple.getPrefixedName ( )

Returns the prefixed name from this XMLTriple.

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.
string libsbmlcs.XMLTriple.getURI ( )

Returns the URI portion of this XMLTriple object.

Returns
URI a string, the URI portion of this XMLTriple object.
bool libsbmlcs.XMLTriple.isEmpty ( )

Returns true if this XMLTriple object is empty.

Returns
true if this XMLTriple is empty, false otherwise.

Member Data Documentation

bool libsbmlcs.XMLTriple.swigCMemOwn
protected