380 likes | 740 Views
AIXM 5.1 - UML to XSD. AIXM 5.1 XML Developers' Seminar #2 – Dec 2009. Content. Overview of AIXM files Mapping rules for Datatypes Mapping rules for Features Presentation AIXM scripts Creation of an extension. AIXM 5.1. includes. GML 3.2. ISO 19139 metadata schema. W3C xlink.
E N D
AIXM 5.1 - UML to XSD AIXM 5.1 XML Developers' Seminar #2 – Dec 2009
Content • Overview of AIXM files • Mapping rules for Datatypes • Mapping rules for Features • Presentation AIXM scripts • Creation of an extension AIXM 5.1 - UML to XSD
AIXM 5.1 includes GML 3.2 ISO19139metadataschema W3C xlink Overview of AIXM files • The file AIXM_AbstractGML_ObjectTypes.xsd • References ISO19139 Metadata Schema • Defines the base AIXM Feature Constructs • AbstractAIXMFeatureType / AbstractAIXMFeature • AbstractAIXMTimesliceType / AbstractAIXMTimeslice • The file AIXM_DataTypes.xsd contains the mapping of the AIXM datatypes • The file AIXM_Features.xsd contains the mapping of the AIXM features AIXM 5.1 - UML to XSD
AIXM 5.1UML AIXM 5.1XSD Overview of AIXM files AIXM 5.1 Mapping Rules • AIXM 5.1 Mapping rules explains how to translate the AIXM 5.1 UML model into an XML grammar based on a subset of the Geography Markup Language (GML 3.2) • Mapping rules are defined for: • AIXM Datatypes • AIXM Features AIXM 5.1 - UML to XSD
NEW AIXM 5.1 - NEW AIXM 5.1 - AIXM 5.1 Mapping Rules - Datatypes • Mapping <<enumeration>> <simpleType name="CodeAircraftEngineBaseType"> <union> <simpleType> <restriction base="xsd:string"> <enumeration value="JET"> <annotation> <documentation/> </annotation> </enumeration> <enumeration value="PISTON"/> <enumeration value=“TURBOPROP"/> <enumeration value=“ALL"/> </restriction> </simpleType> <simpleType> <restriction base="string"> <pattern value="OTHER:\w{2,58}"/> </restriction> </simpleType> </union> </simpleType> AIXM 5.1 - UML to XSD
AIXM 5.1 Mapping Rules - Datatypes • Mapping <<codelist>> <simpleType name="CodeApproachLightingBaseType"> <union> <simpleType> <restriction base="xsd:string"> <enumeration value="ALSAF"> </enumeration> <enumeration value="MALS"> </enumeration> <enumeration value="MALSR"> </enumeration> <enumeration value="SALS"> </enumeration> ...... </restriction> </simpleType> <simpleType> <restriction base="string"> -- NO PATTERN -- </restriction> </simpleType> </union> </simpleType> AIXM 5.1 - UML to XSD
AIXM 5.1 Mapping Rules - Datatypes • Mapping <<datatype>> - default case <simpleType name="DateBaseType"> <restriction base="xsd:date"> </restriction> </simpleType> AIXM 5.1 - UML to XSD
NEW AIXM 5.1 - NEW AIXM 5.1 - NEW AIXM 5.1 - NEW AIXM 5.1 - NEW AIXM 5.1 - NEW AIXM 5.1 - AIXM 5.1 Mapping Rules - NilReason • Most of AIXM 5.1 Data Types define a nilReason, used to indicate the reason for a null value. AIXM 5.1 - UML to XSD
NEW AIXM 5.1 - NEW AIXM 5.1 - AIXM 5.1 Mapping Rules - NilReason <simpleType name="CodeAircraftEngineBaseType"> <union> <simpleType> <restriction base="xsd:string"> <enumeration value="JET"> …………………….. </restriction> </simpleType> <simpleType> <restriction base="string"> <pattern value="OTHER:\w{2,58}"/> </restriction> </simpleType> </union> </simpleType> • Mapping nilReason <complexType name="CodeAircraftEngineType"> <simpleContent> <extension base="aixm:CodeAircraftEngineBaseType"> <attribute name="nilReason“ type="aixm:NilReasonType"/> </extension> </simpleContent> </complexType> AIXM 5.1 - UML to XSD
AIXM 5.1 Mapping Rules - UOM • Mapping Units of Measurement <simpleType name=“ValDepthBaseType"> <restriction base="xsd:decimal"> </restriction> </simpleType> <complexType name="ValDepthType"> <simpleContent> <extension base="aixm:ValDepthBaseType"> <attribute name="nilReason" type="aixm:NilReasonType"/> <attribute name="uom" type="aixm:UomDepthType" use="required"/> </extension> </simpleContent> </complexType> AIXM 5.1 - UML to XSD
AIXM 5.1 Mapping Rules - Features • AIXM is based on GML • AIXM Features are GML features… • AIXM follows the GML object-property concept. <AirportHeliport> <!-- feature --> <ElevatedPoint> <!-- object --> <AirportHeliport> <!-- feature --> <hasReferencePoint> <!-- property --> <ElevatedPoint> <!-- object --> AIXM 5.1 - UML to XSD
AIXM 5.1 Mapping Rules - Features • For each AIXM Feature in the UML, the following XML schema entities are created: • FeaturePropertyType • Feature • FeatureType • FeatureTimeSlicePropertyType • FeatureTimeSlice • FeatureTimeSliceType • FeaturePropertyGroup • AIXM objects are encoded as GML objects. The mapping rules for Objects are the same as the rules for Features except that • Object do not exist outside of a feature • TimeSlice types and elements are not created AIXM 5.1 - UML to XSD
RunwayPropertyType • Runway • RunwayType • RunwayTimeSlicePropertyType • RunwayTimeSlice • RunwayTimeSliceType • RunwayPropertyGroup AIXM 5.1 Mapping Rules - Features <group name="RunwayPropertyGroup"> <sequence> <element name="designator“ type="aixm:TextDesignatorType" nillable="true" minOccurs="0"> <annotation> <documentation>The full textual designator of the runway, used to uniquely identify it at an aerodrome/heliport which has more than one. E.g. 09/27, 02R/20L, RWY 1. </documentation> </annotation> </element> <element name="type" type="aixm:CodeRunwayType" nillable="true" minOccurs="0"> [………………] </sequence> </group> • UML properties are mapped into FeaturePropertyGroup AIXM 5.1 - UML to XSD
RunwayPropertyType • Runway • RunwayType • RunwayTimeSlicePropertyType • RunwayTimeSlice • RunwayTimeSliceType • RunwayPropertyGroup AIXM 5.1 Mapping Rules - Features <group name="RunwayPropertyGroup"> <sequence> <element name="designator" nillable="true" minOccurs="0"> [………………] <element name="surfaceProperties" nillable="true" minOccurs="0"> <complexType> <complexContent> <extension base="aixm:SurfaceCharacteristicsPropertyType"> <attribute name="nilReason" type="gml:NilReasonEnumeration"/> </extension> </complexContent> </complexType> </element> [………………] AIXM 5.1 - UML to XSD
RunwayPropertyType • Runway • RunwayType • RunwayTimeSlicePropertyType • RunwayTimeSlice • RunwayTimeSliceType • RunwayPropertyGroup AIXM 5.1 Mapping Rules - Features • UML properties are mapped into FeaturePropertyGroup <group name="RunwayPropertyGroup"> <sequence> <element name="designator" type="aixm:TextDesignatorType" nillable="true" minOccurs="0"> [………………] <element name="type" type="aixm:CodeRunwayType" nillable="true" minOccurs="0"> [………………] <element name="associatedAirportHeliport" type="aixm:AirportHeliportPropertyType" nillable="true" minOccurs="0"> [………………] </sequence> </group> AIXM 5.1 - UML to XSD
RunwayPropertyType • Runway • RunwayType • RunwayTimeSlicePropertyType • RunwayTimeSlice • RunwayTimeSliceType • RunwayPropertyGroup AIXM 5.1 Mapping Rules - Features • The RunwayTimeSliceType encapsulates all the Runway properties that change over time <complexType name="RunwayTimeSliceType"> <complexContent> <extension base="aixm:AbstractAIXMTimeSliceType"> <sequence> <group ref="aixm:RunwayPropertyGroup"/> <element name="extension" minOccurs="0" maxOccurs="unbounded"> <complexType> <sequence> <element ref="aixm:AbstractRunwayExtension"/> </sequence> <attributeGroup ref="gml:OwnershipAttributeGroup"/> </complexType> </element> </sequence> </extension> </complexContent> </complexType> AIXM 5.1 - UML to XSD
RunwayPropertyType • Runway • RunwayType • RunwayTimeSlicePropertyType • RunwayTimeSlice • RunwayTimeSliceType • RunwayPropertyGroup AIXM 5.1 Mapping Rules - Features <element name="RunwayTimeSlice" type="aixm:RunwayTimeSliceType" substitutionGroup="gml:AbstractTimeSlice"/> • RunwayTimeSlice element is of type RunwayTimeSliceType. AIXM 5.1 - UML to XSD
RunwayPropertyType • Runway • RunwayType • RunwayTimeSlicePropertyType • RunwayTimeSlice • RunwayTimeSliceType • RunwayPropertyGroup AIXM 5.1 Mapping Rules - Features <complexType name="RunwayTimeSlicePropertyType"> <sequence> <element ref="aixm:RunwayTimeSlice"/> </sequence> <attributeGroup ref="gml:OwnershipAttributeGroup"/> </complexType> • A GML property type containing a FeatureTimeSlice objects is created. AIXM 5.1 - UML to XSD
RunwayPropertyType • Runway • RunwayType • RunwayTimeSlicePropertyType • RunwayTimeSlice • RunwayTimeSliceType • RunwayPropertyGroup AIXM 5.1 Mapping Rules - Features <complexType name="RunwayType"> <complexContent> <extension base="aixm:AbstractAIXMFeatureType"> <sequence> <element name="timeSlice" type="aixm:RunwayTimeSlicePropertyType" maxOccurs="unbounded"/> </sequence> </extension> </complexContent> </complexType> • The Runway feature type is created extending the AbstractAIXMFeatureType with the RunwayTimeSlice object created before. AIXM 5.1 - UML to XSD
RunwayPropertyType • Runway • RunwayType • RunwayTimeSlicePropertyType • RunwayTimeSlice • RunwayTimeSliceType • RunwayPropertyGroup AIXM 5.1 Mapping Rules - Features <element name="Runway" type="aixm:RunwayType" substitutionGroup="aixm:AbstractAIXMFeature"> <annotation> <documentation>A defined rectangular area on a land aerodrome/heliport prepared for the landing and take-off of aircraft. Note: this includes the concept of Final Approach and Take-Off Area (FATO) for helicopters. </documentation> </annotation> </element> • The Runway feature is then defined by the RunwayType. AIXM 5.1 - UML to XSD
RunwayPropertyType • Runway • RunwayType • RunwayTimeSlicePropertyType • RunwayTimeSlice • RunwayTimeSliceType • RunwayPropertyGroup AIXM 5.1 Mapping Rules - Features <complexType name="RunwayPropertyType"> <attributeGroup ref="gml:OwnershipAttributeGroup"/> <attributeGroup ref="gml:AssociationAttributeGroup"/> </complexType> • Used for relationship to feature Runway • Provides the xlink:href attribute AIXM 5.1 - UML to XSD
AIXM 5.1 Mapping Rules – Other cases • Mapping Associations with Association Classes • <<datatype>> with no BaseType • <<enumeration>> CodeNilReasonType • <<datatype>> TextXHTMLBaseType Please refer to AIXM documentation: AIXM - UML to XML Schema Mapping AIXM 5.1 - UML to XSD
UML Extension • A feature or object may be extended by creating a class with the same name as the core AIXM feature and giving it a stereotype <<extension>>. • New classes (features and objects), that do not extend existing AIXM Core classes, can be also created. AIXM 5.1 - UML to XSD
UML Extension • Extensions shall NOT be included in the core AIXM packages AIXM 5.1 - UML to XSD
AIXM 5.1 Mapping Rules - Extensions • AIXM_Features.xsd is defined in such a way that multiple extensions can be included in the core FeatureTimesliceType • Features with the stereotype of <<extension>> generates three related elements for that class. • FeatureExtensionPropertyGroup • FeatureExtensionType • FeatureExtension <complexType name="AirspaceTimeSliceType"> <complexContent> <extension base="aixm:AbstractAIXMTimeSliceType"> <sequence> <group ref="aixm:AirspacePropertyGroup"/> <element name="extension" minOccurs="0" maxOccurs="unbounded"> <complexType> <sequence> <element ref="aixm:AbstractAirspaceExtension"/> […………….] AIXM 5.1 - UML to XSD
AirspaceExtension • AirspaceExtensionType • AirspaceExtensionPropertyGroup AIXM 5.1 Mapping Rules - Extensions <group name="AirspaceExtensionPropertyGroup"> <sequence> <element name="flexibleUse“ type=“CodeYesNoType” nillable="true" minOccurs="0"> […………….] <element name="level1“ type=“CodeYesNoType” nillable="true" minOccurs="0"> […………….] </sequence> </group> AIXM 5.1 - UML to XSD
AirspaceExtension • AirspaceExtensionType • AirspaceExtensionPropertyGroup AIXM 5.1 Mapping Rules - Extensions <complexType name="AirspaceExtensionType"> <complexContent> <extension base="aixm:AbstractExtensionType"> <sequence> <group ref="easm:AirspaceExtensionPropertyGroup"/> </sequence> </extension> </complexContent> </complexType> • A relationship is created with an abstract XML element that acts as the root for all extensions. AIXM 5.1 - UML to XSD
AirspaceExtension • AirspaceExtensionType • AirspaceExtensionPropertyGroup AIXM 5.1 Mapping Rules - Extensions <element name="AirspaceExtension" type="easm:AirspaceExtensionType“ substitutionGroup="aixm:AbstractAirspaceExtension"/> AIXM 5.1 - UML to XSD
Focus on AIXM Basic Message • Basic Message • is an AIXM 5.1 extension • contains just a collection of AIXM features AIXM 5.1 - UML to XSD