Class CustomMappings
java.lang.Object
org.openehealth.ipf.commons.spring.map.config.CustomMappings
- All Implemented Interfaces:
MappingResourceHolder
This class should be used to define the custom mappings
in the spring context definition. The resources may be in any mapping format whose loader is on
the classpath, and one list may mix them. Where their names do not identify a format - locations
without a file extension, resources fetched from a terminology server - set
mappingFormat to name the format all of them are in.
<!-- either as a list of mapping definitions -->
<bean id="customMapping3"
class="org.openehealth.ipf.commons.map.config.CustomMappings">
<property name="mappingResources">
<list>
<value>classpath:gender.mapping.xml</value>
<value>classpath:encounter.mapping.yaml</value>
</list>
</property>
</bean>*
<!-- or as a single mapping definition -->
<bean id="customMappingSingle"
class="org.openehealth.ipf.commons.map.config.CustomMappings">
<property name="mappingResource" value="classpath:vip.map" />
</bean>- Author:
- Christian Ohr, Boris Stanojevic
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMappingResource(Resource mappingResource) The format the resources of this holder are read in, for resources whose name does not identify one.Collection<? extends Resource> voidsetMappingFormat(String mappingFormat) Names the format every resource of this bean is read in, rather than leaving it to their file extensions.voidsetMappingResource(Resource mappingResource) Registers a mapping resource.voidsetMappingResources(Collection<? extends Resource> mappingResources) Registers a collection of mapping resources
-
Constructor Details
-
CustomMappings
public CustomMappings()
-
-
Method Details
-
getMappingResources
- Specified by:
getMappingResourcesin interfaceMappingResourceHolder- Returns:
- immutable registered mapping resources
-
addMappingResource
- Specified by:
addMappingResourcein interfaceMappingResourceHolder
-
setMappingResources
Description copied from interface:MappingResourceHolderRegisters a collection of mapping resources- Specified by:
setMappingResourcesin interfaceMappingResourceHolder- Parameters:
mappingResources- mapping resources
-
setMappingResource
Description copied from interface:MappingResourceHolderRegisters a mapping resource.- Specified by:
setMappingResourcein interfaceMappingResourceHolder- Parameters:
mappingResource- mapping resource
-
getMappingFormat
Description copied from interface:MappingResourceHolderThe format the resources of this holder are read in, for resources whose name does not identify one. One holder groups the mappings of one module, which are typically all in the same format, so it is declared here rather than per resource.- Specified by:
getMappingFormatin interfaceMappingResourceHolder- Returns:
- a
format id, ornullto dispatch each resource by its file extension
-
setMappingFormat
-