org.nsdl.mptstore.query.component
Class BasicNodeFilter<T extends Node>

java.lang.Object
  extended by org.nsdl.mptstore.query.component.BasicNodeFilter<T>
Type Parameters:
T - The type of node that is being constrained by this filter. Typically, this is one of SubjectNode, PredicateNode, ObjectNode, or just Node if the exact node type is unimportant or unknown.
All Implemented Interfaces:
NodeFilter<T>

public class BasicNodeFilter<T extends Node>
extends java.lang.Object
implements NodeFilter<T>

Generic implementation of a NodeFilter.

Author:
birkland

Constructor Summary
BasicNodeFilter(NodePattern<T> node, java.lang.String operator, NodePattern<T> constraint)
          Create a filter on a particular node pattern.
 
Method Summary
 NodePattern<T> getConstraint()
          Get the constraint on this filter's NodePattern's value.
 NodePattern<T> getNode()
          Get the node pattern whose value this NodeFilter is constraining.
 java.lang.String getOperator()
          Get the operator that specifies the relationship between the NodePattern and a value constraint (e.g.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicNodeFilter

public BasicNodeFilter(NodePattern<T> node,
                       java.lang.String operator,
                       NodePattern<T> constraint)
Create a filter on a particular node pattern.

Parameters:
node - The node pattern to constrain
operator - String representing some operator
constraint - node pattern representing a constraint
Method Detail

getNode

public NodePattern<T> getNode()
Get the node pattern whose value this NodeFilter is constraining.

Specified by:
getNode in interface NodeFilter<T extends Node>
Returns:
the pattern.

getConstraint

public NodePattern<T> getConstraint()
Get the constraint on this filter's NodePattern's value.

Specified by:
getConstraint in interface NodeFilter<T extends Node>
Returns:
the constraint.

getOperator

public java.lang.String getOperator()
Get the operator that specifies the relationship between the NodePattern and a value constraint (e.g. '=', '<', '>', etc). Its semantics exact are undefined at this level.

Specified by:
getOperator in interface NodeFilter<T extends Node>
Returns:
the operator.