Class ModelTransformationStepBase
java.lang.Object
de.mid.innovator.m2msdk.model.transformation.ConfigurableItem
de.mid.innovator.m2msdk.model.transformation.ModelTransformationStepBase
- All Implemented Interfaces:
ConfigurableItemIF,ModelTransformationStepIF,IdentifierAble,Serializable
- Direct Known Subclasses:
ModelTransformationStep
public abstract class ModelTransformationStepBase
extends ConfigurableItem
implements ModelTransformationStepIF
The base of model transformation steps.
- Version:
- 10.1.1
- Author:
- jmback
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncalcAllTargetMatchCandidates(MappingElementIF se, TargetDetectionData target, TransformationStepSubStepData inputSubStepData) Get existing possible target elements for checking source and target according to the tasks in this step.booleancheckConstraints(MappingElementIF element, ExpressionContext context) Check if all constraints evaluate to true.detectPatternAnchor(MappingElementIF se, TransformationStepSubStepData inputSubStepData) Uses the embedding pattern to detect the target elements anchor elements for creation of target.voidextendModel(WorkModelInterface workModel) Extend the source model by applying the model extension of this step.Get the type of the configurable item.booleanGet the list of all acceptable parameter names.Get the embeddings for the target match.Get Model Glue Reader ManagerGet Model Glue Writer ManagergetName()Get the name.Get the embeddings for the target pattern.Get the pattern to create a target.Retrieves from the source model the elements suitable for the current pattern.Returns a List of PreTranstransformationSteps.static ModelTransformationStepListgetRelevantTransformationStep(ConfigurableItemIF runtimeItem, MappingElementIF sourceElement, String sStepIdentifier, String tagProposal) Get the source model extension of this step.Get the patterns that define a source match.Get the lowest step group in which this item isReturns a List of SubTranstransformationSteps.Get the target model extension of this step.getTargetMatchCandidates(MappingElementIF se, TransformationStepSubStepData preStepData) Try to find the target via glue or via properties from source elements .Get the patterns that define a target match.booleanbooleanbooleanbooleanvoidpreinit(SessionInterface iSession) Initialize the model transformation step.voidsetConfigurationContext(SessionInterface iSession, MetaModel sourceMM, MetaModel targetMM, ConfigurationItemIF context) Set the configuration context of this configurable item.voidSet the previous step as the default predecessor.voidsetStepGroup(GroupIF iGroup) Set the lowest group of this itemtoString()voidTransform the source model by applying this step.voidtransformDispatch(MappingElementIF se, TargetDetectionData target, TransformationStepSubStepData inputSubStepData) Transform a single source model element by applying this step.voidtransformElementList(MappingElementList candidates, TransformationStepSubStepData preStepData) Transforms the given Mapping Element ListMethods inherited from class de.mid.innovator.m2msdk.model.transformation.ConfigurableItem
checkConstraints, getBaseItem, getConfigurableItems, getId, getItem, getParentItem, getParentItem, setBaseItem, setConfigurationTag, setId, setParentMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface de.mid.innovator.m2msdk.model.transformation.interfaces.ConfigurableItemIF
checkConstraints, getBaseItem, getConfigurableItems, getItem, getParentItem, getParentItem, setBaseItem, setConfigurationTag, setParentMethods inherited from interface de.mid.innovator.m2msdk.util.IdentifierAble
getId, setId
-
Field Details
-
PARAMETERNAME_STEP_NAME_SYMBOLIC
- See Also:
-
PARAMETERNAME_STEP_TAG_PROPOSALS
- See Also:
-
-
Constructor Details
-
ModelTransformationStepBase
public ModelTransformationStepBase()
-
-
Method Details
-
getStepGroup
Description copied from interface:ModelTransformationStepIFGet the lowest step group in which this item is- Specified by:
getStepGroupin interfaceModelTransformationStepIF- Returns:
- null if it is in no step group.
-
setStepGroup
Description copied from interface:ModelTransformationStepIFSet the lowest group of this item- Specified by:
setStepGroupin interfaceModelTransformationStepIF- Parameters:
iGroup- step group
-
getModelGlueWriterManager
Description copied from interface:ModelTransformationStepIFGet Model Glue Writer Manager- Specified by:
getModelGlueWriterManagerin interfaceModelTransformationStepIF- Returns:
- ModelGlueWriterManager
-
getModelGlueReaderManager
Description copied from interface:ModelTransformationStepIFGet Model Glue Reader Manager- Specified by:
getModelGlueReaderManagerin interfaceModelTransformationStepIF- Returns:
- ModelGlueReaderManager
-
getSubTransformationStepList
Description copied from interface:ModelTransformationStepIFReturns a List of SubTranstransformationSteps.- Specified by:
getSubTransformationStepListin interfaceModelTransformationStepIF- Returns:
- return a list of steps which are subordinated to this step
-
checkConstraints
public boolean checkConstraints(MappingElementIF element, ExpressionContext context) throws RemoteException, M2MException Description copied from interface:ConfigurableItemIFCheck if all constraints evaluate to true.- Specified by:
checkConstraintsin interfaceConfigurableItemIF- Overrides:
checkConstraintsin classConfigurableItem- Parameters:
context- context of evaluation with source and target- Returns:
- true, if there are no constraints or all constraints evaluate to true
- Throws:
RemoteException- exception from remote executionM2MException- generic exception
-
getName
Description copied from interface:ConfigurableItemIFGet the name.- Specified by:
getNamein interfaceConfigurableItemIF- Overrides:
getNamein classConfigurableItem- Returns:
- name as given by user in model transformation configuration
-
transform
Description copied from interface:ModelTransformationStepIFTransform the source model by applying this step.- Specified by:
transformin interfaceModelTransformationStepIF- Throws:
M2MExceptionRemoteExceptionRemoteException
-
transformElementList
public void transformElementList(MappingElementList candidates, TransformationStepSubStepData preStepData) throws M2MException, RemoteException Description copied from interface:ModelTransformationStepIFTransforms the given Mapping Element List- Specified by:
transformElementListin interfaceModelTransformationStepIF- Parameters:
candidates-preStepData-- Throws:
M2MExceptionRemoteExceptionRemoteException
-
transformDispatch
public void transformDispatch(MappingElementIF se, TargetDetectionData target, TransformationStepSubStepData inputSubStepData) throws M2MException, RemoteException Description copied from interface:ModelTransformationStepIFTransform a single source model element by applying this step.- Specified by:
transformDispatchin interfaceModelTransformationStepIF- Parameters:
se- model element in source modeltarget- existing and created targets glued with source persistently or matching sourceinputSubStepData- the description of the sub step- Throws:
M2MExceptionRemoteException
-
preinit
Description copied from interface:ModelTransformationStepIFInitialize the model transformation step.- Specified by:
preinitin interfaceModelTransformationStepIF- Parameters:
iSession- session- Throws:
M2MExceptionRemoteException
-
getSourceExtension
Description copied from interface:ModelTransformationStepIFGet the source model extension of this step.- Specified by:
getSourceExtensionin interfaceModelTransformationStepIF- Returns:
- model extension
-
getTargetExtension
Description copied from interface:ModelTransformationStepIFGet the target model extension of this step.- Specified by:
getTargetExtensionin interfaceModelTransformationStepIF- Returns:
- model extension
-
getPatternProduction
Description copied from interface:ModelTransformationStepIFGet the pattern to create a target.- Specified by:
getPatternProductionin interfaceModelTransformationStepIF- Returns:
- patterns to create a target
-
getSourceMatchPattern
Description copied from interface:ModelTransformationStepIFGet the patterns that define a source match.- Specified by:
getSourceMatchPatternin interfaceModelTransformationStepIF- Returns:
- list of patterns
-
getTargetMatchPattern
Description copied from interface:ModelTransformationStepIFGet the patterns that define a target match.- Specified by:
getTargetMatchPatternin interfaceModelTransformationStepIF- Returns:
- list of patterns
-
getPatternEmbedding
Description copied from interface:ModelTransformationStepIFGet the embeddings for the target pattern.- Specified by:
getPatternEmbeddingin interfaceModelTransformationStepIF- Returns:
- list of model embeddings
-
getMatchEmbedding
Description copied from interface:ModelTransformationStepIFGet the embeddings for the target match.- Specified by:
getMatchEmbeddingin interfaceModelTransformationStepIF- Returns:
- list of model embeddings
-
extendModel
Description copied from interface:ModelTransformationStepIFExtend the source model by applying the model extension of this step.- Specified by:
extendModelin interfaceModelTransformationStepIF- Parameters:
workModel- work model to extend by this step- Throws:
M2MExceptionRemoteExceptionRemoteException
-
getKnownParameters
public ParameterTemplates getKnownParameters(MappingElementIF me, ConfigurationItemIF iItem) throws M2MException, RemoteException Description copied from interface:ConfigurableItemIFGet the list of all acceptable parameter names.- Specified by:
getKnownParametersin interfaceConfigurableItemIF- Overrides:
getKnownParametersin classConfigurableItem- Parameters:
me- mapping element, maybe nulliItem- configuration item, maybe null- Returns:
- list of parameter names
- Throws:
M2MException- generic exceptionRemoteException- error in communicationRemoteException- exception from remote execution
-
setConfigurationContext
public void setConfigurationContext(SessionInterface iSession, MetaModel sourceMM, MetaModel targetMM, ConfigurationItemIF context) throws M2MException, RemoteException Description copied from interface:ConfigurableItemIFSet the configuration context of this configurable item. The configurable item is configured according the context.- Specified by:
setConfigurationContextin interfaceConfigurableItemIF- Overrides:
setConfigurationContextin classConfigurableItem- Parameters:
iSession- sessionsourceMM- source meta modeltargetMM- target meta modelcontext- Configuration item- Throws:
M2MException- generic exceptionRemoteException- exception from remote execution
-
setPreviousModelTransformationStep
Description copied from interface:ModelTransformationStepIFSet the previous step as the default predecessor.- Specified by:
setPreviousModelTransformationStepin interfaceModelTransformationStepIF- Parameters:
lastStep- Previous step in the order of the owning model transformation
-
toString
- Overrides:
toStringin classConfigurableItem
-
getPatternSourceModelCandidateElements
public MappingElementList getPatternSourceModelCandidateElements() throws M2MException, RemoteExceptionRetrieves from the source model the elements suitable for the current pattern.- Returns:
- source elements fitting the pattern
- Throws:
RemoteExceptionAbortExceptionSevereExceptionRemoteExceptionM2MException
-
getPreTransformationSteps
Description copied from interface:ModelTransformationStepIFReturns a List of PreTranstransformationSteps.- Specified by:
getPreTransformationStepsin interfaceModelTransformationStepIF- Returns:
- return a list of steps which are executed before an element of the current element is processed.
-
calcAllTargetMatchCandidates
public MappingElementList calcAllTargetMatchCandidates(MappingElementIF se, TargetDetectionData target, TransformationStepSubStepData inputSubStepData) throws M2MException, RemoteException Get existing possible target elements for checking source and target according to the tasks in this step.- Specified by:
calcAllTargetMatchCandidatesin interfaceModelTransformationStepIF- Parameters:
se- source elementinputSubStepData-- Returns:
- list of all elements that comply the target match
- Throws:
AbortExceptionSevereExceptionRemoteExceptionM2MExceptionRemoteException
-
getTargetMatchCandidates
public MappingElementList getTargetMatchCandidates(MappingElementIF se, TransformationStepSubStepData preStepData) throws M2MException, RemoteException Try to find the target via glue or via properties from source elements .- Parameters:
se- list of source elements- Returns:
- If found, list of target elements glued persistently or virtually with source
- Throws:
RemoteExceptionSevereExceptionRemoteExceptionM2MException
-
detectPatternAnchor
public MappingAnchor detectPatternAnchor(MappingElementIF se, TransformationStepSubStepData inputSubStepData) throws M2MException, RemoteException Uses the embedding pattern to detect the target elements anchor elements for creation of target.- Specified by:
detectPatternAnchorin interfaceModelTransformationStepIF- Parameters:
se- Model element in source modelinputSubStepData- data about enclosing step- Returns:
- Anchor for a mapping element.
- Throws:
RemoteExceptionAbortException- critical errorSevereException- errorRemoteExceptionM2MException
-
getConfigurationTag
Description copied from interface:ConfigurableItemIFGet the type of the configurable item. The type defines the role that the item plays in the execution.- Specified by:
getConfigurationTagin interfaceConfigurableItemIF- Overrides:
getConfigurationTagin classConfigurableItem- Returns:
- type of the item
-
isPreStep
- Throws:
AbortExceptionRemoteException
-
isSubStep
- Throws:
AbortExceptionRemoteException
-
getSubStepIdentificationName
- Throws:
AbortExceptionRemoteException
-
getPreStepIdentificationName
- Throws:
AbortExceptionRemoteException
-
getIsValidatingSubStep
- Throws:
AbortExceptionRemoteException
-
isSubTransformationStep
- Throws:
AbortExceptionRemoteException
-
getSymbolicStepName
- Specified by:
getSymbolicStepNamein interfaceModelTransformationStepIF- Returns:
- returns the transformation step's symbolic name
-
getStepProposals
- Specified by:
getStepProposalsin interfaceModelTransformationStepIF
-
getPredecessorModelTransformationStep
public ModelTransformationStepList getPredecessorModelTransformationStep() throws AbortException, RemoteException- Specified by:
getPredecessorModelTransformationStepin interfaceModelTransformationStepIF- Throws:
AbortExceptionRemoteException
-
getRelevantTransformationStep
public static ModelTransformationStepList getRelevantTransformationStep(ConfigurableItemIF runtimeItem, MappingElementIF sourceElement, String sStepIdentifier, String tagProposal) throws RemoteException, M2MException - Throws:
RemoteExceptionM2MException
-
getTansformationStepIterator
- Specified by:
getTansformationStepIteratorin interfaceModelTransformationStepIF
-
getStepFullName
-
isName
-