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 int
checkName(String value)
Check if a string is a valid NMTOKEN, Name, or NCName.NamespaceBinding
getNamespaceNodes()
Namespace nodes associated with an element.static boolean
isName(String value)
static boolean
isNamePart(int ch)
static boolean
isNameStart(int ch)
static boolean
isNCName(String value)
static boolean
isNmToken(String value)
void
readExternal(ObjectInput in)
void
setNamespaceNodes(NamespaceBinding nodes)
void
writeExternal(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:
writeExternal
in interfaceExternalizable
- Overrides:
writeExternal
in classSymbol
- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternal
in interfaceExternalizable
- Overrides:
readExternal
in classSymbol
- Throws:
IOException
ClassNotFoundException
-
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.
-
-