Boolean Class Requirements Class: Basic Types and Simple Components Packages Requirements Class

OGC 08-094r1 SWE Common Data Model The “constraint” attribute allows further restricting the range of possible values by using the “AllowedTokens” class defined in clause 7.2.17. This class allows the definition of the constraint by either enumerating the allowed tokens andor by specifying a pattern that the value must match. The “value” attribute or the corresponding value in out-of-band data is a string that must match the constraint. Note: The “Text” component can be used to wrap a string representing complex content such as an expression in a programming language, xml or html content. This practice should however be used only for systems that don’t require high level of interoperability since the client must know how to interpret the content. Also care must be taken to properly escape such content before it is inserted in an XML document or in a SWE Common data stream.

7.2.6 Category Class

The “Category” class is used to specify a scalar data component with a categorical representation as defined in clause 6.2.2. It derives from “AbstractSimpleComponent” and is shown below: AbstractSimpleComponent «Type» Category «property» + codeSpace: Dictionary [0..1] + constraint: AllowedTokens [0..1] + value: CharacterString [0..1] Figure 7.10 – Category Class The “codeSpace” attribute is of type “Dictionary” and allows listing and defining the meaning of all possible values for this component. It is expected that instances of the “Dictionary” class will usually be referenced rather than included inline by implementations of this class since the code space definition is usually obtained from a controlled vocabulary maintained at a remote location. This type of implementation is the one chosen in the XML encodings defined by this standard. The “constraint” attribute allows further restricting the list of possible values by using the “AllowedTokens” class defined in clause 7.2.17. This is usually done by specifying a limited list of possible values, which have to be extracted from the code space. 30 Copyright © 2011 Open Geospatial Consortium