Class GraphObjectImpl

java.lang.Object
de.grogra.persistence.ShareableBase
de.grogra.graph.object.impl.GraphObjectImpl
All Implemented Interfaces:
GraphObject, Manageable, Shareable, RegistryContext, Showable, Serializable
Direct Known Subclasses:
SubGraphImpl

public class GraphObjectImpl extends ShareableBase implements Serializable, Showable, GraphObject
See Also:
  • Field Details

    • MIME_TYPE

      public static final MimeType MIME_TYPE
    • registry

      protected Registry registry
  • Constructor Details

    • GraphObjectImpl

      public GraphObjectImpl()
    • GraphObjectImpl

      public GraphObjectImpl(Node n, Context ctx)
    • GraphObjectImpl

      public GraphObjectImpl(Context ctx)
  • Method Details

    • getRootNode

      public Node getRootNode()
      Description copied from interface: GraphObject
      Return the root node of the subgraph, i.e. the root of the object loaded
      Specified by:
      getRootNode in interface GraphObject
      Returns:
      a Node
    • setRootNode

      public void setRootNode(Node root)
      Description copied from interface: GraphObject
      Set the rootnode of a Subgraph object.
      Specified by:
      setRootNode in interface GraphObject
    • cloneGraph

      public Node cloneGraph() throws CloneNotSupportedException
      Description copied from interface: GraphObject
      clone the graph of the rootnode and returns it
      Specified by:
      cloneGraph in interface GraphObject
      Returns:
      Throws:
      CloneNotSupportedException
    • write

      public void write()
      Description copied from interface: GraphObject
      Override the file subgraph in the project with its current version. Required on subgraph created in RGG to be saved
      Specified by:
      write in interface GraphObject
    • reload

      public void reload()
      Description copied from interface: GraphObject
      If the subgraph uses some modules defined in the project, reload forces the modules in the subgraph to be relinked after compilation
      Specified by:
      reload in interface GraphObject
    • describes

      public Object describes()
      Description copied from interface: GraphObject
      Gives an array of node types and number contained in the subgraph
      Specified by:
      describes in interface GraphObject
      Returns:
    • getGraph

      public GraphManager getGraph()
      Description copied from interface: GraphObject
      Return the graph manager of the subgraph. It is different from the graph manager of the project & workbench.
      Specified by:
      getGraph in interface GraphObject
      Returns:
    • getNode

      public Node getNode(String key)
      Description copied from interface: GraphObject
      Return a node of the given name
      Specified by:
      getNode in interface GraphObject
      Parameters:
      key - : the name of the type of node
    • getManageableType

      public ManageableType getManageableType()
      Specified by:
      getManageableType in interface Manageable
    • show

      public void show(Context ctx)
      Specified by:
      show in interface Showable
    • getRegistry

      public Registry getRegistry()
      Description copied from interface: RegistryContext
      Returns the Registry which is linked with this instance.
      Specified by:
      getRegistry in interface RegistryContext
      Returns:
      the registry linked with this instance