Interface DmrSegmentGenerator
-
- All Known Implementing Classes:
FeaturePathDmrSegmentGenerator
,IndexDmrSegmentGenerator
,MappingDmrSegmentGenerator
,TableDmrSegmentGenerator
public interface DmrSegmentGenerator
Implement this to providesegment
generation for one or more types ofdomain model references
.- Author:
- Lucas Koehler
-
-
Field Summary
Fields Modifier and Type Field Description static double
NOT_APPLICABLE
The value that expresses that aDmrSegmentGenerator
is not applicable for aVDomainModelReference
.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<VDomainModelReferenceSegment>
generateSegments(VDomainModelReference reference)
Takes aVDomainModelReference
and generates the list of equivalentDMR Segments
.double
isApplicable(VDomainModelReference reference)
Returns a double that expresses if and how suitable this tester is for the givenVDomainModelReference
.
-
-
-
Field Detail
-
NOT_APPLICABLE
static final double NOT_APPLICABLE
The value that expresses that aDmrSegmentGenerator
is not applicable for aVDomainModelReference
.- See Also:
- Constant Field Values
-
-
Method Detail
-
isApplicable
double isApplicable(VDomainModelReference reference)
Returns a double that expresses if and how suitable this tester is for the givenVDomainModelReference
.- Parameters:
reference
- TheVDomainModelReference
- Returns:
- The value indicating how suitable this tester is,
NOT_APPLICABLE
if it can't work with the givenVDomainModelReference
.
-
generateSegments
java.util.List<VDomainModelReferenceSegment> generateSegments(VDomainModelReference reference)
Takes aVDomainModelReference
and generates the list of equivalentDMR Segments
. Equivalent means that a DMR using the generated segments resolves exactly the same as the given DMR.The segment generation is side-effect free. This means neither the given DMR nor any of its contained or referenced elements is changed.
- Parameters:
reference
- TheVDomainModelReference
to generate thesegments
for- Returns:
- The list of generated
segments
; might return an empty list if the given DMR does not specify any path but nevernull
-
-