Skip to content

Commit

Permalink
IWXXM schemas and schematron rules updated to support IWXXM 2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
jjuhas committed May 29, 2017
1 parent 32d9f3c commit a0630c2
Show file tree
Hide file tree
Showing 20 changed files with 24,570 additions and 2 deletions.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ to [[email protected]](mailto:[email protected]). We are open to
organisations and companies working on IWXXM implementation to increase interoperability across packages
coming from different vendors. The features of the demo site are:

1. Validation with IWXXM 2.0, 2.0-RC1, 1.1, 1.0 schemas
1. Validation with IWXXM 2.1, 2.0, 2.0-RC1, 1.1, 1.0 schemas
2. Conversion from TAC METAR, SPECI, SIGMET, AIRMET, VA Advisory to IWXXM 2.0 and 1.1
3. Conversion back from IWXXM to TAC (with some limitations)

Expand Down Expand Up @@ -184,7 +184,15 @@ Updating XML Schema catalog
To prevent download of XSD schemas from the network, XML Schema catalog is stored
on the local disk in the directory `config/schemas`. Content of XML schema catalog
(together with schematron rules) is extracted from ZIP file downloaded from
<http://schemas.wmo.int/iwxxm/2.0/zip/iwxxm-schema-bundle-2.0.zip>.
<http://schemas.wmo.int/iwxxm/2.1/zip/iwxxm-schema-bundle-2.1.zip>.

Note: in the IWXXM version 2.0, there is a problem with original iwxxm-collect.sch file -
it uses sch:include elements to include iwxxm.sch and collect.sch from iwxxm 1.2.
Using of sch:include is not supported by schematron validation rules. Our validator
runs schematron validation against every .sch file placed in the rule directory
(for appropriate version of iwxxm). As a workaround for problem with includes, original
iwxxm-collect.sch file was renamed to iwxxm-collect.sch.txt and collect.sch file from 1.2
IWXXM schematron rules was copied also into 2.0 rule directory.

Configuration of web service
----------------------------
Expand Down
10 changes: 10 additions & 0 deletions config/schemas/rule/2.0/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Workaround for problem with original iwxxm-collect.sch
-------------------------------------------------------

sch:include elements are used in the original iwxxm-collect.sch file. Original
files includes iwxxm.sch and collect.sch from iwxxm 1.2. Using of sch:include is
not supported by schematron validation rules. Our validator runs schematron validation
against every .sch file placed in the rule directory (for appropriate version
of iwxxm). Workaround for problem with includes is to rename (or remove) original
iwxxm-collect.sch file to iwxxm-collect.sch.txt and copy collect.sch from 1.2 rules
also into 2.0 rule directory.
638 changes: 638 additions & 0 deletions config/schemas/rule/2.1/iwxxm-collect.sch

Large diffs are not rendered by default.

