|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.fuberlin.wiwiss.d2rq.fastpath.VariableBindings
public class VariableBindings
A class for capturing binding information for variables that occour in a D2RQPatternStage. It provides for a stage, a set of triples or nodes: - all occuring variable names and nodes. - all positions where a variable is accessed that was bound before (previous stage or previous triple or previous node in triple). - all variables that bind in these triples. (keys in bindVariableToShared) - information if and where these bind variables are used again in bound positions.
Field Summary | |
---|---|
Map |
bindVariableIndexToShared
variables nodes to be bound in this stage. |
Map |
bindVariableToShared
variables nodes to be bound in this stage. |
Map |
boundDomainIndexToShared
variable positions bound in previous stages. |
Map |
boundVariableToShared
variables nodes bound in a previous stage. |
Domain |
inputDomain
variable bindings from inputDomain |
Set |
sharedBindIndices
set of indices of shared variables in a query. |
Set |
sharedBindVariables
set of shared variable Nodes that are to be bound in this stage. |
Map |
variableNameToNodeMap
variable Nodes in given triples |
Constructor Summary | |
---|---|
VariableBindings()
|
Method Summary | |
---|---|
void |
addBindNode(Node node,
int domainIndex,
int tripleNr,
int nodeNr)
Adds information for a variable that is to be bound in this stage. |
void |
addBoundNode(Node node,
int domainIndex,
int tripleNr,
int nodeNr)
Adds information for a node that was already bound in this or a previous stage. |
protected void |
addVariable(Node n)
|
boolean |
isBind(Node var)
|
boolean |
isBind(String var)
|
boolean |
isBind(VariableIndex var)
|
boolean |
isBound(Node var)
|
boolean |
isBound(String var)
|
boolean |
isBound(VariableIndex var)
|
protected Set |
mapToSharedPut(Map map,
Object key,
VariableIndex varIndexMember)
Looks up key in a object to varIndexSet map, adds
varIndexMember to the set or creates it. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public Domain inputDomain
public Map variableNameToNodeMap
public Map boundVariableToShared
bindVariableToShared
public Map boundDomainIndexToShared
public Map bindVariableToShared
public Map bindVariableIndexToShared
bindVariableToShared
public Set sharedBindVariables
public Set sharedBindIndices
Constructor Detail |
---|
public VariableBindings()
Method Detail |
---|
protected void addVariable(Node n)
public boolean isBound(String var)
public boolean isBound(Node var)
public boolean isBound(VariableIndex var)
public boolean isBind(String var)
public boolean isBind(Node var)
public boolean isBind(VariableIndex var)
protected Set mapToSharedPut(Map map, Object key, VariableIndex varIndexMember)
key
in a object to varIndexSet map, adds
varIndexMember
to the set or creates it.
Helper method.
map
- one of: boundVariableToShared, boundDomainIndexToShared, bindVariableToShared, bindVariableIndexToSharedkey
- varIndexMember
-
public void addBindNode(Node node, int domainIndex, int tripleNr, int nodeNr)
node
- the variable namedomainIndex
- the variable index in DomaintripleNr
- the node's triple positionnodeNr
- the node's position within the triplepublic void addBoundNode(Node node, int domainIndex, int tripleNr, int nodeNr)
node
- the variable namedomainIndex
- the variable index in DomaintripleNr
- the node's triple positionnodeNr
- the node's position within the triple
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |