Package org.somda.sdc.glue.common.uri
Class ComplexDeviceComponentMapper
- java.lang.Object
-
- org.somda.sdc.glue.common.uri.ComplexDeviceComponentMapper
-
public class ComplexDeviceComponentMapper extends Object
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 Constructor Description ComplexDeviceComponentMapper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringfromCodedValue(CodedValue codedValue)Given a coded value that belongs to an abstract complex component descriptor, this function creates the URI representation.static StringfromComplexDeviceComponent(AbstractComplexDeviceComponentDescriptor descriptor)Maps an abstract complex component descriptor to URI representation.static CodedValuefromUri(String complexDeviceComponentTypeUri)Maps a complex device component type URI string to a coded value.
-
-
-
Method Detail
-
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.
-
-