SWE Common Data Model OGC 08-094r1
Requirement
http:www.opengis.netspecSWE2.0requml-simple-componentscategory-constraint-valid
Req 24. When an instance of the “Category” class specifies a code space, the list of
allowed tokens provided by the “constraint” property of this instance shall be a
subset of the values listed in this code space.
It is also possible to use this class without a code space, even though it is not recommended as values allowed in the component would then not be formally defined.
However, as the intent of this class is to always represent a value extracted from a set of possible options, a constraint shall be defined if no code space is specified.
Requirement
http:www.opengis.netspecSWE2.0requml-simple-componentscategory-enum-defined
Req 25. An instance of the “Category” class shall either specify a code space or an
enumerated list of allowed tokens, or both.
The “value” attribute or the corresponding value in out-of-band data is a string that must be one of the items of the code space and also match the constraint.
Requirement
http:www.opengis.netspecSWE2.0requml-simple-componentscategory-value-valid
Req 26. When an instance of the “Category” class specifies a code space, the value
of the property represented by this instance shall be equal to one of the entries of
the code space.
7.2.7 Count Class
The “Count” class is used to specify a scalar data component with a discrete countable representation as defined in clause 6.2.4. It derives from “AbstractSimpleComponent”
and is shown below:
AbstractSimpleComponent «Type»
Count
«property» + constraint: AllowedValues [0..1]
+ value: Integer [0..1]
Figure 7.11 – Count Class
Copyright © 2011 Open Geospatial Consortium
31
OGC 08-094r1 SWE Common Data Model
The “constraint” attribute can be used to restrict the range of possible values to a list of inclusive intervals andor single values using the “AllowedValues” class defined in clause
7.2.18. Numbers used to define these constraints should be integers and expressed in the same scale as the count value itself. The “significantFigures” constraint allowed by the
“AllowedValues” class is not applicable to the “Count” class.
The “value” attribute or the corresponding value in out-of-band data is an integer that must be within one of the constraint intervals or exactly one of the enumerated values.
7.2.8 Quantity Class
The “Quantity” class is used to specify a component with a continuous numerical representation as defined in clause 6.2.3. It derives from “AbstractSimpleComponent”
and is shown below:
AbstractSimpleComponent «Type»
Quantity
«property» + uom:
UnitOfMeasure + constraint: AllowedValues [0..1]
+ value: Real [0..1]
Figure 7.12 – Quantity Class
In addition to attributes inherited from the “AbstractSimpleComponent” class, this class provides a unit of measure declaration through the “uom” attribute. This unit is essential
for the correct interpretation of data represented as decimal numbers and is thus mandatory. Quantities with no physical unit still have a scale such as unity, percent, per
thousands, etc. that must be specified with this property.
The “constraint” attribute is used to restrict the range of possible values to a list of inclusive intervals andor single values using the “AllowedValues” class defined in clause
7.2.18. Numbers used to define these constraints must be expressed in the same unit as the quantity value itself. Additionally, it is possible to constrain the number of significant
digits that can be added after the decimal point.
The “value” attribute or the corresponding value in out-of-band data is a real value that is within one of the constraint intervals or exactly one of the enumerated values, and most
importantly is expressed in the unit specified.
32
Copyright © 2011 Open Geospatial Consortium