Class EcoreBigraph.Stub<S extends AbstractEcoreSignature<?>>

java.lang.Object
org.bigraphs.framework.core.EcoreBigraph.Stub<S>
All Implemented Interfaces:
EcoreBigraph<S>, EcoreBigraphExt, HasSignature<S>
Enclosing interface:
EcoreBigraph<S extends AbstractEcoreSignature<?>>

public static class EcoreBigraph.Stub<S extends AbstractEcoreSignature<?>> extends Object implements EcoreBigraph<S>
A lightweight container for a bigraph that holds only the Ecore-relevant objects.

Though it provides no higher-order functions to access all its elements, it can be useful in some cases. For example, to copy a Bigraph instance into memory and later retrieving it via a builder.

Further, this stub allows the completely copy a bigraph by calling the clone() method.

Author:
Dominik Grzelak
  • Constructor Details

    • Stub

      public Stub(EcoreBigraph<S> bigraph)
      Copy constructor
      Parameters:
      bigraph - an Ecore-based bigraph
  • Method Details

    • getMetaModel

      public org.eclipse.emf.ecore.EPackage getMetaModel()
      Description copied from interface: EcoreBigraphExt
      Return the metamodel of a bigraph object or a signature object.

      It is a metamodel that either extends the base bigraph metamodel or the base signature metamodel.

      Specified by:
      getMetaModel in interface EcoreBigraphExt
      Returns:
      the metamodel in Ecore format
      See Also:
      • de.tudresden.inf.st.bigraphs.models.bigraphBaseModel.BigraphBaseModelPackage
    • getInstanceModel

      public org.eclipse.emf.ecore.EObject getInstanceModel()
      Description copied from interface: EcoreBigraphExt
      Return the Ecore-based instance model of a bigraph object or signature object.
      Specified by:
      getInstanceModel in interface EcoreBigraphExt
      Returns:
      the instance model in Ecore format
    • clone

      This methods returns a copy of the actual bigraph.

      Therefore, the bigraph is exported into the memory and loaded again.

      Overrides:
      clone in class Object
      Returns:
      a copy of the current bigraph.
      Throws:
      CloneNotSupportedException
    • getInputStreamOfInstanceModel

      public InputStream getInputStreamOfInstanceModel() throws EcoreBigraphFileSystemException
      Return the actual instance model (*.xmi) of the bigraph as an input stream.
      Returns:
      the bigraph's Ecore instance model as an input stream.
      Throws:
      EcoreBigraphFileSystemException - if the input stream for the model instance could not be created for some reasons. See the wrapped Exception to retrieve a more detailed error message.
    • getSignature

      public S getSignature()
      Description copied from interface: HasSignature
      Get the corresponding signature of the underlying bigraph
      Specified by:
      getSignature in interface EcoreBigraph<S extends AbstractEcoreSignature<?>>
      Specified by:
      getSignature in interface HasSignature<S extends AbstractEcoreSignature<?>>
      Returns:
      the signature of the bigraph