Category Element Requirements Class: Basic Types and Simple Components Schemas Requirements Class

OGC 08-094r1 SWE Common Data Model In this example, no official code space URI was found so the “codeSpace” element is used to reference the online source of the taxonomy The “birdlife.org” website hosts the international database that is the reference in this case. When no code space is specified, Req 25 must be satisfied by inserting a constraint with a list of allowed values as shown in the example below: swe:Category definition = http:www.opengis.netdefpropertyOGC0SensorStatus swe:label Sensor Status swe:label swe:description Current status of the sensor swe:description swe:constraint swe:AllowedTokens swe:value Off swe:value swe:value Stand-by swe:value swe:value Ready swe:value swe:value Busy swe:value swe:AllowedTokens swe:constraint swe:Category Note that in this case, the data consumer has no way of knowing the exact meaning of each allowed value, since there is no associated description. A code space is thus more explicit as it defines not only the list of allowed terms but should also give a textual description. This is why a code space is preferred whenever it is possible to implement it.

8.1.6 Count Element

The “Count” element is the XML schema implementation of the “Count” UML class defined in clause 7.2.7. The schema snippet for this element and its corresponding complex type is shown below: element name = Count substitutionGroup = swe:AbstractSimpleComponent type = swe:CountType complexType name = CountType complexContent extension base = swe:AbstractSimpleComponentType sequence element name = constraint maxOccurs = 1 minOccurs = type = swe:AllowedValuesPropertyType element name = value maxOccurs = 1 minOccurs = type = integer sequence extension complexContent complexType Constraints are expressed by using the “AllowedValues” element detailed in clause 8.1.16. The “value” property element is of the XML schema type “integer”. The following example shows how this XML element can be used to give the value of a geological period: swe:Count definition = http:www.opengis.netdefpropertyOGC0NumberOfPixels swe:label Row Size swe:label swe:description Number of pixels in each row of the image swe:description swe:value 1024 swe:value swe:Count 74 Copyright © 2011 Open Geospatial Consortium SWE Common Data Model OGC 08-094r1 Alternatively it can be used without the value just like any other component.

8.1.7 Quantity Element

The “Quantity” element is the XML schema implementation of the “Quantity” UML class defined in clause 7.2.8. The schema snippet for this element and its corresponding complex type is shown below: element name = Quantity substitutionGroup = swe:AbstractSimpleComponent type = swe:QuantityType complexType name = QuantityType complexContent extension base = swe:AbstractSimpleComponentType sequence element name = uom type = swe:UnitReference element name = constraint maxOccurs = 1 minOccurs = type = swe:AllowedValuesPropertyType element name = value maxOccurs = 1 minOccurs = type = double sequence extension complexContent complexType The “uom” property element is of type “UnitReferencePropertyType” whose complex type definition is given below: complexType name = UnitReference attribute name = code type = swe:UomSymbol use = optional attributeGroup ref = swe:AssociationAttributeGroup complexType This type allows defining a unit of measure by its code using the “code” attribute or by using an “xlink:href” from the “swe:AssociationAttributeGroup” to reference a unit defined externally. Defining the unit of measure by its code expressed using the Unified Code for Units of Measure UCUM is the mandatory way unless the unit cannot be properly expressed with the elements defined in this specification in which case “xlink:href” should be used. Requirement http:www.opengis.netspecSWE2.0reqxsd-simple-componentsucum-code-used Req 64. The UCUM code for a unit of measure shall be used as the value of the “code” XML attribute whenever it can be constructed using the UCUM 1.8 specification. Otherwise the “href” XML attribute shall be used to reference an external unit definition. Constraints can be expressed by using the “AllowedValues” element detailed in clause 8.1.16. The “value” property element takes a decimal value of the XML schema type “double”. This means that special values “–INF”, “INF” and “NaN” for Not a Number are allowed as well as numbers in exponent notation ex: 1.2e-9. Copyright © 2011 Open Geospatial Consortium 75