Package net.sf.saxon.om
Class VirtualUntypedCopy
java.lang.Object
net.sf.saxon.om.VirtualCopy
net.sf.saxon.om.VirtualUntypedCopy
- All Implemented Interfaces:
Source,SourceLocator,PullEvent,Item,NodeInfo,ValueRepresentation
This class represents a virtual copy of a node with type annotations stripped
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class net.sf.saxon.om.VirtualCopy
VirtualCopy.VirtualCopier -
Field Summary
Fields inherited from class net.sf.saxon.om.VirtualCopy
documentNumber, original, parent, root, systemIdFields inherited from interface net.sf.saxon.om.NodeInfo
ALL_NAMESPACES, EMPTY_NAMESPACE_LIST, IS_DTD_TYPE, IS_NILLED, LOCAL_NAMESPACES, NO_NAMESPACESFields inherited from interface net.sf.saxon.om.ValueRepresentation
EMPTY_VALUE_ARRAY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedVirtualUntypedCopy(NodeInfo base) Protected constructor: create a virtual copy of a node -
Method Summary
Modifier and TypeMethodDescriptionatomize()Get the typed value.voidCopy this node to a given outputterintGet the type annotation of this node, if any.Get the typed value of the itemprotected VirtualCopy.VirtualCopiermakeCopier(AxisIterator axis, VirtualCopy newParent, NodeInfo root) Create an iterator that makes and returns virtual copies of nodes on the original treestatic VirtualCopymakeVirtualUntypedCopy(NodeInfo original, NodeInfo root) Public factory method: create an untyped virtual copy of a nodeMethods inherited from class net.sf.saxon.om.VirtualCopy
compareOrder, equals, generateId, getAttributeValue, getBaseURI, getColumnNumber, getConfiguration, getDeclaredNamespaces, getDisplayName, getDocumentNumber, getDocumentRoot, getFingerprint, getLineNumber, getLocalPart, getNameCode, getNamePool, getNodeKind, getParent, getPrefix, getPublicId, getRoot, getStringValue, getStringValueCS, getSystemId, getURI, hasChildNodes, hashCode, isId, isIdref, isNilled, isSameNodeInfo, iterateAxis, iterateAxis, makeVirtualCopy, setDocumentNumber, setSystemId, wrap
-
Constructor Details
-
VirtualUntypedCopy
Protected constructor: create a virtual copy of a node- Parameters:
base- the node to be copied
-
-
Method Details
-
makeVirtualUntypedCopy
Public factory method: create an untyped virtual copy of a node- Parameters:
original- the node to be copiedroot- the root of the tree- Returns:
- the virtual copy.
-
getTypeAnnotation
public int getTypeAnnotation()Get the type annotation of this node, if any.- Specified by:
getTypeAnnotationin interfaceNodeInfo- Overrides:
getTypeAnnotationin classVirtualCopy- Returns:
- the type annotation of the node.
- See Also:
-
atomize
Get the typed value. The result of this method will always be consistent with the methodItem.getTypedValue(). However, this method is often more convenient and may be more efficient, especially in the common case where the value is expected to be a singleton.- Specified by:
atomizein interfaceNodeInfo- Overrides:
atomizein classVirtualCopy- Returns:
- the typed value. If requireSingleton is set to true, the result will always be an AtomicValue. In other cases it may be a Value representing a sequence whose items are atomic values.
- Throws:
XPathException- Since:
- 8.5
-
getTypedValue
Get the typed value of the item- Specified by:
getTypedValuein interfaceItem- Overrides:
getTypedValuein classVirtualCopy- Returns:
- the typed value of the item. In general this will be a sequence
- Throws:
XPathException- where no typed value is available, e.g. for an element with complex content
-
copy
public void copy(Receiver out, int whichNamespaces, boolean copyAnnotations, int locationId) throws XPathException Description copied from class:VirtualCopyCopy this node to a given outputter- Specified by:
copyin interfaceNodeInfo- Overrides:
copyin classVirtualCopy- Parameters:
out- the Receiver to which the node should be copiedwhichNamespaces- in the case of an element, controls which namespace nodes should be copied. Values are NO_NAMESPACES, LOCAL_NAMESPACES, ALL_NAMESPACEScopyAnnotations- indicates whether the type annotations of element and attribute nodes should be copiedlocationId- Identifies the location of the instruction that requested this copy. Pass zero if no other information is available- Throws:
XPathException
-
makeCopier
protected VirtualCopy.VirtualCopier makeCopier(AxisIterator axis, VirtualCopy newParent, NodeInfo root) Create an iterator that makes and returns virtual copies of nodes on the original tree- Overrides:
makeCopierin classVirtualCopy- Parameters:
axis- the axis to be navigatednewParent- the parent of the nodes in the new virtual tree (may be null)root- the root of the virtual tree- Returns:
- the iterator that does the copying
-