Package net.sf.saxon.value
Class NotationValue
java.lang.Object
net.sf.saxon.value.AtomicValue
net.sf.saxon.value.QualifiedNameValue
net.sf.saxon.value.NotationValue
- All Implemented Interfaces:
Iterable<AtomicValue>
,AtomicMatchKey
,AtomicSequence
,GroundedValue
,IdentityComparable
,Item
,Sequence
,ConversionResult
An xs:NOTATION value.
-
Field Summary
Fields inherited from class net.sf.saxon.value.QualifiedNameValue
qName
Fields inherited from class net.sf.saxon.value.AtomicValue
typeLabel
Fields inherited from interface net.sf.saxon.expr.sort.AtomicMatchKey
NaN_MATCH_KEY
-
Constructor Summary
ConstructorsConstructorDescriptionNotationValue
(String prefix, String uri, String localName) Constructor for a value that is known to be validNotationValue
(String prefix, String uri, String localName, boolean check) ConstructorNotationValue
(String prefix, String uri, String localName, AtomicType typeLabel) Constructor for a value that is known to be validNotationValue
(StructuredQName qName, AtomicType typeLabel) Constructor -
Method Summary
Modifier and TypeMethodDescriptioncopyAsSubType
(AtomicType typeLabel) Create a copy of this atomic value, with a different type labelboolean
Determine if two Notation values are equal.Determine the primitive type of the value.Get a Comparable value that implements the XML Schema ordering comparison semantics for this value.toString()
The toString() method returns the name in the form QName("uri", "local")Methods inherited from class net.sf.saxon.value.QualifiedNameValue
getClarkName, getEQName, getLocalName, getNamespaceURI, getPrefix, getPrimitiveStringValue, getStructuredQName, getXPathComparable, hashCode, identityHashCode, isIdentical, makeQName, toJaxpQName
Methods inherited from class net.sf.saxon.value.AtomicValue
asAtomic, asMapKey, atomize, checkPermittedContents, checkValidInJavascript, effectiveBooleanValue, getCanonicalLexicalRepresentation, getCardinality, getComponent, getGenre, getItemType, getLength, getStringValue, getStringValueCS, getUType, head, isIdentical, isNaN, itemAt, iterate, iterator, setTypeLabel
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.sf.saxon.expr.sort.AtomicMatchKey
asAtomic
Methods inherited from interface net.sf.saxon.om.GroundedValue
asIterable, concatenate, containsNode, materialize
Methods inherited from interface net.sf.saxon.om.Item
isStreamed, reduce, subsequence, toShortString
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface net.sf.saxon.om.Sequence
makeRepeatable
-
Constructor Details
-
NotationValue
public NotationValue(String prefix, String uri, String localName, boolean check) throws XPathException Constructor- Parameters:
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 QNamecheck
- Used for request checking names against XML 1.0 or XML 1.1 syntax rules- Throws:
XPathException
-
NotationValue
Constructor for a value that is known to be valid- Parameters:
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 QName
-
NotationValue
Constructor for a value that is known to be valid- Parameters:
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 value
-
NotationValue
Constructor- Parameters:
qName
- the name as a StructuredQNametypeLabel
- idenfies a subtype of xs:QName
-
-
Method Details
-
copyAsSubType
Create a copy of this atomic value, with a different type label- Specified by:
copyAsSubType
in classAtomicValue
- Parameters:
typeLabel
- the type label of the new copy. The caller is responsible for checking that the value actually conforms to this type.- Returns:
- the copied value
-
getPrimitiveType
Determine the primitive type of the value. This delivers the same answer as getItemType().getPrimitiveItemType(). The primitive types are the 19 primitive types of XML Schema, plus xs:integer, xs:dayTimeDuration and xs:yearMonthDuration, and xs:untypedAtomic. For external objects, the result is AnyAtomicType.- Specified by:
getPrimitiveType
in classAtomicValue
- Returns:
- the primitive type
-
equals
Determine if two Notation values are equal. This comparison ignores the prefix part of the value.- Specified by:
equals
in classAtomicValue
- Parameters:
other
- the other value- Returns:
- true if the other operand is an atomic value and the two values are equal as defined by the XPath eq operator
- Throws:
ClassCastException
- if they are not comparableIllegalStateException
- if the two QNames are in different name pools
-
getSchemaComparable
Description copied from class:AtomicValue
Get a Comparable value that implements the XML Schema ordering comparison semantics for this value. An implementation must be provided for all atomic types.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
SequenceTool.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.- Specified by:
getSchemaComparable
in interfaceAtomicSequence
- Specified by:
getSchemaComparable
in classAtomicValue
- Returns:
- a Comparable that follows XML Schema comparison rules
-
toString
The toString() method returns the name in the form QName("uri", "local")- Overrides:
toString
in classQualifiedNameValue
- Returns:
- the name in Clark notation: {uri}local
-