public abstract class QualifiedNameValue extends AtomicValue
Modifier and Type | Field and Description |
---|---|
protected StructuredQName |
qName |
typeLabel
Constructor and Description |
---|
QualifiedNameValue() |
Modifier and Type | Method and Description |
---|---|
int |
allocateNameCode(NamePool pool)
Allocate a nameCode for this QName in the NamePool
|
String |
getClarkName()
Get the QName in Clark notation, that is "{uri}local" if in a namespace, or "local" otherwise
|
String |
getLocalName()
Get the local part
|
String |
getNamespaceURI()
Get the namespace part.
|
String |
getPrefix()
Get the prefix.
|
String |
getPrimitiveStringValue()
Get the string value as a String.
|
StructuredQName |
getStructuredQName()
Get the equivalent StructuredQName
|
Object |
getXPathComparable(boolean ordered,
StringCollator collator,
XPathContext context)
Get an object value that implements the XPath equality and ordering comparison semantics for this value.
|
int |
hashCode() |
boolean |
isIdentical(AtomicValue v)
Determine whether two atomic values are identical, as determined by XML Schema rules.
|
static AtomicValue |
makeQName(String prefix,
String uri,
String local,
AtomicType targetType,
CharSequence lexicalForm,
ConversionRules rules)
Factory method to construct either a QName or a NOTATION value, or a subtype of either of these.
|
QName |
toJaxpQName()
Construct a javax.xml.namespace.QName from this QualifiedNameValue
|
String |
toString()
The toString() method returns the name in the form QName("uri", "local")
|
StructuredQName |
toStructuredQName()
Convert to a StructuredQName
|
asAtomic, checkPermittedContents, copyAsSubType, effectiveBooleanValue, equals, getCanonicalLexicalRepresentation, getCardinality, getComponent, getItemType, getPrimitiveType, getSchemaComparable, getStringValue, getStringValueCS, head, isIdentical, isNaN, itemAt, iterate, process, setTypeLabel
getLength, reduce, subsequence
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getLength
reduce, subsequence
protected StructuredQName qName
public static AtomicValue makeQName(String prefix, String uri, String local, AtomicType targetType, CharSequence lexicalForm, ConversionRules rules) throws XPathException
prefix
- the prefix part of the value. Use "" or null for the empty prefix.uri
- the namespace URI part of the value. Use "" or null for the non-namespacelocal
- the local part of the valuetargetType
- the target type, which must be xs:QName or a subtype of xs:NOTATION or xs:QNamelexicalForm
- the original lexical form of the value. This is needed in case there are facets
such as pattern that check the lexical formrules
- the conversion rules to be appliedXPathException
- if the value cannot be converted.public final String getPrimitiveStringValue()
getPrimitiveStringValue
in class AtomicValue
public StructuredQName toStructuredQName()
public final String getClarkName()
public final String getLocalName()
public final String getNamespaceURI()
public final String getPrefix()
public int allocateNameCode(NamePool pool)
pool
- the NamePool to be usedpublic Object getXPathComparable(boolean ordered, StringCollator collator, XPathContext context)
getXPathComparable
in class AtomicValue
ordered
- true if an ordered comparison is required. In this case the result is null if the
type is unordered; in other cases the returned value will be a Comparable.collator
- the collation to be used for the comparisoncontext
- the XPath dynamic evaluation context, used in cases where the comparison is context
sensitive @return an Object whose equals() and hashCode() methods implement the XPath comparison semanticspublic boolean isIdentical(AtomicValue v)
AtomicValue
Note that even this check ignores the type annotation of the value. The integer 3 and the short 3 are considered identical, even though they are not fully interchangeable. "Identical" means the same point in the value space, regardless of type annotation.
NaN is identical to itself.
isIdentical
in class AtomicValue
v
- the other value to be compared with this onepublic String toString()
toString
in class AtomicValue
public QName toJaxpQName()
public StructuredQName getStructuredQName()
Copyright (c) 2004-2013 Saxonica Limited. All rights reserved.