You are here: Wiki>SensorWeb Web>SensorML (07 Aug 2013, DanielNuest)Edit Attach

Sensor Model Language (SensorML)

SensorML defines concepts and XML encodings for descriptions of sensors, processes and systems. SensorML is used in several OGC SWE web services (e.g. SOS, SPS, SAS).

SensorML website:

Compiling SensorML with XmlBeans

If you want to compile the sensorML.xsd schema into Java classes with XmlBeans, you have to do a small change in the schema. Open the system.xsd file and navigate to the definition of sml:AbstractDerivableComponentType. This type is an extension of sml:AbstractProcessType, which is an extension of gml:Feature. That is, why every sml:AbstractDerivableComponent has a location element with type gml:location. The sml:AbstractDerivableComponentType also contains a second location element, which is of type sml:location Having two location elements defined in the sml:AbstractDerivableComponentType leads to compiler errors when compiling the XmlBeans created Java classes.

Solution: The sml:location restricts gml:location to gml:Point and gml:_CurveType. The easiest way to get around with that, is to change the type of the location defined in the sml:AbstractDerivableComponentType at line 24 from sml:location to "gml:location". Although this keeps back the restriction to gml:Point and gml:_CurveType, you can use these types and the schema could be compiled with XmlBeans.

Please write, if you know a better solution!

Validating SensorML with Altova XmlSpy

For those developers, who are using XmlSpy 2005: If you comment out the xs:element name="parameter" type="swe:DataComponentPropertyType" maxOccurs="unbounded" element in line 298, the validation of schema system.xsd should work! -- ChristophStasch - 19 Jun 2007

To validate all SensorML schema with XmlBeans 2005 rel 3, you also have to outcomment the parameters element in the TransducerType. This is quick and dirty and I will try to see, whether there are better workarounds for this issue. Nevertheless the whole schema do validate for now... -- ChristophStasch - 23 Jun 2007
Topic revision: r5 - 07 Aug 2013, DanielNuest
Legal Notice | Privacy Statement

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Wiki? Send feedback