org.sbml.jsbml.xml
public class XMLTriple extends java.lang.Object
This class of objects is defined by jsbml 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 jsbml 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:
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' />
XMLTriple
objects are the lowest-level data item in the XML layer
of jsbml. Other objects such as XMLToken
make use of XMLTriple
objects.
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
name |
private java.lang.String |
namespaceURI |
private java.lang.String |
prefix |
Constructor and Description |
---|
XMLTriple()
Creates a new, empty
XMLTriple . |
XMLTriple(java.lang.String triplet)
Creates a new
XMLTriple by splitting the given triplet
separated by space. |
XMLTriple(java.lang.String triplet,
char sepchar)
|
XMLTriple(java.lang.String name,
java.lang.String uri,
java.lang.String prefix)
|
XMLTriple(XMLTriple orig)
Creates a copy of this
XMLTriple set. |
Modifier and Type | Method and Description |
---|---|
XMLTriple |
clone()
Creates and returns a deep copy of this
XMLTriple set. |
boolean |
equals(java.lang.Object sb)
Equality comparison method for XMLTriple.
|
java.lang.String |
getName()
Returns the name portion of this
XMLTriple . |
java.lang.String |
getPrefix()
Returns the prefix portion of this
XMLTriple . |
java.lang.String |
getPrefixedName()
Returns the prefixed name from this
XMLTriple . |
java.lang.String |
getURI()
Returns the URI portion of this
XMLTriple . |
int |
hashCode()
Returns a hashcode for this XMLTriple object.
|
boolean |
isEmpty()
Deprecated.
libSBML internal
|
java.lang.String |
toString() |
private java.lang.String name
private java.lang.String prefix
private java.lang.String namespaceURI
public XMLTriple()
XMLTriple
.public XMLTriple(java.lang.String name, java.lang.String uri, java.lang.String prefix)
public XMLTriple(java.lang.String triplet, char sepchar)
XMLTriple
by splitting the given triplet
on the
separator character sepchar
.
Triplet may be in one of the following formats:
triplet
- a string representing the triplet as abovesepchar
- a character, the sepchar used in the triplet
public XMLTriple(java.lang.String triplet)
XMLTriple
by splitting the given triplet
separated by space.
Triplet may be in one of the following formats:
triplet
- a string representing the triplet as above
public boolean equals(java.lang.Object sb)
equals
in class java.lang.Object
sb
- a reference to an object to which the current object
instance will be comparedtrue
if sb
refers to the same underlying
native object as this one, false
otherwisepublic int hashCode()
hashCode
in class java.lang.Object
public XMLTriple clone()
XMLTriple
set.
clone
in class java.lang.Object
XMLTriple
set.public java.lang.String getName()
XMLTriple
.
XMLTriple
.public java.lang.String getPrefix()
XMLTriple
.
XMLTriple
.public java.lang.String getURI()
XMLTriple
.
XMLTriple
.public java.lang.String getPrefixedName()
XMLTriple
.
XMLTriple
.@Deprecated public boolean isEmpty()
true
if this XMLTriple
is empty, false
otherwise.
public java.lang.String toString()
toString
in class java.lang.Object