OGC 08-094r1 SWE Common Data Model
8.2 Requirements Class: Record Components Schema Requirements Class
http:www.opengis.netspecSWE2.0reqxsd-record-components
Target Type XML Instance
Dependency
http:www.opengis.netspecSWE2.0requml-record-components
Dependency
http:www.opengis.netspecSWE2.0reqxsd-simple-components
XML Schema elements and types defined in the “record_components.xsd” schema implement all classes defined in the “Record Components” UML packages.
Requirement
http:www.opengis.netspecSWE2.0reqxsd-record-componentsdependency-simple-components
Req 67. An XML instance passing the “Record Components Schema” conformance
test class shall first pass the “Basic Types and Simple Components Schemas”
conformance test class.
Requirement
http:www.opengis.netspecSWE2.0reqxsd-record-componentsschema-valid
Req 68. The XML instance shall be valid with respect to the XML grammar defined in
the “record_components.xsd” XML schema as well as satisfy all Schematron
patterns defined in “record_components.sch”.
8.2.1 DataRecord Element
The “DataRecord” element is the XML schema implementation of the “DataRecord” UML class defined in clause 7.3.1. The schema snippet for this element and its
corresponding complex type is shown below:
element name
= DataRecord
type =
swe:DataRecordType substitutionGroup
= swe:AbstractDataComponent
complexType name
= DataRecordType
complexContent extension
base =
swe:AbstractDataComponentType sequence
element name
= field
maxOccurs =
unbounded complexType
complexContent extension
base =
swe:AbstractDataComponentPropertyType attribute
name =
name type
= NCName
use= required
extension complexContent
complexType
90
Copyright © 2011 Open Geospatial Consortium
SWE Common Data Model OGC 08-094r1
element sequence
extension complexContent
complexType
The element contains all sub-elements inherited from “AbstractDataComponentType” as well as a list of at least one “field” property elements, each with a “name” attribute and
containing the data component element that defines the field.
The XML example below describes a record composed of weather data fields. In this case the “DataRecord” element is used as a data descriptor and the corresponding data
stream is usually composed of several tuples of values, each tuple corresponding to one record as defined here:
swe:DataRecord swe:label
Weather Data Record swe:label
swe:description Record of synchronous weather measurements
swe:description swe:field
name =
time swe:Time
definition =
http:www.opengis.netdefpropertyOGC0SamplingTime referenceFrame
= http:www.opengis.netdeftrsOGC0GPS
swe:label Sampling Time
swe:label swe:uom
xlink:href =
http:www.opengis.netdefuomISO-86010Gregorian swe:Time
swe:field swe:field
name =
temperature swe:Quantity
definition =
http:mmisw.orgontcfparameterair_temperature swe:label
Air Temperature swe:label
swe:uom code
= Cel
swe:Quantity swe:field
swe:field name
= pressure
swe:Quantity definition
= http:mmisw.orgontcfparameterair_pressure_at_sea_level
swe:label Air Pressure
swe:label swe:uom
code =
mbar swe:Quantity
swe:field swe:field
name =
windSpeed swe:Quantity
definition =
http:mmisw.orgontcfparameterwind_speed swe:label
Wind Speed swe:label
swe:uom code
= kmh
swe:Quantity swe:field
swe:field name
= windDirection
swe:Quantity definition
= http:mmisw.orgontcfparameterwind_to_direction
swe:label Wind Direction
swe:label swe:uom
code =
deg swe:Quantity
swe:field swe:DataRecord
Each field shall have a unique name within the record Req 39. This is enforced by a Schematron pattern.
The “DataRecord” element can also carry its own “definition” attribute to carry semantics about the whole group of values. The next example shows how radial
distortion coefficients of a frame camera sensor could be encoded in this way:
Copyright © 2011 Open Geospatial Consortium
91