Class Condition
java.lang.Object
de.mid.innovator.m2msdk.model.transformation.ConfigurableItem
de.mid.innovator.m2msdk.model.transformation.function.Condition
- All Implemented Interfaces:
ConditionIF,ConfigurableItemIF,IdentifierAble,Serializable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanevaluate(MappingElementIF source, MappingElementIF target) Evaluate the condition for the given source, target and glue.booleanevaluate(MappingElementList sources, MappingElementList targets) Evaluate the condition for the given sources and targets.evaluateScore(MappingElementIF source, MappingElementIF target) Evaluate the condition for the given source, target and glue.evaluateScoreWithConditionCheck(MappingElementIF source, MappingElementIF target) filter(MappingElementIF referenceElement, MappingElementList filterElements, ExpressionContext context) Filter a list of mapping elements with this condition.Get the list of all acceptable parameter names.voidsetConfigurationContext(SessionInterface iSession, MetaModel sourceMM, MetaModel targetMM, ConfigurationItemIF iItem) Set the configuration context of this configurable item.toString()Methods inherited from class de.mid.innovator.m2msdk.model.transformation.ConfigurableItem
checkConstraints, checkConstraints, getBaseItem, getConfigurableItems, getConfigurationTag, getId, getItem, getName, 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, checkConstraints, getBaseItem, getConfigurableItems, getConfigurationTag, getItem, getName, getParentItem, getParentItem, setBaseItem, setConfigurationTag, setParentMethods inherited from interface de.mid.innovator.m2msdk.util.IdentifierAble
getId, setId
-
Constructor Details
-
Condition
public Condition()
-
-
Method Details
-
evaluate
public boolean evaluate(MappingElementIF source, MappingElementIF target) throws M2MException, RemoteException Description copied from interface:ConditionIFEvaluate the condition for the given source, target and glue.- Specified by:
evaluatein interfaceConditionIF- Parameters:
source- Source model element; may not be nulltarget- Target model element; may be null, e.g. when used in source match- Returns:
- true, if source, target and glue fulfill the condition
- Throws:
M2MException- generic exceptionRemoteExceptionRemoteException- exception from remote execution
-
evaluate
public boolean evaluate(MappingElementList sources, MappingElementList targets) throws M2MException, RemoteException Description copied from interface:ConditionIFEvaluate the condition for the given sources and targets. The function may define if it is true for all elements or not.- Specified by:
evaluatein interfaceConditionIF- Parameters:
sources- source model elementstargets- glued target model elements- Returns:
- true, if the boolean function is true for the source and target elements.
- Throws:
M2MException- generic exceptionRemoteException- exception from remote execution
-
filter
public MappingElementList filter(MappingElementIF referenceElement, MappingElementList filterElements, ExpressionContext context) throws RemoteException, M2MException Description copied from interface:ConditionIFFilter a list of mapping elements with this condition. Each model element in the result evaluates with this condition to true.- Specified by:
filterin interfaceConditionIF- Parameters:
referenceElement- Reference Element, to which the filter elements should be compared tofilterElements- Filter Elements, which are compared to the referenceElementcontext- context containing the elements to filter in this elements- Returns:
- List of filter mapping elements
- Throws:
RemoteException- communication errorM2MException- application error
-
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
-
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
-
evaluateScore
public ValidatingScore evaluateScore(MappingElementIF source, MappingElementIF target) throws M2MException, RemoteException Description copied from interface:ConditionIFEvaluate the condition for the given source, target and glue.- Specified by:
evaluateScorein interfaceConditionIF- Parameters:
source- Source model element; may not be nulltarget- Target model element; may be null, e.g. when used in source match- Returns:
- score showing how good the elements fit the condition
- Throws:
M2MException- application errorRemoteException- communication error
-
toString
- Overrides:
toStringin classConfigurableItem
-
evaluateScoreWithConditionCheck
public ValidatingScore evaluateScoreWithConditionCheck(MappingElementIF source, MappingElementIF target) throws M2MException, RemoteException - Specified by:
evaluateScoreWithConditionCheckin interfaceConditionIF- Throws:
M2MExceptionRemoteException
-