Interface AutomaticElementMappingRule
@OpenApiAll
public interface AutomaticElementMappingRule
Copied from md core and modified.
Rule for describing when source element can be mapped to target element without user input
-
Method Summary
Modifier and TypeMethodDescriptionboolean
accept
(TypedElement sourceElement) Gets if mapping rule can be applied to source elementgetElementToMap
(Element sourceElement, List<Element> targetElements) Get target element to be automatically mapped to the source element.default boolean
Allow one to one or many to one mapping.
-
Method Details
-
getElementToMap
Get target element to be automatically mapped to the source element. If this method returns an element, provided elements will be mapped at once If this method returns null, user still can pair elements later manually- Parameters:
sourceElement
- source elementtargetElements
- list of candidate target elements. Target elements are always in the same nesting depth as the source element- Returns:
- element that can be mapped automatically, without user input, to the source element
-
accept
Gets if mapping rule can be applied to source element- Parameters:
sourceElement
- source element (property)- Returns:
- true if rule can be used, else false
-
isOneToOneMapping
default boolean isOneToOneMapping()Allow one to one or many to one mapping.- Returns:
- true if only one to one mapping is allowed, false - many to one
-