Class KindSignature
java.lang.Object
org.bigraphs.framework.core.AbstractEcoreSignature<DefaultDynamicControl>
org.bigraphs.framework.core.impl.signature.KindSignature
- All Implemented Interfaces:
EcoreBigraphExt
,EcoreSignature
,IsPlaceSortable
,Signature<DefaultDynamicControl>
public class KindSignature
extends AbstractEcoreSignature<DefaultDynamicControl>
implements IsPlaceSortable
Concrete implementation of a pure (dynamic) signature, where controls can be assigned a
status = (active, passive)
,
and further place-sorts can be defined for each control.
This class generalizes the DefaultDynamicSignature
class somewhat, because (place-sorted) kind signatures
are a generalisation of pure signatures.
- Author:
- Dominik Grzelak
-
Field Summary
Modifier and TypeFieldDescriptionprotected org.eclipse.emf.ecore.EFactory
Fields inherited from class org.bigraphs.framework.core.AbstractEcoreSignature
controls, instanceModel, sigPackage
Fields inherited from interface org.bigraphs.framework.core.EcoreSignature
VALIDATORS
-
Constructor Summary
ConstructorDescriptionKindSignature
(Set<DefaultDynamicControl> 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<DefaultDynamicControl> 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.EObject
Return the respective signature Ecore-based instance model.org.eclipse.emf.ecore.EPackage
Return the respective signature Ecore-based metamodel.int
hashCode()
protected void
initKindFunction
(Collection<KindSort> kindSorts) protected void
protected void
Methods inherited from class org.bigraphs.framework.core.AbstractEcoreSignature
equals, extendBControlEClass, extendBKindSortCompositeEClass, extendBKindSortLeafEClass, getControls, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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:
recreateControls
in classAbstractEcoreSignature<DefaultDynamicControl>
-
recreateSorts
protected void recreateSorts()- Overrides:
recreateSorts
in classAbstractEcoreSignature<DefaultDynamicControl>
-
getMetaModel
public org.eclipse.emf.ecore.EPackage getMetaModel()Description copied from interface:EcoreSignature
Return the respective signature Ecore-based metamodel.- Specified by:
getMetaModel
in interfaceEcoreBigraphExt
- Specified by:
getMetaModel
in interfaceEcoreSignature
- Specified by:
getMetaModel
in classAbstractEcoreSignature<DefaultDynamicControl>
- Returns:
- the metamodel of the base signature specification
- See Also:
-
de.tudresden.inf.st.bigraphs.models.signatureBaseModel.SignatureBaseModelPackage
-
getInstanceModel
public org.eclipse.emf.ecore.EObject getInstanceModel()Description copied from interface:EcoreSignature
Return the respective signature Ecore-based instance model.- Specified by:
getInstanceModel
in interfaceEcoreBigraphExt
- Specified by:
getInstanceModel
in interfaceEcoreSignature
- Specified by:
getInstanceModel
in classAbstractEcoreSignature<DefaultDynamicControl>
- Returns:
- the signature instance model
-
hashCode
public int hashCode()- Overrides:
hashCode
in classAbstractEcoreSignature<DefaultDynamicControl>
-
initKindFunction
-
getPlaceKindMap
- Specified by:
getPlaceKindMap
in interfaceIsPlaceSortable
-