public class XMLToken extends java.lang.Object
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.
Constructor and Description |
---|
XMLToken()
Creates a new empty
XMLToken . |
XMLToken(java.lang.String chars)
Creates a text
XMLToken . |
XMLToken(java.lang.String chars,
long line)
Creates a text
XMLToken . |
XMLToken(java.lang.String chars,
long line,
long column)
Creates a text
XMLToken . |
XMLToken(XMLToken orig)
Copy constructor creates a copy of this
XMLToken . |
XMLToken(XMLTriple triple)
Creates an end element
XMLToken . |
XMLToken(XMLTriple triple,
long line)
Creates an end element
XMLToken . |
XMLToken(XMLTriple triple,
long line,
long column)
Creates an end element
XMLToken . |
XMLToken(XMLTriple triple,
XMLAttributes attributes)
Creates a start element
XMLToken with the given set of attributes. |
XMLToken(XMLTriple triple,
XMLAttributes attributes,
long line)
Creates a start element
XMLToken with the given set of attributes. |
XMLToken(XMLTriple triple,
XMLAttributes attributes,
long line,
long column)
Creates a start element
XMLToken with the given set of attributes. |
XMLToken(XMLTriple triple,
XMLAttributes attributes,
XMLNamespaces namespaces)
Creates a start element
XMLToken with the given set of attributes and
namespace declarations. |
XMLToken(XMLTriple triple,
XMLAttributes attributes,
XMLNamespaces namespaces,
long line)
Creates a start element
XMLToken with the given set of attributes and
namespace declarations. |
XMLToken(XMLTriple triple,
XMLAttributes attributes,
XMLNamespaces namespaces,
long line,
long column)
Creates a start element
XMLToken with the given set of attributes and
namespace declarations. |
Modifier and Type | Method and Description |
---|---|
int |
addAttr(java.lang.String name,
java.lang.String value)
Adds an attribute to the attribute set in this
XMLToken optionally
with a prefix and URI defining a namespace. |
int |
addAttr(java.lang.String name,
java.lang.String value,
java.lang.String namespaceURI)
Adds an attribute to the attribute set in this
XMLToken optionally
with a prefix and URI defining a namespace. |
int |
addAttr(java.lang.String name,
java.lang.String value,
java.lang.String namespaceURI,
java.lang.String prefix)
Adds an attribute to the attribute set in this
XMLToken optionally
with a prefix and URI defining a namespace. |
int |
addAttr(XMLTriple triple,
java.lang.String value)
|
int |
addNamespace(java.lang.String uri)
Appends an XML namespace prefix and URI pair to this
XMLToken . |
int |
addNamespace(java.lang.String uri,
java.lang.String prefix)
Appends an XML namespace prefix and URI pair to this
XMLToken . |
int |
append(java.lang.String chars)
Appends characters to this XML text content.
|
int |
clearAttributes()
Clears (deletes) all attributes in this
XMLToken . |
int |
clearNamespaces()
Clears (deletes) all XML namespace declarations in the
XMLNamespaces of
this XMLToken . |
XMLToken |
cloneObject()
Creates and returns a deep copy of this
XMLToken . |
void |
delete()
Explicitly deletes the underlying native object.
|
boolean |
equals(java.lang.Object sb)
Equality comparison method for XMLToken.
|
XMLAttributes |
getAttributes()
Returns the attributes of this element.
|
int |
getAttributesLength()
Return the number of attributes in the attributes set.
|
int |
getAttrIndex(java.lang.String name)
Return the index of an attribute with the given local name and namespace URI.
|
int |
getAttrIndex(java.lang.String name,
java.lang.String uri)
Return the index of an attribute with the given local name and namespace URI.
|
int |
getAttrIndex(XMLTriple triple)
Return the index of an attribute with the given
XMLTriple . |
java.lang.String |
getAttrName(int index)
Return the local name of an attribute in the attributes set in this
XMLToken (by position). |
java.lang.String |
getAttrPrefix(int index)
Return the prefix of an attribute in the attribute set in this
XMLToken (by position). |
java.lang.String |
getAttrPrefixedName(int index)
Return the prefixed name of an attribute in the attribute set in this
XMLToken (by position). |
java.lang.String |
getAttrURI(int index)
Return the namespace URI of an attribute in the attribute set in this
XMLToken (by position). |
java.lang.String |
getAttrValue(int index)
Return the value of an attribute in the attribute set in this
XMLToken
(by position). |
java.lang.String |
getAttrValue(java.lang.String name)
Return a value of an attribute with the given local name and namespace URI.
|
java.lang.String |
getAttrValue(java.lang.String name,
java.lang.String uri)
Return a value of an attribute with the given local name and namespace URI.
|
java.lang.String |
getAttrValue(XMLTriple triple)
Return a value of an attribute with the given
XMLTriple . |
java.lang.String |
getCharacters()
Returns the text of this element.
|
long |
getColumn()
Returns the column at which this
XMLToken occurred in the input
document or data stream. |
long |
getLine()
Returns the line at which this
XMLToken occurred in the input document
or data stream. |
java.lang.String |
getName()
Returns the (unqualified) name of this XML element.
|
int |
getNamespaceIndex(java.lang.String uri)
Look up the index of an XML namespace declaration by URI.
|
int |
getNamespaceIndexByPrefix(java.lang.String prefix)
Look up the index of an XML namespace declaration by prefix.
|
java.lang.String |
getNamespacePrefix(int index)
Look up the prefix of an XML namespace declaration by position.
|
java.lang.String |
getNamespacePrefix(java.lang.String uri)
Look up the prefix of an XML namespace declaration by its URI.
|
XMLNamespaces |
getNamespaces()
Returns the XML namespace declarations for this XML element.
|
int |
getNamespacesLength()
Returns the number of XML namespaces stored in the
XMLNamespaces
of this XMLToken . |
java.lang.String |
getNamespaceURI()
Look up the URI of an XML namespace declaration by its prefix.
|
java.lang.String |
getNamespaceURI(int index)
Look up the URI of an XML namespace declaration by its position.
|
java.lang.String |
getNamespaceURI(java.lang.String prefix)
Look up the URI of an XML namespace declaration by its prefix.
|
java.lang.String |
getPrefix()
Returns the namespace prefix of this XML element.
|
java.lang.String |
getURI()
Returns the namespace URI of this XML element.
|
boolean |
hasAttr(int index)
Predicate returning
true or false depending on whether
an attribute with the given index exists in the attribute set in this
XMLToken . |
boolean |
hasAttr(java.lang.String name)
Predicate returning
true or false depending on whether
an attribute with the given local name and namespace URI exists
in the attribute set in this XMLToken . |
boolean |
hasAttr(java.lang.String name,
java.lang.String uri)
Predicate returning
true or false depending on whether
an attribute with the given local name and namespace URI exists
in the attribute set in this XMLToken . |
boolean |
hasAttr(XMLTriple triple)
Predicate returning
true or false depending on whether
an attribute with the given XML triple exists in the attribute set in
this XMLToken |
int |
hashCode()
Returns a hashcode for this XMLToken object.
|
boolean |
hasNamespaceNS(java.lang.String uri,
java.lang.String prefix)
Predicate returning
true or false depending on whether
an XML Namespace with the given uri/prefix pair is contained in the
XMLNamespaces ofthis XMLToken . |
boolean |
hasNamespacePrefix(java.lang.String prefix)
Predicate returning
true or false depending on whether
an XML Namespace with the given prefix is contained in the XMLNamespaces of
this XMLToken . |
boolean |
hasNamespaceURI(java.lang.String uri)
Predicate returning
true or false depending on whether
an XML Namespace with the given URI is contained in the XMLNamespaces of
this XMLToken . |
boolean |
isAttributesEmpty()
Predicate returning
true or false depending on whether
the attribute set in this XMLToken set is empty. |
boolean |
isElement()
|
boolean |
isEnd()
|
boolean |
isEndFor(XMLToken element)
Predicate returning
true or false depending on whether
this XMLToken is an XML end element for the given start element. |
boolean |
isEOF()
|
boolean |
isNamespacesEmpty()
|
boolean |
isStart()
|
boolean |
isText()
|
int |
removeAttr(int n)
Removes an attribute with the given index from the attribute set in
this
XMLToken . |
int |
removeAttr(java.lang.String name)
Removes an attribute with the given local name and namespace URI from
the attribute set in this
XMLToken . |
int |
removeAttr(java.lang.String name,
java.lang.String uri)
Removes an attribute with the given local name and namespace URI from
the attribute set in this
XMLToken . |
int |
removeAttr(XMLTriple triple)
|
int |
removeNamespace(int index)
Removes an XML Namespace stored in the given position of the
XMLNamespaces
of this XMLToken . |
int |
removeNamespace(java.lang.String prefix)
Removes an XML Namespace with the given prefix.
|
int |
setAttributes(XMLAttributes attributes)
Sets an
XMLAttributes to this XMLToken . |
int |
setEnd()
Declares this XML start element is also an end element.
|
int |
setEOF()
Declares this
XMLToken is an end-of-file (input) marker. |
int |
setNamespaces(XMLNamespaces namespaces)
Sets an XMLnamespaces to this XML element.
|
int |
setTriple(XMLTriple triple)
Sets the XMLTripe (name, uri and prefix) of this XML element.
|
java.lang.String |
toString()
Prints a string representation of the underlying token stream, for
debugging purposes.
|
int |
unsetEnd()
Declares this XML start/end element is no longer an end element.
|
public XMLToken() throws XMLConstructorException
XMLToken
.XMLConstructorException
public XMLToken(java.lang.String chars) throws XMLConstructorException
XMLToken
.
chars
- a string, the text to be added to the XMLToken
line
- a long integer, the line number (default = 0).column
- a long integer, the column number (default = 0).
XMLConstructorException
- Thrown if the argument orig
is null.
public XMLToken(java.lang.String chars, long line) throws XMLConstructorException
XMLToken
.
chars
- a string, the text to be added to the XMLToken
line
- a long integer, the line number (default = 0).column
- a long integer, the column number (default = 0).
XMLConstructorException
- Thrown if the argument orig
is null.
public XMLToken(java.lang.String chars, long line, long column) throws XMLConstructorException
XMLToken
.
chars
- a string, the text to be added to the XMLToken
line
- a long integer, the line number (default = 0).column
- a long integer, the column number (default = 0).
XMLConstructorException
- Thrown if the argument orig
is null.
public XMLToken(XMLToken orig) throws XMLConstructorException
XMLToken
.
orig
- the XMLToken
object to copy.
XMLConstructorException
- Thrown if the argument orig
is null.
public XMLToken(XMLTriple triple) throws XMLConstructorException
XMLToken
.
triple
- XMLTriple
.line
- a long integer, the line number (default = 0).column
- a long integer, the column number (default = 0).
XMLConstructorException
public XMLToken(XMLTriple triple, long line) throws XMLConstructorException
XMLToken
.
triple
- XMLTriple
.line
- a long integer, the line number (default = 0).column
- a long integer, the column number (default = 0).
XMLConstructorException
public XMLToken(XMLTriple triple, long line, long column) throws XMLConstructorException
XMLToken
.
triple
- XMLTriple
.line
- a long integer, the line number (default = 0).column
- a long integer, the column number (default = 0).
XMLConstructorException
public XMLToken(XMLTriple triple, XMLAttributes attributes) throws XMLConstructorException
XMLToken
with the given set of attributes.
triple
- XMLTriple
.attributes
- XMLAttributes
, the attributes to set.line
- a long integer, the line number (default = 0).column
- a long integer, the column number (default = 0).
XMLConstructorException
public XMLToken(XMLTriple triple, XMLAttributes attributes, long line) throws XMLConstructorException
XMLToken
with the given set of attributes.
triple
- XMLTriple
.attributes
- XMLAttributes
, the attributes to set.line
- a long integer, the line number (default = 0).column
- a long integer, the column number (default = 0).
XMLConstructorException
public XMLToken(XMLTriple triple, XMLAttributes attributes, long line, long column) throws XMLConstructorException
XMLToken
with the given set of attributes.
triple
- XMLTriple
.attributes
- XMLAttributes
, the attributes to set.line
- a long integer, the line number (default = 0).column
- a long integer, the column number (default = 0).
XMLConstructorException
public XMLToken(XMLTriple triple, XMLAttributes attributes, XMLNamespaces namespaces) throws XMLConstructorException
XMLToken
with the given set of attributes and
namespace declarations.
triple
- XMLTriple
.attributes
- XMLAttributes
, the attributes to set.namespaces
- XMLNamespaces
, the namespaces to set.line
- a long integer, the line number (default = 0).column
- a long integer, the column number (default = 0).
XMLConstructorException
public XMLToken(XMLTriple triple, XMLAttributes attributes, XMLNamespaces namespaces, long line) throws XMLConstructorException
XMLToken
with the given set of attributes and
namespace declarations.
triple
- XMLTriple
.attributes
- XMLAttributes
, the attributes to set.namespaces
- XMLNamespaces
, the namespaces to set.line
- a long integer, the line number (default = 0).column
- a long integer, the column number (default = 0).
XMLConstructorException
public XMLToken(XMLTriple triple, XMLAttributes attributes, XMLNamespaces namespaces, long line, long column) throws XMLConstructorException
XMLToken
with the given set of attributes and
namespace declarations.
triple
- XMLTriple
.attributes
- XMLAttributes
, the attributes to set.namespaces
- XMLNamespaces
, the namespaces to set.line
- a long integer, the line number (default = 0).column
- a long integer, the column number (default = 0).
XMLConstructorException
public int addAttr(java.lang.String name, java.lang.String value)
XMLToken
optionally
with a prefix and URI defining a namespace.
Nothing will be done if this XMLToken
is not a start element.
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
public int addAttr(java.lang.String name, java.lang.String value, java.lang.String namespaceURI)
XMLToken
optionally
with a prefix and URI defining a namespace.
Nothing will be done if this XMLToken
is not a start element.
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
public int addAttr(java.lang.String name, java.lang.String value, java.lang.String namespaceURI, java.lang.String prefix)
XMLToken
optionally
with a prefix and URI defining a namespace.
Nothing will be done if this XMLToken
is not a start element.
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
public int addAttr(XMLTriple triple, java.lang.String value)
XMLTriple
/value pair to the attribute set
in this XMLToken
.
Nothing will be done if this XMLToken
is not a start element.
triple
- an XMLTriple
, the XML triple of the attribute.value
- a string, the value of the attribute.
public int addNamespace(java.lang.String uri)
XMLToken
.
If there is an XML namespace with the given prefix in this XMLToken
,
then the existing XML namespace will be overwritten by the new one.
Nothing will be done if this XMLToken
is not a start element.
uri
- a string, the uri for the namespaceprefix
- a string, the prefix for the namespace
public int addNamespace(java.lang.String uri, java.lang.String prefix)
XMLToken
.
If there is an XML namespace with the given prefix in this XMLToken
,
then the existing XML namespace will be overwritten by the new one.
Nothing will be done if this XMLToken
is not a start element.
uri
- a string, the uri for the namespaceprefix
- a string, the prefix for the namespace
public int append(java.lang.String chars)
chars
- string, characters to append
public int clearAttributes()
XMLToken
.
Nothing will be done if this XMLToken
is not a start element.
public int clearNamespaces()
XMLNamespaces
of
this XMLToken
.
Nothing will be done if this XMLToken
is not a start element.
public XMLToken cloneObject()
XMLToken
.
XMLToken
set.public void delete()
In general, application software will not need to call this method directly. The Java language binding for libSBML is implemented as a language wrapper that provides a Java interface to libSBML's underlying C++/C code. Some of the Java methods return objects that are linked to objects created not by Java code, but by C++ code. The Java objects wrapped around them will be deleted when the garbage collector invokes the corresponding C++ finalize()
methods for the objects. The finalize()
methods in turn call the XMLToken.delete()
method on the libSBML object.
This method is exposed in case calling programs want to ensure that the underlying object is freed immediately, and not at some arbitrary time determined by the Java garbage collector. In normal usage, callers do not need to invoke XMLToken.delete()
themselves.
public boolean equals(java.lang.Object sb)
Because the Java methods for libSBML are actually wrappers around code
implemented in C++ and C, certain operations will not behave as
expected. Equality comparison is one such case. An instance of a
libSBML object class is actually a proxy object
wrapping the real underlying C/C++ object. The normal ==
equality operator in Java will only compare the Java proxy objects,
not the underlying native object. The result is almost never what you
want in practical situations. Unfortunately, Java does not provide a
way to override ==
.
The alternative that must be followed is to use the
equals()
method. The equals
method on this
class overrides the default java.lang.Object one, and performs an
intelligent comparison of instances of objects of this class. The
result is an assessment of whether two libSBML Java objects are truly
the same underlying native-code objects.
The use of this method in practice is the same as the use of any other
Java equals
method. For example,
a.equals(
b)
returns
true
if a and b are references to the
same underlying object.
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 XMLAttributes getAttributes()
XMLAttributes
of this XML element.public int getAttributesLength()
XMLToken
.public int getAttrIndex(java.lang.String name)
name
- a string, the local name of the attribute.uri
- a string, the namespace URI of the attribute.
-1
if not present.
public int getAttrIndex(java.lang.String name, java.lang.String uri)
name
- a string, the local name of the attribute.uri
- a string, the namespace URI of the attribute.
-1
if not present.
public int getAttrIndex(XMLTriple triple)
XMLTriple
.
public java.lang.String getAttrName(int index)
XMLToken
(by position).
index
- an integer, the position of the attribute whose local name
is required.
XMLToken.hasAttr(int index)
to test for the attribute existence.public java.lang.String getAttrPrefix(int index)
XMLToken
(by position).
index
- an integer, the position of the attribute whose prefix is
required.
XMLToken.hasAttr(int index)
to test
for the attribute existence.public java.lang.String getAttrPrefixedName(int index)
XMLToken
(by position).
index
- an integer, the position of the attribute whose prefixed
name is required.
XMLToken.hasAttr(int index)
to test
for attribute existence.public java.lang.String getAttrURI(int index)
XMLToken
(by position).
index
- an integer, the position of the attribute whose namespace
URI is required.
XMLToken.hasAttr(int index)
to test
for attribute existence.public java.lang.String getAttrValue(int index)
XMLToken
(by position).
index
- an integer, the position of the attribute whose value is
required.
XMLToken.hasAttr(int index)
to test
for attribute existence.public java.lang.String getAttrValue(java.lang.String name)
name
- a string, the local name of the attribute whose value is required.uri
- a string, the namespace URI of the attribute.
XMLToken.hasAttr(String name, String uri)
to test for attribute existence.
public java.lang.String getAttrValue(java.lang.String name, java.lang.String uri)
name
- a string, the local name of the attribute whose value is required.uri
- a string, the namespace URI of the attribute.
XMLToken.hasAttr(String name, String uri)
to test for attribute existence.
public java.lang.String getAttrValue(XMLTriple triple)
XMLTriple
.
triple
- an XMLTriple
, the XML triple of the attribute whose
value is required.
XMLTriple
does not exist, an empty string will be returned.
Use XMLToken.hasAttr(XMLTriple triple)
to test for attribute existence.public java.lang.String getCharacters()
public long getColumn()
XMLToken
occurred in the input
document or data stream.
XMLToken
occurred.public long getLine()
XMLToken
occurred in the input document
or data stream.
XMLToken
occurred.public java.lang.String getName()
public int getNamespaceIndex(java.lang.String uri)
uri
- a string, uri of the required namespace.
-1
if not present.public int getNamespaceIndexByPrefix(java.lang.String prefix)
prefix
- a string, prefix of the required namespace.
-1
if not present.public java.lang.String getNamespacePrefix(int index)
Callers should use getNamespacesLength() to find out how many
namespaces are stored in the XMLNamespaces
.
index
- an integer, position of the required prefix.
XMLNamespaces
(by position).
XMLToken.getNamespacesLength()
public java.lang.String getNamespacePrefix(java.lang.String uri)
uri
- a string, the URI of the prefix being sought
uri
does not exist, an empty string will be returned.public XMLNamespaces getNamespaces()
public int getNamespacesLength()
XMLNamespaces
of this XMLToken
.
public java.lang.String getNamespaceURI()
prefix
- a string, the prefix of the required URI
prefix
does not exist, an empty string will be returned.
public java.lang.String getNamespaceURI(int index)
index
- an integer, position of the required URI.
XMLNamespaces
(by position).
XMLToken.getNamespacesLength()
index
is out of range, an empty string will be
returned.
public java.lang.String getNamespaceURI(java.lang.String prefix)
prefix
- a string, the prefix of the required URI
prefix
does not exist, an empty string will be returned.
public java.lang.String getPrefix()
public java.lang.String getURI()
public boolean hasAttr(int index)
true
or false
depending on whether
an attribute with the given index exists in the attribute set in this
XMLToken
.
index
- an integer, the position of the attribute.
true
if an attribute with the given index exists in the attribute
set in this XMLToken
, false
otherwise.public boolean hasAttr(java.lang.String name)
true
or false
depending on whether
an attribute with the given local name and namespace URI exists
in the attribute set in this XMLToken
.
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 the attribute set in this XMLToken
, false
otherwise.
public boolean hasAttr(java.lang.String name, java.lang.String uri)
true
or false
depending on whether
an attribute with the given local name and namespace URI exists
in the attribute set in this XMLToken
.
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 the attribute set in this XMLToken
, false
otherwise.
public boolean hasAttr(XMLTriple triple)
true
or false
depending on whether
an attribute with the given XML triple exists in the attribute set in
this XMLToken
public int hashCode()
hashCode
 in class java.lang.Object
