java.lang.Object
de.grogra.xl.impl.base.Producer
- Direct Known Subclasses:
DOMProducer,RGGProducer,SimpleProducer
This class is an abstract base implementation of
Producer.
It uses subclasses of GraphQueue to represent the queues which
store deferred actions of XL.- Author:
- Ole Kniemeyer
-
Field Summary
FieldsFields inherited from interface de.grogra.xl.query.Producer
DOUBLE_ARROW, EXECUTION_ARROW, SIMPLE_ARROW -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedProducer(RuntimeModel model) protectedProducer(QueryState match) -
Method Summary
Modifier and TypeMethodDescriptionfinal voidaddEdgeImpl(Object first, Object second, int bits, EdgeDirection direction) voidaddNodeImpl(Object node, boolean addEdge) protected voidaddNodeImplMS(Object node, boolean addEdge) <N,P> void Adds an action to the connecting queueq(GraphQueue.CONNECT_DESCRIPTOR) which induces the invocationc.connect(s, t, param, q)on queue application.voidvoidcopyIncoming(Object s, Object t, int edges) voidcopyOutgoing(Object s, Object t, int edges) voidcut()voidgetFirstLastScale(int index) getFirstLastScale(Object node) Returns an existing FirstLastScale for the scale of the input nodeprotected Objectprotected QueryStateReturns the match for which this producer constructs the replacement.<Q extends Queue>
QgetQueue(QueueDescriptor<Q> descr) voidvoidmoveIncoming(Object s, Object t, int edges) voidmoveOutgoing(Object s, Object t, int edges) protected voidprotected voidpopImpl()booleanproducer$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).voidproducer$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.Returns the graph for which this producer constructs the right-hand side structur.voidproducer$visitEdge(EdgePattern pattern) protected voidpushImpl()protected voidvoidsetConnectionEdges(int edges) voidsetInConnectionEdges(int edges) voidsetOutConnectionEdges(int edges) voiduseOperators(boolean value)
-
Field Details
-
addNodeQueue
-
deleteNodeQueue
-
deleteEdgeQueue
-
-
Constructor Details
-
Producer
-
Producer
-
-
Method Details
-
getQueryState
Returns the match for which this producer constructs the replacement. The returned instance is the same as the one in the factory methodGraph.createProducer(de.grogra.xl.query.QueryState)which created this producer.- Returns:
- the match for which this producer constructs a replacement
-
producer$getGraph
Description copied from interface:ProducerReturns the graph for which this producer constructs the right-hand side structur.- Specified by:
producer$getGraphin interfaceProducer- Returns:
- the graph on which this producer operates
-
producer$beginExecution
public boolean producer$beginExecution(int arrow) Description copied from interface:ProducerThis 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).- Specified by:
producer$beginExecutionin interfaceProducer- Parameters:
arrow- the type of rule arrow, one ofProducer.SIMPLE_ARROW,Producer.DOUBLE_ARROW,Producer.EXECUTION_ARROW- Returns:
trueif the right-hand side shall be executed,falseif its execution shall be skipped
-
producer$endExecution
public void producer$endExecution(boolean applied) Description copied from interface:ProducerThis 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.- Specified by:
producer$endExecutionin interfaceProducer- Parameters:
applied- return value of invocation ofProducer.producer$beginExecution(int)
-
producer$cliqueBegin
-
producer$cliqueEnd
-
pushImpl
protected void pushImpl() -
popImpl
protected void popImpl() -
separateImpl
protected void separateImpl() -
nodeUsed
-
addNodeImpl
-
addNodeImplMS
-
getPreviousNode
-
addEdgeImpl
-
producer$visitEdge
- Specified by:
producer$visitEdgein interfaceProducer
-
copyIncoming
-
copyOutgoing
-
moveIncoming
-
moveOutgoing
-
connect
Adds an action to the connecting queueq(GraphQueue.CONNECT_DESCRIPTOR) which induces the invocationc.connect(s, t, param, q)on queue application.- Parameters:
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 connector
-
execute
-
setConnectionEdges
public void setConnectionEdges(int edges) -
setInConnectionEdges
public void setInConnectionEdges(int edges) -
setOutConnectionEdges
public void setOutConnectionEdges(int edges) -
cut
public void cut() -
useOperators
public void useOperators(boolean value) -
interpretive
public void interpretive() -
consume
-
getQueues
-
getQueue
-
getFirstLastScale
-
getFirstLastScale
Returns an existing FirstLastScale for the scale of the input node- Parameters:
node-- Returns:
- FirstLastScale that has scale of input node, null if no FirstLastScale at scale of input node
-