632 changes: 632 additions & 0 deletions config/schemas/rule/2.1/iwxxm.sch

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions config/schemas/rule/2014/collect.sch
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<sch:schema xmlns:sch="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2">
<sch:title>Schematron validation</sch:title>
<sch:ns prefix="collect" uri="http://def.wmo.int/collect/2014"/>
<sch:ns prefix="sf" uri="http://www.opengis.net/sampling/2.0"/>
<sch:ns prefix="sams" uri="http://www.opengis.net/samplingSpatial/2.0"/>
<sch:ns prefix="xlink" uri="http://www.w3.org/1999/xlink"/>
<sch:ns prefix="xsi" uri="http://www.w3.org/2001/XMLSchema-instance"/>
<sch:ns prefix="om" uri="http://www.opengis.net/om/2.0"/>
<sch:ns prefix="gml" uri="http://www.opengis.net/gml/3.2"/>
<sch:pattern id="COLLECT.MB1">
<sch:rule context="//collect:MeteorologicalBulletin">
<sch:assert test="count(distinct-values(for $item in //collect:meteorologicalInformation/child::node() return(node-name($item))))eq 1">COLLECT.MB1: All meteorologicalInformation instances in MeteorologicalBulletin must be of the same type</sch:assert>
</sch:rule>
</sch:pattern>
</sch:schema>
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--====================================================================-->
<!--AIXM 5.1.1-->
<!--www.aixm.aero-->
<!--April 2016-->
<!--====================================================================-->
<!--
Copyright (c) 2016, EUROCONTROL & FAA
=====================================
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the names of EUROCONTROL or FAA nor the names of their contributors may be used to endorse or promote products derived from this specification without specific prior written permission.
THIS SPECIFICATION IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
==========================================
Editorial note: this license is an instance of the BSD license template as
provided by the Open Source Initiative:
http://www.opensource.org/licenses/bsd-license.php
-->
<!-- Component: AIXM: Basic Message -->
<schema xmlns:message="http://www.aixm.aero/schema/5.1.1/message" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:aixm="http://www.aixm.aero/schema/5.1.1" targetNamespace="http://www.aixm.aero/schema/5.1.1/message" elementFormDefault="qualified" attributeFormDefault="unqualified" version="5.1.1">
<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
<import namespace="http://www.aixm.aero/schema/5.1.1" schemaLocation="../AIXM_Features.xsd"/>
<annotation>
<appinfo>Basic Message.xsd</appinfo>
<documentation>The definition of a simple data product, that contains just a collection of AIXM features.</documentation>
</annotation>
<group name="AIXMBasicMessagePropertyGroup">
<sequence>
<element name="hasMember" type="message:BasicMessageMemberAIXMPropertyType" maxOccurs="unbounded"/>
</sequence>
</group>
<complexType name="AIXMBasicMessageType">
<complexContent>
<extension base="aixm:AbstractAIXMMessageType">
<sequence>
<group ref="message:AIXMBasicMessagePropertyGroup"/>
</sequence>
</extension>
</complexContent>
</complexType>
<element name="AIXMBasicMessage" type="message:AIXMBasicMessageType" substitutionGroup="gml:AbstractFeature"/>
<complexType name="BasicMessageMemberAIXMPropertyType">
<complexContent>
<extension base="gml:AbstractFeatureMemberType">
<choice>
<element ref="aixm:AbstractAIXMFeature"/>
</choice>
<attributeGroup ref="gml:AssociationAttributeGroup"/>
</extension>
</complexContent>
</complexType>
</schema>
239 changes: 239 additions & 0 deletions config/schemas/schema/aero/aixm/5.1/AIXM_AbstractGML_ObjectTypes.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,239 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--====================================================================-->
<!--AIXM 5.1-->
<!--www.aixm.aero-->
<!--Released: February 2010-->
<!--====================================================================-->
<!--
Copyright (c) 2010, EUROCONTROL & FAA
=====================================
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the names of EUROCONTROL or FAA nor the names of their contributors may be used to endorse or promote products derived from this specification without specific prior written permission.
THIS SPECIFICATION IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
==========================================
Editorial note: this license is an instance of the BSD license template as
provided by the Open Source Initiative:
http://www.opensource.org/licenses/bsd-license.php
-->
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:aixm="http://www.aixm.aero/schema/5.1" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:gmd="http://www.isotc211.org/2005/gmd" targetNamespace="http://www.aixm.aero/schema/5.1" elementFormDefault="qualified" attributeFormDefault="unqualified" version="5.1">
<annotation>
<appinfo>
<gml:gmlProfileSchema>http://www.aixm.aero/schema/5.1/profile/gml4aixm.xsd</gml:gmlProfileSchema>
</appinfo>
</annotation>
<annotation>
<appinfo source="www.aixm.aero/schema/5.1">AIXM_AbstractGML_ObjectTypesFeatures.xsd</appinfo>
</annotation>
<!--====================================================================-->
<!--Schema Imports and Includes-->
<!--====================================================================-->
<!--==== IMPORT GML 3.2 ====-->
<import namespace="http://www.opengis.net/gml/3.2" schemaLocation="./ISO_19136_Schemas/gml.xsd"/>
<!--==== IMPORT ISO19139 METADATA SCHEMA ====-->
<import namespace="http://www.isotc211.org/2005/gmd" schemaLocation="./ISO_19139_Schemas/gmd/metadataEntity.xsd"/>
<!--====================================================================-->
<!--Base AIXM Feature/Object Constructs-->
<!--====================================================================-->
<complexType name="AbstractAIXMFeatureBaseType" abstract="true">
<annotation>
<documentation>This derives from gml:DynamicFeatureType, as all AIXM features are expected to have temporal properties modeled using the Timeslice model. While the GML specification does not mandate that dynamic features derive from gml:DynamicFeatureType, many GML-aware applications may only detect a dynamic feature by this type hierarchy. Note that all temporal properties of gml:DynamicFeatureType are removed during this restriction, because they will be added for each AIXM feature specifically, based on the TimeSlice model</documentation>
</annotation>
<complexContent>
<restriction base="gml:DynamicFeatureType">
<sequence>
<sequence>
<sequence>
<element ref="gml:description" minOccurs="0"/>
<element ref="gml:identifier" minOccurs="0"/>
<element ref="gml:name" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</sequence>
<sequence>
<element ref="gml:boundedBy" minOccurs="0"/>
</sequence>
</sequence>
<attribute ref="gml:id" use="required"/>
</restriction>
</complexContent>
</complexType>
<complexType name="AbstractAIXMFeatureType" abstract="true">
<annotation>
<documentation>Adds the FeatureMetadata, which is common to all AIXM features</documentation>
</annotation>
<complexContent>
<extension base="aixm:AbstractAIXMFeatureBaseType">
<sequence>
<element name="featureMetadata" type="aixm:FeatureMetadataPropertyType" minOccurs="0"/>
</sequence>
</extension>
</complexContent>
</complexType>
<element name="AbstractAIXMFeature" type="aixm:AbstractAIXMFeatureType" abstract="true" substitutionGroup="gml:AbstractFeature">
<annotation>
<documentation>Substitution head for AIXM features.</documentation>
</annotation>
</element>
<complexType name="AbstractAIXMObjectType" abstract="true">
<annotation>
<documentation>Base type for AIXM complex types that are NOT features. For example, City, ContactInformation, AirspaceVolume, etc. It derives from AbstractGMLType so that AIXM objects are recognised as GML objects, thus ensuring that GML-aware applications recognise them properly. Retains only the mandatory gml:id attribute.</documentation>
</annotation>
<complexContent>
<restriction base="gml:AbstractGMLType">
<sequence>
<sequence/>
</sequence>
<attribute ref="gml:id" use="required"/>
</restriction>
</complexContent>
</complexType>
<element name="AbstractAIXMObject" type="aixm:AbstractAIXMObjectType" abstract="true" substitutionGroup="gml:AbstractGML">
<annotation>
<documentation>Substitution head for AIXM objects.</documentation>
</annotation>
</element>
<complexType name="AbstractAIXMPropertyType" abstract="true">
<annotation>
<documentation>It provides a basis for deriving AIXM feature/object properties. It defines the nilReason attribute and currently, it is only used for properties that are derived from association with an AIM object.</documentation>
</annotation>
<attribute name="nilReason" type="gml:NilReasonEnumeration"/>
</complexType>
<!--====================================================================-->
<!--AIXM TimeSlice-->
<!--====================================================================-->
<complexType name="AbstractAIXMTimeSliceBaseType" abstract="true">
<annotation>
<documentation>Base type of AIXM Timeslices. Removes option attributes that are not used in AIXM.</documentation>
</annotation>
<complexContent>
<restriction base="gml:AbstractTimeSliceType">
<sequence>
<sequence/>
<sequence>
<annotation>
<documentation>The efffectivity of the TimeSlice.</documentation>
</annotation>
<element ref="gml:validTime"/>
</sequence>
</sequence>
<attribute ref="gml:id" use="required"/>
</restriction>
</complexContent>
</complexType>
<complexType name="AbstractAIXMTimeSliceType" abstract="true">
<annotation>
<documentation>Adds in the AIXM specific properties, such as 'interpretation'.</documentation>
</annotation>
<complexContent>
<extension base="aixm:AbstractAIXMTimeSliceBaseType">
<sequence>
<element ref="aixm:interpretation"/>
<element ref="aixm:sequenceNumber" minOccurs="0"/>
<element ref="aixm:correctionNumber" minOccurs="0"/>
<element name="timeSliceMetadata" type="aixm:FeatureTimeSliceMetadataPropertyType" minOccurs="0"/>
<element ref="aixm:featureLifetime" minOccurs="0"/>
</sequence>
</extension>
</complexContent>
</complexType>
<!--====================================================================-->
<!--Feature collections-->
<!--====================================================================-->
<complexType name="AbstractAIXMMessageBaseType" abstract="true">
<complexContent>
<extension base="aixm:AbstractAIXMFeatureBaseType">
<sequence>
<element ref="aixm:sequenceNumber" minOccurs="0"/>
<element name="messageMetadata" type="aixm:MessageMetadataPropertyType" minOccurs="0"/>
</sequence>
</extension>
</complexContent>
</complexType>
<complexType name="AbstractAIXMMessageType" abstract="true">
<complexContent>
<extension base="aixm:AbstractAIXMMessageBaseType">
<attributeGroup ref="gml:AggregationAttributeGroup"/>
</extension>
</complexContent>
</complexType>
<!--====================================================================-->
<!--Feature/Object Extensions-->
<!--====================================================================-->
<element name="AbstractExtension" type="aixm:AbstractExtensionType" abstract="true"/>
<complexType name="AbstractExtensionType" abstract="true">
<complexContent>
<extension base="aixm:AbstractAIXMObjectType"/>
</complexContent>
</complexType>
<!--====================================================================-->
<!--Feature and TimeSlice Properties-->
<!--====================================================================-->
<element name="interpretation">
<annotation>
<documentation>Property indicating how the timeslice is to be interpreted. See the AIXM Temporality model for details.</documentation>
</annotation>
<simpleType>
<restriction base="string">
<enumeration value="BASELINE"/>
<enumeration value="SNAPSHOT"/>
<enumeration value="TEMPDELTA"/>
<enumeration value="PERMDELTA"/>
</restriction>
</simpleType>
</element>
<element name="sequenceNumber">
<annotation>
<documentation>Used for the identification of the Time Slice concerned. See the AIXM Temporality model for details.</documentation>
</annotation>
<simpleType>
<restriction base="unsignedInt"/>
</simpleType>
</element>
<element name="correctionNumber">
<annotation>
<documentation>Used for indicating the order of the corrections of a Time Slice. See the AIXM Temporality model for details.</documentation>
</annotation>
<simpleType>
<restriction base="unsignedInt"/>
</simpleType>
</element>
<element name="featureLifetime" type="gml:TimePrimitivePropertyType">
<annotation>
<documentation>The start and end of life of the feature. See the AIXM Temporality model for details.</documentation>
</annotation>
</element>
<!--====================================================================-->
<!--Base AIXM Metadata Property Types-->
<!--====================================================================-->
<complexType name="FeatureMetadataPropertyType">
<complexContent>
<extension base="gml:AbstractMetadataPropertyType">
<sequence minOccurs="0">
<element ref="gmd:MD_Metadata"/>
</sequence>
</extension>
</complexContent>
</complexType>
<complexType name="FeatureTimeSliceMetadataPropertyType">
<complexContent>
<extension base="gml:AbstractMetadataPropertyType">
<sequence minOccurs="0">
<element ref="gmd:MD_Metadata"/>
</sequence>
</extension>
</complexContent>
</complexType>
<complexType name="MessageMetadataPropertyType">
<complexContent>
<extension base="gml:AbstractMetadataPropertyType">
<sequence minOccurs="0">
<element ref="gmd:MD_Metadata"/>
</sequence>
</extension>
</complexContent>
</complexType>
</schema>
Loading

0 comments on commit a0630c2

Please sign in to comment.