de.grogra.xl.impl.dom
Graph.QState, Graph.ThreadDataEXCLUDE_DELETED_FLAG, INTERPRETIVE_FLAG, MODE_MASK, PARALLEL_MODE, PARALLEL_NON_DETERMINISTIC_MODE, SEQUENTIAL_MODE, SEQUENTIAL_NON_DETERMINISTIC_MODE| Constructor and Description |
|---|
Graph(RuntimeModel runtime,
org.w3c.dom.Document doc) |
| Modifier and Type | Method and Description |
|---|---|
void |
addEdgeBits(java.lang.Object source,
java.lang.Object target,
int bits)
Adds a set of edge bits from a
source node
to a target node. |
void |
addNode(java.lang.Object node)
Adds a node to this graph extent.
|
protected void |
beginModifications() |
boolean |
canEnumerateEdges(EdgeDirection dir,
boolean constEdge,
java.io.Serializable edge) |
protected void |
commitModifications() |
Producer |
createProducer(QueryState match)
Creates an instance of
Producer. |
GraphQueue |
createQueue(QueueCollection qc,
QueueDescriptor descr) |
void |
enumerateNodes(Type type,
QueryState qs,
int index,
MatchConsumer consumer,
int arg)
This methods enumerates all nodes of this graph of the given
type to the given
MatchConsumer via the given query state. |
java.lang.Object |
getRoot()
Returns the root node of this graph.
|
java.lang.Object |
getTypeRoot()
Returns the root node of the type graph for this graph
|
void |
removeEdgeBits(java.lang.Object source,
java.lang.Object target,
int bits)
Removes a set of edge bits from a
source node
to a target node. |
createInterpretiveMark, removeNodeallowNoninjectiveMatchesByDefault, allowNoninjectiveMatchesForNextQuery, areComparableScales, canEnumerateNodes, createMatcher, createQueryState, createThreadData, derive, enumerateEdges, enumerateSpaces, getDerivationMode, getMinimumEncoarseDepthDiff, getModel, getPredecessor, getQueues, getScaleValue, getThreadData, getTypeNode, getTypeNode, isInTypeGraph, isSameScale, setDerivationMode, sortedTypeGraphpublic Graph(RuntimeModel runtime, org.w3c.dom.Document doc)
public void addEdgeBits(java.lang.Object source,
java.lang.Object target,
int bits)
GraphImplsource node
to a target node. This method is invoked
within the right hand sides of XL productions ==>>,
==>.addEdgeBits in class GraphImplsource - the source node of the edgetarget - the target node of the edgebits - the edge bits that are to be addedpublic void addNode(java.lang.Object node)
GraphImplGraphImpl.addEdgeBits(java.lang.Object, java.lang.Object, int).
Implementations may perform tasks in preparation of the addition
of edges, if necessary.protected void beginModifications()
beginModifications in class Graphpublic boolean canEnumerateEdges(EdgeDirection dir, boolean constEdge, java.io.Serializable edge)
protected void commitModifications()
commitModifications in class Graphpublic Producer createProducer(QueryState match)
GraphProducer. This factory
method creates an instance of a subclass of
Producer which will be exclusively used later on
in the context of the current match represented by
qs. The instance must be an
instance of the class returned by
CompiletimeModel.getProducerType()
for the corresponding compile-time model.
The usage of producers is specified by the XL programming language.
match - query state which holds current match for which the producer
shall produce a replacementqspublic GraphQueue createQueue(QueueCollection qc, QueueDescriptor descr)
createQueue in class GraphImplpublic void enumerateNodes(Type type, QueryState qs, int index, MatchConsumer consumer, int arg)
GraphMatchConsumer via the given query state.
I.e., for every
node c of this extent that has type type,
the following statement is executed:
qs.amatch (tp, c, consumer, arg);
type - the type of nodesqs - the query state on which the amatch-method has to be invokedindex - the index-parameter for the amatch-methodconsumer - the consumer-parameter for the amatch-methodarg - the arg-parameter for the amatch-methodpublic java.lang.Object getRoot()
Graphpublic java.lang.Object getTypeRoot()
Graphpublic void removeEdgeBits(java.lang.Object source,
java.lang.Object target,
int bits)
GraphImplsource node
to a target node. This method is invoked
within the right hand sides of XL productions ==>>,
==>.removeEdgeBits in class GraphImplsource - the source node of the edgetarget - the target node of the edgebits - the edge bits that are to be removed