Package org.openehealth.ipf.commons.map
Interface MappingService
- All Known Implementing Classes:
BidiMappingService,SpringBidiMappingService
public interface MappingService
Interface for mapping a set of keysets into corresponding values.
The back end mapping implementation is not defined by this interface. Examples
could be a simple Map or a remote terminology service, for
which proper implementations of this interface must be provided.
- Author:
- Christian Ohr
-
Method Summary
Modifier and TypeMethodDescriptionReverse mapping (Optional implementation)Reverse mapping (Optional implementation)getKeySystem(Object mappingKey) getValueSystem(Object mappingKey) Set<?> Set<?> Collection<?>
-
Method Details
-
get
- Parameters:
mappingKey- mapping namekey- left side of the mapping- Returns:
- the value mapped by a registered mapping. The implementation of the mapping implements the behavior if the key does not exist.
- Throws:
IllegalArgumentException- if the mappingKey is not registered.
-
get
- Parameters:
mappingKey- mapping namekey- left side of the mappingdefaultValue- default right side if there is no mapping for the code- Returns:
- the value mapped by a registered mapping. If no mapping exists, the default value if returned. The implementation of the mapping implements the behavior if the key does not exist.
- Throws:
IllegalArgumentException- if the mappingKey is not registered.
-
getKey
Reverse mapping (Optional implementation)- Parameters:
mappingKey- mapping namevalue- right side of the mapping- Returns:
- the key mapped by a registered mapping. The implementation of the mapping implements the behavior if the value does not exist.
- Throws:
IllegalArgumentException- if the mappingKey is not registered.
-
getKey
Reverse mapping (Optional implementation)- Parameters:
mappingKey- mapping namevalue- right side of the mappingdefaultKey- default left side- Returns:
- the key mapped by a registered mapping. If no mapping exists, the default value if returned. The implementation of the mapping implements the behavior if the key does not exist.
- Throws:
IllegalArgumentException- if the mappingKey is not registered.
-
getKeySystem
- Parameters:
mappingKey- mapping name- Returns:
- a formal identification of the key system (e.g. an OID)
- Throws:
IllegalArgumentException- if the mappingKey is not registered.
-
getValueSystem
- Parameters:
mappingKey- mapping name- Returns:
- a formal identification of the value system (e.g. an OID)
- Throws:
IllegalArgumentException- if the mappingKey is not registered.
-
mappingKeys
Set<?> mappingKeys()- Returns:
- a set of names of all registered mappings. Changes to the set do not change the registry itself.
-
keys
- Parameters:
mappingKey- mapping key- Returns:
- key set of a registered mapping. Changes to the set do not change the registry itself.
- Throws:
IllegalArgumentException- if the mappingKey is not registered.
-
values
- Parameters:
mappingKey- mapping key- Returns:
- value set of a registered mapping. Changes to the set do not change the registry itself.
- Throws:
IllegalArgumentException- if the mappingKey is not registered.
-