Interface Mapping
- All Known Implementing Classes:
CompositeMapping, SimpleMapping
A named translation from one code system into another, as
Mappings serves it and a
MappingLoader produces it. A lookup by name works the same for either kind:
- a
SimpleMappingis a translation table - entries of its own and a fallback for either direction. Every mapping format reads into one and writes one; - a
CompositeMappingholds no entries but the names of simple mappings, its parts, and answers through them. Loaders create one where a source spreads a single translation over several tables, such as the groups of a FHIR ConceptMap.
entries(), the fallbacks and
reversible() - a composite cannot report, since it holds nothing but the names of its
parts; it throws UnsupportedOperationException for these. To inspect what a mapping of
either kind declares, ask Mappings.entries(String) by name, which resolves the parts.- Since:
- 6.0
-
Method Summary
-
Method Details
-
name
-
keySystem
String keySystem()- Returns:
- formal identifier (usually an OID or a URI) of the key code system, may be
null
-
valueSystem
String valueSystem()- Returns:
- formal identifier of the value code system, may be
null
-
override
boolean override()- Returns:
- whether this declaration is meant to replace a mapping of the same name loaded earlier. Without it, a duplicate name is a load-time error
-
entries
- Returns:
- the key/value pairs, in declaration order
- Throws:
UnsupportedOperationException- for aCompositeMapping, whose entries are those of its parts; seeMappings.entries(String)
-
unmatched
Unmatched unmatched()- Returns:
- what to answer when a key has no entry
- Throws:
UnsupportedOperationException- for aCompositeMapping, which falls back through its parts
-
reverseUnmatched
Unmatched reverseUnmatched()- Returns:
- what to answer when a value has no entry
- Throws:
UnsupportedOperationException- for aCompositeMapping, which falls back through its parts
-
reversible
boolean reversible()- Returns:
- whether a reverse index is built at all
- Throws:
UnsupportedOperationException- for aCompositeMapping, whose parts decide this each for themselves
-
parts
- Returns:
- the names of the mappings a
CompositeMappingasks, in order; empty for aSimpleMapping
-