DataStream Class Requirements Class: Block Components Package Requirements Class

SWE Common Data Model OGC 08-094r1 as data descriptors, meaning that they shall not include any inline values. These values will instead be block encoded in the “values” attribute of the parent “DataStream”. The “encoding” and “values” fields are there to provide the stream values as an efficient block which can be encoded in several ways. The same encoding methods as for the “DataArray” class are available and are described in clauses 7.6 and 7.7. Requirement http:www.opengis.netspecSWE2.0requml-block-componentsdatastream-array-valid Req 52. Req 49 also applies to the “DataStream” class. Copyright © 2011 Open Geospatial Consortium 57 OGC 08-094r1 SWE Common Data Model

7.6 Requirements Class: Simple Encodings Package Requirements Class

http:www.opengis.netspecSWE2.0requml-simple-encodings Target Type Software Implementation or Encoding of the Conceptual Models Dependency http:www.opengis.netspecSWE2.0reqcore Encoding methods describe how structured array and stream data is encoded into a low level byte stream see related concepts in clause 6.6. Once encoded as a sequence of bytes, the data can then be transmitted using various digital means such as files on a disk or network connections. Requirement http:www.opengis.netspecSWE2.0requml-simple-encodingsdependency-simple-components Req 53. An encoding or software passing the “Simple Encodings UML Package” conformance test class shall first pass “Basic Types and Simple Components UML Package” conformance test class. This package includes two classes that provide definitions of simple encoding methods. They are used as descriptors of the method used to encode data component values wrapped by aggregate classes defined in the “Block Components” package. There model is shown on the diagram below: «Type» AbstractEncoding «Type» TextEncoding «property» «Type» XMLEncoding + tokenSeparator: CharacterString + blockSeparator: CharacterString + decimalSeparator: CharacterString [0..1] = . + collapseWhiteSpaces: Boolean [0..1] = true Figure 7.32 – Simple Encodings 58 Copyright © 2011 Open Geospatial Consortium SWE Common Data Model OGC 08-094r1 Requirement http:www.opengis.netspecSWE2.0requml-simple-encodingspackage-fully-implemented Req 54. The encoding or software shall correctly implement all UML classes defined in the “Simple Encodings” package. All classes defining encoding methods derive from a common abstract class called “AbstractEncoding”. Extensions to this standard that define new encoding methods shall derive encoding classes from this abstract class. The intent of this standard is to provide a set of core encodings covering most common needs. Each encoding has specific benefits that match the needs of different applications. Sometimes several encodings of the same dataset can be offered in order to satisfy several types of consumers andor use cases. In the model provided in this standard, the encoding specification is provided separately from the data component tree describing the dataset structure, thus enabling several encodings to be applied to the same data structure without changing it.

7.6.1 TextEncoding Class

The “TextEncoding” class defines a method allowing encoding arbitrarily complex data using a text based delimiter separated values DSV format. The class used to specify this encoding method is shown below: AbstractEncoding «Type» TextEncoding «property» + tokenSeparator: CharacterString + blockSeparator: CharacterString + decimalSeparator: CharacterString [0..1] = . + collapseWhiteSpaces: Boolean [0..1] = true Figure 7.33 – TextEncoding Class The “tokenSeparator” attribute specifies the characters to use for separating each scalar value from one another. Scalar values appear sequentially in the stream alternatively with the token separator characters, in an order unambiguously defined by the data component structure. The detailed rules are given in the implementation clause 8.3. The “blockSeparator” attribute specifies characters used to mark the end of a “block”, corresponding to the complete structure defined by the data component tree in a “DataArray”, “Matrix” or “DataStream” one block corresponds to one element, that is to Copyright © 2011 Open Geospatial Consortium 59