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

java.lang.Object
  extended by org.nsdl.mptstore.query.component.MappableNodeFilter<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 MappableNodeFilter<T extends Node>
extends java.lang.Object
implements NodeFilter<T>

Represents a constraint on the value of a particular mapped node pattern.

Author:
birkland

Constructor Summary
MappableNodeFilter(MappableNodePattern<T> node, java.lang.String operator, MappableNodePattern<T> constraint)
          Create a filter on a particular node pattern.
MappableNodeFilter(NodeFilter<T> filter)
          Create a mappable node filter from an existing node filter.
 
Method Summary
 MappableNodePattern<T> getConstraint()
          Get the constraint on this filter's NodePattern's value.
 MappableNodePattern<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.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MappableNodeFilter

public MappableNodeFilter(MappableNodePattern<T> node,
                          java.lang.String operator,
                          MappableNodePattern<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

MappableNodeFilter

public MappableNodeFilter(NodeFilter<T> filter)
Create a mappable node filter from an existing node filter.

Parameters:
filter - the existing filter.
Method Detail

getNode

public MappableNodePattern<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 MappableNodePattern<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.

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object