Weaves model elements regarding their relations. More...
Public Member Functions | |
Model | weave (Model theModelToWeave, String theAspectComposition) |
Weaves the given model acoording to the composition and returns the woven model. | |
Model | weaveModel (Model theModelToWeave, AspectComposition theAspectComposition) throws AXLException |
Weaves the model according to the given aspect mapping. | |
Weaver () | |
Constructor setting the operation parameters. | |
Static Public Attributes | |
static final String | ID_IN_ASPECTCOMPOSITION = "aspectcomposition" |
identifier of the aspect composition | |
static final String | ID_IN_MODEL = "axlmodel" |
identifier of the element to weave | |
static final String | ID_OUT_MODEL = "axlwoven" |
identifier of the woven model | |
Protected Member Functions | |
Map< String, Object > | executeConcreteOperation (Map< String, Object > theInputParameters) |
Weaves the model according to the given aspect mapping. | |
Private Member Functions | |
void | createSystemApplicationmodel (Model theModel, Collection< AbstractArchitectureModel > cllApplicationModels) throws AXLException |
Create new applicationmodel with all elements of the applicationmodels of the composition. | |
void | executeWeavingAlgorithm (List< AspectRelation > lstAspectRelations) throws AXLException |
Executes the weaving algorithm. | |
void | identifyElement (IAXLangElement theSourceElement, IAXLangElement theTargetElement, IGlobalInstance theSourceInstance, IGlobalInstance theTargetInstance) throws AXLException |
Identifies an element with another. | |
void | identifyElement (SubComponentInstance theSourceInstance, SubComponentInstance theTargetInstance) throws AXLException |
Identifies a subcomponent instance with another. | |
void | identifyElement (PortInstance theSourceInstance, PortInstance theTargetInstance) throws AXLException |
Identifies a port instance with another. | |
void | identifyElement (IGlobalInstance theSourceInstance, IGlobalInstance theTargetInstance) throws AXLException |
Identifies an instance with another. | |
void | moveElement (IAXLangElement theElementToMove, IAXLangElement theTargetElement, Role theRole, IGlobalInstance theSourceInstance, IGlobalInstance theTargetInstance) throws AXLException |
Moves an element from it's current position to another position. | |
void | weaveIdentityRelation (AspectRelationIdentity theIdentityRelation) throws AXLException |
Weaves one identity relation. | |
Static Private Attributes | |
static final String | IDENTIFIER_SYSMODEL = "systemmodel" |
identifier of the new system model | |
static final String | IDENTIFIER_TOP = "SystemModelTop" |
identifier of the new system model top component |
Weaves model elements regarding their relations.
This operation implements the weaving algorithm described in my dissertation.
de.axbench.transformers.aspects.Weaver.Weaver | ( | ) |
Constructor setting the operation parameters.
Element input parameters:
void de.axbench.transformers.aspects.Weaver.createSystemApplicationmodel | ( | Model | theModel, | |
Collection< AbstractArchitectureModel > | cllApplicationModels | |||
) | throws AXLException [private] |
Create new applicationmodel with all elements of the applicationmodels of the composition.
theModel | parent model | |
cllApplicationModels | application models |
AXLException | if an error occurred |
Map<String, Object> de.axbench.transformers.aspects.Weaver.executeConcreteOperation | ( | Map< String, Object > | theInputParameters | ) | [protected] |
Weaves the model according to the given aspect mapping.
theInputParameters | map of the input parameters (empty map or null allowed) |
Reimplemented from de.fraunhofer.isst.axbench.api.operations.AbstractAXLOperation.
void de.axbench.transformers.aspects.Weaver.executeWeavingAlgorithm | ( | List< AspectRelation > | lstAspectRelations | ) | throws AXLException [private] |
Executes the weaving algorithm.
Weaving order defined by order of aspect relation collection:
At the moment, the order of the relations is the same as the definition order in the aXLang file.
lstAspectRelations | aspect relations to use |
AXLException | if an error occurred |
void de.axbench.transformers.aspects.Weaver.identifyElement | ( | IGlobalInstance | theSourceInstance, | |
IGlobalInstance | theTargetInstance | |||
) | throws AXLException [private] |
Identifies an instance with another.
theSourceInstance | source instance | |
theTargetInstance | target instance |
AXLException | if an error occurred |
void de.axbench.transformers.aspects.Weaver.identifyElement | ( | IAXLangElement | theSourceElement, | |
IAXLangElement | theTargetElement, | |||
IGlobalInstance | theSourceInstance, | |||
IGlobalInstance | theTargetInstance | |||
) | throws AXLException [private] |
Identifies an element with another.
theSourceElement | source element | |
theTargetElement | target element | |
theSourceInstance | source instance | |
theTargetInstance | target instance |
AXLException | if an error occurred |
void de.axbench.transformers.aspects.Weaver.identifyElement | ( | PortInstance | theSourceInstance, | |
PortInstance | theTargetInstance | |||
) | throws AXLException [private] |
Identifies a port instance with another.
theSourceInstance | source instance | |
theTargetInstance | target instance |
AXLException | if an error occurred |
void de.axbench.transformers.aspects.Weaver.identifyElement | ( | SubComponentInstance | theSourceInstance, | |
SubComponentInstance | theTargetInstance | |||
) | throws AXLException [private] |
Identifies a subcomponent instance with another.
theSourceInstance | source instance | |
theTargetInstance | target instance |
AXLException | if an error occurred |
void de.axbench.transformers.aspects.Weaver.moveElement | ( | IAXLangElement | theElementToMove, | |
IAXLangElement | theTargetElement, | |||
Role | theRole, | |||
IGlobalInstance | theSourceInstance, | |||
IGlobalInstance | theTargetInstance | |||
) | throws AXLException [private] |
Moves an element from it's current position to another position.
theElementToMove | element to move | |
theTargetElement | target element | |
theRole | the role, the element is in (and will be) | |
theSourceInstance | source instance | |
theTargetInstance | target instance |
AXLException | if an error occurred |
Model de.axbench.transformers.aspects.Weaver.weave | ( | Model | theModelToWeave, | |
String | theAspectComposition | |||
) |
Weaves the given model acoording to the composition and returns the woven model.
This method is a convenience method for using the Weaver.
Usage (create object in order to access the generated messages):
Weaver theWeaver = new Weaver(); Model theWovenModel = theWeaver.weave(axlModel, sCompositionName); theWeaver.getAXLMessages(MessageType.ERROR);
Usage (no access to the generated messages):
Model theWovenModel = theWeaver.weave(axlModel, sCompositionName); if (theWovenModel != null) { ... }
theModelToWeave | model to weave | |
theAspectComposition | name of the aspect composition |
null | if errors occured |
void de.axbench.transformers.aspects.Weaver.weaveIdentityRelation | ( | AspectRelationIdentity | theIdentityRelation | ) | throws AXLException [private] |
Weaves one identity relation.
theIdentityRelation | identity relation |
AXLException | if an error occurred |
Model de.axbench.transformers.aspects.Weaver.weaveModel | ( | Model | theModelToWeave, | |
AspectComposition | theAspectComposition | |||
) | throws AXLException |
Weaves the model according to the given aspect mapping.
theModelToWeave | model to weave | |
theAspectComposition | aspect composition |
AXLException | if an error occurred |
final String de.axbench.transformers.aspects.Weaver.ID_IN_ASPECTCOMPOSITION = "aspectcomposition" [static] |
identifier of the aspect composition
final String de.axbench.transformers.aspects.Weaver.ID_IN_MODEL = "axlmodel" [static] |
identifier of the element to weave
final String de.axbench.transformers.aspects.Weaver.ID_OUT_MODEL = "axlwoven" [static] |
identifier of the woven model
final String de.axbench.transformers.aspects.Weaver.IDENTIFIER_SYSMODEL = "systemmodel" [static, private] |
identifier of the new system model
final String de.axbench.transformers.aspects.Weaver.IDENTIFIER_TOP = "SystemModelTop" [static, private] |
identifier of the new system model top component