Base Abstract Complex Types

OGC 08-094r1 SWE Common Data Model complexContent complexType The “AbstractSWEIdentifiable” complex type derives from “AbstractSWE” and adds three identification elements. These elements are to be used as described in the UML section of this standard. The following XML elements and complex types are defined in the “simple_components.xsd” schema file: element name = AbstractDataComponent abstract = true type = swe:AbstractDataComponentType substitutionGroup = swe:AbstractSWEIdentifiable complexType name = AbstractDataComponentType abstract = true complexContent extension base = swe:AbstractSWEIdentifiableType attribute name = definition type = anyURI use = required attribute name = updatable type = boolean use = optional attribute name = optional type = boolean use = optional default =fals e extension complexContent complexType The “AbstractDataComponent” complex type adds XML attributes as defined in the UML class with the same name. The meaning of the corresponding UML class attributes is detailed in clause 7.2.2. Requirement http:www.opengis.netspecSWE2.0reqxsd-simple-componentsdefinition-resolvable Req 62. The “definition” attribute shall contain a URI that can be resolved to the complete human readable definition of the property that is represented by the data component. element name = AbstractSimpleComponent abstract = true substitutionGroup = swe:AbstractDataComponent type = swe:AbstractSimpleComponentType complexType name = AbstractSimpleComponentType abstract = true complexContent extension base = swe:AbstractDataComponentType sequence element name = quality type = swe:QualityPropertyType minOccurs = maxOccurs = unbounded element name = nilValues type = swe:NilValuesPropertyType minOccurs = sequence attribute name = referenceFrame type = anyURI use = optional attribute name = axisID type = string use = optional extension complexContent complexType The “AbstractSimpleComponent” complex type adds XML attributes as defined in the UML class with the same name. The meaning of the corresponding UML properties is detailed in clause 7.2.3. The “definition” attribute is mandatory on all elements derived 70 Copyright © 2011 Open Geospatial Consortium SWE Common Data Model OGC 08-094r1 from “AbstractSimpleComponentType” see Req 18 of UML model. This is enforced by a Schematron pattern. As the XML schema snippet shows, this abstract element contains two important property elements “quality” and “nilValues” as well as two attributes “referenceFrame” and “axisID” implementing the corresponding attributes in the UML. Since all simple data components defined in this schema derive from this base type, these elements and attributes are available on all of them. Examples in the following sub-clauses show their usage. Detailed content of the “Quality” and “NilValues” elements that are the values of “QualityPropertyType” and “NilValuesPropertyType” respectively are given in clause 8.1.13 and 8.1.14. Most simple data components defined in the following sub-clauses also allow for the definition of constraints via the “constraint” property element. When such constraints are specified, the value of the component either inline or in a separate data block shall always satisfy these constraints. The “definition” attribute is a URI that shall be resolvable to a human readable description of the property being measured or any other referenced concept. It is also recommended that an XML representation of this information can be retrieved via content negociation. Requirement http:www.opengis.netspecSWE2.0reqxsd-simple-componentsinline-value-constraint-valid Req 63. The inline value included in an instance of a simple data component shall satisfy the constraints specified by this instance.

8.1.3 Boolean Element

The “Boolean” element is the XML schema implementation of the “Boolean” UML class defined in clause 7.2.4. The schema snippet for this element and its corresponding complex type is shown below: element name = Boolean substitutionGroup = swe:AbstractSimpleComponent type = swe:BooleanType complexType name = BooleanType complexContent extension base = swe:AbstractSimpleComponentType sequence element name = value maxOccurs = 1 minOccurs = type = boolean sequence extension complexContent complexType The following instance shows how this element is used in practice to wrap a value generated by a motion detector: swe:Boolean definition = http:sweet.jpl.nasa.gov2.0physDynamics.owlMotion Copyright © 2011 Open Geospatial Consortium 71 OGC 08-094r1 SWE Common Data Model swe:label Motion Detected swe:label swe:description True when motion was detected in the room swe:description swe:value true swe:value swe:Boolean Without the value it can serve as data descriptor for values that are encoded separately. The following example shows how it is used in SPS to define a Boolean tasking parameter. It is used as the definition of the input parameter, and so does not contain the value: swe:Boolean definition = http:mmisw.orgontq2otesttimeContinuityTest swe:label Time Continuity Test swe:label swe:description Set to true to enable time continuity test swe:description swe:Boolean

8.1.4 Text Element

The “Text” element is the XML schema implementation of the “Text” UML class defined in clause 7.2.5. The schema snippet for this element and its corresponding complex type is shown below: element name = Text substitutionGroup = swe:AbstractSimpleComponent type = swe:TextType complexType name = TextType complexContent extension base = swe:AbstractSimpleComponentType sequence element name = constraint maxOccurs = 1 minOccurs = type = swe:AllowedTokensPropertyType element name = value maxOccurs = 1 minOccurs = type = string sequence extension complexContent complexType Constraints can be expressed by using the “AllowedTokens” element detailed in clause 8.1.15. The “value” property element is of the XML schema type “string” and it can contain XML entities if special characters i.e. not allowed in XML are required. The following instance shows how this element can be used to describe a “plate number”: swe:Text definition = http:mmisw.orgontmmideviceManufacturer swe:label Manufacturer swe:label swe:value Ocean Devices, Inc. swe:value swe:Text The plate number value that would be present in the corresponding data file or stream would then have to include a value that matches the pattern such as “5491 AB 31”. 72 Copyright © 2011 Open Geospatial Consortium