Class PName
java.lang.Object
com.fasterxml.aalto.in.PName
- Direct Known Subclasses:
ByteBasedPName, PNameC
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanboundEquals(PName other) Method that compares two bound PNames for semantic equality.final booleanboundEquals(String nsUri, String ln) final intstatic intboundHashCode(String nsURI, String localName) final QNamefinal QNameconstructQName(com.fasterxml.aalto.in.NsBinding defaultNs) Method called to construct a QName representation of elemented represented by this PName.abstract PNamecreateBoundName(com.fasterxml.aalto.in.NsBinding nsb) final booleanabstract intabstract intfinal Stringfinal com.fasterxml.aalto.in.NsBindingfinal StringgetNsUri()final Stringfinal Stringabstract intgetQuad(int index) inthashCode()booleanbooleanfinal booleanisBound()final booleanabstract intfinal StringtoString()final booleanunboundEquals(PName other) final int
-
Field Details
-
_prefixedName
-
_prefix
-
_localName
-
_namespaceBinding
protected com.fasterxml.aalto.in.NsBinding _namespaceBindingBinding of this qualified/prefixed name. Null if there is no prefix; in which case name is either bound to the default namespace (when element name), or no namespace (when other name, like attribute)
-
-
Constructor Details
-
PName
-
-
Method Details
-
createBoundName
-
getPrefixedName
-
getPrefix
- Returns:
- Prefix of this name, if it has one; null if not.
-
getLocalName
-
hasPrefix
public boolean hasPrefix() -
hasPrefixedName
-
getNsBinding
public final com.fasterxml.aalto.in.NsBinding getNsBinding() -
getNsUri
-
constructQName
-
constructQName
Method called to construct a QName representation of elemented represented by this PName. Because of namespace defaulting, current default namespace binding also needs to be passed (since only explicit ones get bound to PName instances). -
needsBinding
public final boolean needsBinding()- Returns:
- True if the name has no binding object, but will need one (has prefix)
-
isBound
public final boolean isBound()- Returns:
- True if the name as described either has no prefix (either belongs to the default ns [elems], or to 'no namespace' [attrs]), or has a prefix that is bound currently. False if name has a prefix that is unbound.
-
boundEquals
Method that compares two bound PNames for semantic equality. This means that the local name, as well as bound URI are compared. -
unboundEquals
-
boundEquals
-
unboundHashCode
public final int unboundHashCode() -
boundHashCode
public final int boundHashCode() -
boundHashCode
-
toString
-
hashCode
-
equals
-
sizeInQuads
public abstract int sizeInQuads() -
getFirstQuad
public abstract int getFirstQuad() -
getQuad
public abstract int getQuad(int index) -
getLastQuad
public abstract int getLastQuad()
-