Class KindSignature
java.lang.Object
org.bigraphs.framework.core.AbstractEcoreSignature<DynamicControl>
org.bigraphs.framework.core.impl.signature.KindSignature
- All Implemented Interfaces:
EcoreBigraphExt,EcoreSignature,IsPlaceSortable,Signature<DynamicControl>
public class KindSignature
extends AbstractEcoreSignature<DynamicControl>
implements IsPlaceSortable
Concrete implementation of a pure dynamic signature, where controls
can be assigned a
status (active or passive),
and each control may additionally define a place sort.
This class generalizes DynamicSignature, as kind signatures
(with place sorts) are a generalization of pure signatures.
The kind signature encapsulates both the Ecore-based metamodel and its corresponding instance model. The instance model is derived from the extended metamodel and created internally.
- Author:
- Dominik Grzelak
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.eclipse.emf.ecore.EFactoryFields inherited from class org.bigraphs.framework.core.AbstractEcoreSignature
controls, instanceModel, sigPackageFields inherited from interface org.bigraphs.framework.core.EcoreSignature
VALIDATORS -
Constructor Summary
ConstructorsConstructorDescriptionKindSignature(Set<DynamicControl> controls) This constructor automatically assumes as the default that all controls are active, thus, the kind function returns all available controls for the respective control.KindSignature(Set<DynamicControl> controls, Collection<KindSort> kindSorts) This constructor creates a kind signature with the given controls and kind sorts.KindSignature(org.eclipse.emf.ecore.EObject bKindSignature) Create a kind signature object for the given Ecore instance model. -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.emf.ecore.EObjectReturn the respective signature Ecore-based instance model.org.eclipse.emf.ecore.EPackageReturn the respective signature Ecore-based metamodel.inthashCode()protected voidinitKindFunction(Collection<KindSort> kindSorts) protected voidprotected voidMethods inherited from class org.bigraphs.framework.core.AbstractEcoreSignature
equals, extendBControlEClass, extendBKindSortCompositeEClass, extendBKindSortLeafEClass, getControls, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.bigraphs.framework.core.Signature
getArity, getArity, getControl, getControl, getControlByName
-
Field Details
-
kindFunction
-
sigFactory
protected org.eclipse.emf.ecore.EFactory sigFactory
-
-
Constructor Details
-
KindSignature
public KindSignature(org.eclipse.emf.ecore.EObject bKindSignature) Create a kind signature object for the given Ecore instance model. The "extended" metamodel for kind signatures is stored in the member variableAbstractEcoreSignature.sigPackage.- Parameters:
bKindSignature- the instance model of a kind signature- Throws:
RuntimeException- if the instance model is invalid (not conforming to the metamodel)- See Also:
-
KindSignature
This constructor automatically assumes as the default that all controls are active, thus, the kind function returns all available controls for the respective control.- Parameters:
controls- the controls of the kind signature
-
KindSignature
This constructor creates a kind signature with the given controls and kind sorts. If no kind sort is provided for a given control, the default behaviour kicks in. That is, that control is active, thus, the kind function returns all available controls for the respective control.- Parameters:
controls- the controlskindSorts- the kind sorts (must not be fully defined for all controls, has a default behaviour as described above)
-
-
Method Details
-
recreateControls
protected void recreateControls()- Overrides:
recreateControlsin classAbstractEcoreSignature<DynamicControl>
-
recreateSorts
protected void recreateSorts()- Overrides:
recreateSortsin classAbstractEcoreSignature<DynamicControl>
-
getMetaModel
public org.eclipse.emf.ecore.EPackage getMetaModel()Description copied from interface:EcoreSignatureReturn the respective signature Ecore-based metamodel.- Specified by:
getMetaModelin interfaceEcoreBigraphExt- Specified by:
getMetaModelin interfaceEcoreSignature- Specified by:
getMetaModelin classAbstractEcoreSignature<DynamicControl>- Returns:
- the metamodel of the base signature specification
- See Also:
-
getInstanceModel
public org.eclipse.emf.ecore.EObject getInstanceModel()Description copied from interface:EcoreSignatureReturn the respective signature Ecore-based instance model.- Specified by:
getInstanceModelin interfaceEcoreBigraphExt- Specified by:
getInstanceModelin interfaceEcoreSignature- Specified by:
getInstanceModelin classAbstractEcoreSignature<DynamicControl>- Returns:
- the signature instance model
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractEcoreSignature<DynamicControl>
-
initKindFunction
-
getPlaceKindMap
- Specified by:
getPlaceKindMapin interfaceIsPlaceSortable
-