Conversion rule changes Improved conversion rule

Copyright © 2012 Open Geospatial Consortium 75 12 Encoding rule

12.1.1 Target namespace

All schema components specified in Sub-clause 12.4 are in the target namespace: http:www.opengis.netgml3.3exr

12.2 Improved conversion rule

12.2.1 Conversion rule changes

The conversion rule in GML 3.2 ISO 19136:2007, Subclause E.2.4, is improved as specified in Table 4. Table 4 – Amendments to the encoding rule for code lists Sub-clause in GML 3.2 ISO 19136:2007 Clarification in the context of the conformance class specified in this Clause Table E.1 — Schema encoding overview A CodeList is by default converted to an external dictionary, within which each item is identified by a URI. An alternative mapping is a union of an enumeration and a pattern. NOTE This changes the default conversion for code lists. E.2.4.9 UML classes code lists The conversion of a UML class with stereotype CodeList and with a tagged value asDictionary with the value false is unchanged. If a UML class with stereotype CodeList is without a tagged value asDictionary, or carries a tagged value asDictionary with the value true, the code list shall be represented by an external dictionary, vocabulary or ontology, using any suitable syntax or encoding. EXAMPLE The code list ParcelUsage from Figure E.3 may be represented in RDF Turtle syntax as: prefix skos: http:www.w3.org200402skoscore. http:www.someorg.declParcelUsage a skos:ConceptScheme; skos:prefLabel Parcel Usage; skos:hasTopConcept http:www.someorg.declParcelUsage1; skos:hasTopConcept http:www.someorg.declParcelUsage2; skos:hasTopConcept http:www.someorg.declParcelUsage3; skos:hasTopConcept http:www.someorg.declParcelUsage4; skos:hasTopConcept http:www.someorg.declParcelUsage5. http:www.someorg.declParcelUsage1 a skos:Concept; skos:prefLabel factory; skos:inScheme http:www.someorg.declParcelUsage. 76 Copyright © 2012 Open Geospatial Consortium http:www.someorg.declParcelUsage2 a skos:Concept; skos:prefLabel road; skos:inScheme http:www.someorg.declParcelUsage. http:www.someorg.declParcelUsage3 a skos:Concept; skos:prefLabel residential; skos:inScheme http:www.someorg.declParcelUsage. http:www.someorg.declParcelUsage4 a skos:Concept; skos:prefLabel offices; skos:inScheme http:www.someorg.declParcelUsage. http:www.someorg.declParcelUsage5 a skos:Concept; skos:prefLabel sea, river; skos:inScheme http:www.someorg.declParcelUsage. In an instance document the reference would then be encoded using gml:ReferenceType as the content model, see GML 3.2, E.2.4.11 for example as: usage xlink:href=http:www.someorg.declParcelUsage1 The value of the xlink:href attribute is the URI for the dictionary item. E.2.4.11 UML attributes and association roles A UML attribute whose type is a class stereotyped Enumeration is be mapped to an element with a string value value domain: values of the enumeration. EXAMPLE 6 The enumeration BuildingStatus would be represented as: element name=condition type=ex:BuildingStatusType Depending on the encoding of the class GML 3.2, E.2.4.9, a UML attribute whose type is a class stereotyped CodeList is mapped to an element with either a reference to the corresponding dictionary entry type gml:ReferenceType or a string value value domain: values of the code list. A value for the name of the code list may be provided using an appinfo annotation element gmlexr:targetCodeList. element name=targetCodeList type=string EXAMPLE 7 The code list BuildingType would be represented as: element name=type type=gml:ReferenceType annotation appinfo Copyright © 2012 Open Geospatial Consortium 77 gmlexr:targetCodeListBuildingTypegmlexr: targetCodeList appinfo annotation element if asDictionary=true or element name=type type=ex:BuildingTypeType if asDictionary=false. F.2.1.2.9 Code lists Code-list-valued properties may be qualified with an appInfo annotation element gmlexr:targetCodeList specifying that the referenced item in an xlink:href attribute of the property is a value in an external code list dictionary. The value of the annotation element is the name of the code list.

12.2.2 Requirements class Requirements Class