public boolean hasNamespaceNS(java.lang.String uri, java.lang.String prefix)
true
or false
depending on whether
an XML Namespace with the given uri/prefix pair is contained in the
XMLNamespaces
ofthis XMLToken
.
uri
- a string, the uri for the namespaceprefix
- a string, the prefix for the namespace
true
if an XML Namespace with the given uri/prefix pair is
contained in the XMLNamespaces
of this XMLToken
, false
otherwise.public boolean hasNamespacePrefix(java.lang.String prefix)
true
or false
depending on whether
an XML Namespace with the given prefix is contained in the XMLNamespaces
of
this XMLToken
.
prefix
- a string, the prefix for the namespace
true
if an XML Namespace with the given URI is contained in the
XMLNamespaces
of this XMLToken
, false
otherwise.public boolean hasNamespaceURI(java.lang.String uri)
true
or false
depending on whether
an XML Namespace with the given URI is contained in the XMLNamespaces
of
this XMLToken
.
uri
- a string, the uri for the namespace
true
if an XML Namespace with the given URI is contained in the
XMLNamespaces
of this XMLToken
, false
otherwise.public boolean isAttributesEmpty()
true
or false
depending on whether
the attribute set in this XMLToken
set is empty.
true
if the attribute set in this XMLToken
is empty,
false
otherwise.public boolean isElement()
true
if this XMLToken
is an XML element, false
otherwise.public boolean isEnd()
true
if this XMLToken
is an XML end element, false
otherwise.public boolean isEndFor(XMLToken element)
true
or false
depending on whether
this XMLToken
is an XML end element for the given start element.
public boolean isEOF()
true
if this XMLToken
is an end of file (input) marker, false
otherwise.public boolean isNamespacesEmpty()
true
if the XMLNamespaces
of this XMLToken
is empty,
false
otherwise.public boolean isStart()
true
if this XMLToken
is an XML start element, false
otherwise.public boolean isText()
true
if this XMLToken
is an XML text element, false
otherwise.public int removeAttr(int n)
XMLToken
.
Nothing will be done if this XMLToken
is not a start element.
n
- an integer the index of the resource to be deleted
public int removeAttr(java.lang.String name)
XMLToken
.
Nothing will be done if this XMLToken
is not a start element.
name
- a string, the local name of the attribute.uri
- a string, the namespace URI of the attribute.
public int removeAttr(java.lang.String name, java.lang.String uri)
XMLToken
.
Nothing will be done if this XMLToken
is not a start element.
name
- a string, the local name of the attribute.uri
- a string, the namespace URI of the attribute.
public int removeAttr(XMLTriple triple)
XMLTriple
from the attribute set
in this XMLToken
.
Nothing will be done if this XMLToken
is not a start element.
triple
- an XMLTriple
, the XML triple of the attribute.
public int removeNamespace(int index)
XMLNamespaces
of this XMLToken
.
Nothing will be done if this XMLToken
is not a start element.
index
- an integer, position of the removed namespace.
public int removeNamespace(java.lang.String prefix)
XMLToken
is not a start element.
prefix
- a string, prefix of the required namespace.
public int setAttributes(XMLAttributes attributes)
XMLAttributes
to this XMLToken
.
Nothing will be done if this XMLToken
is not a start element.
attributes
- XMLAttributes
to be set to this XMLToken
.
XMLAttributes
with the new one.public int setEnd()
public int setEOF()
XMLToken
is an end-of-file (input) marker.
public int setNamespaces(XMLNamespaces namespaces)
XMLToken
is not a start element.
namespaces
- XMLNamespaces
to be set to this XMLToken
.
XMLNamespaces
with the new one.public int setTriple(XMLTriple triple)
triple
- XMLTriple
to be added to this XML element.
public java.lang.String toString()
toString
 in class java.lang.Object
public int unsetEnd()