Package gnu.xml
Class XName
- java.lang.Object
-
- gnu.mapping.Symbol
-
- gnu.xml.XName
-
- All Implemented Interfaces:
EnvironmentKey,Externalizable,Serializable,Comparable
public class XName extends Symbol implements Externalizable
A QName with namespace nodes [and future optional type annotation].- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description XName()XName(Symbol symbol, NamespaceBinding namespaceNodes)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static intcheckName(String value)Check if a string is a valid NMTOKEN, Name, or NCName.NamespaceBindinggetNamespaceNodes()Namespace nodes associated with an element.static booleanisName(String value)static booleanisNamePart(int ch)static booleanisNameStart(int ch)static booleanisNCName(String value)static booleanisNmToken(String value)voidreadExternal(ObjectInput in)voidsetNamespaceNodes(NamespaceBinding nodes)voidwriteExternal(ObjectOutput out)-
Methods inherited from class gnu.mapping.Symbol
compareTo, equals, equals, getKeyProperty, getKeySymbol, getLocalName, getLocalPart, getName, getNamespace, getNamespaceURI, getPrefix, hasEmptyNamespace, hashCode, hasUnknownNamespace, make, make, makeUninterned, makeUninterned, makeWithUnknownNamespace, matches, matches, parse, readResolve, setNamespace, toString, toString, valueOf, valueOf, valueOf
-
-
-
-
Constructor Detail
-
XName
public XName()
-
XName
public XName(Symbol symbol, NamespaceBinding namespaceNodes)
-
-
Method Detail
-
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(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Overrides:
writeExternalin classSymbol- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Overrides:
readExternalin classSymbol- Throws:
IOExceptionClassNotFoundException
-
isNameStart
public static boolean isNameStart(int ch)
-
isNamePart
public static boolean isNamePart(int ch)
-
isNmToken
public static boolean isNmToken(String value)
-
isName
public static boolean isName(String value)
-
isNCName
public static boolean isNCName(String value)
-
checkName
public static int checkName(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.
-
-