DataChoice Class Requirements Class: Choice Components Package Requirements Class

SWE Common Data Model OGC 08-094r1 This class implements a full composite pattern, so that each “item” can be any data component, including simple and aggregate types. The “choiceValue” attribute is used to represent the token value that would be present in the data stream and that indicates the actual choice selection before the corresponding data can be given i.e. knowing what choice item was selected ahead of time is necessary for proper decoding of encoded data streams. Each “item” attribute can thus take an instance of any concrete sub-class of “AbstractDataComponent”, which is the superset of all data component types defined in this standard. The name of each item shall be unique within a given “DataChoice” instance so that it can be used as a key to uniquely identify andor index each one of the choice components. Requirement http:www.opengis.netspecSWE2.0requml-choice-componentschoice-item-name-unique Req 46. Each “item” attribute in a given instance of the “DataChoice” class shall be identified by a name that is unique to this instance. The “DataChoice” component is used to describe a data structure or a part of the structure that can alternatively contain different types of objects. It can also be used to define the input of a service or process that allows a choice of structures as its input. Examples NMEA 0183 compatible devices can output several types of sentences in the same data stream. Some sentences include GPS location, while some others contain heading or status data. This can be described by a “DataChoice” which items represent all the possible types of sentences output by the device. A Sensor Planning Service SPS can define a choice in the tasking messages that the service can accept, thus leaving more possibilities to the users. Copyright © 2011 Open Geospatial Consortium 49 OGC 08-094r1 SWE Common Data Model

7.5 Requirements Class: Block Components Package Requirements Class

http:www.opengis.netspecSWE2.0requml-block-components Target Type Software Implementation or Encoding of the Conceptual Models Dependency http:www.opengis.netspecSWE2.0requml-simple-components Dependency http:www.opengis.netspecSWE2.0requml-simple-encodings This package defines additional aggregate components for describing arrays of values that are designed to be encoded as efficient data blocks. These additional aggregate components are purposely defined in a separate requirement class because they require a more advanced implementation for handling data values as encoded blocks. Requirement http:www.opengis.netspecSWE2.0requml-block-componentsdependency-simple-components- and-simple-encodings Req 47. An encoding or software passing the “Block Components UML Package” conformance test class shall first pass the “Basic Types and Simple Components UML Packages” and “Simple Encodings UML Package” conformance test classes. The UML models for these additional aggregate components are shown below: AbstractSWEIdentifiable «Type» Simple Components:: AbstractDataComponent «property» + definition: ScopedName [0..1] + optional: Boolean [0..1] = false + updatable: Boolean [0..1] «Type» DataArray «property» + elementCount: Count + elementType: AbstractDataComponent + encoding: AbstractEncoding [0..1] + values: EncodedValues [0..1] «Type» Matrix «property» + referenceFrame: SC_CRS [0..1] + localFrame: SC_CRS [0..1] Figure 7.28 – Array Components 50 Copyright © 2011 Open Geospatial Consortium SWE Common Data Model OGC 08-094r1 Requirement http:www.opengis.netspecSWE2.0requml-block-componentspackage-fully-implemented Req 48. The encoding or software shall correctly implement all UML classes defined in the “Block Components” package. The principle of these two classes is that the number and type of elements contained in the array is defined once, while the actual array values are listed separately without being redefined with each value. In order to achieve this, all array values are encoded as a single data block in the “values” attribute. Consequently, these classes are restricted to cases where all elements are homogeneous and thus can be described only once even though the array data may in fact contain many of them. This package also defines the “DataStream” class that is similar in principle to the “DataArray” class but cannot be nested within other aggregate data components. It is a top level class that encapsulates the description of a full data stream.

7.5.1 DataArray Class

The “DataArray” class is modeled on the corresponding definition of ISO 11404. This definition states that an array is a collection of elements of the same type as opposed to a record where each field can have a different type, with a defined size. This class is shown on the following UML diagram: AbstractDataComponent «Type» DataArray «property» + elementCount: Count + elementType: AbstractDataComponent + encoding: AbstractEncoding [0..1] + values: EncodedValues [0..1] Figure 7.29 – DataArray Class This class implements a full composite pattern, so that the “elementType” can be any data component, including simple and aggregate types. It can be used to group identical scalar components as well as records, choices and arrays in a recursive manner. The “elementCount” attribute is used to indicate the size of the array, that is to say the number of elements of the given type in the array. Note that each element is not necessarily scalar but can be a record, another array, etc. The content of the “elementType” attribute defines the exact structure of each element in the array. The data component used and all of its children shall not include any inline Copyright © 2011 Open Geospatial Consortium 51