org.jboss.dna.graph
Interface Subgraph

All Superinterfaces:
Iterable<Node>, Results

@Immutable
public interface Subgraph
extends Results

A subgraph returned by the Graph, containing the nodes in the subgraph as well as the properties and children for each of those nodes. The Iterable.iterator() method may be used to walk the nodes in the subgraph in a pre-order traversal.

Since this subgraph has a single node that is the top of the subgraph, the methods that take a String path or path object will accept absolute or relative paths.

Author:
Randall Hauch

Method Summary
 Location getLocation()
          Get the location of the node.
 int getMaximumDepth()
          Get the maximum depth requested for this subgraph.
 Node getRoot()
          Get the node that is at the root of the subgraph.
 
Methods inherited from interface org.jboss.dna.graph.Results
getGraph, getNode, getNode, getNode, includes, includes, includes
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

getLocation

Location getLocation()
Get the location of the node.

Returns:
the node's location

getMaximumDepth

int getMaximumDepth()
Get the maximum depth requested for this subgraph. The actual subgraph may not be as deep, but will never be deeper than this value.

Returns:
the maximum depth requested; always positive

getRoot

Node getRoot()
Get the node that is at the root of the subgraph.

Returns:
the root node in the subgraph


Copyright © 2008-Present JBoss a division of Red Hat. All Rights Reserved.