org.openanzo.glitter.syntax.abstrakt
Class Graph

java.lang.Object
  extended by org.openanzo.glitter.syntax.abstrakt.TreeNode
      extended by org.openanzo.glitter.syntax.abstrakt.GraphPattern
          extended by org.openanzo.glitter.syntax.abstrakt.Graph

public class Graph
extends GraphPattern

Graph represents a GRAPH statement in a query.

Author:
lee

Constructor Summary
Graph(TriplePatternComponent graph, GraphPattern pattern)
          Constructs a Graph from either a Variable or an IRIReference representing the named graph, and a GraphPattern representing the contents of the GRAPH clause.
 
Method Summary
 void addChild(TreeNode child)
          Adds the given child at the end of this node's children.
 java.util.Iterator<GraphPattern> getChildren()
           
 TriplePatternComponent getGraphContext()
           
 GraphPattern getGraphPattern()
           
 boolean removeChild(TreeNode child)
          Removes the given child from the collection of children
 boolean replaceChild(TreeNode oldChild, TreeNode newChild)
          Changes the tree below this node by replacing oldChild with newChild
 java.lang.String toString()
           
 
Methods inherited from class org.openanzo.glitter.syntax.abstrakt.TreeNode
containsVariable, getBindableVariableCount, getBindableVariableSet, getFilters, getInScopeFilterSet, getParent, getRoot, getVariableCount, getVariableSet, invalidateCache, invalidateCache, mightBindVariable, prettyPrint, prettyPrint
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Graph

public Graph(TriplePatternComponent graph,
             GraphPattern pattern)
Constructs a Graph from either a Variable or an IRIReference representing the named graph, and a GraphPattern representing the contents of the GRAPH clause.

Parameters:
graph -
pattern -
Method Detail

getGraphContext

public TriplePatternComponent getGraphContext()
Returns:
The graph context for this GRAPH clause. Either a Variable or an IRIReference/.

getGraphPattern

public GraphPattern getGraphPattern()
Returns:
the graph pattern scoped to the graph context.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getChildren

public java.util.Iterator<GraphPattern> getChildren()
Specified by:
getChildren in class TreeNode
Returns:
An Iterator over the children of this node.

replaceChild

public boolean replaceChild(TreeNode oldChild,
                            TreeNode newChild)
Description copied from class: TreeNode
Changes the tree below this node by replacing oldChild with newChild

Specified by:
replaceChild in class TreeNode
Returns:
true if the oldChild was found and replaced; false otherwise.

removeChild

public boolean removeChild(TreeNode child)
Description copied from class: TreeNode
Removes the given child from the collection of children

Specified by:
removeChild in class TreeNode
Returns:
true if the child was found and removed; false otherwise.

addChild

public void addChild(TreeNode child)
Description copied from class: TreeNode
Adds the given child at the end of this node's children.

Specified by:
addChild in class TreeNode


Copyright © 2007 Cambridge Semantics Inc.. All Rights Reserved.