Cleans the element. More...
Public Types | |
enum | CleanOp { ALL, OPT, XOR } |
possible cleaning operations. More... | |
Public Member Functions | |
void | cleanElement (IAXLangElement axlToClean, CleanOp theCleanOp) |
the main operation; cleans an element according to the selected cleaning operations | |
ElementCleaner () | |
Constructor setting the operation parameters. | |
Static Public Attributes | |
static final String | ID_IN_CLEANOP = "cleanoperation" |
identifier of the clean operation to perform | |
static final String | ID_IN_ELEMENT_TOCLEAN = "axltoclean" |
identifier of the element to clean | |
static final String | ID_OUT_ELEMENT = "axlcleaned" |
identifier of the cleaned element | |
Protected Member Functions | |
Map< String, Object > | executeConcreteOperation (Map< String, Object > theInputParameters) |
Cleans the model with the selected operation. | |
Static Private Member Functions | |
static void | cleanOptionalElements (IAXLangElement theParent) |
Cleans parent element and all children of not selected optional elements. | |
static void | cleanXORElements (IAXLangElement theParent) |
Cleans parent element and all children of XOR elements. | |
static void | cleanXORService (Function theXORService) |
Cleans one XOR service. | |
static void | cleanXORSubComponent (SubComponent theXORSubComponent) |
Cleans one XOR subcomponent. | |
static void | collectAndCleanXORElements (IAXLangElement theParent) |
Collects and cleans XOR subelements to clean, i.e. replaces them with their only alternative. | |
static Collection < ElementWithRole > | collectOptionalElementsToRemove (IAXLangElement theParent) |
Collects optional elements to remove. | |
static Collection < ElementWithRole > | collectXORElementsToRemove (IAXLangElement theElement, Class<?extends IAXLangElement > theXORClass, Role theSubRole) |
Collects XOR subelements to remove. | |
static Collection < ElementWithRole > | collectXORElementsToRemove (IAXLangElement theParent) |
Collects XOR subelements to remove. | |
static void | deleteNotSelectedElements (Collection< ElementWithRole > cllToDelete) |
Deletes the given elements. | |
static void | removeNotReferencedComponentTypes (IAXLangElement theParent) |
Cleans one XOR hwsubcomponent. |
Cleans the element.
This converter does the cleaning step for elements.
Cleaning includes:
Elements are processed only if their binding time is "design time" (BindingTime#DESIGNTIME)
remove F2* links that point to mandatory elements
process optional elements
remove not used elements (not connected)
remove models? (e.g. empty ones, including referenced models)
remove not connected ports?
de.fraunhofer.isst.axbench.operations.transformer.ElementCleaner.ElementCleaner | ( | ) |
Constructor setting the operation parameters.
Element input parameters:
void de.fraunhofer.isst.axbench.operations.transformer.ElementCleaner.cleanElement | ( | IAXLangElement | axlToClean, | |
CleanOp | theCleanOp | |||
) |
the main operation; cleans an element according to the selected cleaning operations
axlToClean | the aXLang-element that is to be cleaned | |
theCleanOp | the operation that is to be performed (CleanOp.ALL or CleanOp.XOR) |
static void de.fraunhofer.isst.axbench.operations.transformer.ElementCleaner.cleanOptionalElements | ( | IAXLangElement | theParent | ) | [static, private] |
Cleans parent element and all children of not selected optional elements.
theParent | parent element to clean |
static void de.fraunhofer.isst.axbench.operations.transformer.ElementCleaner.cleanXORElements | ( | IAXLangElement | theParent | ) | [static, private] |
Cleans parent element and all children of XOR elements.
XOR elements to consider are described in collectElementsToRemove(IAXLangElement)
theParent | parent element to clean |
static void de.fraunhofer.isst.axbench.operations.transformer.ElementCleaner.cleanXORService | ( | Function | theXORService | ) | [static, private] |
Cleans one XOR service.
theXORService | the XOR service that is to be to cleaned |
static void de.fraunhofer.isst.axbench.operations.transformer.ElementCleaner.cleanXORSubComponent | ( | SubComponent | theXORSubComponent | ) | [static, private] |
Cleans one XOR subcomponent.
theXORSubComponent | XOR subcomponent to clean |
static void de.fraunhofer.isst.axbench.operations.transformer.ElementCleaner.collectAndCleanXORElements | ( | IAXLangElement | theParent | ) | [static, private] |
Collects and cleans XOR subelements to clean, i.e. replaces them with their only alternative.
XOR elements to consider are:
theParent | parent element |
static Collection<ElementWithRole> de.fraunhofer.isst.axbench.operations.transformer.ElementCleaner.collectOptionalElementsToRemove | ( | IAXLangElement | theParent | ) | [static, private] |
Collects optional elements to remove.
theParent | parent element |
static Collection<ElementWithRole> de.fraunhofer.isst.axbench.operations.transformer.ElementCleaner.collectXORElementsToRemove | ( | IAXLangElement | theElement, | |
Class<?extends IAXLangElement > | theXORClass, | |||
Role | theSubRole | |||
) | [static, private] |
Collects XOR subelements to remove.
theElement | possible XOR element | |
theXORClass | possible XOR class | |
theSubRole | subelement role |
static Collection<ElementWithRole> de.fraunhofer.isst.axbench.operations.transformer.ElementCleaner.collectXORElementsToRemove | ( | IAXLangElement | theParent | ) | [static, private] |
Collects XOR subelements to remove.
XOR elements to consider are:
theParent | parent element |
static void de.fraunhofer.isst.axbench.operations.transformer.ElementCleaner.deleteNotSelectedElements | ( | Collection< ElementWithRole > | cllToDelete | ) | [static, private] |
Deletes the given elements.
cllToDelete | elements to delete |
Map<String, Object> de.fraunhofer.isst.axbench.operations.transformer.ElementCleaner.executeConcreteOperation | ( | Map< String, Object > | theInputParameters | ) | [protected] |
Cleans the model with the selected operation.
theInputParameters | map of the input parameters (empty map or null allowed) |
Reimplemented from de.fraunhofer.isst.axbench.api.operations.AbstractAXLOperation.
static void de.fraunhofer.isst.axbench.operations.transformer.ElementCleaner.removeNotReferencedComponentTypes | ( | IAXLangElement | theParent | ) | [static, private] |
Cleans one XOR hwsubcomponent.
theXORSubComponent | XOR subcomponent to clean Removes component types without reference (except top component and clock). -# collect all component types
|
theParent | parent element to clean |
final String de.fraunhofer.isst.axbench.operations.transformer.ElementCleaner.ID_IN_CLEANOP = "cleanoperation" [static] |
identifier of the clean operation to perform
final String de.fraunhofer.isst.axbench.operations.transformer.ElementCleaner.ID_IN_ELEMENT_TOCLEAN = "axltoclean" [static] |
identifier of the element to clean
final String de.fraunhofer.isst.axbench.operations.transformer.ElementCleaner.ID_OUT_ELEMENT = "axlcleaned" [static] |
identifier of the cleaned element