Interface WrappedGraph

All Superinterfaces:
Graph, GraphContext, GraphManagerContext, RegistryContext
All Known Subinterfaces:
IntegratableWrappedGraphObj, InterpretableWrappedGraphObj, ProducableWrappedGraphObj, TWGraph, WrappedGraphObj, WrappedGraphRef
All Known Implementing Classes:
GraphObject, GraphObjectRef, NonEsoSecGraph, NonEsoThreadedSecGraph, NonEsoWrappedGraph, RewritableWrappedGraph, SecGraph, SecGraphRef, SharedWrappedGraph, ThreadedSecGraph

public interface WrappedGraph extends RegistryContext, Graph, GraphManagerContext
  • Method Details

    • getDataGraph

      GraphManager getDataGraph()
    • getQueryGraph

      Graph getQueryGraph()
    • getRootNode

      Node getRootNode()
    • setRootNode

      void setRootNode(Node n)
    • cloneGraph

      Node cloneGraph() throws CloneNotSupportedException
      Throws:
      CloneNotSupportedException
    • toInstance

      Instance3D toInstance(boolean transfrom)
    • getName

      String getName()
    • clear

      void clear()
    • reload

      void reload(Registry r)
    • derive

      void derive()
    • apply

      DisposableIterator apply(int count)
    • getModel

      default RuntimeModel getModel()
      Default implementation for xl.query.graph based on the queryGraph provided from getQueryGraph()
      Specified by:
      getModel in interface Graph
      Returns:
      the run-time model
    • createQueryState

      default QueryState createQueryState()
      Description copied from interface: Graph
      Creates 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 by CompiletimeModel.getQueryStateType() of the corresponding compile-time model.
      Specified by:
      createQueryState in interface Graph
      Returns:
      a new query state
    • createProducer

      default Producer createProducer(QueryState qs)
      Description copied from interface: Graph
      Creates an instance of Producer. 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.

      Specified by:
      createProducer in interface Graph
      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:
      createMatcher in interface Graph
    • canEnumerateNodes

      default boolean canEnumerateNodes(Type type)
      Description copied from interface: Graph
      Can nodes of the specified type be enumerated? This method returns true iff this graph can enumerate nodes of the given type using the method Graph.enumerateNodes(de.grogra.reflect.Type, de.grogra.xl.query.QueryState, int, de.grogra.xl.query.MatchConsumer, int).
      Specified by:
      canEnumerateNodes in interface Graph
      Parameters:
      type - the type of nodes
      Returns:
      true iff nodes of type can be enumerated
    • enumerateNodes

      default void enumerateNodes(Type type, QueryState qs, int tp, MatchConsumer consumer, int arg)
      Description copied from interface: Graph
      This methods enumerates all nodes of this graph of the given type to the given MatchConsumer 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);
       
      Specified by:
      enumerateNodes in interface Graph
      Parameters:
      type - the type of nodes
      qs - the query state on which the amatch-method has to be invoked
      tp - the index-parameter for the amatch-method
      consumer - the consumer-parameter for the amatch-method
      arg - the arg-parameter for the amatch-method
    • canEnumerateEdges

      default boolean canEnumerateEdges(EdgeDirection dir, boolean constEdge, Serializable edge)
      Specified by:
      canEnumerateEdges in interface Graph
    • 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:
      enumerateEdges in interface Graph
    • getRoot

      default Object getRoot()
      Description copied from interface: Graph
      Returns the root node of this graph.
      Specified by:
      getRoot in interface Graph
      Returns:
      the root
    • setDerivationMode

      default void setDerivationMode(int mode)
    • view2d

      void view2d()
    • view3d

      void view3d()