Package org.somda.sdc.glue.common.uri
Class ContextIdentificationMapper
-
- All Implemented Interfaces:
public class ContextIdentificationMapperUtility class to map between context-based URIs and instance identifiers.
This class implements the grammar defined in IEEE 11073-20701 section 9.4.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumContextIdentificationMapper.ContextSourceDefines the context instance identifier URI type.
This type reflects the scheme of the URI, which is according to the IEEE 11073-20701
-
Constructor Summary
Constructors Constructor Description ContextIdentificationMapper()
-
Method Summary
Modifier and Type Method Description static StringfromInstanceIdentifier(InstanceIdentifier instanceIdentifier, ContextIdentificationMapper.ContextSource contextSource)Converts from an instance identifier to an URI. static InstanceIdentifierfromUri(String contextIdentificationUri, ContextIdentificationMapper.ContextSource expectedContextSource)Converts from an URI string to an instance identifier. -
-
Method Detail
-
fromInstanceIdentifier
static String fromInstanceIdentifier(InstanceIdentifier instanceIdentifier, ContextIdentificationMapper.ContextSource contextSource)
Converts from an instance identifier to an URI.
- Parameters:
instanceIdentifier- the instance identifier to convert.contextSource- the type of context to create a scheme for.- Returns:
an URI that reflects the instance identifier.
-
fromUri
static InstanceIdentifier fromUri(String contextIdentificationUri, ContextIdentificationMapper.ContextSource expectedContextSource)
Converts from an URI string to an instance identifier.
- Parameters:
contextIdentificationUri- the URI to parse.expectedContextSource- the expected context source.- Returns:
the converted instance identifier.
-
-
-
-