org.openanzo.glitter.query.planning
Class OdoTripleNode

java.lang.Object
  extended by org.openanzo.glitter.query.planning.OdoTripleNode
All Implemented Interfaces:
java.lang.Comparable<OdoTripleNode>

public class OdoTripleNode
extends java.lang.Object
implements java.lang.Comparable<OdoTripleNode>

An OdoTripleNode wraps a TriplePatternNode and allows for stateful comparison of two such nodes based on the number of free variables in each triple pattern.

Author:
lee

Constructor Summary
OdoTripleNode(TriplePatternNode t)
          Constructor.
 
Method Summary
 boolean checkMatch(Variable variable)
           
 int compareTo(OdoTripleNode otherNode)
           
 int getMatchedVariableCount()
           
 TriplePatternNode getTriple()
           
 int getUnMatchedVariableCount()
           
 int getVarCount()
           
 java.util.Collection<Variable> getVariables()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OdoTripleNode

public OdoTripleNode(TriplePatternNode t)
Constructor.

Parameters:
t -
Method Detail

getTriple

public TriplePatternNode getTriple()
Returns:
The TriplePatternNode corresponding to this object.

getVarCount

public int getVarCount()
Returns:
The number of variables in this triple pattern

getVariables

public java.util.Collection<Variable> getVariables()
Returns:
The variables in this triple pattern

getMatchedVariableCount

public int getMatchedVariableCount()
Returns:
The number of variables that have been matched via calls to checkMatch(Variable)

getUnMatchedVariableCount

public int getUnMatchedVariableCount()
Returns:
The number of variables in this triple pattern not yet matched via calls to checkMatch(Variable)

checkMatch

public boolean checkMatch(Variable variable)
Parameters:
variable -
Returns:
true, if the given variable occurs in this triple pattern; false, otherwise

compareTo

public int compareTo(OdoTripleNode otherNode)
Specified by:
compareTo in interface java.lang.Comparable<OdoTripleNode>


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