public final class NotationValue extends QualifiedNameValue
qName
typeLabel
INDETERMINATE_ORDERING
EMPTY_VALUE_ARRAY
Constructor and Description |
---|
NotationValue(java.lang.String prefix,
java.lang.String uri,
java.lang.String localName)
Constructor for a value that is known to be valid
|
NotationValue(java.lang.String prefix,
java.lang.String uri,
java.lang.String localName,
AtomicType typeLabel)
Constructor for a value that is known to be valid
|
NotationValue(java.lang.String prefix,
java.lang.String uri,
java.lang.String localName,
NameChecker checker)
Constructor
|
Modifier and Type | Method and Description |
---|---|
ConversionResult |
convertPrimitive(BuiltInAtomicType requiredType,
boolean validate,
ConversionRules rules)
Convert to target data type
|
AtomicValue |
copyAsSubType(AtomicType typeLabel)
Create a copy of this atomic value, with a different type label
|
boolean |
equals(java.lang.Object other)
Determine if two Notation values are equal.
|
BuiltInAtomicType |
getPrimitiveType()
Determine the primitive type of the value.
|
java.lang.Comparable |
getSchemaComparable()
Get a Comparable value that implements the XML Schema ordering comparison semantics for this value.
|
java.lang.String |
toString()
The toString() method returns the name in the form QName("uri", "local")
|
allocateNameCode, getClarkName, getLocalName, getNamespaceURI, getPrefix, getPrimitiveStringValue, getXPathComparable, hashCode, isIdentical, makeQName, toJaxpQName, toStructuredQName
asAtomic, checkPermittedContents, convert, convert, convert, effectiveBooleanValue, getCardinality, getComponent, getItemType, getLength, getStringValue, getStringValueCS, getTypedValue, getTypeLabel, isNaN, itemAt, iterate, process, setTypeLabel, subsequence
asItem, asItem, asIterator, asValue, convertToJava, fromItem, getCanonicalLexicalRepresentation, getIterator, iterate, reduce
public NotationValue(java.lang.String prefix, java.lang.String uri, java.lang.String localName, NameChecker checker) throws XPathException
prefix
- The prefix part of the QName (not used in comparisons). Use null or "" to represent the
default prefix.uri
- The namespace part of the QName. Use null or "" to represent the null namespace.localName
- The local part of the QNamechecker
- Used for checking names against XML 1.0 or XML 1.1 syntax rulesXPathException
public NotationValue(java.lang.String prefix, java.lang.String uri, java.lang.String localName)
prefix
- The prefix part of the QName (not used in comparisons). Use null or "" to represent the
default prefix.uri
- The namespace part of the QName. Use null or "" to represent the null namespace.localName
- The local part of the QNamepublic NotationValue(java.lang.String prefix, java.lang.String uri, java.lang.String localName, AtomicType typeLabel)
prefix
- The prefix part of the QName (not used in comparisons). Use null or "" to represent the
default prefix.uri
- The namespace part of the QName. Use null or "" to represent the null namespace.localName
- The local part of the QNametypeLabel
- A type derived from xs:NOTATION to be used for the new valuepublic AtomicValue copyAsSubType(AtomicType typeLabel)
copyAsSubType
in class AtomicValue
typeLabel
- the type label of the new copy. The caller is responsible for checking that
the value actually conforms to this type.public BuiltInAtomicType getPrimitiveType()
getPrimitiveType
in class AtomicValue
public ConversionResult convertPrimitive(BuiltInAtomicType requiredType, boolean validate, ConversionRules rules)
convertPrimitive
in class AtomicValue
requiredType
- an integer identifying the required atomic typerules
- validate
- true if validation is required. If set to false, the caller guarantees that
the value is valid for the target data type, and that further validation
is therefore not required.
Note that a validation failure may be reported even if validation was not requested.public boolean equals(java.lang.Object other)
equals
in class AtomicValue
other
- the other valuejava.lang.ClassCastException
- if they are not comparablejava.lang.IllegalStateException
- if the two QNames are in different name poolspublic java.lang.Comparable getSchemaComparable()
AtomicValue
In the case of data types that are partially ordered, the returned Comparable extends the standard
semantics of the compareTo() method by returning the value Value.INDETERMINATE_ORDERING
when there
is no defined order relationship between two given values. This value is also returned when two values
of different types are compared.
getSchemaComparable
in class AtomicValue
public java.lang.String toString()
toString
in class QualifiedNameValue