Class Pattern
java.lang.Object
de.mid.innovator.m2msdk.model.transformation.ConfigurableItem
de.mid.innovator.m2msdk.model.transformation.pattern.Pattern
- All Implemented Interfaces:
ConditionAbleIF,ConfigurableItemIF,PatternIF,IdentifierAble,Serializable
- Direct Known Subclasses:
PatternEmbeddingDefault,PatternExtendingInnovator,PatternHookBase,PatternHookInnovator,PatternProductionAppend,PatternTargetMatchBase
Base class for all patterns.
- Author:
- jmback
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckElementsExtension(MappingElementList patternOut) final voidevaluate(MappingModelRole modelRole, MappingElementIF sourceElement, MappingAnchor anchors, MappingElementList patternIn, MappingElementList patternOut, TransformationStepSubStepData subStepData) Evaluate the pattern.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.voidfilterByPattern(MappingModelRole modelRole, MappingElementIF sourceElement, MappingAnchor anchors, MappingElementList patternIn, MappingElementList patternOut, TransformationStepSubStepData subStepData) Filter the given list of patterns.filterElements(MappingElementIF sourceElement, MappingElementList targetElements) Filter the list target elements according to conditions and current source element.Get the list of all acceptable parameter names.voidpreinit(SessionInterface iSession, MappingModelRole modelRole) Preinits the element for later usage.voidsetConfigurationContext(SessionInterface iSession, MetaModel sourceMM, MetaModel targetMM, ConfigurationItemIF context) 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, 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, getName, getParentItem, getParentItem, setBaseItem, setConfigurationTag, setParentMethods inherited from interface de.mid.innovator.m2msdk.util.IdentifierAble
getId, setId
-
Constructor Details
-
Pattern
public Pattern()
-
-
Method Details
-
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
-
checkElementsExtension
public void checkElementsExtension(MappingElementList patternOut) throws AbortException, RemoteException - Throws:
AbortExceptionRemoteException
-
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
-
filterByPattern
public void filterByPattern(MappingModelRole modelRole, MappingElementIF sourceElement, MappingAnchor anchors, MappingElementList patternIn, MappingElementList patternOut, TransformationStepSubStepData subStepData) throws M2MException, RemoteException Description copied from interface:PatternIFFilter the given list of patterns.- Specified by:
filterByPatternin interfacePatternIF- Parameters:
modelRole- If the given pattern is in the source or target modelsourceElement- TODOanchors-patternIn- The list of patterns to be filteredpatternOut- The list of patterns which matchedsubStepData- SubstepData- Throws:
M2MException- an exception occurredRemoteException
-
evaluate
public final void evaluate(MappingModelRole modelRole, MappingElementIF sourceElement, MappingAnchor anchors, MappingElementList patternIn, MappingElementList patternOut, TransformationStepSubStepData subStepData) throws M2MException, RemoteException Description copied from interface:PatternIFEvaluate the pattern.- Specified by:
evaluatein interfacePatternIF- Parameters:
modelRole- If the given pattern is in the source or target modelsourceElement- source element to compare the target withanchors- anchor for the created patterns. The anchor maybe modified by an embedding.patternIn- pattern to be used for creationpatternOut- created patternsubStepData- subStepData- Throws:
M2MException- an exception occurredRemoteException
-
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
-
preinit
public void preinit(SessionInterface iSession, MappingModelRole modelRole) throws M2MException, RemoteException Description copied from interface:PatternIFPreinits the element for later usage.- Specified by:
preinitin interfacePatternIF- Parameters:
iSession- Session itemmodelRole- it his pattern used in source or target model- Throws:
M2MExceptionRemoteExceptionRemoteException
-
getKnownParameters
public ParameterTemplates getKnownParameters(MappingElementIF me, ConfigurationItemIF item) 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 nullitem- configuration item, maybe null- Returns:
- list of parameter names
- Throws:
M2MException- generic exceptionRemoteException- error in communicationRemoteException- exception from remote execution
-