org.nsdl.mptstore.query.component
Interface NodePattern<T extends Node>

Type Parameters:
T - The type of node that is described by the pattern. Typically, this is one of SubjectNode, PredicateNode, ObjectNode, or just Node if the exact node type is unimportant or unknown.
All Known Implementing Classes:
BasicNodePattern, MappableNodePattern

public interface NodePattern<T extends Node>

Represents a specified or unspecified (variable) in a query or pattern

A NodePattern is a representation of a Node in a query, which may have given value. If a NodePattern does not have an explicit Node value, then it represents variable. Variables may have names associated with them that may have a meaning the context of a particular query language.

Author:
birkland

Method Summary
 T getNode()
          Get the node value of this pattern, or null if this pattern does not represent a variable.
 java.lang.String getVarName()
          Get the variable name of this pattern, or null if this pattern does not represent a variable.
 boolean isVariable()
          Tell whether this node pattern represents a variable.
 

Method Detail

getNode

T getNode()
Get the node value of this pattern, or null if this pattern does not represent a variable.

Returns:
the node value

getVarName

java.lang.String getVarName()
Get the variable name of this pattern, or null if this pattern does not represent a variable.

Returns:
the variable name

isVariable

boolean isVariable()
Tell whether this node pattern represents a variable.

Returns:
whether this pattern represents a variable.