- All Superinterfaces:
Graph,GraphContext,GraphManagerContext,RegistryContext,WrappedGraph
- All Known Implementing Classes:
GraphObjectRef,SecGraphRef
-
Method Summary
Modifier and TypeMethodDescriptiondefault DisposableIteratorapply(int count) default booleancanEnumerateEdges(EdgeDirection dir, boolean constEdge, Serializable edge) default booleancanEnumerateNodes(Type type) Can nodes of the specifiedtypebe enumerated?default voidclear()default Nodedefault Pattern.MatchercreateMatcher(Pattern pred, XBitSet providedConstants, IntList neededConstantsOut) default ProducerCreates an instance ofProducer.default QueryStateCreates a query state to be used for queries which use this graph.default voidderive()default voidenumerateEdges(Object node, EdgeDirection dir, Type edgeType, QueryState qs, int toIndex, int patternIndex, Serializable pattern, int matchIndex, MatchConsumer consumer, int arg) default voidenumerateNodes(Type type, QueryState qs, int tp, MatchConsumer consumer, int arg) This methods enumerates all nodes of this graph of the given type to the givenMatchConsumervia the given query state.default GraphManagerDefault implementation of the functions of WrappedGraph using the WrappedGraph provided by the resolve() function.default GraphManagergetGraph()default RuntimeModelgetModel()Default implementation for xl.query.graph based on the queryGraph provided from resolve()getName()default Graphdefault RegistryReturns theRegistrywhich is linked with this instance.default ObjectgetRoot()Returns the root node of this graph.default Nodedefault voiddefault void<T extends WrappedGraph>
Tresolve()default voidsetRootNode(Node n) default Instance3DtoInstance(boolean transfrom) default voidview2d()default voidview3d()Methods inherited from interface de.grogra.graph.wrapped.WrappedGraph
setDerivationMode
-
Method Details
-
getName
String getName()- Specified by:
getNamein interfaceWrappedGraph
-
resolve
-
getDataGraph
Default implementation of the functions of WrappedGraph using the WrappedGraph provided by the resolve() function.- Specified by:
getDataGraphin interfaceWrappedGraph
-
getGraph
- Specified by:
getGraphin interfaceGraphContext- Specified by:
getGraphin interfaceGraphManagerContext
-
getQueryGraph
- Specified by:
getQueryGraphin interfaceWrappedGraph
-
getRegistry
Description copied from interface:RegistryContextReturns theRegistrywhich is linked with this instance.- Specified by:
getRegistryin interfaceRegistryContext- Returns:
- the registry linked with this instance
-
derive
default void derive()- Specified by:
derivein interfaceWrappedGraph
-
view2d
default void view2d()- Specified by:
view2din interfaceWrappedGraph
-
view3d
default void view3d()- Specified by:
view3din interfaceWrappedGraph
-
toInstance
- Specified by:
toInstancein interfaceWrappedGraph
-
getRootNode
- Specified by:
getRootNodein interfaceWrappedGraph
-
apply
- Specified by:
applyin interfaceWrappedGraph
-
setRootNode
- Specified by:
setRootNodein interfaceWrappedGraph
-
cloneGraph
- Specified by:
cloneGraphin interfaceWrappedGraph- Throws:
CloneNotSupportedException
-
clear
default void clear()- Specified by:
clearin interfaceWrappedGraph
-
reload
-
reload
- Specified by:
reloadin interfaceWrappedGraph
-
getModel
Default implementation for xl.query.graph based on the queryGraph provided from resolve()- Specified by:
getModelin interfaceGraph- Specified by:
getModelin interfaceWrappedGraph- Returns:
- the run-time model
-
createQueryState
Description copied from interface:GraphCreates a query state to be used for queries which use this graph. The returned query state has to be an instance of the type defined byCompiletimeModel.getQueryStateType()of the corresponding compile-time model.- Specified by:
createQueryStatein interfaceGraph- Specified by:
createQueryStatein interfaceWrappedGraph- Returns:
- a new query state
-
createProducer
Description copied from interface:GraphCreates an instance ofProducer. This factory method creates an instance of a subclass ofProducerwhich will be exclusively used later on in the context of the current match represented byqs. The instance must be an instance of the class returned byCompiletimeModel.getProducerType()for the corresponding compile-time model.The usage of producers is specified by the XL programming language.
- Specified by:
createProducerin interfaceGraph- Specified by:
createProducerin interfaceWrappedGraph- Parameters:
qs- query state which holds current match for which the producer shall produce a replacement- Returns:
- a producer for use in the context of
qs
-
createMatcher
default Pattern.Matcher createMatcher(Pattern pred, XBitSet providedConstants, IntList neededConstantsOut) - Specified by:
createMatcherin interfaceGraph- Specified by:
createMatcherin interfaceWrappedGraph
-
canEnumerateNodes
Description copied from interface:GraphCan nodes of the specifiedtypebe enumerated? This method returnstrueiff this graph can enumerate nodes of the giventypeusing the methodGraph.enumerateNodes(de.grogra.reflect.Type, de.grogra.xl.query.QueryState, int, de.grogra.xl.query.MatchConsumer, int).- Specified by:
canEnumerateNodesin interfaceGraph- Specified by:
canEnumerateNodesin interfaceWrappedGraph- Parameters:
type- the type of nodes- Returns:
trueiff nodes oftypecan be enumerated
-
enumerateNodes
Description copied from interface:GraphThis methods enumerates all nodes of this graph of the given type to the givenMatchConsumervia the given query state. I.e., for every nodecof this extent that has typetype, the following statement is executed:qs.amatch (tp, c, consumer, arg);- Specified by:
enumerateNodesin interfaceGraph- Specified by:
enumerateNodesin interfaceWrappedGraph- Parameters:
type- the type of nodesqs- the query state on which theamatch-method has to be invokedtp- the index-parameter for theamatch-methodconsumer- the consumer-parameter for theamatch-methodarg- the arg-parameter for theamatch-method
-
canEnumerateEdges
- Specified by:
canEnumerateEdgesin interfaceGraph- Specified by:
canEnumerateEdgesin interfaceWrappedGraph
-
enumerateEdges
default void enumerateEdges(Object node, EdgeDirection dir, Type edgeType, QueryState qs, int toIndex, int patternIndex, Serializable pattern, int matchIndex, MatchConsumer consumer, int arg) - Specified by:
enumerateEdgesin interfaceGraph- Specified by:
enumerateEdgesin interfaceWrappedGraph
-
getRoot
Description copied from interface:GraphReturns the root node of this graph.- Specified by:
getRootin interfaceGraph- Specified by:
getRootin interfaceWrappedGraph- Returns:
- the root
-