gnu.xml
Class XName
java.lang.Object
gnu.mapping.Symbol
gnu.xml.XName
- All Implemented Interfaces:
- EnvironmentKey, java.io.Externalizable, java.io.Serializable, java.lang.Comparable
public class XName
- extends Symbol
- implements java.io.Externalizable
A QName with namespace nodes [and future optional type annotation].
- See Also:
- Serialized Form
Methods inherited from class gnu.mapping.Symbol |
compareTo, equals, equals, getKeyProperty, getKeySymbol, getLocalName, getLocalPart, getName, getNamespace, getNamespaceURI, getPrefix, hasEmptyNamespace, hashCode, make, make, makeUninterned, makeWithUnknownNamespace, matches, matches, parse, readResolve, setNamespace, toString |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
XName
public XName()
XName
public XName(Symbol symbol,
NamespaceBinding namespaceNodes)
getNamespaceNodes
public final NamespaceBinding getNamespaceNodes()
- Namespace nodes associated with an element.
These are in inverse document/parse order.
setNamespaceNodes
public final void setNamespaceNodes(NamespaceBinding nodes)
writeExternal
public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
- Specified by:
writeExternal
in interface java.io.Externalizable
- Overrides:
writeExternal
in class Symbol
- Throws:
java.io.IOException
readExternal
public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
- Specified by:
readExternal
in interface java.io.Externalizable
- Overrides:
readExternal
in class Symbol
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
isNameStart
public static boolean isNameStart(int ch)
isNamePart
public static boolean isNamePart(int ch)
isNmToken
public static boolean isNmToken(java.lang.String value)
isName
public static boolean isName(java.lang.String value)
isNCName
public static boolean isNCName(java.lang.String value)
checkName
public static int checkName(java.lang.String value)
- Check if a string is a valid NMTOKEN, Name, or NCName.
- Returns:
- 2 if string is an NCName; otherwise 1 if string is a Name;
otherwise 0 if string is an NMTOKEN; otherwise -1.