1 / 46

Encoding CD 1.0

Encoding CD 1.0. Vienna, Austria 1999-03-01 David Skogan Project leader work item 18 Encoding SINTEF Telecom and Informatics Email: David.Skogan@informatics.sintef.no. Content. Presentation of Encoding (pre) CD (WG4-N111 1999-02-15) Demonstration. Design requirements. Unified Modeling

december
Télécharger la présentation

Encoding CD 1.0

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Encoding CD 1.0 Vienna, Austria 1999-03-01 David Skogan Project leader work item 18 Encoding SINTEF Telecom and Informatics Email: David.Skogan@informatics.sintef.no

  2. Content • Presentation of Encoding (pre) CD (WG4-N111 1999-02-15) • Demonstration

  3. Design requirements Unified Modeling Language (UML) XML Metadata Interchange (XMI) ISO CD 15046-18 Encoding Extensible Markup Language (XML) Modeling and naming requirements Character set requirements

  4. Contents 1 Scope, 2 Conformance, 3 Normative references, 4 Term(s) and definition(s), 5 Symbols (and abbreviated terms) 6 Fundamental concepts and assumptions Module 1 7 Character repertoire Module 2 8 Application schema specific data structure Module 3 9 Output data structure Module 4 10 Encoding service Module 5 Annex A (n) Abstract Test Suite Annex B (n) Required DTD elements Annex C (i) Extensible Markup Language (XML) Annex D (i) Character Repertoire (ISO/IEC 10646) Annex E (i) Examples

  5. 1 Scope • This part of ISO 15046 specifies the encoding rule that shall be used for data interchange purposes. The encoding rule allows geographic information defined in an application schema to be coded into a system independent data structure suitable for transport or storage. ... • The encoding rule requires that an application schema shall exist and that it shall have been defined using the standardised conceptual schema language specified in part 3 – Conceptual Schema Language and that it shall be in conformance with the rules mandated in part 9 – Rules for Application schemas. • The encoding rule shall be compatible with the Universal Modelling Language (UML). Since there are no encoding rules associated with UML for data interchange this part of ISO 15046 defines an encoding rule based on the Extensible Markup Language (XML). • The choice of one international encoding rule does not exclude application domains and national countries to define and use their own encoding rules ...

  6. System A System B Application schema I Internal schema A Internal schema B Internal database Internal database MAI MIB i i Encoding service R Encoding service R-1 d d File system Transfer services Transfer services File system Defines Data transfer Data flow System boundary System boundary Module 1 Data interchange

  7. Conceptual schema language C Conceptual schema language D Schema language Encoding rule R Application schema I Data structure schema D Schema Encodingservice i d Instances input output Defines Data flow Relationship

  8. Module 2 7 Character repertoire • This standard adopts the following international character set standards: • ISO/IEC 10646-1 • ISO/IEC 10646-2 • Encodings: • UTF-8, UTF-16, UCS-2, UCS-4 • These standards define an international recognised repertoire of characters and their encodings. • Additional requirements • Composite characters deprecated • Language tagging mechanism required

  9. 8 Application schema specific data structure Module 3 8.1 General 8.2 Attributes and data types 8.3 Associations and association ends 8.4 Schema model 8.5 Instance model

  10. 8.2 Attributes and data types • A data type specifies a legal value domain and the operations on values of that domain • Four categories a) Basic data types b) Collection data types c) Enumerated data types d) Model types

  11. Integer 23995, -532, 0 Real 23.501, -1.23E-4 Binary FEA22A59 Boolean TRUE or FALSE String “Årlig” Date 1998-09-18 Time 18:30:59+01:00 DateTime 1998-09-18T18:30:01 DirectPosition (123, 514, 150) 8.2.2 Basic data types

  12. 8.2.3 Collection types • A template type that indicates multiple occurrences of instances of a specific type • Types • Set • points : Set ( GM_Point ) • Bag • occurrences : Bag ( Integer ) • Sequence (List) • points : Sequence ( GM_Point ) • Dictionary • named_points: Dictionary( String, GM_Point )

  13. A r2 r1 class1 class2 0..* 1 association-end association-end 8.3 Associations and association ends association B r3 C r4 class1 class3 class1 class4 1..* 1..* aggregation composition

  14. 8.4 Schema model

  15. Intersection pos : GM_Point Schema Model vs. UML • Package • Class • cProperty Basic types • cAssociation Association and aggregations • cComposition Composition and model types Road intersect road_no : Integer segment : GM_Curve 2

  16. Structure Level 0 – Complete schema Level 1 – Application schema package, name "RoadMap" Class and Association declarations Level 2 - Subpackages Level 1 – Standardised schema package, name "Spatial" Class and Association declarations Level 2 - Subpackages Level 1 – Standardised schema package, name "Quality” Class and Association declarations Level 2 - Subpackages

  17. 8.5 Instance model

  18. Structure Level 0 – Top package Level 1 – Application schema package, name "RoadMap" <object references to RoadMap objects, ...> Level 1 – Standardised schema package, name "Spatial" <object references to spatial objects, ... > Level 1 – Standardised schema package, name "Quality" <object references to quality objects, ... >

  19. Modeling requirements (UML) • Naming policy • Start with letter, no space within names • Applies to: package, class, attribute, and role names • Inheritance • No redeclarations, no derived attributes! • Attributes • Use the basic data types and template types defined in clause 8 • Associations • Use the three association types of UML consistently • Define role names and multiplicities at both association ends whenever needed, if only one way association are needed use one-way navigation • State • All attributes and associations necessary for abstract state shall be defined in application schemas and standardised schemas

  20. 9 Output data structure Module 4 9.1 Conversion rules 9.2 XML DTD production 9.3 XML document production 9.4 Character coding

  21. Application schema Standardised schemas c 9.1 Conversion rules Schema model I Encoding Service DTD D “XMI” Schema conversion rules UML XML Instance conversion rules Instance model i XML document d

  22. DTD structure • An XML version processing instruction and optional encoding declaration. Example: <?xml version="1.0" encoding="UCS-2" ?> • The required DTD declarations. • Declarations for the application schema. • Declarations for any of the standardised schemas used by the application schema.

  23. Element declarations GI GI.header GI.documentation GI.applicationSchema GI.lookupTable GI.content GI.difference GI.add GI.delete GI.update Entity declarations GI.element.att GI.link.att GI.Integer.cont GI.Real.cont GI.Binary.cont GI.Binary.att GI.String.cont GI.String.att GI.Date.cont GI.Time.cont GI.DateTime.cont GI.Boolean.cont GI.Boolean.att GI.DirectPosition.cont GI.Enum.cont Required DTD declarations GI.Integer GI.Real GI.Binary GI.String GI.Date GI.Time GI.DateTime GI.Boolean GI.DirectPosition

  24. Schema conversion rules Schema modelDTD declarations Package  package element declaration Class  object element declaration cProperty  property element declaration cAssociation  association element declaration cComposition  composition element declaration

  25. Example c0 + a1 : Integer + a2 : Real <<optional>> + a3 : Binary + a4 : String c1 +r1 + a5 : Date + a1 : Integer + a6 : Boolean 1..* 1..* + a7 : EnumType + a8 : Dictionary(Real , String) + a9 : DirectPosition + a10 : Sequence(Integer) c2 c3 +r1 + a2 : Integer + no_items : Integer + a3 : Date + pos : GM_Point 0..* 0..*

  26. Package • General <!ELEMENT TopPackage ( (SubPackage1, ..., SubPackageN), ( Class1 | Class2 ... | ClassN )*)> • Example <!ELEMENT p ((p.c0 | p.c1 | p.c2 | p.c3)*)>

  27. Class <!ENTITY % cProperties 'propertiesForC'> <!ENTITY % cAssociations 'associationsForC'> <!ENTITY % cCompositions 'compositionsForC'> <!ELEMENT c (%cProperties;, %cAssociations;, %cCompositions;)?> <!ATTLIST c %GI.element.att; %GI.link.att; >

  28. Property c0 • a1: Integer <!ELEMENT p.c0.a1 %GI.Integer.cont;> • a2: Real <!ELEMENT p.c0.a2 %GI.Real.cont;> • a3: Binary <!ELEMENT p.c0.a3 %GI.Binary.cont;> <!ATTLIST p.c0.a3 %GI.Binary.att;> • a4: String <!ELEMENT p.c0.a4 %GI.String.cont;> <!ATTLIST p.c0.a4 %GI.String.att; > ... • Property entity • <!ELEMENT % p.c0Properties ‘p.c0.a1, p.c0.a2, p.c0.a3?, p.c0.a4 ... + a1 : Integer + a2 : Real <<optional>> + a3 : Binary + a4 : String + a5 : Date + a6 : Boolean + a7 : EnumType + a8 : Dictionary(Real , String) + a9 : DirectPosition + a10 : Sequence(Integer)

  29. Association and composition • r1 <!ELEMENT p.c0.r1 (p.c1 | p.c2)+> • Association entity <!ENTITY % p.c0Associations ‘p.c0.r1’> • c0’s object element declaration <!ELEMENT p.c0 (%p.c0Properties;, %p.c0Associations;)?> <!ATTLIST p.c0 %GI.element.att; %GI.link.att; >

  30. 9.3 XML document production • An XML version processing instruction and optional encoding declaration. Example: <?xml version="1.0" encoding="UCS-2" ?> • A mandatory reference to an external DTD subset containing the DTD declarations for the application schema and for the standardised schemas used by the application schema. Example: <!DOCTYPE GI SYSTEM "http://www.example.org/roadmap.dtd"> • Any XML element that conform to the external DTD declaration and to the application schema. <GI> <GI.header> ... </GI.header> <GI.content> <package_element> <object_element> </object_element> ... </package_element> ... </GI.content> </GI>

  31. Instance conversion rules Instance modelXML document Package  package element Object  object element oProperty  property element oAssociation  association element oComposition  composition element

  32. Choices • Identification • id local to XML document • label user defined label • uuid unique id • Naming policy • Qualified name “Package.SubPackage.Class.Property” • Tag name “cpty” • Containment model (compositions) • Flat Objects in appropriate packages • Mixed • Nested Objects within objects

  33. Referencing object elements • object element • <e gi.id="i05" gi.label="test" gi.uuid="dce:F6A120B3"> ... </e> • XML IDREF mechanism: • <l gi.idref="i05"></l> • Uuidref mechanism: • <l gi.uuidref="dce:F6A120B3"></l> • Simple link (local): • <l xml:link="simple" href="|gi.label(test)"></l> • Simple link (external): • <l xml:link="simple" href="http://www.example.org/data.xml|i05"></l>

  34. 9.4 Character coding • Example: <?xml version=“1.0” encoding=“ISO-10646-UCS-2”?> • Legal encodings: • default UTF-8 or UTF-16 • “UTF-8”, “UTF-16” • “ISO-10646-UCS2”, “ISO-10646-UCS-4”

  35. 10 Encoding service Module 4

  36. E.2 Example

  37. Data • RoadMap • i01: Road • road_no (p): "66" • intersection (a): { i05, i06 } • situation (c): { i02, i03, i04 } • segment (c): i09 • i02: RoadSituation • type (p): "gravel" • length (p): "159.5" • i03: RoadSituation • type (p): "asphalt" • length (p): "30.5" • i04: RoadSituation • type (p): "concrete" • length (p): "160.0" • i05: Intersection • pos (c): i07 • i06: Intersection • pos (c): i08 • Spatial • i07: GM_Point • position (p): "50400 10800" • SRS (a): i11 • i08: GM_Point • position (p): "50300 10500" • SRS (a): i11 • i09: GM_Curve • SRS (a) : i11 • segment (c): { i10 } • i10: GM_CurveSegment • controlPoint (p): { "50300 10500", "50400 10600", • "50400 10800" } • controlParameter (p): { "1.0", "1.0", "1.0" } • interpolationMethod (p): "Linear" • Position • i11: SpatialReferenceSystem • type (p): "UTM"

  38. RoadMap DTD <?xml version="1.0" encoding="UTF-8" ?> <!-- DTD file: roadmap.dtd --> <!-- Import fixed elements from file called "iso15046/fixed.dtd" --> <!ENTITY % GI.fixed.elements SYSTEM "iso15046/fixed.dtd" > %GI.fixed.elements; <!--The dataset's root element is the predefined GI.content element --> <!--It could have been defined as ELEMENT GI.content (RoadMap, Spatial) > <!-- PACKAGE RoadMap --> <!ELEMENT RoadMap (RoadMap.Road | RoadMap.Intersection)* >

  39. RoadMap DTD cont. <!-- CLASS Road --> <!ELEMENT RoadMap.Road.road_no %GI.Integer.cont; > <!ENTITY RoadMap.RoadProperties ' RoadMap.Road.road_no ' > <!ELEMENT RoadMap.Road.intersection ( RoadMap.Intersection)+ > <!ENTITY % RoadMap.RoadAssociations 'RoadMap.Road.intersection' > <!ELEMENT RoadMap.Road.situation ( RoadSituation ) > <!ELEMENT RoadMap.Road.segment ( Spatial.GM_Curve )* > <!ENTITY % RoadMap.RoadCompositions 'RoadSituation, RoadMap.Road.segment' > <!ELEMENT RoadMap.Road ( %RoadMap.RoadProperties;, %RoadMap.RoadAssociations;, %RoadMap.RoadCompositions; )? > <!ATTLIST RoadMap.Road %GI.element.att; %GI.link.att; > ...

  40. RoadMap data <?xml version="1.0" ?> <!DOCTYPE GI SYSTEM "roadmap.dtd" > <GI gi.version="1.0" timestamp="1999-01-06 12:00" verified="false" containment="nested" naming="qualified"> <GI.header> <GI.applicationSchema xml:link="simple" href="http://www.as.org/RoadMap/" gi.name="RoadMap" gi.version="1.2">Additional text</GI.applicationSchema> </GI.header> <GI.content> <RoadMap> <RoadMap.Road gi.id="i01"> <RoadMap.Road.road_no>66</RoadMap.Road.road_no> <RoadMap.Road.intersection> <RoadMap.Intersection gi.idref="i05"></RoadMap.Intersection> <RoadMap.Intersection gi.idref="i06"></RoadMap.Intersection> </RoadMap.Road.intersection> <RoadMap.Road.situation> ... </RoadMap.Road.situation>

  41. RoadMap cont. • <RoadMap.Road.segment> • <Spatial.GM_Curve gi.id="i09"> • <Spatial.GM_Object.SRS> • <Position.SpatialReferenceSystem gi.idref="i11"></Position.SpatialReferenceSystem> • </Spatial.GM_Object.SRS> • <Spatial.GM_Curve.segment> • <Spatial.GM_CurveSegment gi.id="i10"> • <Spatial.GM_CurveSegment.controlPoint>50300 10500 • </Spatial.GM_CurveSegment.controlPoint> • <Spatial.GM_CurveSegment.controlPoint>50400 10600 • </Spatial.GM_CurveSegment.controlPoint> • <Spatial.GM_CurveSegment.controlPoint>50400 10800 • </Spatial.GM_CurveSegment.controlPoint> • <Spatial.GM_CurveSegment.controlParameter> • <GI.Real>10.5</GI.Real><GI.String>Add to c1</GI.String> • </Spatial.GM_CurveSegment.controlParameter> • <Spatial.GM_CurveSegment.interpolation>linear • </Spatial.GM_CurveSegment.interpolation> • </Spatial.GM_CurveSegment> • </Spatial.GM_Curve.segment> • </Spatial.GM_Curve> • </RoadMap.Road.segment> • </RoadMap.Road>

  42. Tag-based naming policy RM RoadMap r RoadMap.Road rno RoadMap.Road.road_no rin RoadMap.Road.intersection rsi RoadMap.Road.situation rsg RoadMap.Road.segment rs RoadMap.RoadSituation rst RoadMap.RoadSituation.type rsl RoadMap.RoadSituation.length i RoadMap.Intersection ipo RoadMap.Intersection.pos SP Spatial p Spatial.GM_Point osr Spatial.GM_Object.SRS pp Spatial.GM_Point.position cs Spatial.GM_CurveSegment csp Spatial.GM_CurveSegment.controlPoint csa Spatial.GM_CurveSegment.controlParameter csi Spatial.GM_CurveSegment.interpolation c Spatial.GM_Curve csg Spatial.GM_Curve.segment PO Position srs Position.SpatialReferenceSystem lookup table

  43. Tag-based data <?xml version="1.0" ?> <!DOCTYPE GI SYSTEM "roadmap-tag.dtd" [ <!ENTITY lookup.table SYSTEM "rm-lookup.xml"] > <GI gi.version="1.0" timestamp="1999-01-06 12:00" verified="false" containment="nested" naming="qualified"> <GI.header> <GI.applicationSchema xml:link="simple" href="http://www.as.org/RM/" gi.name="RM" gi.version="1.2">Additional text</GI.applicationSchema> <GI.lookupTable>&lookup.table;</GI.lookupTable> </GI.header> <GI.content> <RM> <r gi.id="i01"> <rno>66</rno> <rin> <i gi.idref="i05"> <i gi.idref="i06"> </rin> <rsi>

  44. Tag-based data cont. <rsg> <c gi.id="i09"> <osr> <srs gi.idref="i11"></srs> </osr> <csg> <cs gi.id="i10"> <csp>50300 10500</csp> <csp>50400 10600</csp> <csp>50400 10800</csp> <csa><GI.Real>10.5</GI.Real><GI.String>Add to c1</GI.String></csa> <csi>linear</csi> </cs> </csg> </c> </rsg> </r>

  45. Demonstration • Java Application (applet) • Model Browser and Editor • Schema Model and Instance Model • Encoding Service Implementation • XML read/write • DTD generation DISGIS Esprit project 22.084 1996 Taskon, INESC, SINTEF, Iona, DIKAS, GISDK, NMA Appl. Schema Std. Schemas DTD UML Browser and Editor + Encoding Service “XMI Light” Application data XML doc. XML doc.

  46. Summary • Inspired by XMI and based on UML and XML • M1: Data interchange (requirements) • M2: Character repertoire (requirements) • M3: Schema and instance data structures • Data types, associations • Schema Model and Instance Model • M4: Output data structure (Conversion rules) • DTD and XML document production • Two alternative naming policies • Three identification mechanisms • Choice of containment model • M5: Encoding Service

More Related