net.sf.saxon.om

Class VirtualUntypedCopy

public class VirtualUntypedCopy extends VirtualCopy

This class represents a virtual copy of a node with type annotations stripped
Nested Class Summary
protected classVirtualUntypedCopy.VirtualUntypedCopier
Constructor Summary
protected VirtualUntypedCopy(NodeInfo base)
Protected constructor: create a virtual copy of a node
Method Summary
Valueatomize()
Get the typed value.
voidcopy(Receiver out, int whichNamespaces, boolean copyAnnotations, int locationId)
intgetTypeAnnotation()
Get the type annotation of this node, if any.
SequenceIteratorgetTypedValue()
Get the typed value of the item
protected VirtualCopy.VirtualCopiermakeCopier(AxisIterator axis, VirtualCopy newParent, NodeInfo root)
Create an iterator that makes and returns virtual copies of nodes on the original tree
static VirtualCopymakeVirtualUntypedCopy(NodeInfo original, NodeInfo root)
Public factory method: create an untyped virtual copy of a node

Constructor Detail

VirtualUntypedCopy

protected VirtualUntypedCopy(NodeInfo base)
Protected constructor: create a virtual copy of a node

Parameters: base the node to be copied

Method Detail

atomize

public Value atomize()
Get the typed value. The result of this method will always be consistent with the method 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.

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.

Since: 8.5

copy

public void copy(Receiver out, int whichNamespaces, boolean copyAnnotations, int locationId)

getTypeAnnotation

public int getTypeAnnotation()
Get the type annotation of this node, if any.

Returns: the type annotation of the node.

See Also: Type

getTypedValue

public SequenceIterator getTypedValue()
Get the typed value of the item

Returns: the typed value of the item. In general this will be a sequence

Throws: net.sf.saxon.trans.XPathException where no typed value is available, e.g. for an element with complex content

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

Parameters: axis the axis to be navigated newParent the parent of the nodes in the new virtual tree (may be null) root the root of the virtual tree

makeVirtualUntypedCopy

public static VirtualCopy makeVirtualUntypedCopy(NodeInfo original, NodeInfo root)
Public factory method: create an untyped virtual copy of a node

Parameters: original the node to be copied root the root of the tree

Returns: the virtual copy.