<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:gml="http://www.opengis.net/gml" xmlns:topp="http://www.openplans.org/topp" xmlns:ais="http://www.emsa.europa.eu/ais" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.emsa.europa.eu/ais" elementFormDefault="qualified">
	<!-- ====================================================================== -->
	<!-- GML IMPORT -->
	<xsd:import namespace="http://www.opengis.net/gml" schemaLocation="http://schemas.opengis.net/gml/3.1.1/base/feature.xsd"/>
	<xsd:import namespace="http://www.opengis.net/gml" schemaLocation="http://schemas.opengis.net/gml/3.1.1/base//geometryAggregates.xsd"/>
	<!-- ================================================================== -->
	<!-- globally defined ais: elements (direct from gml or xsd namespace types) -->
	<xsd:element name="time" type="xsd:dateTime">
		<xsd:annotation>
			<xsd:documentation>Allways in UTC timeframe (YYYY-MM-DDThh:mm:ss)</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="MMSI" type="xsd:string">
		<xsd:annotation>
			<xsd:documentation>Vessel Identification according to the IMO AIS standards</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="expectedTimeOfArrival" type="xsd:dateTime">
		<xsd:annotation>
			<xsd:documentation>Allways in UTC timeframe (YYYY-MM-DDThh:mm:ss)</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="length" type="xsd:decimal">
		<xsd:annotation>
			<xsd:documentation>In meters</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="beam" type="xsd:decimal">
		<xsd:annotation>
			<xsd:documentation>In meters</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="draught" type="xsd:decimal">
		<xsd:annotation>
			<xsd:documentation>In meters</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="courseOverGround" type="xsd:decimal">
		<xsd:annotation>
			<xsd:documentation>In decimal deegrees of angle</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="heading" type="xsd:decimal">
		<xsd:annotation>
			<xsd:documentation>In decimal deegrees of angle</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="bearing" type="xsd:decimal">
		<xsd:annotation>
			<xsd:documentation>In decimal deegrees of angle</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="speedOverGround" type="xsd:decimal">
		<xsd:annotation>
			<xsd:documentation>In knots</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="rateOfTurn" type="xsd:decimal">
		<xsd:annotation>
			<xsd:documentation>Units as defined for IMO AIS ?</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="navigationalStatus" type="xsd:string">
		<xsd:annotation>
			<xsd:documentation>Free text</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:element name="dataSource" type="xsd:string">
		<xsd:annotation>
			<xsd:documentation>Organizational source of data for the object of which this element is a member, used at several levels and may represent a data service provider, a data management sys., an AIS transmission sys., etc.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<!-- ================================================================== -->
	<!-- ais: moving object status element - based on a gml Point -->
	<xsd:element name="objectStatus" type="ais:ObjectStatusType" substitutionGroup="gml:pointProperty">
		<xsd:annotation>
			<xsd:documentation>Inherits the pointMemberType of gml.  This 'time slice' type encapsulates the various dynamic properties of AIS objects at a given point in time and space</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:complexType name="ObjectStatusType">
		<xsd:complexContent>
			<xsd:extension base="gml:PointPropertyType">
				<xsd:sequence>
					<xsd:element ref="ais:time">
						<xsd:annotation>
							<xsd:documentation>Time represents here the AIS message time stamp (mandatory)</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element ref="ais:speedOverGround" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>SOG as defined for AIS messages (optional)</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element ref="ais:courseOverGround" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>COG as defined for AIS messages (optional)</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element ref="ais:heading" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>Heading as defined for AIS messages (optional)</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element ref="ais:bearing" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>Bearing, not currently defined for AIS messages (optional)</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element ref="ais:rateOfTurn" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>Rate Of Turn as defined for AIS messages (optional)</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element ref="ais:navigationalStatus" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>Status free text as defined for AIS messages (optional)</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="safetyMessage" type="xsd:string" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>optional</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element ref="ais:dataSource" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>dataSource (optional) represents here the infrastructure supplying the AIS message</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<!-- ================================================================== -->
	<!-- the AIS Track type - parallel to gml: multi point -->
	<xsd:element name="track" type="ais:TrackType" substitutionGroup="gml:_GeometricAggregate">
		<xsd:annotation>
			<xsd:documentation>The track of an object is a sequence of specialized timeslices (i.e. ObjectStatus) that indicate the dynamic status of the object.  Inherits srsName attribute of abstract geometry type for defining SRS for this entire track, i.e. all geometry elements within this track are interpreted under the given SRS, unless differently specified at a lower level for each geometric element.</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:complexType name="TrackType">
		<xsd:complexContent>
			<xsd:extension base="gml:AbstractGeometricAggregateType">
				<xsd:sequence>
					<xsd:element ref="ais:objectStatus" minOccurs="0" maxOccurs="unbounded"/>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<!-- ================================================================== -->
	<!-- the AIS Track Property type - every feature should have a geometry property -->
	<xsd:element name="trackProperty" type="ais:TrackPropertyType">
		<xsd:annotation>
			<xsd:documentation>This is applied as the geometry property of a feature, so that general GML tools can interpret that each feature is associated with a given geometry - NB! it contains no attribute group refering to gml:AssociationAttributeGroup</xsd:documentation>
		</xsd:annotation>
	</xsd:element>
	<xsd:complexType name="TrackPropertyType">
		<xsd:sequence minOccurs="0">
			<xsd:element ref="ais:track"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="FeatureType">
		<xsd:complexContent>
			<xsd:extension base="gml:AbstractFeatureType">
				<xsd:sequence>
					<!-- mandatory static AIS properties -->
					<xsd:element ref="ais:MMSI">
						<xsd:annotation>
							<xsd:documentation>mandatory</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="callsign" type="xsd:string">
						<xsd:annotation>
							<xsd:documentation>mandatory</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="name" type="xsd:string">
						<xsd:annotation>
							<xsd:documentation>mandatory</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<!-- optional static AIS properties -->
					<xsd:element name="IMONumber" type="xsd:string" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>optional</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element ref="ais:length" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>optional</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element ref="ais:beam" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>optional</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="vesselType" type="xsd:string" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>optional</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="antennaLocation" type="xsd:string" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>optional</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<!-- optional voyage related AIS properties-->
					<xsd:element ref="ais:draught" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>optional</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="hazardousCargo" type="xsd:string" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>optional</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="destination" type="xsd:string" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>optional</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element ref="ais:expectedTimeOfArrival" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>optional</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element name="extraInfo" type="xsd:string" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>optional</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<!-- optional dynamic AIS properties - i.e. the track info -->
					<xsd:element ref="ais:trackProperty" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>optional</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<!-- optional origin of feature properties -->
					<xsd:element ref="ais:time" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>Time (optional) represents here the time of creation of this feature as a "snapshot" of history, which implies the latest possible time of an AISObjectStatus within the feature.	Should be identical to - and omitted here - given the enclosing feature collection's time</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
					<xsd:element ref="ais:dataSource" minOccurs="0">
						<xsd:annotation>
							<xsd:documentation>dataSource (optional)  represents here the generating organizational source for this feature, e.g. coastal traffic authorities collecting AIS messages from a fleet. Should be identical to - and omitted here - given the enclosing feature collection's dataSource</xsd:documentation>
						</xsd:annotation>
					</xsd:element>
				</xsd:sequence>
			</xsd:extension>
		</xsd:complexContent>
	</xsd:complexType>
	<xsd:element name="feature" type="ais:FeatureType" substitutionGroup="gml:_Feature"/>
</xsd:schema>
