diff --git a/deegree-core/deegree-core-base/src/main/java/org/deegree/feature/types/AppSchemaGeometryHierarchy.java b/deegree-core/deegree-core-base/src/main/java/org/deegree/feature/types/AppSchemaGeometryHierarchy.java
index 46a76e64d4..970c658e5f 100644
--- a/deegree-core/deegree-core-base/src/main/java/org/deegree/feature/types/AppSchemaGeometryHierarchy.java
+++ b/deegree-core/deegree-core-base/src/main/java/org/deegree/feature/types/AppSchemaGeometryHierarchy.java
@@ -36,6 +36,7 @@
package org.deegree.feature.types;
import static org.deegree.gml.GMLVersion.GML_32;
+import static org.deegree.gml.GMLVersion.GML_322;
import java.util.HashSet;
import java.util.Set;
@@ -119,7 +120,7 @@ public class AppSchemaGeometryHierarchy {
}
private QName getAbstractElementName( String localPart, GMLVersion version ) {
- if ( version == GML_32 ) {
+ if ( version == GML_32 || version == GML_322 ) {
return new QName( version.getNamespace(), "Abstract" + localPart );
}
return new QName( version.getNamespace(), "_" + localPart );
diff --git a/deegree-core/deegree-core-base/src/main/java/org/deegree/filter/function/ParameterType.java b/deegree-core/deegree-core-base/src/main/java/org/deegree/filter/function/ParameterType.java
index 698a0d9439..15eddd6a71 100644
--- a/deegree-core/deegree-core-base/src/main/java/org/deegree/filter/function/ParameterType.java
+++ b/deegree-core/deegree-core-base/src/main/java/org/deegree/filter/function/ParameterType.java
@@ -42,6 +42,7 @@
import static org.deegree.gml.GMLVersion.GML_30;
import static org.deegree.gml.GMLVersion.GML_31;
import static org.deegree.gml.GMLVersion.GML_32;
+import static org.deegree.gml.GMLVersion.GML_322;
import java.util.HashMap;
import java.util.Map;
@@ -64,11 +65,13 @@ public class ParameterType {
public static final ParameterType GEOMETRY = new ParameterType( new QName( GMLNS, "_Geometry", "gml" ),
new QName( GMLNS, "_Geometry", "gml" ),
new QName( GMLNS, "_Geometry", "gml" ),
+ new QName( GML3_2_NS, "AbstractGeometry", "gml32" ),
new QName( GML3_2_NS, "AbstractGeometry", "gml32" ) );
public static final ParameterType POINT = new ParameterType( new QName( GMLNS, "Point", "gml" ),
new QName( GMLNS, "Point", "gml" ),
new QName( GMLNS, "Point", "gml" ),
+ new QName( GML3_2_NS, "Point", "gml32" ),
new QName( GML3_2_NS, "Point", "gml32" ) );
public static final ParameterType STRING = new ParameterType( new QName( XSNS, "string", "xsd" ) );
@@ -88,13 +91,15 @@ public ParameterType( QName name ) {
versionToName.put( GML_30, name );
versionToName.put( GML_31, name );
versionToName.put( GML_32, name );
+ versionToName.put( GML_322, name );
}
- public ParameterType( QName gml2Name, QName gml30Name, QName gml31Name, QName gml32Name ) {
+ public ParameterType( QName gml2Name, QName gml30Name, QName gml31Name, QName gml32Name, QName gml322Name ) {
versionToName.put( GML_2, gml2Name );
versionToName.put( GML_30, gml30Name );
versionToName.put( GML_31, gml31Name );
versionToName.put( GML_32, gml32Name );
+ versionToName.put( GML_322, gml322Name );
}
/**
diff --git a/deegree-core/deegree-core-base/src/main/java/org/deegree/gml/GMLStreamReader.java b/deegree-core/deegree-core-base/src/main/java/org/deegree/gml/GMLStreamReader.java
index 2fd0dee1f8..cd95a7d831 100644
--- a/deegree-core/deegree-core-base/src/main/java/org/deegree/gml/GMLStreamReader.java
+++ b/deegree-core/deegree-core-base/src/main/java/org/deegree/gml/GMLStreamReader.java
@@ -470,7 +470,8 @@ public GMLGeometryReader getGeometryReader() {
}
case GML_30:
case GML_31:
- case GML_32: {
+ case GML_32:
+ case GML_322: {
geometryReader = new GML3GeometryReader( this );
break;
}
diff --git a/deegree-core/deegree-core-base/src/main/java/org/deegree/gml/GMLStreamWriter.java b/deegree-core/deegree-core-base/src/main/java/org/deegree/gml/GMLStreamWriter.java
index b5eb32c486..1ae4f07130 100644
--- a/deegree-core/deegree-core-base/src/main/java/org/deegree/gml/GMLStreamWriter.java
+++ b/deegree-core/deegree-core-base/src/main/java/org/deegree/gml/GMLStreamWriter.java
@@ -44,6 +44,7 @@
import static org.deegree.feature.property.ExtraProps.EXTRA_PROP_NS_GEOMETRY;
import static org.deegree.feature.property.ExtraProps.EXTRA_PROP_NS_STRING;
import static org.deegree.gml.GMLVersion.GML_32;
+import static org.deegree.gml.GMLVersion.GML_322;
import java.util.HashMap;
import java.util.List;
@@ -134,7 +135,7 @@ public class GMLStreamWriter {
this.xmlStream = xmlStream;
referenceExportStrategy = new DefaultGmlXlinkStrategy( "#{}", new GmlXlinkOptions() );
prefixToNs.put( "ogc", OGCNS );
- prefixToNs.put( "gml", version != GML_32 ? GMLNS : GML3_2_NS );
+ prefixToNs.put( "gml", !isVersionOfGML32( version ) ? GMLNS : GML3_2_NS );
prefixToNs.put( "xlink", XLNNS );
prefixToNs.put( "xsi", XSINS );
prefixToNs.put( "dxtra", EXTRA_PROP_NS );
@@ -142,6 +143,21 @@ public class GMLStreamWriter {
prefixToNs.put( "dxtra-geometry", EXTRA_PROP_NS_GEOMETRY );
}
+ /**
+ * Returns if a version is of GML 3.2.
+ *
+ * @param version
+ * GML version of the output, must not be null
+ *
+ * @return true
, if version is 3.2.1 or 3.2.2, false
otherwise
+ */
+ private boolean isVersionOfGML32( GMLVersion version ) {
+ if ( version == GML_32 || version == GML_322 ){
+ return true;
+ }
+ return false;
+ }
+
/**
* Returns the GML version of the generated output.
*
@@ -413,7 +429,8 @@ public GMLGeometryWriter getGeometryWriter() {
}
case GML_30:
case GML_31:
- case GML_32: {
+ case GML_32:
+ case GML_322: {
geometryWriter = new GML3GeometryWriter( this );
break;
}
diff --git a/deegree-core/deegree-core-base/src/main/java/org/deegree/gml/GMLVersion.java b/deegree-core/deegree-core-base/src/main/java/org/deegree/gml/GMLVersion.java
index 03c8f998aa..4efd15e78a 100644
--- a/deegree-core/deegree-core-base/src/main/java/org/deegree/gml/GMLVersion.java
+++ b/deegree-core/deegree-core-base/src/main/java/org/deegree/gml/GMLVersion.java
@@ -58,8 +58,10 @@ public enum GMLVersion {
GML_30( GMLNS, "3.0", "3.0.1" ),
/** GML 3.1 versions (either 3.1.0 or 3.1.1) */
GML_31( GMLNS, "3.1", "3.1.1" ),
- /** GML 3.2 versions (3.2.1) */
- GML_32( GML3_2_NS, "3.2", "3.2.1" );
+ /** GML 3.2.1 versions (3.2.1) */
+ GML_32( GML3_2_NS, "3.2", "3.2.1" ),
+ /** GML 3.2.2 versions (3.2.2) */
+ GML_322( GML3_2_NS, "3.2", "3.2.2" );
private final String ns;
@@ -141,6 +143,8 @@ public static GMLVersion fromMimeType( String mimeType, GMLVersion defaultVersio
result = GML_31;
} else if ( v.compareTo( new Version( 3, 2, 1 ) ) <= 0 ) {
result = GML_32;
+ } else if ( v.compareTo( new Version( 3, 2, 2 ) ) <= 0 ) {
+ result = GML_322;
}
}
}
diff --git a/deegree-core/deegree-core-base/src/main/java/org/deegree/gml/commons/AbstractGMLObjectReader.java b/deegree-core/deegree-core-base/src/main/java/org/deegree/gml/commons/AbstractGMLObjectReader.java
index 153e42a27f..6d32cbf439 100644
--- a/deegree-core/deegree-core-base/src/main/java/org/deegree/gml/commons/AbstractGMLObjectReader.java
+++ b/deegree-core/deegree-core-base/src/main/java/org/deegree/gml/commons/AbstractGMLObjectReader.java
@@ -51,9 +51,7 @@
import static org.deegree.commons.xml.stax.XMLStreamUtils.nextElement;
import static org.deegree.commons.xml.stax.XMLStreamUtils.require;
import static org.deegree.commons.xml.stax.XMLStreamUtils.skipElement;
-import static org.deegree.gml.GMLVersion.GML_2;
-import static org.deegree.gml.GMLVersion.GML_30;
-import static org.deegree.gml.GMLVersion.GML_31;
+import static org.deegree.gml.GMLVersion.GML_32;
import java.util.ArrayList;
import java.util.Collections;
@@ -204,7 +202,7 @@ private boolean isGmlIdRequired() {
if ( gmlStreamReader.getLaxMode() ) {
return false;
}
- return version != GML_2 && version != GML_30 || version != GML_31;
+ return version == GML_32;
}
private void checkValidNcName( final String gmlId ) {
diff --git a/deegree-core/deegree-core-base/src/main/java/org/deegree/gml/geometry/GML3GeometryWriter.java b/deegree-core/deegree-core-base/src/main/java/org/deegree/gml/geometry/GML3GeometryWriter.java
index b3943467c2..3f72579dbf 100644
--- a/deegree-core/deegree-core-base/src/main/java/org/deegree/gml/geometry/GML3GeometryWriter.java
+++ b/deegree-core/deegree-core-base/src/main/java/org/deegree/gml/geometry/GML3GeometryWriter.java
@@ -41,6 +41,7 @@
import static org.deegree.geometry.Geometry.GeometryType.ENVELOPE;
import static org.deegree.gml.GMLVersion.GML_30;
import static org.deegree.gml.GMLVersion.GML_32;
+import static org.deegree.gml.GMLVersion.GML_322;
import java.util.List;
import java.util.UUID;
@@ -119,6 +120,7 @@
import org.deegree.geometry.refs.GeometryReference;
import org.deegree.geometry.standard.curvesegments.AffinePlacement;
import org.deegree.gml.GMLStreamWriter;
+import org.deegree.gml.GMLVersion;
import org.deegree.gml.commons.AbstractGMLObjectWriter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -261,7 +263,7 @@ public void exportMultiGeometry( MultiGeometry extends Geometry> geometry )
break;
}
case MULTI_LINE_STRING: {
- if ( version == GML_32 ) {
+ if ( isGML32version( version ) ) {
// GML 3.2 does not define MultiLineString anymore -> export as MultiCurve
MultiCurve
XMLStreamWriter
for writing an XML response document.
- *
+ *
* @param writer
* writer to write the XML to, must not be null
* @param mimeType
@@ -1363,7 +1368,7 @@ private XMLExceptionSerializer getDefaultExceptionSerializer() {
/**
* Determines the requested output/input format.
- *
+ *
* @param requestVersion
* version of the WFS request, must not be null
* @param format
@@ -1459,7 +1464,7 @@ public ReferencePatternMatcher getReferencePatternMatcher() {
* {@link OWSException#VERSION_NEGOTIATION_FAILED} -- the latter should only be used for failed GetCapabilities
* requests.
*
- *
+ *
* @param requestedVersion
* version to be checked, may be null (causes exception)
* @return requestedVersion
(if it is not null), or highest version supported
diff --git a/deegree-services/deegree-services-wfs/src/main/java/org/deegree/services/wfs/format/gml/request/AbstractGmlRequestHandler.java b/deegree-services/deegree-services-wfs/src/main/java/org/deegree/services/wfs/format/gml/request/AbstractGmlRequestHandler.java
index dc7857ed49..587ece1a7f 100644
--- a/deegree-services/deegree-services-wfs/src/main/java/org/deegree/services/wfs/format/gml/request/AbstractGmlRequestHandler.java
+++ b/deegree-services/deegree-services-wfs/src/main/java/org/deegree/services/wfs/format/gml/request/AbstractGmlRequestHandler.java
@@ -42,6 +42,7 @@
import static org.deegree.gml.GMLVersion.GML_2;
import static org.deegree.gml.GMLVersion.GML_31;
import static org.deegree.gml.GMLVersion.GML_32;
+import static org.deegree.gml.GMLVersion.GML_322;
import static org.deegree.protocol.wfs.WFSConstants.GML32_NS;
import static org.deegree.protocol.wfs.WFSConstants.GML32_SCHEMA_URL;
import static org.deegree.protocol.wfs.WFSConstants.QUERY_ID_GET_FEATURE_BY_ID;
@@ -356,7 +357,7 @@ protected QName determineFeatureMemberElement( Version version ) {
memberElementName = new QName( options.getResponseFeatureMemberEl().getNamespaceURI(),
options.getResponseFeatureMemberEl().getLocalPart(),
options.getResponseFeatureMemberEl().getPrefix() );
- } else if ( gmlVersion == GML_32 ) {
+ } else if ( gmlVersion == GML_32 || gmlVersion == GML_322 ) {
// WFS 1.0.0 / 1.1.0 without custom configured member element, GML 3.2 -> wfs:featureMember
memberElementName = new QName( WFS_NS, "member", "wfs" );
} else {
@@ -454,7 +455,7 @@ protected String getSchemaLocation( Version version, GMLVersion gmlVersion, QNam
try {
if ( VERSION_100.equals( version ) && gmlVersion == GML_2 ) {
baseUrl.append( "XMLSCHEMA" );
- } else if ( VERSION_200.equals( version ) && gmlVersion == GML_32 ) {
+ } else if ( VERSION_200.equals( version ) && ( gmlVersion == GML_32 || gmlVersion == GML_322 ) ) {
baseUrl.append( URLEncoder.encode( gmlVersion.getMimeType(), "UTF-8" ) );
} else {
baseUrl.append( URLEncoder.encode( gmlVersion.getMimeTypeOldStyle(), "UTF-8" ) );
diff --git a/deegree-services/deegree-services-wfs/src/main/java/org/deegree/services/wfs/format/gml/request/GmlDescribeFeatureTypeHandler.java b/deegree-services/deegree-services-wfs/src/main/java/org/deegree/services/wfs/format/gml/request/GmlDescribeFeatureTypeHandler.java
index f202402ea5..4efee228ed 100644
--- a/deegree-services/deegree-services-wfs/src/main/java/org/deegree/services/wfs/format/gml/request/GmlDescribeFeatureTypeHandler.java
+++ b/deegree-services/deegree-services-wfs/src/main/java/org/deegree/services/wfs/format/gml/request/GmlDescribeFeatureTypeHandler.java
@@ -42,6 +42,7 @@
import static org.deegree.commons.xml.CommonNamespaces.XSNS;
import static org.deegree.commons.xml.CommonNamespaces.XS_PREFIX;
import static org.deegree.gml.GMLVersion.GML_32;
+import static org.deegree.gml.GMLVersion.GML_322;
import static org.deegree.gml.schema.GMLAppSchemaWriter.GML_2_DEFAULT_INCLUDE;
import static org.deegree.gml.schema.GMLAppSchemaWriter.GML_30_DEFAULT_INCLUDE;
import static org.deegree.gml.schema.GMLAppSchemaWriter.GML_31_DEFAULT_INCLUDE;
@@ -396,6 +397,7 @@ private void writeWFSSchema( XMLStreamWriter writer, Version version, GMLVersion
writer.writeAttribute( "schemaLocation", GML_31_DEFAULT_INCLUDE );
break;
case GML_32:
+ case GML_322:
// there is no abstract FeatureCollection element in GML 3.2 anymore
parentElement = GML_PREFIX + ":AbstractFeature";
parentType = GML_PREFIX + ":AbstractFeatureType";
@@ -417,7 +419,7 @@ private void writeWFSSchema( XMLStreamWriter writer, Version version, GMLVersion
writer.writeStartElement( XSNS, "extension" );
writer.writeAttribute( "base", parentType );
- if ( GML_32 == gmlVersion ) {
+ if ( GML_32 == gmlVersion || GML_322 == gmlVersion ) {
// in GML 3.2, FeatureCollections are Features with properties that derive
// gml:AbstractFeatureMemberType
writer.writeStartElement( XSNS, "sequence" );
@@ -450,7 +452,7 @@ private void writeWFSSchema( XMLStreamWriter writer, Version version, GMLVersion
writer.writeEndElement();
writer.writeEndElement();
- if ( GML_32 == gmlVersion ) {
+ if ( GML_32 == gmlVersion || GML_322 == gmlVersion ) {
// write wfs:FeaturePropertyType declaration
writer.writeStartElement( XSNS, "complexType" );
writer.writeAttribute( "name", "FeaturePropertyType" );
diff --git a/deegree-services/deegree-services-wfs/src/main/java/org/deegree/services/wfs/format/gml/request/GmlGetFeatureHandler.java b/deegree-services/deegree-services-wfs/src/main/java/org/deegree/services/wfs/format/gml/request/GmlGetFeatureHandler.java
index 122154abac..efd2310557 100644
--- a/deegree-services/deegree-services-wfs/src/main/java/org/deegree/services/wfs/format/gml/request/GmlGetFeatureHandler.java
+++ b/deegree-services/deegree-services-wfs/src/main/java/org/deegree/services/wfs/format/gml/request/GmlGetFeatureHandler.java
@@ -46,6 +46,7 @@
import static org.deegree.gml.GMLOutputFactory.createGMLStreamWriter;
import static org.deegree.gml.GMLVersion.GML_2;
import static org.deegree.gml.GMLVersion.GML_32;
+import static org.deegree.gml.GMLVersion.GML_322;
import static org.deegree.protocol.wfs.WFSConstants.VERSION_100;
import static org.deegree.protocol.wfs.WFSConstants.VERSION_110;
import static org.deegree.protocol.wfs.WFSConstants.VERSION_200;
@@ -248,7 +249,7 @@ public void doGetFeatureResults( GetFeature request, HttpResponseBuffer response
// ensure that namespace for gml (e.g. geometry elements) is bound
writeNamespaceIfNotBound( xmlStream, "gml", gmlVersion.getNamespace() );
- if ( GML_32 == gmlVersion && !request.getVersion().equals( VERSION_200 ) ) {
+ if ( ( GML_32 == gmlVersion || GML_322 == gmlVersion ) && !request.getVersion().equals( VERSION_200 ) ) {
xmlStream.writeAttribute( "gml", GML3_2_NS, "id", "WFS_RESPONSE" );
}
}
@@ -640,7 +641,8 @@ private void writeBoundedBy( Version wfsVersion, GMLStreamWriter gmlStream, GMLV
xmlStream.writeEndElement();
break;
}
- case GML_32: {
+ case GML_32:
+ case GML_322: {
if ( wfsVersion.equals( VERSION_200 ) ) {
xmlStream.writeStartElement( "wfs", "boundedBy", GML3_2_NS );
if ( env == null ) {
diff --git a/deegree-services/deegree-services-wfs/src/main/java/org/deegree/services/wfs/format/gml/request/GmlGetGmlObjectHandler.java b/deegree-services/deegree-services-wfs/src/main/java/org/deegree/services/wfs/format/gml/request/GmlGetGmlObjectHandler.java
index 4fd7849cfb..795457010f 100644
--- a/deegree-services/deegree-services-wfs/src/main/java/org/deegree/services/wfs/format/gml/request/GmlGetGmlObjectHandler.java
+++ b/deegree-services/deegree-services-wfs/src/main/java/org/deegree/services/wfs/format/gml/request/GmlGetGmlObjectHandler.java
@@ -142,6 +142,7 @@ public void doGetGmlObject( GetGmlObject request, HttpResponseBuffer response )
schemaLocation = GMLNS + " http://schemas.opengis.net/gml/3.1.1/base/geometryComplexes.xsd";
break;
case GML_32:
+ case GML_322:
schemaLocation = GML3_2_NS + " http://schemas.opengis.net/gml/3.2.1/geometryComplexes.xsd";
break;
}