Class KindSignatureBuilder
The builder returns an object of the class KindSignature
, which includes
both the Ecore-based kind signature metamodel and its instance model.
Both the metamodel for kind signatures and the instance model are created internally.
The instance model is based on the extended metamodel.
- Author:
- Dominik Grzelak
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddActiveKindSort
(String control, Collection<String> containingControls) This methods adds a place-sort for the given control.addControl
(String name, int arity) addPassiveKindSort
(String control) This method adds an empty place-sort for the given control.create()
Create the signature with the assigned controls so far.create
(EMetaModelData metaModelData) protected KindControlBuilder
Hook method to be implemented by subclasses for creating the corresponding control builder (i.e., only active or dynamic controls).Creates an empty signature, meaning that the control set is empty.
Needed for the interaction of elementary bigraphs and user-defined bigraphs.protected KindSignature
This method is not called by the user; it is called bySignatureBuilder.createEmpty()
.createWith
(Iterable<? extends Control<StringTypedName, FiniteOrdinal<Integer>>> controls) Create a signature with the given controls.createWith
(Iterable<? extends Control<StringTypedName, FiniteOrdinal<Integer>>> controls, Collection<KindSort> kindSorts) createWith
(Iterable<? extends Control<StringTypedName, FiniteOrdinal<Integer>>> controls, Collection<KindSort> kindSorts, EMetaModelData metaModelData) newControl
(String name, int arity) Methods inherited from class org.bigraphs.framework.core.SignatureBuilder
addControl, getControls, newControl, newControl, self
-
Constructor Details
-
KindSignatureBuilder
public KindSignatureBuilder()
-
-
Method Details
-
createControlBuilder
Description copied from class:SignatureBuilder
Hook method to be implemented by subclasses for creating the corresponding control builder (i.e., only active or dynamic controls).- Specified by:
createControlBuilder
in classSignatureBuilder<StringTypedName,
FiniteOrdinal<Integer>, KindControlBuilder, KindSignatureBuilder> - Returns:
- the control builder
-
newControl
-
addControl
-
addActiveKindSort
public KindSignatureBuilder addActiveKindSort(String control, Collection<String> containingControls) throws ControlNotExistsException This methods adds a place-sort for the given control. The status of the control is thusactive
, i.e., it is an non-atomic control.If this method is called multiple times with the same argument
control
, the new valuescontainingControls
will be used to override the existing sorting for the controlcontrol
.If this method is called after, for example,
addPassiveKindSort(String)
, then it will override the previous configuration of being an atomic control.- Parameters:
control
- the control to specify the place-sorts forcontainingControls
- the controls that can be nested undercontrol
- Returns:
- the same instance of the kind signature builder
- Throws:
ControlNotExistsException
-
addPassiveKindSort
This method adds an empty place-sort for the given control. The status of the control is thuspassive
, i.e., it is an atomic control.If this method is called after, for example,
addActiveKindSort(String, Collection)
, then it will override the existing sort and declare the given control aspassive
.- Parameters:
control
- the control to declare atomic- Returns:
- Throws:
ControlNotExistsException
-
create
Description copied from class:SignatureBuilder
Create the signature with the assigned controls so far.- Overrides:
create
in classSignatureBuilder<StringTypedName,
FiniteOrdinal<Integer>, KindControlBuilder, KindSignatureBuilder> - Returns:
- a signature
-
create
- Overrides:
create
in classSignatureBuilder<StringTypedName,
FiniteOrdinal<Integer>, KindControlBuilder, KindSignatureBuilder>
-
createWith
public KindSignature createWith(Iterable<? extends Control<StringTypedName, FiniteOrdinal<Integer>>> controls) Description copied from class:SignatureBuilder
Create a signature with the given controls.- Specified by:
createWith
in classSignatureBuilder<StringTypedName,
FiniteOrdinal<Integer>, KindControlBuilder, KindSignatureBuilder> - Parameters:
controls
- the controls to use for the signature- Returns:
- a signature with the given controls
-
createWith
public KindSignature createWith(Iterable<? extends Control<StringTypedName, FiniteOrdinal<Integer>>> controls, Collection<KindSort> kindSorts) -
createWith
public KindSignature createWith(Iterable<? extends Control<StringTypedName, FiniteOrdinal<Integer>>> controls, Collection<KindSort> kindSorts, EMetaModelData metaModelData) -
createEmpty
Description copied from class:SignatureBuilder
Creates an empty signature, meaning that the control set is empty.
Needed for the interaction of elementary bigraphs and user-defined bigraphs.- Overrides:
createEmpty
in classSignatureBuilder<StringTypedName,
FiniteOrdinal<Integer>, KindControlBuilder, KindSignatureBuilder> - Returns:
- an empty signature of type <S>.
-
createEmptyStub
Description copied from class:SignatureBuilder
This method is not called by the user; it is called bySignatureBuilder.createEmpty()
.- Specified by:
createEmptyStub
in classSignatureBuilder<StringTypedName,
FiniteOrdinal<Integer>, KindControlBuilder, KindSignatureBuilder>
-