org.openanzo.glitter.syntax.abstrakt
Class TriplePatternNode

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.TriplePatternNode

public class TriplePatternNode
extends GraphPattern

A TriplePatternNode is any node in the abstract syntax that represents a triple pattern (contains three TriplePatternComponents).

Author:
lee

Constructor Summary
TriplePatternNode(TriplePatternComponent s, TriplePatternComponent p, TriplePatternComponent o)
          Constructor from three triple pattern components.
 
Method Summary
 void addChild(TreeNode child)
          Adds the given child at the end of this node's children.
 java.util.Iterator<TreeNode> getChildren()
           
 TriplePattern getTriplePattern()
           
 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

TriplePatternNode

public TriplePatternNode(TriplePatternComponent s,
                         TriplePatternComponent p,
                         TriplePatternComponent o)
Constructor from three triple pattern components.

Parameters:
s - Subject
p - Predicate
o - Object
Method Detail

toString

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

getTriplePattern

public TriplePattern getTriplePattern()
Returns:
The TriplePattern for this node.

getChildren

public java.util.Iterator<TreeNode> 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.