|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.grogra.xl.impl.base.Producer
public abstract class Producer
This class is an abstract base implementation of Producer
.
It uses subclasses of GraphQueue
to represent the queues which
store deferred actions of XL.
Field Summary | |
---|---|
protected GraphQueue |
addNodeQueue
|
protected GraphQueue |
deleteEdgeQueue
|
protected GraphQueue |
deleteNodeQueue
|
Fields inherited from interface de.grogra.xl.query.Producer |
---|
DOUBLE_ARROW, EXECUTION_ARROW, SIMPLE_ARROW |
Constructor Summary | |
---|---|
protected |
Producer(QueryState match)
|
protected |
Producer(RuntimeModel model)
|
Method Summary | ||
---|---|---|
protected void |
addEdgeImpl(java.lang.Object first,
java.lang.Object second,
int bits,
EdgeDirection direction)
|
|
protected void |
addNodeImpl(java.lang.Object object,
boolean addEdge)
|
|
|
connect(N s,
N t,
P param,
Connector<N,P> c)
Adds an action to the connecting queue q
(GraphQueue.CONNECT_DESCRIPTOR ) which induces the invocation
c.connect(s, t, param, q) on queue application. |
|
void |
consume(java.lang.Object node)
|
|
void |
copyIncoming(java.lang.Object s,
java.lang.Object t,
int edges)
|
|
void |
copyOutgoing(java.lang.Object s,
java.lang.Object t,
int edges)
|
|
void |
cut()
|
|
void |
execute(java.lang.Runnable r)
|
|
protected java.lang.Object |
getPreviousNode()
|
|
protected QueryState |
getQueryState()
Returns the match for which this producer constructs the replacement. |
|
|
getQueue(QueueDescriptor<Q> descr)
|
|
QueueCollection |
getQueues()
|
|
void |
interpretive()
|
|
void |
moveIncoming(java.lang.Object s,
java.lang.Object t,
int edges)
|
|
void |
moveOutgoing(java.lang.Object s,
java.lang.Object t,
int edges)
|
|
protected void |
nodeUsed(java.lang.Object object)
|
|
protected void |
popImpl()
|
|
boolean |
producer$beginExecution(int arrow)
This method is invoked by the XL run-time system in order to notify the producer about the beginning of a right-hand side (i.e., a match for the left-hand side has been found, and the right-hand side is executed). |
|
void |
producer$endExecution(boolean applied)
This method is invoked by the XL run-time system in order to notify the producer about the end of the execution of a right-hand side. |
|
Graph |
producer$getGraph()
Returns the graph for which this producer constructs the right-hand side structur. |
|
void |
producer$visitEdge(EdgePattern pattern)
|
|
protected void |
pushImpl()
|
|
protected void |
separateImpl()
|
|
void |
setConnectionEdges(int edges)
|
|
void |
setInConnectionEdges(int edges)
|
|
void |
setOutConnectionEdges(int edges)
|
|
void |
useOperators(boolean value)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected GraphQueue addNodeQueue
protected GraphQueue deleteEdgeQueue
protected GraphQueue deleteNodeQueue
Constructor Detail |
---|
protected Producer(QueryState match)
protected Producer(RuntimeModel model)
Method Detail |
---|
protected final void addEdgeImpl(java.lang.Object first, java.lang.Object second, int bits, EdgeDirection direction)
protected void addNodeImpl(java.lang.Object object, boolean addEdge)
public <N,P> void connect(N s, N t, P param, Connector<N,P> c)
q
(GraphQueue.CONNECT_DESCRIPTOR
) which induces the invocation
c.connect(s, t, param, q)
on queue application.
s
- node of the match for the left hand side of the rulet
- replacing node of the right hand side of the ruleparam
- some parameter for the connectorc
- a connectorpublic void consume(java.lang.Object node)
public void copyIncoming(java.lang.Object s, java.lang.Object t, int edges)
public void copyOutgoing(java.lang.Object s, java.lang.Object t, int edges)
public void cut()
public void execute(java.lang.Runnable r)
execute
in interface java.util.concurrent.Executor
protected java.lang.Object getPreviousNode()
protected QueryState getQueryState()
Graph.createProducer(de.grogra.xl.query.QueryState)
which
created this producer.
public <Q extends Queue> Q getQueue(QueueDescriptor<Q> descr)
public QueueCollection getQueues()
public void interpretive()
public void moveIncoming(java.lang.Object s, java.lang.Object t, int edges)
public void moveOutgoing(java.lang.Object s, java.lang.Object t, int edges)
protected void nodeUsed(java.lang.Object object)
protected void popImpl()
public boolean producer$beginExecution(int arrow)
Producer
producer$beginExecution
in interface Producer
arrow
- the type of rule arrow, one of Producer.SIMPLE_ARROW
,
Producer.DOUBLE_ARROW
, Producer.EXECUTION_ARROW
true
if the right-hand side shall be executed,
false
if its execution shall be skippedpublic void producer$endExecution(boolean applied)
Producer
producer$endExecution
in interface Producer
applied
- return value of invocation of
Producer.producer$beginExecution(int)
public Graph producer$getGraph()
Producer
producer$getGraph
in interface Producer
public void producer$visitEdge(EdgePattern pattern)
producer$visitEdge
in interface Producer
protected void pushImpl()
protected void separateImpl()
public void setConnectionEdges(int edges)
public void setInConnectionEdges(int edges)
public void setOutConnectionEdges(int edges)
public void useOperators(boolean value)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |