APIdia Launch Partner
Top Description Inners Fields Constructors Methods
com.sun.org.apache.xml.internal.security.signature.reference

public Class ReferenceSubTreeData

extends Object
implements ReferenceNodeSetData
Class Inheritance
All Implemented Interfaces
com.sun.org.apache.xml.internal.security.signature.reference.ReferenceNodeSetData, com.sun.org.apache.xml.internal.security.signature.reference.ReferenceData
Imports
java.util.ArrayList, .Iterator, .List, .ListIterator, .NoSuchElementException, org.w3c.dom.NamedNodeMap, .Node

A representation of a ReferenceNodeSetData type containing a node-set. This is a subtype of NodeSetData that represents a dereferenced same-document URI as the root of a subdocument. The main reason is for efficiency and performance, as some transforms can operate directly on the subdocument and there is no need to convert it first to an XPath node-set.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
ReferenceSubTreeData.DelayedNodeIterator

This is an Iterator that contains a backing node-set that is not populated until the caller first attempts to advance the iterator.

Field Summary

Modifier and TypeField and Description
private boolean
private Node

Constructor Summary

AccessConstructor and Description
public
ReferenceSubTreeData(Node root, boolean excludeComments)

Method Summary

Modifier and TypeMethod and Description
public boolean
public Node
public Iterator<Node>
iterator()

Implements com.sun.org.apache.xml.internal.security.signature.reference.ReferenceNodeSetData.iterator.

Returns a read-only iterator over the nodes contained in this NodeSetData in document order.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

excludeCommentsback to summary
private boolean excludeComments
rootback to summary
private Node root

Constructor Detail

ReferenceSubTreeDataback to summary
public ReferenceSubTreeData(Node root, boolean excludeComments)

Method Detail

excludeCommentsback to summary
public boolean excludeComments()
getRootback to summary
public Node getRoot()
iteratorback to summary
public Iterator<Node> iterator()

Implements com.sun.org.apache.xml.internal.security.signature.reference.ReferenceNodeSetData.iterator.

Doc from com.sun.org.apache.xml.internal.security.signature.reference.ReferenceNodeSetData.iterator.

Returns a read-only iterator over the nodes contained in this NodeSetData in document order. Attempts to modify the returned iterator via the remove method throw UnsupportedOperationException.

Annotations
@Override
com.sun.org.apache.xml.internal.security.signature.reference back to summary

pack-priv Class ReferenceSubTreeData.DelayedNodeIterator

extends Object
implements Iterator<Node>
Class Inheritance
  • java.lang.Object
  • com.sun.org.apache.xml.internal.security.signature.reference.ReferenceSubTreeData.DelayedNodeIterator
All Implemented Interfaces
java.util.Iterator

This is an Iterator that contains a backing node-set that is not populated until the caller first attempts to advance the iterator.

Field Summary

Modifier and TypeField and Description
private ListIterator<Node>
private List<Node>
private Node
private boolean

Constructor Summary

AccessConstructor and Description
pack-priv
DelayedNodeIterator(Node root, boolean excludeComments)

Method Summary

Modifier and TypeMethod and Description
private List<Node>

Returns:

a set of nodes (minus any comment nodes)
dereferenceSameDocumentURI
(Node
the node (document or element) referenced by the URI fragment. If null, returns an empty set.
node
)

Dereferences a same-document URI fragment.

public boolean
hasNext()

Implements java.util.Iterator.hasNext.

Returns true if the iteration has more elements.

public Node
next()

Implements java.util.Iterator.next.

Returns the next element in the iteration.

private void
nodeSetMinusCommentNodes(Node
the node to traverse
node
,
List<Node>
the set of nodes traversed so far
nodeSet
,
Node
the previous sibling node
prevSibling
)

Recursively traverses the subtree, and returns an XPath-equivalent node-set of all nodes traversed, excluding any comment nodes, if specified.

public void
remove()

Overrides default java.util.Iterator.remove.

Removes from the underlying collection the last element returned by this iterator (optional operation).

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

liback to summary
private ListIterator<Node> li
nodeSetback to summary
private List<Node> nodeSet
rootback to summary
private Node root
withCommentsback to summary
private boolean withComments

Constructor Detail

DelayedNodeIteratorback to summary
pack-priv DelayedNodeIterator(Node root, boolean excludeComments)

Method Detail

dereferenceSameDocumentURIback to summary
private List<Node> dereferenceSameDocumentURI(Node node)

Dereferences a same-document URI fragment.

Parameters
node:Node

the node (document or element) referenced by the URI fragment. If null, returns an empty set.

Returns:List<Node>

a set of nodes (minus any comment nodes)

hasNextback to summary
public boolean hasNext()

Implements java.util.Iterator.hasNext.

Doc from java.util.Iterator.hasNext.

Returns true if the iteration has more elements. (In other words, returns true if next would return an element rather than throwing an exception.)

Annotations
@Override
nextback to summary
public Node next()

Implements java.util.Iterator.next.

Doc from java.util.Iterator.next.

Returns the next element in the iteration.

Annotations
@Override
nodeSetMinusCommentNodesback to summary
private void nodeSetMinusCommentNodes(Node node, List<Node> nodeSet, Node prevSibling)

Recursively traverses the subtree, and returns an XPath-equivalent node-set of all nodes traversed, excluding any comment nodes, if specified.

Parameters
node:Node

the node to traverse

nodeSet:List<Node>

the set of nodes traversed so far

prevSibling:Node

the previous sibling node

Annotations
@SuppressWarnings:fallthrough
removeback to summary
public void remove()

Overrides default java.util.Iterator.remove.

Doc from java.util.Iterator.remove.

Removes from the underlying collection the last element returned by this iterator (optional operation). This method can be called only once per call to next.

The behavior of an iterator is unspecified if the underlying collection is modified while the iteration is in progress in any way other than by calling this method, unless an overriding class has specified a concurrent modification policy.

The behavior of an iterator is unspecified if this method is called after a call to the forEachRemaining method.

Annotations
@Override