Class DefaultUriMapper
java.lang.Object
org.openehealth.ipf.commons.ihe.fhir.translation.AbstractUriMapper
org.openehealth.ipf.commons.ihe.fhir.translation.DefaultUriMapper
- All Implemented Interfaces:
UriMapper
Default URI Mapper implementation that requires a
MappingService
for URI-to-OID translation- Since:
- 3.1
- Author:
- Christian Ohr
-
Constructor Summary
ConstructorDescriptionDefaultUriMapper
(MappingService mappingService) DefaultUriMapper
(MappingService mappingService, String uriToOidMappingKey, String uriToNamespaceMappingKey) -
Method Summary
Modifier and TypeMethodDescriptionmapNamespaceToUri
(String namespace) Translate a namespace into an URI.mapOidToUri
(String oid) Translate a OID into an URI.mapUriToNamespace
(String uri) Translate a non-URN URI (e.g.mapUriToOid
(String uri) Translate a non-URN URI (e.g.Methods inherited from class org.openehealth.ipf.commons.ihe.fhir.translation.AbstractUriMapper
namespaceToUri, oidToUri, uriToNamespace, uriToOid
-
Constructor Details
-
DefaultUriMapper
-
DefaultUriMapper
public DefaultUriMapper(MappingService mappingService, String uriToOidMappingKey, String uriToNamespaceMappingKey)
-
-
Method Details
-
mapUriToOid
Description copied from class:AbstractUriMapper
Translate a non-URN URI (e.g. a URL) into an OID- Specified by:
mapUriToOid
in classAbstractUriMapper
- Parameters:
uri
- URI- Returns:
- OID string
-
mapOidToUri
Description copied from class:AbstractUriMapper
Translate a OID into an URI. Can either return null or throw an exception if no URL was found.- Specified by:
mapOidToUri
in classAbstractUriMapper
- Parameters:
oid
- OID- Returns:
- valid URI or null if no URI was found
-
mapUriToNamespace
Description copied from class:AbstractUriMapper
Translate a non-URN URI (e.g. a URL) into an OID- Specified by:
mapUriToNamespace
in classAbstractUriMapper
- Parameters:
uri
- URI- Returns:
- OID string
-
mapNamespaceToUri
Description copied from class:AbstractUriMapper
Translate a namespace into an URI. Can either return null or throw an exception if no URL was found.- Specified by:
mapNamespaceToUri
in classAbstractUriMapper
- Parameters:
namespace
- namespace- Returns:
- valid URI or null if no URI was found
-