70
Cop
16 Identifier Usage
16.1 Introduction
Being able to identify something is critical both in everyday life and IT systems. Each object – a real world object or one used in software – has identity.
The identity of an object can be implicit in which case we just know of the object being a unique entity that exists. If it is explicit, then we know the object by name. That name is
unique in a given namespace. If an object is known in more than one domain, it may have different names assigned in the namespaces of the domains. A domain may even assign
multiple names to the same object. In general, the domain that owns that namespace governs naming of objects.
The following chapter explains the implementation and usage of identifiers according to ISOGML. How identifiers are used in the SWE Service Model is explained afterwards.
Handling of identifiers is slightly but significantly different in the two approaches, this is the reason why additional documentation was deemed necessary.
16.2 Implementation in ISO 19103 and ISO 19136
ISO 19103 defines three classes to support the concept of explicit identity: GenericName, LocalName and ScopedName – see Figure 21.
Figure 21 — overview of name types defined by ISO 19103
Without going into too much detail here, a GenericName is bound to a NameSpace and is bound to a certain object and thus identified in the namespace. GenericName itself is
abstract and therefore needs to be substituted by a non-abstract subclass, in this case LocalName or ScopedName. ISO 19136OGC 07-036 defines the mapping of both types
to XML encodings see table D.2 in OGC 07-036.
Both LocalName and ScopedName belong to a namespace. The difference in the XML encoding defined by GML is that for a ScopedName the namespace is explicitly provided
in the codeSpace attribute while for a LocalName the namespace is usually implicit - but may also be provided via the optional codeSpace attribute.
yright © 2011 Open Geospatial Consortium.
Copyright © 2011 Open Geospatial Consortium.
71 The XML encoding of LocalName according to OGC 07-036 Table D.2 is gml:CodeType
while the encoding of ScopedName is gml:CodeWithAuthorityType – see following listing.
Listing 6 – GML CodeType and CodeWithAuthorityType complexType name=CodeType
annotation documentation
gml:CodeType is a generalized type to be used for a term, keyword or name. It adds a XML attribute codeSpace
to a term, where the value of the codeSpace attribute if present shall indicate a dictionary, thesaurus,
classification scheme, authority, or pattern for the term.
documentation annotation
simpleContent extension base=string
attribute name=codeSpace type=anyURI extension
simpleContent complexType
complexType name=CodeWithAuthorityType annotation
documentation
gml:CodeWithAuthorityType requires that the codeSpace attribute is provided in an instance.
documentation annotation
simpleContent restriction base=gml:CodeType
attribute name=codeSpace type=anyURI use=required
restriction simpleContent
complexType
A namespacecodeSpace may be implemented as a dictionary, thesaurus or classification scheme. It can also be a register available or virtual of any authority, e.g.
standardization body, governmental organization etc.
The key point is that – following GML encoding rules – the codeSpacnamespace has to be provided for the XML encoding of a ScopedName while it is optional in the encoding
of a LocalName.
Whenever GenericName is used in a UML model, either LocalName or ScopedName replaces it in the implementation. In the XML encoding following GML rules, this is
possible because the XML encoding of a GenericName is also gml:CodeType.
72
Copyright © 2011 Open Geospatial Consortium.
Whether a name is unique or uniquely identifies an object in a given codeSpacenamespace is up to the authority responsible for that codeSpacenamespace.
However, as one name is bound to one object only in one namespace, in the XML encoding of GenericName and thus ScopedName and LocalName only the combination
of the value and the codeSpace provided explicitly or implicitly make an identifier unique.
Example: an identifier with value “observation-1” can be assigned to different sensor outputs. Only in combination with a codeSpace - like “http:some.organization.orgsensor1” does the identifier reference one unique object.
16.3 Implementation in SWE Service Model