Class ContextIdentificationMapper

  • All Implemented Interfaces:

    
    public class ContextIdentificationMapper
    
                        

    Utility class to map between context-based URIs and instance identifiers.

    This class implements the grammar defined in IEEE 11073-20701 section 9.4.

    • Constructor Detail

      • ContextIdentificationMapper

        ContextIdentificationMapper()
    • 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.