|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nsdl.mptstore.query.component.MappableNodePattern<T>
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.public class MappableNodePattern<T extends Node>
Represents node pattern that can be mapped to a database object.
Since a triple pattern may be mapped ap a specific table in the MPT model, a mappable pattern node, then, can retain a mapping to a specific column of a specific table. Such a node has the following properties
Node
Nested Class Summary | |
---|---|
static class |
MappableNodePattern.Types
Types of MappableNodePattern . |
Constructor Summary | |
---|---|
MappableNodePattern(NodePattern<? extends T> nodePattern)
Create a mappable node pattern from an existing node pattern. |
|
MappableNodePattern(NodePattern<? extends T> nodePattern,
java.lang.Class<T> patternType)
Create a mappable node pattern from an existing node pattern. |
|
MappableNodePattern(java.lang.String variable,
java.lang.String type)
Create a node pattern that is a variable. |
|
MappableNodePattern(T node)
Create a node pattern given a node value. |
Method Summary | |
---|---|
void |
bindTo(MPTable t)
Bind this node pattern to the given table. |
void |
bindTo(MPTable t,
java.lang.String type)
Bind this node pattern to the given table and optionally set the type. |
MPTable |
boundTable()
Return the table to which this pattern is bound. |
boolean |
equals(java.lang.Object p)
Equality of Triple Pattern. |
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. |
int |
hashCode()
Get a hash code for this mappable node pattern. |
boolean |
isVariable()
Tell whether this node pattern is variable. |
java.lang.String |
mappedName()
Return the table/alias and column identifier of the RDBMS location of this value or literal. |
java.lang.String |
toString()
Get a string representation of this mappable node pattern. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MappableNodePattern(java.lang.String variable, java.lang.String type)
variable
- any string representing the variable's name
(e.g. "$value", "?person").type
- the type of node this variable represents, which should be
s, p, or o.public MappableNodePattern(T node)
node
- Node representing this pattern's valuepublic MappableNodePattern(NodePattern<? extends T> nodePattern)
null
.
nodePattern
- the node pattern to base this one on.public MappableNodePattern(NodePattern<? extends T> nodePattern, java.lang.Class<T> patternType)
null
.
nodePattern
- the node pattern to create the mappable pattern from.patternType
- constraint on the type of node allowed by this
pattern.Method Detail |
---|
public boolean isVariable()
isVariable
in interface NodePattern<T extends Node>
public void bindTo(MPTable t)
t
- the table.public void bindTo(MPTable t, java.lang.String type)
t
- the table.type
- the new type for this node pattern. This should be s, p,
o, or null
if the type shouldn't be set.public java.lang.String mappedName()
public MPTable boundTable()
public T getNode()
getNode
in interface NodePattern<T extends Node>
public java.lang.String getVarName()
getVarName
in interface NodePattern<T extends Node>
public boolean equals(java.lang.Object p)
Equality of triple patterns follow the following rules:
equals
in class java.lang.Object
p
- the object to compare this one to.
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |