Package org.openehealth.ipf.commons.map
Class BidiMappingService
java.lang.Object
org.openehealth.ipf.commons.map.BidiMappingService
- All Implemented Interfaces:
GroovyObject
,MappingService
- Direct Known Subclasses:
SpringBidiMappingService
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static void
checkMappingKey
(Map<Object, Map> map, Object mappingKey) void
boolean
Reverse mapping (Optional implementation)Reverse mapping (Optional implementation)getKeySystem
(Object mappingKey) getMap()
getValueSystem
(Object mappingKey) boolean
protected Object
Set<?>
Set<?>
protected Object
protected static Object
void
setIgnoreResourceNotFound
(boolean value) void
void
setMappingScript
(URL script) void
setMappingScripts
(URL... scripts) void
void
setReverseMap
(Map value) void
setScripts
(List<URL> value) void
setSeparator
(String value) protected Object
protected void
Collection<?>
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface groovy.lang.GroovyObject
getProperty, invokeMethod, setProperty
-
Field Details
-
KEYSYSTEM
- See Also:
-
VALUESYSTEM
- See Also:
-
ELSE
- See Also:
-
SEPARATOR
- See Also:
-
-
Constructor Details
-
BidiMappingService
public BidiMappingService() -
BidiMappingService
-
-
Method Details
-
getMetaClass
- Specified by:
getMetaClass
in interfaceGroovyObject
-
setMetaClass
- Specified by:
setMetaClass
in interfaceGroovyObject
-
getMap
-
setMap
-
getReverseMap
-
setReverseMap
-
getSeparator
-
setSeparator
-
getIgnoreResourceNotFound
public boolean getIgnoreResourceNotFound() -
isIgnoreResourceNotFound
public boolean isIgnoreResourceNotFound() -
setIgnoreResourceNotFound
public void setIgnoreResourceNotFound(boolean value) -
getScripts
-
setScripts
-
setMappingScript
-
setMappingScripts
-
clearMappings
public void clearMappings() -
get
- Specified by:
get
in interfaceMappingService
- 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.
-
getKey
Description copied from interface:MappingService
Reverse mapping (Optional implementation)- Specified by:
getKey
in interfaceMappingService
- 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.
-
get
- Specified by:
get
in interfaceMappingService
- 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.
-
getKey
Description copied from interface:MappingService
Reverse mapping (Optional implementation)- Specified by:
getKey
in interfaceMappingService
- Parameters:
mappingKey
- mapping namevalue
- right side of the mappingdefaultValue
- 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.
-
getKeySystem
- Specified by:
getKeySystem
in interfaceMappingService
- Parameters:
mappingKey
- mapping name- Returns:
- a formal identification of the key system (e.g. an OID)
-
getValueSystem
- Specified by:
getValueSystem
in interfaceMappingService
- Parameters:
mappingKey
- mapping name- Returns:
- a formal identification of the value system (e.g. an OID)
-
mappingKeys
- Specified by:
mappingKeys
in interfaceMappingService
- Returns:
- a set of names of all registered mappings. Changes to the set do not change the registry itself.
-
keys
- Specified by:
keys
in interfaceMappingService
- Parameters:
mappingKey
- mapping key- Returns:
- key set of a registered mapping. Changes to the set do not change the registry itself.
-
values
- Specified by:
values
in interfaceMappingService
- Parameters:
mappingKey
- mapping key- Returns:
- value set of a registered mapping. Changes to the set do not change the registry itself.
-
retrieve
-
retrieveElse
-
updateReverseMap
protected void updateReverseMap() -
checkMappingKey
-
joinKey
-
splitKey
-