Package org.somda.sdc.glue.common.uri
Class ComplexDeviceComponentMapper
java.lang.Object
org.somda.sdc.glue.common.uri.ComplexDeviceComponentMapper
Utility class to map from complex device component coded value to URI and back to coded value.
This class implements the grammar defined in IEEE 11073-20701 section 9.2.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringfromCodedValue(CodedValue codedValue) Given a coded value that belongs to an abstract complex component descriptor, this function creates the URI representation.static StringMaps an abstract complex component descriptor to URI representation.static CodedValueMaps a complex device component type URI string to a coded value.
-
Constructor Details
-
ComplexDeviceComponentMapper
public ComplexDeviceComponentMapper()
-
-
Method Details
-
fromComplexDeviceComponent
public static String fromComplexDeviceComponent(AbstractComplexDeviceComponentDescriptor descriptor) throws UriMapperGenerationArgumentException Maps an abstract complex component descriptor to URI representation.- Parameters:
descriptor- the device component where to access the type.- Returns:
- the mapped URI.
- Throws:
UriMapperGenerationArgumentException- in case no valid URI could be generated from the input.
-
fromCodedValue
public static String fromCodedValue(CodedValue codedValue) throws UriMapperGenerationArgumentException Given a coded value that belongs to an abstract complex component descriptor, this function creates the URI representation.- Parameters:
codedValue- a complex device component's type.- Returns:
- the mapped URI.
- Throws:
UriMapperGenerationArgumentException- in case no valid URI could be generated from the input.
-
fromUri
public static CodedValue fromUri(String complexDeviceComponentTypeUri) throws UriMapperParsingException Maps a complex device component type URI string to a coded value.- Parameters:
complexDeviceComponentTypeUri- the URI to parse.- Returns:
- a coded value if pattern of URI matches.
- Throws:
UriMapperParsingException- in case no valid URI was given.
-