Package net.sf.saxon.ma.jnode
Class SpecificJNodeType
java.lang.Object
net.sf.saxon.type.gnode.GNodeType
net.sf.saxon.ma.jnode.JNodeType
net.sf.saxon.ma.jnode.SpecificJNodeType
- All Implemented Interfaces:
NodePredicate,NodeTest,ItemType,ItemTypeWithSequenceTypeCache
Represents the type jnode(S, T) where T is a sequence type giving the type
of the JNode content and S is a selector value, or null meaning "*" indicating
that the selector can be any value (including absent).
-
Constructor Summary
ConstructorsConstructorDescriptionSpecificJNodeType(AtomicValue selector, SequenceType valueType) SpecificJNodeType(SequenceType valueType) -
Method Summary
Modifier and TypeMethodDescriptionexplainMismatch(Item item, TypeHierarchy th) Get extra diagnostic information about why a supplied item does not conform to this item type, if available.Get the item type of the atomic values that will be produced when an item of this type is atomizedbooleanAsk whether values of this type are atomizablebooleanDetermine whether the content type (if present) is nillablestatic SpecificJNodeTypejTreeRoot(SequenceType valueType) booleanTest whether a given item conforms to this typetoString()Return a string representation of this ItemType.Methods inherited from class net.sf.saxon.ma.jnode.JNodeType
asXNodeTest, getBasicAlphaCode, getCoercionPlan, getDefaultPriority, getGenre, getPrimitiveItemType, getPrimitiveType, getUTypeMethods inherited from class net.sf.saxon.type.gnode.GNodeType
getContentType, getItemType, getQNameTest, isAtomicType, isPlainType, one, oneOrMore, test, toShortString, zeroOrMore, zeroOrOneMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.sf.saxon.type.ItemType
asChoiceItemType, getNormalizedDefaultPriority, normalizeItemType, toExportString
-
Constructor Details
-
SpecificJNodeType
-
SpecificJNodeType
-
-
Method Details
-
jTreeRoot
-
getValueType
- Overrides:
getValueTypein classJNodeType
-
getSelector
-
matches
Test whether a given item conforms to this type -
getAtomizedItemType
Get the item type of the atomic values that will be produced when an item of this type is atomized- Specified by:
getAtomizedItemTypein interfaceItemType- Overrides:
getAtomizedItemTypein classGNodeType- Returns:
- the best available item type of the atomic values that will be produced when an item of this type is atomized, or null if it is known that atomization will throw an error.
-
isAtomizable
Ask whether values of this type are atomizable- Specified by:
isAtomizablein interfaceItemType- Overrides:
isAtomizablein classGNodeType- Parameters:
th- the type hierarchy cache- Returns:
- true if some or all instances of this type can be successfully atomized; false if no instances of this type can be atomized
-
explainMismatch
Get extra diagnostic information about why a supplied item does not conform to this item type, if available. If extra information is returned, it should be in the form of a complete sentence, minus the closing full stop. No information should be returned for obvious cases.- Specified by:
explainMismatchin interfaceItemType- Specified by:
explainMismatchin interfaceNodeTest- Overrides:
explainMismatchin classGNodeType- Parameters:
item- the item that doesn't match this typeth- the type hierarchy cache- Returns:
- optionally, a message explaining why the item does not match the type
-
toString
Return a string representation of this ItemType. -
isNillable
public boolean isNillable()Determine whether the content type (if present) is nillable- Returns:
- true if the content test (when present) can match nodes that are nilled
-