Class MappingModelGlue
java.lang.Object
de.mid.innovator.m2msdk.model.transformation.ConfigurableItem
de.mid.innovator.m2msdk.model.transformation.glue.MappingModelGlue
- All Implemented Interfaces:
ConditionAbleIF,ConfigurableItemIF,MappingModelGlueIF,FunctionalVariationPointGroupAbleIF,IdentifierAble,Serializable
- Direct Known Subclasses:
MappingModelGlueInnovator,MappingModelGlueNull
Abstract base class for a persistent glue.
- Version:
- 11.3.1
- Author:
- nagl
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapplyFunctionalVariationPoints(SimulateMode iMode, MappingElementIF se, MappingElementList created, MappingElementList existing) Apply the functional variation points within this production to the newly created and existing target elements.booleanbuildModelGlue(SimulateMode mode, MappingElementIF masterElement, MappingElementIF slaveElement) Create or update a model glue between slave element and master element.booleanevaluateConditions(MappingElementIF sourceElement, MappingElementIF targetElement) Evaluate the conditions for a pair of source and target elements or for a single source element.evaluateScore(MappingElementIF sourceElement, MappingElementIF targetElement) Evaluate the score of the target element in context of source element.filterElements(MappingElementIF sourceElement, MappingElementList targetElements) Filter the list target elements according to conditions and current source element.getGlueFromSource(MappingElementIF sourceElement, TransformationStepSubStepData preStepData) Get glue from source element.getGlueFromSources(MappingElementList sourceElements) Get glue from source elements.getSourcesFromTarget(MappingElementIF targetElement) Get sources of glues of target.booleanIs the glue persistent?voidpreinitSource(SessionInterface iSession, MappingModel sourceModel) voidpreinitTarget(SessionInterface iSession, MappingModel sourceModel) voidsetConfigurationContext(SessionInterface iSession, MetaModel sourceMM, MetaModel targetMM, ConfigurationItemIF iItem) Set the configuration context of this configurable item.Methods inherited from class de.mid.innovator.m2msdk.model.transformation.ConfigurableItem
checkConstraints, checkConstraints, getBaseItem, getConfigurableItems, getConfigurationTag, getId, getItem, getKnownParameters, getName, getParentItem, getParentItem, setBaseItem, setConfigurationTag, setId, setParent, toStringMethods 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, checkConstraints, getBaseItem, getConfigurableItems, getConfigurationTag, getItem, getKnownParameters, getName, getParentItem, getParentItem, setBaseItem, setConfigurationTag, setParentMethods inherited from interface de.mid.innovator.m2msdk.util.IdentifierAble
getId, setId
-
Constructor Details
-
MappingModelGlue
public MappingModelGlue()
-
-
Method Details
-
evaluateConditions
public boolean evaluateConditions(MappingElementIF sourceElement, MappingElementIF targetElement) throws M2MException, RemoteException Description copied from interface:ConditionAbleIFEvaluate the conditions for a pair of source and target elements or for a single source element.- Specified by:
evaluateConditionsin interfaceConditionAbleIF- Parameters:
sourceElement- source element for the evaluationtargetElement- target element for the evaluation- Returns:
- true, if all conditions are true
- Throws:
M2MException- error in applicationRemoteException- error in communication
-
filterElements
public MappingElementList filterElements(MappingElementIF sourceElement, MappingElementList targetElements) throws M2MException, RemoteException Description copied from interface:ConditionAbleIFFilter the list target elements according to conditions and current source element.- Specified by:
filterElementsin interfaceConditionAbleIF- Parameters:
sourceElement- source elementtargetElements- candidate target elements- Returns:
- filtered target elements
- Throws:
M2MException- application errorRemoteException- communication error
-
applyFunctionalVariationPoints
public FunctionalVariationPointChangeVectors applyFunctionalVariationPoints(SimulateMode iMode, MappingElementIF se, MappingElementList created, MappingElementList existing) throws AbortException, SevereException Description copied from interface:FunctionalVariationPointGroupAbleIFApply the functional variation points within this production to the newly created and existing target elements.- Specified by:
applyFunctionalVariationPointsin interfaceFunctionalVariationPointGroupAbleIF- Parameters:
iMode- should the change be simulated or executedse- source model elementcreated- newly created target elementsexisting- existing target elements- Returns:
- vector of changes
- Throws:
AbortExceptionSevereException
-
getGlueFromSource
public GluePart getGlueFromSource(MappingElementIF sourceElement, TransformationStepSubStepData preStepData) throws M2MException, RemoteException Description copied from interface:MappingModelGlueIFGet glue from source element.- Specified by:
getGlueFromSourcein interfaceMappingModelGlueIF- Parameters:
sourceElement- mapping element in source model- Returns:
- glue, if a persistent glue exists
- Throws:
M2MExceptionRemoteException
-
getGlueFromSources
public List<GluePart> getGlueFromSources(MappingElementList sourceElements) throws M2MException, RemoteException Description copied from interface:MappingModelGlueIFGet glue from source elements.- Specified by:
getGlueFromSourcesin interfaceMappingModelGlueIF- Parameters:
sourceElements- list mapping element in source model- Returns:
- list of glues in same order as source elements
- Throws:
M2MExceptionRemoteException
-
buildModelGlue
public boolean buildModelGlue(SimulateMode mode, MappingElementIF masterElement, MappingElementIF slaveElement) throws M2MException, RemoteException Description copied from interface:MappingModelGlueIFCreate or update a model glue between slave element and master element.- Specified by:
buildModelGluein interfaceMappingModelGlueIF- Parameters:
mode- simulate or updatemasterElement- mapping element being the master of the glueslaveElement- mapping element being the slave of the glue- Returns:
- true, if a new persistent glue has been created.
- Throws:
M2MException- exceptionRemoteException
-
getSourcesFromTarget
public MappingElementList getSourcesFromTarget(MappingElementIF targetElement) throws M2MException, RemoteException Description copied from interface:MappingModelGlueIFGet sources of glues of target.- Specified by:
getSourcesFromTargetin interfaceMappingModelGlueIF- Parameters:
targetElement- mapping element in target model- Returns:
- sources of glues glued with target
- Throws:
M2MExceptionRemoteException
-
isPersistent
public boolean isPersistent()Description copied from interface:MappingModelGlueIFIs the glue persistent?- Specified by:
isPersistentin interfaceMappingModelGlueIF- Returns:
- true, if there is or would be a persistent glue if this class would be used to build a glue.
-
preinitSource
- Specified by:
preinitSourcein interfaceMappingModelGlueIF- Throws:
M2MException
-
preinitTarget
- Specified by:
preinitTargetin interfaceMappingModelGlueIF- Throws:
M2MException
-
setConfigurationContext
public void setConfigurationContext(SessionInterface iSession, MetaModel sourceMM, MetaModel targetMM, ConfigurationItemIF iItem) 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 modeliItem- Configuration item- Throws:
M2MException- generic exceptionRemoteException- exception from remote execution
-
evaluateScore
public ValidatingScore evaluateScore(MappingElementIF sourceElement, MappingElementIF targetElement) throws RemoteException, M2MException Description copied from interface:ConditionAbleIFEvaluate the score of the target element in context of source element.- Specified by:
evaluateScorein interfaceConditionAbleIF- Parameters:
sourceElement- source elementtargetElement- target element- Returns:
- a score showing how good the target matches the source via conditions
- Throws:
RemoteException- communication errorM2MException- application error
-