|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.idoox.xml.Token
This class is a java mapping to the start/end of an element. XML element can be thought of as two XML token. Start token with local name, namespace URI and array of attributes and end token with local name and namespace URI.
Field Summary | |
Attribute[] |
attArr
an array of attributes. |
int |
attEnd
position of the end of attributes array |
java.lang.String |
localName
the local name of the element |
java.lang.String |
prefix
prefix of this Token |
byte |
type
the type of the token; one of Tokenizer.UNKNOWN, Tokenizer.START_TOKEN, Tokenizer.END_TOKEN |
java.lang.String |
uri
the uri of the element |
Constructor Summary | |
Token()
|
Method Summary | |
void |
clear()
Not to be called from an application. |
void |
ensureCapacity(int size)
Not to be called from the application. |
Attribute |
getAttribute(int idx)
Get an attribute. |
int |
getAttributeCount()
Returns the number of attributes of the filled start token. |
java.lang.String |
getAttributeLocalName(int index)
Returns local name for the attribute. |
java.lang.String |
getAttributeNamespace(int index)
Returns namespace URI for the attribute |
java.lang.String |
getAttributeValue(int index)
Returns value for the attribute |
java.lang.String |
getAttributeValue(java.lang.String uri,
java.lang.String localName)
Returns value for an attribute given by name. |
java.lang.String |
getLocalName()
Returns the local name of the token. |
java.lang.String |
getNamespace()
Returns the namespace URI of the token. |
byte |
getType()
Returns the type of the token. |
java.lang.String |
toString()
Returns the string representation of the token. |
void |
writeTo(Token token)
Copy this token to new one. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public byte type
public java.lang.String uri
public java.lang.String localName
public int attEnd
public Attribute[] attArr
attEnd
(excluding) are part
of the value of this token. No reference in this array
is ever null
. Also all referenced Attribute
instances must be unique.
public java.lang.String prefix
Constructor Detail |
public Token()
Method Detail |
public byte getType()
public void clear()
public java.lang.String getLocalName()
public java.lang.String getNamespace()
public int getAttributeCount()
public java.lang.String getAttributeLocalName(int index)
index
- the position of the attribute
public java.lang.String getAttributeNamespace(int index)
index
- the position of the attribute
public java.lang.String getAttributeValue(int index)
index
- the position of the attribute
public java.lang.String getAttributeValue(java.lang.String uri, java.lang.String localName)
uri
- the namespace URI of the attributelocalName
- the local name of the attribute
public java.lang.String toString()
public Attribute getAttribute(int idx)
idx
- index of the attribute
public void ensureCapacity(int size)
size
- the size which should be ensuredpublic void writeTo(Token token)
token
- the token to be copied
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |