From 3d356cc9ef7b1055242256c00a2e6b93b5462880 Mon Sep 17 00:00:00 2001 From: Dimitar Misev Date: Sat, 5 Feb 2011 22:44:35 +0100 Subject: WCS 2.0 implementation in Petascope --- .../schemas/Examples/requestDescribeCoverage.xml | 8 - .../schemas/Examples/requestGetCapabilities.xml | 10 - .../wcs2/schemas/Examples/requestGetCoverage.xml | 18 - .../schemas/Examples/responseDescribeCoverage.xml | 37 -- .../schemas/Examples/responseGetCapabilities.xml | 60 --- .../wcs2/schemas/Examples/responseGetCoverage.xml | 40 -- .../wcs2/schemas/Examples/wcsDescribeCoverage.xml | 57 --- .../wcs2/schemas/Examples/wcsGetCapabilities.xml | 125 ----- .../wcs2/schemas/Examples/wcsGetCoverage.xml | 57 --- .../src/petascope/wcs2/schemas/SchemaServlet.java | 97 ---- .../schemas/gml/Examples/2dIdentityConversion.xml | 16 - .../wcs2/schemas/gml/Examples/2dIdentityMethod.xml | 22 - .../schemas/gml/Examples/exampleRangeStructure.xml | 35 -- .../gml/Examples/exampleRectifiedGridCoverage.xml | 56 --- .../Examples/exampleReferenceablGridCoverage.xml | 60 --- .../src/petascope/wcs2/schemas/gml/gmlwcsAll.xsd | 21 - .../src/petascope/wcs2/schemas/gml/wcsCoverage.xsd | 160 ------- .../wcs2/schemas/gml/wcsDataTypeIdentifiers.xml | 111 ----- .../src/petascope/wcs2/schemas/gml/wcsGrids.xsd | 156 ------ petascope/src/petascope/wcs2/schemas/wcsAll.xsd | 21 - petascope/src/petascope/wcs2/schemas/wcsCommon.xsd | 87 ---- .../petascope/wcs2/schemas/wcsDescribeCoverage.xsd | 73 --- .../src/petascope/wcs2/schemas/wcsExtensions.xml | 125 ----- .../petascope/wcs2/schemas/wcsGetCapabilities.xsd | 56 --- .../src/petascope/wcs2/schemas/wcsGetCoverage.xsd | 88 ---- .../src/petascope/wcs2/server/Wcs2Server.java | 120 ----- .../wcs2/server/ops/DescribeCoverage.java | 204 -------- .../petascope/wcs2/server/ops/GetCapabilities.java | 85 ---- .../src/petascope/wcs2/server/ops/GetCoverage.java | 529 --------------------- .../petascope/wcs2/server/ops/WcsOperation.java | 36 -- .../server/templates/DescribeCoverageTemplate.xml | 38 -- .../server/templates/GetCapabilitiesTemplate.xml | 92 ---- .../wcs2/server/templates/GetCoverageTemplate.xml | 38 -- .../wcs2/server/templates/WcsNamespaceContext.java | 59 --- 34 files changed, 2797 deletions(-) delete mode 100644 petascope/src/petascope/wcs2/schemas/Examples/requestDescribeCoverage.xml delete mode 100644 petascope/src/petascope/wcs2/schemas/Examples/requestGetCapabilities.xml delete mode 100644 petascope/src/petascope/wcs2/schemas/Examples/requestGetCoverage.xml delete mode 100644 petascope/src/petascope/wcs2/schemas/Examples/responseDescribeCoverage.xml delete mode 100644 petascope/src/petascope/wcs2/schemas/Examples/responseGetCapabilities.xml delete mode 100644 petascope/src/petascope/wcs2/schemas/Examples/responseGetCoverage.xml delete mode 100644 petascope/src/petascope/wcs2/schemas/Examples/wcsDescribeCoverage.xml delete mode 100644 petascope/src/petascope/wcs2/schemas/Examples/wcsGetCapabilities.xml delete mode 100644 petascope/src/petascope/wcs2/schemas/Examples/wcsGetCoverage.xml delete mode 100644 petascope/src/petascope/wcs2/schemas/SchemaServlet.java delete mode 100644 petascope/src/petascope/wcs2/schemas/gml/Examples/2dIdentityConversion.xml delete mode 100644 petascope/src/petascope/wcs2/schemas/gml/Examples/2dIdentityMethod.xml delete mode 100644 petascope/src/petascope/wcs2/schemas/gml/Examples/exampleRangeStructure.xml delete mode 100644 petascope/src/petascope/wcs2/schemas/gml/Examples/exampleRectifiedGridCoverage.xml delete mode 100644 petascope/src/petascope/wcs2/schemas/gml/Examples/exampleReferenceablGridCoverage.xml delete mode 100644 petascope/src/petascope/wcs2/schemas/gml/gmlwcsAll.xsd delete mode 100644 petascope/src/petascope/wcs2/schemas/gml/wcsCoverage.xsd delete mode 100644 petascope/src/petascope/wcs2/schemas/gml/wcsDataTypeIdentifiers.xml delete mode 100644 petascope/src/petascope/wcs2/schemas/gml/wcsGrids.xsd delete mode 100644 petascope/src/petascope/wcs2/schemas/wcsAll.xsd delete mode 100644 petascope/src/petascope/wcs2/schemas/wcsCommon.xsd delete mode 100644 petascope/src/petascope/wcs2/schemas/wcsDescribeCoverage.xsd delete mode 100644 petascope/src/petascope/wcs2/schemas/wcsExtensions.xml delete mode 100644 petascope/src/petascope/wcs2/schemas/wcsGetCapabilities.xsd delete mode 100644 petascope/src/petascope/wcs2/schemas/wcsGetCoverage.xsd delete mode 100644 petascope/src/petascope/wcs2/server/Wcs2Server.java delete mode 100644 petascope/src/petascope/wcs2/server/ops/DescribeCoverage.java delete mode 100644 petascope/src/petascope/wcs2/server/ops/GetCapabilities.java delete mode 100644 petascope/src/petascope/wcs2/server/ops/GetCoverage.java delete mode 100644 petascope/src/petascope/wcs2/server/ops/WcsOperation.java delete mode 100644 petascope/src/petascope/wcs2/server/templates/DescribeCoverageTemplate.xml delete mode 100644 petascope/src/petascope/wcs2/server/templates/GetCapabilitiesTemplate.xml delete mode 100644 petascope/src/petascope/wcs2/server/templates/GetCoverageTemplate.xml delete mode 100644 petascope/src/petascope/wcs2/server/templates/WcsNamespaceContext.java (limited to 'petascope/src/petascope/wcs2') diff --git a/petascope/src/petascope/wcs2/schemas/Examples/requestDescribeCoverage.xml b/petascope/src/petascope/wcs2/schemas/Examples/requestDescribeCoverage.xml deleted file mode 100644 index c1224e7..0000000 --- a/petascope/src/petascope/wcs2/schemas/Examples/requestDescribeCoverage.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - diff --git a/petascope/src/petascope/wcs2/schemas/Examples/requestGetCapabilities.xml b/petascope/src/petascope/wcs2/schemas/Examples/requestGetCapabilities.xml deleted file mode 100644 index b7966cb..0000000 --- a/petascope/src/petascope/wcs2/schemas/Examples/requestGetCapabilities.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - 2.0.0 - - diff --git a/petascope/src/petascope/wcs2/schemas/Examples/requestGetCoverage.xml b/petascope/src/petascope/wcs2/schemas/Examples/requestGetCoverage.xml deleted file mode 100644 index 5195d36..0000000 --- a/petascope/src/petascope/wcs2/schemas/Examples/requestGetCoverage.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - x - 200 - 299 - - - y - 200 - 300 - - diff --git a/petascope/src/petascope/wcs2/schemas/Examples/responseDescribeCoverage.xml b/petascope/src/petascope/wcs2/schemas/Examples/responseDescribeCoverage.xml deleted file mode 100644 index 544e62f..0000000 --- a/petascope/src/petascope/wcs2/schemas/Examples/responseDescribeCoverage.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - 1 1 - 5 3 - - - xAxis yAxis - - - - - - - band1 - urn:ogc:def:dataType:OGC:1.1:unsignedByte - 000 255 - - - - - - - application/xml - - - diff --git a/petascope/src/petascope/wcs2/schemas/Examples/responseGetCapabilities.xml b/petascope/src/petascope/wcs2/schemas/Examples/responseGetCapabilities.xml deleted file mode 100644 index c5485e9..0000000 --- a/petascope/src/petascope/wcs2/schemas/Examples/responseGetCapabilities.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - petascope - WCS Server developed at jacobs University - OGC WCS - 2.0.0 - urn:ogc:def:extension:OGC-WCS:2.0:protocol:post - urn:ogc:def:extension:OGC-WCS:2.0:coverageFormat:netcdf - urn:ogc:def:extension:OGC-WCS:2.0:serviceModel:wcps:1.0 - urn:ogc:def:extension:OGC-WCS:2.0:serviceModel:wcst:1.0 - - - Jacobs University Bremen - - - Mr. X - Developer - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/petascope/src/petascope/wcs2/schemas/Examples/responseGetCoverage.xml b/petascope/src/petascope/wcs2/schemas/Examples/responseGetCoverage.xml deleted file mode 100644 index a4c6fd3..0000000 --- a/petascope/src/petascope/wcs2/schemas/Examples/responseGetCoverage.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - 1 1 - 5 3 - - - xAxis yAxis - - - - - - - 1 2 3 4 5 - 6 7 8 9 10 - 11 12 13 14 15 - - - - - - - - band1 - urn:ogc:def:dataType:OGC:1.1:unsignedByte - 000 255 - - - - - diff --git a/petascope/src/petascope/wcs2/schemas/Examples/wcsDescribeCoverage.xml b/petascope/src/petascope/wcs2/schemas/Examples/wcsDescribeCoverage.xml deleted file mode 100644 index 047caed..0000000 --- a/petascope/src/petascope/wcs2/schemas/Examples/wcsDescribeCoverage.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - 0 0 - 399 343 - - - - x y - - - - - - - - red - urn:ogc:def:dataType:OGC:1.1:unsigned int - - - - - - green - - urn:ogc:def:dataType:OGC:1.1:unsigned int - - - - - - blue - urn:ogc:def:dataType:OGC:1.1:unsigned int - - - - - - - - - - application/xml - - - - - diff --git a/petascope/src/petascope/wcs2/schemas/Examples/wcsGetCapabilities.xml b/petascope/src/petascope/wcs2/schemas/Examples/wcsGetCapabilities.xml deleted file mode 100644 index 3d33e03..0000000 --- a/petascope/src/petascope/wcs2/schemas/Examples/wcsGetCapabilities.xml +++ /dev/null @@ -1,125 +0,0 @@ - - - - WCS 2.0 Coverage Server @ Jacobs University - WCS 2.0 Server developed at jacobs University - OGC WCS - 2.0.0 - urn:ogc:def:extension:OGC-WCS:2.0:protocol:post - - urn:ogc:def:extension:OGC-WCS:2.0:serviceModel:wcps:1.0 - urn:ogc:def:extension:OGC-WCS:2.0:serviceModel:wcst:1.0 - - - Jacobs University Bremen - - - - Prof. Dr. Peter Baumann - - - Bremen - 28717 - Germany - p.baumann@jacobs-university.de - - - - Project Leader - - - - - - - - - - - - - text/xml - - - - - - XML - - - - - - - - - - - - - text/xml - - - - - - XML - - - - - - - - - - - - - text/xml - - - - - - XML - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/petascope/src/petascope/wcs2/schemas/Examples/wcsGetCoverage.xml b/petascope/src/petascope/wcs2/schemas/Examples/wcsGetCoverage.xml deleted file mode 100644 index 371a714..0000000 --- a/petascope/src/petascope/wcs2/schemas/Examples/wcsGetCoverage.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - 200 200 - 219 209 - - - - x y - - - - - - - - 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 204,0,88 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 204,0,88 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 204,0,88 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 204,0,88 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 204,0,88 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 204,0,88 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 204,0,88 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 204,0,88 242,27,103 204,0,88 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 204,0,88 204,0,88 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 204,0,88 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 204,0,88 204,0,88 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 204,0,88 204,0,88 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 204,0,88 204,0,88 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 204,0,88 204,0,88 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 204,0,88 204,0,88 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 204,0,88 204,0,88 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 204,0,88 242,27,103 204,0,88 204,0,88 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 204,0,88 204,0,88 204,0,88 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 204,0,88 242,27,103 204,0,88 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 204,0,88 204,0,88 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 204,0,88 204,0,88 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 242,27,103 204,0,88 204,0,88 242,27,103 242,27,103 242,27,10 - - - - - - - - red - - urn:ogc:def:dataType:OGC:1.1:unsigned int - 0 - - - - - green - urn:ogc:def:dataType:OGC:1.1:unsigned int - - 0 - - - - - blue - urn:ogc:def:dataType:OGC:1.1:unsigned int - 0 - - - - - - - diff --git a/petascope/src/petascope/wcs2/schemas/SchemaServlet.java b/petascope/src/petascope/wcs2/schemas/SchemaServlet.java deleted file mode 100644 index f2c874f..0000000 --- a/petascope/src/petascope/wcs2/schemas/SchemaServlet.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * This file is part of rasdaman community. - * - * Rasdaman community is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Rasdaman community is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with rasdaman community. If not, see . - * - * Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann / - rasdaman GmbH. - * - * For more information please see - * or contact Peter Baumann via . - */ -package petascope.wcs2.schemas; - -import java.io.File; -import java.io.FileReader; -import java.io.IOException; -import java.io.PrintWriter; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import org.apache.commons.io.IOUtils; - -/** Servlet that handles GET requests for the WCS 2.0 schema files. - * - * @author Andrei Aiordachioaie - */ -public class SchemaServlet extends HttpServlet { - - /** - * Processes requests for both HTTP GET and POST methods. - * @param request servlet request - * @param response servlet response - * @throws ServletException if a servlet-specific error occurs - * @throws IOException if an I/O error occurs - */ - protected void processRequest(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - response.setContentType("application/xml;charset=UTF-8"); - PrintWriter out = response.getWriter(); - try { - String schemaFile = request.getPathInfo(); - String pathPrefix = "/xml/ogc/wcs/2.0.0/"; - File file = new File(getServletContext().getRealPath(pathPrefix + schemaFile)); - String fileContents = IOUtils.toString(new FileReader(file)); - out.write(fileContents); - } finally { - out.close(); - } - } - - /** - * Handles the HTTP GET method. - * @param request servlet request - * @param response servlet response - * @throws ServletException if a servlet-specific error occurs - * @throws IOException if an I/O error occurs - */ - @Override - protected void doGet(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - processRequest(request, response); - } - - /** - * Handles the HTTP POST method. - * @param request servlet request - * @param response servlet response - * @throws ServletException if a servlet-specific error occurs - * @throws IOException if an I/O error occurs - */ - @Override - protected void doPost(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - processRequest(request, response); - } - - /** - * Returns a short description of the servlet. - * @return a String containing servlet description - */ - @Override - public String getServletInfo() { - return "Short description"; - } -} diff --git a/petascope/src/petascope/wcs2/schemas/gml/Examples/2dIdentityConversion.xml b/petascope/src/petascope/wcs2/schemas/gml/Examples/2dIdentityConversion.xml deleted file mode 100644 index 994917e..0000000 --- a/petascope/src/petascope/wcs2/schemas/gml/Examples/2dIdentityConversion.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - IdentityConversion2D - Identity Conversion 2D - none provided - not known - - diff --git a/petascope/src/petascope/wcs2/schemas/gml/Examples/2dIdentityMethod.xml b/petascope/src/petascope/wcs2/schemas/gml/Examples/2dIdentityMethod.xml deleted file mode 100644 index 949036f..0000000 --- a/petascope/src/petascope/wcs2/schemas/gml/Examples/2dIdentityMethod.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - IdentityMethod2D - Identity Method 2D - Method for use by a Coordinate Conversion for the identity transformation of two coordinates - This coordinate converion shall be as specified by the equations: - BaseX = DerivedX - BaseY = DerivedY -where - DerivedX, DerivedY are position coordinates in the derived 2D CRS - BaseX, BaseY are position coordinates in the 2D base CRS - - 2 - 2 - diff --git a/petascope/src/petascope/wcs2/schemas/gml/Examples/exampleRangeStructure.xml b/petascope/src/petascope/wcs2/schemas/gml/Examples/exampleRangeStructure.xml deleted file mode 100644 index 519a5a5..0000000 --- a/petascope/src/petascope/wcs2/schemas/gml/Examples/exampleRangeStructure.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - red - UnsignedChar - 000 255 - - - - - green - UnsignedChar - 000 255 - - - - - blue - UnsignedChar - 000 255 - - - - diff --git a/petascope/src/petascope/wcs2/schemas/gml/Examples/exampleRectifiedGridCoverage.xml b/petascope/src/petascope/wcs2/schemas/gml/Examples/exampleRectifiedGridCoverage.xml deleted file mode 100644 index 9514ae7..0000000 --- a/petascope/src/petascope/wcs2/schemas/gml/Examples/exampleRectifiedGridCoverage.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - 0 0 - 9999 9999 - - - column row - - - 99.9 99.9 - - - 1 0 - 0 1 - - - - - - TBDurlOfFile - TBD - - - - - - - white - UnsignedChar - 000 255 - - - - - - - Linear - 0 0 - - - - diff --git a/petascope/src/petascope/wcs2/schemas/gml/Examples/exampleReferenceablGridCoverage.xml b/petascope/src/petascope/wcs2/schemas/gml/Examples/exampleReferenceablGridCoverage.xml deleted file mode 100644 index bc9de96..0000000 --- a/petascope/src/petascope/wcs2/schemas/gml/Examples/exampleReferenceablGridCoverage.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - 0 0 - 9999 9999 - - - Column Row - - - InternalCRS1 - not known - - - image - - - - - - - - - - TBDurlOfFile - TBD - - - - - - - white - unsignedInteger - 000 255 - - - - - - - Linear - 0 0 - - - - diff --git a/petascope/src/petascope/wcs2/schemas/gml/gmlwcsAll.xsd b/petascope/src/petascope/wcs2/schemas/gml/gmlwcsAll.xsd deleted file mode 100644 index ae0d949..0000000 --- a/petascope/src/petascope/wcs2/schemas/gml/gmlwcsAll.xsd +++ /dev/null @@ -1,21 +0,0 @@ - - - - gmlwcsAll.xsd - This is the XML Schema for the GML 3.2.1 Application schema for WCS 2.0. - This XML Schema Document includes, directly and indirectly, all the XML Schema Documents defined by the GML 3.2.1 Application schema for WCS 2.0. - Last updated: 2010-jan-11 - Copyright (c) 2010 Open Geospatial Consortium, Inc, All Rights Reserved. - To obtain additional rights of use, visit http://www.opengeospatial.org/legal/. - - - - - - - - diff --git a/petascope/src/petascope/wcs2/schemas/gml/wcsCoverage.xsd b/petascope/src/petascope/wcs2/schemas/gml/wcsCoverage.xsd deleted file mode 100644 index 5643a1d..0000000 --- a/petascope/src/petascope/wcs2/schemas/gml/wcsCoverage.xsd +++ /dev/null @@ -1,160 +0,0 @@ - - - - coverage.xsd - Part of GML 3.2.1 Application schema for WCS 2.0. - Last updated: 2010-jan-11 - Copyright (c) 2010 Open Geospatial Consortium, Inc. All Rights Reserved. - To obtain additional rights of use, visit http://www.opengeospatial.org/legal/. - - - - - - - - - - - - Extends gml:AbstractCoverage as needed for WCS 2.0, by adding a rangeStructure property. - - - - - - The gml:coverageFunction property is included here, because it is included in both discrete and continuous coverages. This permits coverages in the gmlwcs:AbstractCoverage substitutionGroup to be used for either discrete and continuous coverages, in preparation for expected future elimination of this distinction. - - - - - - - - - - - - - - A GridCoverage is a discrete point coverage in which the domain is a geometric grid of points. -Note that this is the same as the MultiPointCoverage except that we have a gml:Grid to describe the domain. -This simple grid coverage is not geometrically referenced to the earth, and hence no geometric positions are assignable to the points in the grid. Such geometric positioning is introduced in the RectifiedGridCoverage. -Redefinition needed in order to benefit from the changes to the abstract ancestor AbstractCoverage. - - Since this GridCoverage uses the gmlwcs:CoverageType, it can be used for both discrete and continuous coverages. - - - - - - A RectifiedGridCoverage is a discrete point coverage based on a rectified grid. It is similar to the grid coverage except that the points of the grid are geometrically referenced. The rectified grid coverage has a domain that is a gml:RectifiedGrid geometry. - Redefinition needed in order to benefit from the changes to the abstract ancestor AbstractCoverage. - - Since this RectifiedGridCoverage uses the gmlwcs:CoverageType, it can be used for both discrete and continuous coverages. - - - - - - A ReferenceableGridCoverage is an implementation of ISO 19123 CV_DiscreteGridPointCoverage for a CV_ReferenceableGrid domain. It is a coverage based on a referenceable grid and has a domain geometry that is in the substitution group of AbstractReferenceableGrid. - This equivalent of this element is being added to GML 3.2.1 by approved Change Request 07-112r3. - Since this ReferenceableGridCoverage uses the gmlwcs:CoverageType, it can be used for both discrete and continuous coverages. - - - - - - The rangeStructure property includes or references the RangeStructure, introduced for coverage definitions used by WCS 2.0. - - - - - - - - - - - - - - The RangeStructure element describes the structure of a coverage's range, introduced for coverage definitions used by WCS 2.0. - - - - - - - - - - - - - - - - The RangeField property includes or references one RangeField element. - - - - - - - - - - - - - - The RangeField element describes the structure of one Field of a coverage's range. - - - - - - - - The gml:name should be used for the unique identifier of this RangeField. - - - - - - - - Identifier of the Unit of Measure applicable to values of this RangeField. - - - - - - - - - - - - This element will contain an URN that identifies the datatype of this field. The default gml:Dictionary of allowed values of this dataType is wcsDataTypeIdentifiers.xml. - - - - - - - - - List of the specific values of this RangeField that are used to designate non-valid values. - - - - diff --git a/petascope/src/petascope/wcs2/schemas/gml/wcsDataTypeIdentifiers.xml b/petascope/src/petascope/wcs2/schemas/gml/wcsDataTypeIdentifiers.xml deleted file mode 100644 index bf10663..0000000 --- a/petascope/src/petascope/wcs2/schemas/gml/wcsDataTypeIdentifiers.xml +++ /dev/null @@ -1,111 +0,0 @@ - - - This dictionary specifies the standard values for dataType, specified in the WCS 2.0 GML 3.2.1 application schema. This dataType is for values of a RangeField. In addition, this dictionary specifies definition URNs in the "ogc" URN namespace for these values. This dictionary uses a currently unspecified simple dictionary profile of GML 3.2.1. - Definitions are compatible with XML Schema as of 28 October 2004 [http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/]. - Identifiers do not have an associated unit of measure. - Last updated: 2010-jan-11 - Copyright (c) 2010 Open Geospatial Consortium, Inc. All Rights Reserved. - To obtain additional rights of use, visit http://www.opengeospatial.org/legal/. - - DataTypeIdentifiers - - - - Logical value; admissible values are "true" and "false" (in whatever case), as well as 0 (which shall represent "false") and 1 (which shall represent "true"). - boolean - - - - - - - Positive or negative integer number without any limitation on maximum and minimum values. For expressing certain value range limitations the specialized types byte, shortInteger, int, and LongInteger are available. - long - - - - - - Non-negative integer number without any limitation on minimum values. For expressing certain value range limitations the specialized types unsignedByte, unsignedShort, unsignedInt, and unsignedLong are available. - unsignedInteger - - - - - - - Positive or negative integer number with values between -128 anf 127. - byte - - - - - - Non-negative integer number with values between 0 and 255. - unsignedByte - - - - - - Positive or negative integer number with values between -32768 and 32767, which allows for a representation with 16 bits. - short - - - - - - Non-negative integer number with values between 0 and 65535, which allows for a representation with 16 bits. - unsignedShort - - - - - - Positive or negative integer number with values between -2147483648 and 2147483647, which allows for a representation with 32 bits. - int - - - - - - Non-negative integer number with values between 0 and 4294967295, which allows for a representation with 32 bits. - unsignedInt - - - - - - Positive or negative integer number with values between -9223372036854775808 and 9223372036854775807, which allows for a representation with 64 bits. - long - - - - - - Non-negative integer number with values between 0 and 18446744073709551616, which allows for a representation with 64 bits. - unsignedLong - - - - - - - Single-precision floating point number according to IEEE 754-1985. - double - - - - - - Double-precision floating point number according to IEEE 754-1985. - double - - - - - diff --git a/petascope/src/petascope/wcs2/schemas/gml/wcsGrids.xsd b/petascope/src/petascope/wcs2/schemas/gml/wcsGrids.xsd deleted file mode 100644 index 587e25d..0000000 --- a/petascope/src/petascope/wcs2/schemas/gml/wcsGrids.xsd +++ /dev/null @@ -1,156 +0,0 @@ - - - - wcsGrids.xsd - This XML Schema Document encodes extensions to GML 3.2.1 for grids that are referenced by a Transformation, named "ReferencedGridByTransformation". This document also extends the alternatives allowed in gml:ParameterValueType as expected to be needed by such Transformations. - Last updated: 2010-jan-11 - Copyright (c) 2010 Open Geospatial Consortium, Inc. All Rights Reserved. - To obtain additional rights of use, visit http://www.opengeospatial.org/legal/. - - - - - - - - - - - - AbstractReferenceableGrid is an encoding of CV_ReferenceableGrid in ISO 19123. AbstractReferenceableGrid is the head of a substitution group that may include multiple concrete implementations. - -A referenceable grid is a grid associated with a transformation that can be used to convert grid coordinate values to values of coordinates referenced to an external coordinate reference system [ISO 19123]. The transformation between grid coordinates and ‘external’ coordinates is usually non-affine, and may take different forms. It may be described analytically (e.g., through parametrised mathematical image rectification models); or it may provided in a table, for instance, relating the grid points to coordinates in the external coordinate reference system [ISO 19123, §8.2.1]. - -The inherited attribute group gml:SRSReferenceGroup shall link the referenceable grid to the internal coordinate reference system of the grid. - - This element and its type are copied from approved Change Request 07-112r3, which adds them to GML 3.2.1. - - - - - - - - - - - - This element and its type are copied from approved Change Request 07-112r3, which adds them to GML 3.2.1. - - - - - - - - - - - - - - ReferencedGridByTransformation encodes one type of CV_ReferenceableGrid as defined in ISO 19123, using a gml:Transformation or gml:ConcatenatedOperation to specify the relationship between positions in the grid and corresponding positions in another CRS. This encoding also generalises CV_ReferenceableGrid to allow including more than one referencing Transformation. - This element and its type are copied from Change Request 09-091r1, which adds them to GML 3.2.1. - - - - - - - - - - The gridCRS is a composition association to the definition of the internal CRS for this extended gml:Grid. This definition shall be the one referenced by the gml:srsName attribute in the gml:GridType. This CRS definition shall be included here if its definition is needed by some data receivers and is not otherwise available using that gml:srsName value. - - - - - This choice encodes an unordered list of associations to coordinate Transformations or Concatenated Operations that each (geo)reference this ReferenceableGrid. Each of these Transformations or Concatenated Operations shall reference the internal CRS for this extended gml:Grid, as either its sourceCRS or targetCRS. This transformation association may be repeated when this ReferencedGridByTransformation is referenced to more than one other CRS, and/or is referenced to the same other CRS by multiple Transformation versions. - - - - - - - - - - - - The gridCRS is a composition association to the definition of the internal CRS for this extended gml:Grid. This internal CRS may be a DerivedCRS, EngineeringCRS, ImageCRS, or CompoundCRS. However, proposed OGC Best Practices Paper 09-085r1 recommends that this internal CRS always be a DerivedCRS. - This element and its type are copied from Change Request 09-091r1, which adds them to GML 3.2.1. - - - - - - - - - - - - - Extends gml:ParameterValue to also allow values that are a gml:Geometry or a gml:vector. - This element and its type are copied from Change Request 09-091r1, which adds them to GML 3.2.1. - - - - - - - - - - - - - - - - - - - - - - - - - - - - A geometry used as a coordinate operation parameter value, which contains any type of geometry element, with a reference to its associated coordinate reference system. - This element and its type are copied from Change Request 09-091r1, which adds them to GML 3.2.1. - - - - - - Vector value of a coordinate operation parameter. A vectorValue can represent a distance in a direction (when the magnitude of the vector is significant) or just a direction (when the magnitude of the vector is not considered significant). This vectorValue shall use the coordinate axes directions and units of the coordinate system in the referenced coordinate reference system. This coordinate reference system will often be the same as referenced by an associated geometryValue coordinate operation parameter. - - - - - - - gml:SimpleMultiPoint implements, and provides a simplified encoding for, ISO 19107 GM_MultiPoint (see ISO 19107:2003, 6.5.4). A gml:SimpleMultiPoint consists of a list of DirectPositions. - - - - - - - - - - - - - - diff --git a/petascope/src/petascope/wcs2/schemas/wcsAll.xsd b/petascope/src/petascope/wcs2/schemas/wcsAll.xsd deleted file mode 100644 index 21f0e83..0000000 --- a/petascope/src/petascope/wcs2/schemas/wcsAll.xsd +++ /dev/null @@ -1,21 +0,0 @@ - - - - wcsAll.xsd - This XML Schema Document includes, directly and indirectly, all the XML Schema Documents defined by the OGC Web Coverage Service (WCS). - Last updated: 2010-jan-11 - Copyright (c) 2010 Open Geospatial Consortium, Inc, All Rights Reserved. - To obtain additional rights of use, visit http://www.opengeospatial.org/legal/. - - - - - - - - - - diff --git a/petascope/src/petascope/wcs2/schemas/wcsCommon.xsd b/petascope/src/petascope/wcs2/schemas/wcsCommon.xsd deleted file mode 100644 index c1d5b33..0000000 --- a/petascope/src/petascope/wcs2/schemas/wcsCommon.xsd +++ /dev/null @@ -1,87 +0,0 @@ - - - - wcsContents.xsd - - http://schemas.opengis.net/wcs/2.0/gml/gmlwcsAll.xsd - - This XML Schema Document encodes the elements and types that are shared by multiple WCS operations. - Last updated: 2010-jan-11 - Copyright (c) 2010 Open Geospatial Consortium, Inc, All Rights Reserved. - To obtain additional rights of use, visit http://www.opengeospatial.org/legal/. - - - - - - - - - - - - - XML encoded WCS operation request base, for all operations except GetCapabilities. In this XML encoding, no "request" parameter is included, since the element name specifies the specific operation. - - - - - Service type identifier, where the value is the OWS type abbreviation. For WCS operation requests, the value is "WCS". - - - - - Specification version for WCS version and operation. See Version parameter Subclause 7.3.1 of OWS Common for more information. - - - - - - - - - - - - This element is a wrapper for the gml:id attribute. Needed to allow lists of identifiers. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/petascope/src/petascope/wcs2/schemas/wcsDescribeCoverage.xsd b/petascope/src/petascope/wcs2/schemas/wcsDescribeCoverage.xsd deleted file mode 100644 index c3c4ec3..0000000 --- a/petascope/src/petascope/wcs2/schemas/wcsDescribeCoverage.xsd +++ /dev/null @@ -1,73 +0,0 @@ - - - - wcsDescribeCoverage.xsd - - http://schemas.opengis.net/wcs/2.0/gml/gmlwcsAll.xsd - - This XML Schema Document defines the DescribeCoverage operation request and response XML elements and types, used by the OGC Web Coverage Service (WCS). - Last updated: 2010-jan-11 - Copyright (c) 2010 Open Geospatial Consortium, Inc, All Rights Reserved. - To obtain additional rights of use, visit http://www.opengeospatial.org/legal/. - - - - - - - - - - - - - - Request to a WCS to perform the DescribeCoverage operation. This operation allows a client to retrieve descriptions of one or more coverages. In this XML encoding, no "request" parameter is included, since the element name specifies the specific operation. - - - - - - - - - Unordered list of identifiers of desired coverages. A client can obtain identifiers by a prior GetCapabilities request, or from a third-party source. - - - - - - - - - - - Response from a WCS DescribeCoverage operation, containing one or more coverage descriptions. - - - - - - - - - - - Full description of coverages available from a WCS server. This description shall include sufficient information to allow all valid GetCoverage operation requests to be prepared by a WCS client. - - - - - - - - - - - - diff --git a/petascope/src/petascope/wcs2/schemas/wcsExtensions.xml b/petascope/src/petascope/wcs2/schemas/wcsExtensions.xml deleted file mode 100644 index eff982d..0000000 --- a/petascope/src/petascope/wcs2/schemas/wcsExtensions.xml +++ /dev/null @@ -1,125 +0,0 @@ - - - - This dictionary specifies URNs and identifiers for WCS 2.0 extensions, to be communicated as part of a WCS GetCapabilities response. The dictionary is situated in the "ogc" namespace and uses a currently unspecified simple dictionary profile of GML 3.2.1. - - Last updated: 2010-jan-11 - Copyright (c) 2010 Open Geospatial Consortium, Inc. All Rights Reserved. - To obtain additional rights of use, visit http://www.opengeospatial.org/legal/. - - WcsExtensions - - - - - - WCS 2.0 extension defining handling of nil values in a coverage. - 1.0 - - - - - - WCS 2.0 extension defining handling of uncertainty in a coverage. - 1.0 - - - - - - - - WCS 2.0 extension defining advanced service metadata concepts. - 1.0 - - - - - - WCS 2.0 extension defining scaling and interpolation of coverages. - 1.0 - - - - - - WCS 2.0 extension defining coordinate reference system (CRS) handling within coverages. - 1.0 - - - - - - WCS 2.0 extension defining transactional (ie, update) services. - 1.0 - - - - - - WCS 2.0 extension defining coverage processing services. - 1.0 - - - - - - - - WCS 2.0 extension defining the HTTP GET / KVP protocol encoding. - 1.0 - - - - - - WCS 2.0 extension defining the HTTP POST / XML protocol encoding. - 1.0 - - - - - - WCS 2.0 extension defining the SOAP protocol encoding. - 1.0 - - - - - - - - WCS 2.0 extension defining use of the GML coverage encoding format. - 1.0 - - - - - - WCS 2.0 extension defining use of the GeoTIFF coverage encoding format. - 1.0 - - - - - - WCS 2.0 extension defining use of the NetCDF coverage encoding format. - 1.0 - - - - - - - - WCS 2.0 extension defining multilingual access to a WCS. - 1.0 - - - diff --git a/petascope/src/petascope/wcs2/schemas/wcsGetCapabilities.xsd b/petascope/src/petascope/wcs2/schemas/wcsGetCapabilities.xsd deleted file mode 100644 index 9996063..0000000 --- a/petascope/src/petascope/wcs2/schemas/wcsGetCapabilities.xsd +++ /dev/null @@ -1,56 +0,0 @@ - - - - wcsGetCapabilities.xsd - This XML Schema Document encodes the GetCapabilities operation request and response used by the OGC Web Coverage Service (WCS). - Last updated: 2010-jan-11 - Copyright (c) 2010 Open Geospatial Consortium, Inc, All Rights Reserved. - To obtain additional rights of use, visit http://www.opengeospatial.org/legal/. - - - - - - - - - - - - - - Request to a WCS server to perform the GetCapabilities operation. This operation allows a client to retrieve a Capabilities XML document providing metadata for the specific WCS server. In this XML encoding, no "request" parameter is included, since the element name specifies the specific operation. - - - - - - - - - - - - - - - - XML encoded WCS GetCapabilities operation response. The Capabilities document provides clients with service metadata about a specific service instance, including metadata about the coverages served. If the server does not implement the updateSequence parameter, the server shall always return the Capabilities document, without the updateSequence parameter. When the server implements the updateSequence parameter and the GetCapabilities operation request included the updateSequence parameter with the current value, the server shall return this element with only the "version" and "updateSequence" attributes. Otherwise, all optional sections shall be included or not depending on the actual value of the Contents parameter in the GetCapabilities operation request. - - - - - - - - - - - - - diff --git a/petascope/src/petascope/wcs2/schemas/wcsGetCoverage.xsd b/petascope/src/petascope/wcs2/schemas/wcsGetCoverage.xsd deleted file mode 100644 index 57ef8ed..0000000 --- a/petascope/src/petascope/wcs2/schemas/wcsGetCoverage.xsd +++ /dev/null @@ -1,88 +0,0 @@ - - - - wcsGetCoverage.xsd - This XML Schema Document defines the GetCoverage operation request elements and types, for the OGC Web Coverage Service (WCS). - The GetCoverage request element is GetCoverage. The GetCoverage response element is a specialization of gmlwcs:AbstractCoverage. - Last updated: 2010-jan-11 - Copyright (c) 2007 Open Geospatial Consortium, Inc. All Rights Reserved. - To obtain additional rights of use, visit http://www.opengeospatial.org/legal/. - - - - - - - - - - - - - Request to a WCS to perform the GetCoverage operation. This operation allows a client to retrieve a subset of one coverage. - - - - - - - - - Identifier of the coverage that this GetCoverage operation request shall draw from. - - - - - - - - - - - - - - - - - Definition of the desired subset of the domain of the coverage. This is either a Trim operation, or a Slice operation. - - - - - - - - - Describes the trimming of a coverage's domain axis, between two values. - - - - - - - - - - - - - - Describes the slicing of a coverage's domain axis at a particular point. - - - - - - - - - - - - diff --git a/petascope/src/petascope/wcs2/server/Wcs2Server.java b/petascope/src/petascope/wcs2/server/Wcs2Server.java deleted file mode 100644 index cb5f6f9..0000000 --- a/petascope/src/petascope/wcs2/server/Wcs2Server.java +++ /dev/null @@ -1,120 +0,0 @@ -/* - * This file is part of rasdaman community. - * - * Rasdaman community is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Rasdaman community is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with rasdaman community. If not, see . - * - * Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann / - rasdaman GmbH. - * - * For more information please see - * or contact Peter Baumann via . - */ -package petascope.wcs2.server; - -//~--- non-JDK imports -------------------------------------------------------- -import javax.servlet.ServletException; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import petascope.ConfigManager; - -import petascope.wcps.server.core.DbMetadataSource; - -import petascope.wcs.server.exceptions.WCSException; - -import petascope.wcs2.server.ops.DescribeCoverage; -import petascope.wcs2.server.ops.GetCapabilities; -import petascope.wcs2.server.ops.GetCoverage; - -//~--- JDK imports ------------------------------------------------------------ -/** - * The Web Coverage Service (WcsServer) - * This class provides methods for each of the WCS operations: - * - GetCapabilities - * - DescribeCoverage - * - GetCoverage - * - * @author Andrei Aiordachioaie - */ -public class Wcs2Server { - - private static Logger LOG = LoggerFactory.getLogger(Wcs2Server.class); - - /* The Operations to delegate to */ - private GetCapabilities capa; - private DescribeCoverage desc; - private GetCoverage getcov; - - /* Globals */ - private DbMetadataSource meta; - - /** - * constructor - * @param settingsPath path to the "settings.properties" file - */ - public Wcs2Server(String settingsPath, DbMetadataSource source) throws ServletException { - ConfigManager.getInstance(settingsPath, null); - meta = source; - - try { - capa = new GetCapabilities(meta); - desc = new DescribeCoverage(meta); - getcov = new GetCoverage(meta); - } catch (Exception e) { - LOG.error("Could not init WCS 2.0"); - - throw new RuntimeException("Could not initialize WCS 2.0", e); - } - } - - /** - * WcsServer GetCapabilities operation - */ - public String GetCapabilities(String stringXml) throws WCSException { - LOG.trace("Received input:\n{}", stringXml); - LOG.info("Executing operation GetCapabilities..."); - String result = capa.execute(stringXml); - - LOG.info("GetCapabilities finished"); - - return result; - } - - /** - * WcsServer DescribeCoverage operation - */ - public String DescribeCoverage(String stringXml) throws WCSException { - LOG.trace("Received input:\n{}", stringXml); - LOG.info("Executing operation DescribeCoverage..."); - String result = desc.execute(stringXml); - - LOG.info("DescribeCoverage finished"); - - return result; - } - - /** - * WcsServer GetCoverage operation - */ - public String GetCoverage(String stringXml) throws WCSException { - LOG.trace("Received input:\n{}", stringXml); - LOG.info("Executing operation GetCoverage..."); - String result = getcov.execute(stringXml); - - LOG.info("GetCoverage finished"); - - return result; - } -} diff --git a/petascope/src/petascope/wcs2/server/ops/DescribeCoverage.java b/petascope/src/petascope/wcs2/server/ops/DescribeCoverage.java deleted file mode 100644 index 6f4e752..0000000 --- a/petascope/src/petascope/wcs2/server/ops/DescribeCoverage.java +++ /dev/null @@ -1,204 +0,0 @@ -/* - * This file is part of rasdaman community. - * - * Rasdaman community is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Rasdaman community is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with rasdaman community. If not, see . - * - * Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann / - rasdaman GmbH. - * - * For more information please see - * or contact Peter Baumann via . - */ -package petascope.wcs2.server.ops; - -//~--- non-JDK imports -------------------------------------------------------- -import java.util.HashSet; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import petascope.ConfigManager; - -import petascope.wcps.server.core.CellDomainElement; -import petascope.wcps.server.core.DbMetadataSource; -import petascope.wcps.server.core.DomainElement; -import petascope.wcps.server.core.Metadata; -import petascope.wcps.server.core.RangeElement; - -import petascope.wcs.server.exceptions.WCSException; - -//~--- JDK imports ------------------------------------------------------------ - -import java.util.Iterator; -import java.util.List; -import java.util.Set; -import petascope.wcps.server.core.SDU; -import petascope.wcs.server.exceptions.InvalidParameterValueException; -import petascope.wcs.server.exceptions.InvalidServiceConfigurationException; -import petascope.wcs.server.exceptions.NoApplicableCodeException; - -/** - * Describe Coverage operation for WCS 2.0 - * - * @author Andrei Aiordachioaie - */ -public class DescribeCoverage implements WcsOperation { - - public static String DATATYPE_URN_PREFIX = "urn:ogc:def:dataType:OGC:1.1:"; - private static Logger LOG = LoggerFactory.getLogger(DescribeCoverage.class); - /* Template XMLs for response types */ - private String DescribeCoverageResponse; - /* Other useful stuff */ - private String coverageDescriptionTemplate; - private String listOfFormats; - private String low, high, axisLabels; - private DbMetadataSource meta; - private String rangeComponentTemplate; - private String rangeComponents, gridDimension, gridId; - - public DescribeCoverage(DbMetadataSource metadata) throws InvalidServiceConfigurationException { - meta = metadata; - - DescribeCoverageResponse = ConfigManager.WCS2_DESCRIBE_COVERAGE_TEMPLATE; - if (DescribeCoverageResponse == null) { - throw new InvalidServiceConfigurationException("Could not find template file."); - } - listOfFormats = "application/xml"; - - /* Find the CoverageDescription template string */ - String starttag = " it = cov.getDomainIterator(); - Iterator it2 = cov.getCellDomainIterator(); - - low = ""; - high = ""; - axisLabels = ""; - while (it.hasNext() && it2.hasNext()) { - DomainElement dom = it.next(); - CellDomainElement cell = it2.next(); - - axisLabels += dom.getName() + " "; - low += cell.getLo() + " "; - high += cell.getHi() + " "; - } - - // Build the range components data structure - Iterator it3 = cov.getRangeIterator(); - Iterator nilIterator = cov.getNullSetIterator(); - - - rangeComponents = ""; - int i = -1; - while (it3.hasNext()) { - String component = rangeComponentTemplate; - RangeElement range = it3.next(); - i++; - String rangeId = "range-" + cov.getCoverageId() + "-" + range.getName(); - - component = component.replaceAll("\\{rangeFieldId\\}", rangeId); - component = component.replaceAll("\\{fieldName\\}", range.getName()); - component = component.replaceAll("\\{datatype\\}", DATATYPE_URN_PREFIX + range.getType()); - - // Compute the null values for this range field - Set nullVals = new HashSet(); - Iterator it4 = cov.getNullSetIterator(); - while (it4.hasNext()) { - List nilVal = SDU.str2string(it4.next()); - nullVals.add(nilVal.get(i)); - } - StringBuffer nullValsString = new StringBuffer(); - it4 = nullVals.iterator(); - while (it4.hasNext()) { - nullValsString.append(" " + it4.next()); - } - component = component.replaceAll("\\{nilValues\\}", nullValsString.toString().substring(1)); - - // And add this range field to the range structure - rangeComponents += component; - } - - desc = coverageDescriptionTemplate.replaceAll("\\{coverageId\\}", coverageId); - gridId = "grid" + coverageId; - desc = desc.replaceAll("\\{gridId\\}", gridId); - gridDimension = String.valueOf(cov.getDimension()); - desc = desc.replaceAll("\\{gridDimension\\}", gridDimension); - desc = desc.replaceAll("\\{low\\}", low); - desc = desc.replaceAll("\\{high\\}", high); - desc = desc.replaceAll("\\{axisLabels\\}", axisLabels); - desc = desc.replaceAll("\\{rangeFields\\}", rangeComponents); - desc = desc.replaceAll("\\{rangeStructureId\\}", "rangeStructure-" + coverageId); - desc = desc.replaceAll("\\{supportedFormats\\}", listOfFormats); - - listOfCoverageDescriptions += desc; - } else { - throw new InvalidParameterValueException("gml:id"); - } - } - - output = DescribeCoverageResponse.replaceAll("\\{listOfCoverageDescriptions\\}", - listOfCoverageDescriptions); - - output = output.replaceAll("\\{wcsSchemaUrl\\}", ConfigManager.WCS2_SCHEMA_URL); - - return output; - } -} diff --git a/petascope/src/petascope/wcs2/server/ops/GetCapabilities.java b/petascope/src/petascope/wcs2/server/ops/GetCapabilities.java deleted file mode 100644 index b64d3f2..0000000 --- a/petascope/src/petascope/wcs2/server/ops/GetCapabilities.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * This file is part of rasdaman community. - * - * Rasdaman community is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Rasdaman community is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with rasdaman community. If not, see . - * - * Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann / - rasdaman GmbH. - * - * For more information please see - * or contact Peter Baumann via . - */ -package petascope.wcs2.server.ops; - -//~--- non-JDK imports -------------------------------------------------------- -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import petascope.ConfigManager; - -import petascope.wcps.server.core.DbMetadataSource; -import petascope.wcps.server.exceptions.ResourceException; - -//~--- JDK imports ------------------------------------------------------------ - -import java.util.Iterator; -import petascope.wcs.server.exceptions.InvalidServiceConfigurationException; - -/** - * GetCapabilities operation for The Web Coverage Service 2.0 - * - * @author Andrei Aiordachioaie - */ -public class GetCapabilities implements WcsOperation { - - private static Logger LOG = LoggerFactory.getLogger(GetCapabilities.class); - /* Template XMLs for response types */ - private String GetCapabilitiesResponse; - private DbMetadataSource meta; - /* Other useful vars */ - private String xmlListOfCoverages; - - public GetCapabilities(DbMetadataSource metadata) throws InvalidServiceConfigurationException { - meta = metadata; - - GetCapabilitiesResponse = ConfigManager.WCS2_GET_CAPABILITIES_TEMPLATE; - if (GetCapabilitiesResponse == null) { - throw new InvalidServiceConfigurationException("Could not find template file."); - } - } - - @Override - public String execute(String input) { - String output; - - // Create the output by replacing placeholders - output = GetCapabilitiesResponse.replaceAll("\\{URL\\}", - ConfigManager.PETASCOPE_SERVLET_URL); - Iterator it; - - try { - it = meta.coverages().iterator(); - xmlListOfCoverages = ""; - while (it.hasNext()) { - xmlListOfCoverages += ""; - } - } catch (ResourceException ex) { - ex.printStackTrace(); - } - output = output.replaceAll("\\{Coverages\\}", xmlListOfCoverages); - output = output.replaceAll("\\{wcsSchemaUrl\\}", ConfigManager.WCS2_SCHEMA_URL); - - return output; - } -} diff --git a/petascope/src/petascope/wcs2/server/ops/GetCoverage.java b/petascope/src/petascope/wcs2/server/ops/GetCoverage.java deleted file mode 100644 index a6ddcff..0000000 --- a/petascope/src/petascope/wcs2/server/ops/GetCoverage.java +++ /dev/null @@ -1,529 +0,0 @@ -/* - * This file is part of rasdaman community. - * - * Rasdaman community is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Rasdaman community is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with rasdaman community. If not, see . - * - * Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann / - rasdaman GmbH. - * - * For more information please see - * or contact Peter Baumann via . - */ -package petascope.wcs2.server.ops; - -//~--- non-JDK imports -------------------------------------------------------- -import org.apache.commons.io.IOUtils; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.w3c.dom.Document; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; - -import org.xml.sax.SAXException; - -import petascope.ConfigManager; - -import petascope.wcps.server.core.DbMetadataSource; -import petascope.wcps.server.core.Metadata; - -import petascope.wcs.server.exceptions.WCSException; - -//~--- JDK imports ------------------------------------------------------------ - -import java.io.IOException; - -import java.math.BigInteger; -import java.util.HashSet; -import java.util.Iterator; - -import java.util.List; -import java.util.Set; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.xpath.XPath; -import javax.xml.xpath.XPathConstants; -import javax.xml.xpath.XPathExpressionException; -import javax.xml.xpath.XPathFactory; -import org.odmg.DBag; -import org.odmg.Database; -import org.odmg.Implementation; -import org.odmg.ODMGException; -import org.odmg.OQLQuery; -import org.odmg.QueryException; -import org.odmg.Transaction; -import rasj.RasGMArray; -import rasj.RasImplementation; -import petascope.wcps.server.core.CellDomainElement; -import petascope.wcps.server.core.DomainElement; -import petascope.wcps.server.core.RangeElement; -import petascope.wcps.server.core.SDU; -import petascope.wcs.server.exceptions.InputOutputException; -import petascope.wcs.server.exceptions.InternalComponentException; -import petascope.wcs.server.exceptions.InvalidParameterValueException; -import petascope.wcs.server.exceptions.InvalidServiceConfigurationException; -import petascope.wcs.server.exceptions.NoApplicableCodeException; -import petascope.wcs.server.exceptions.WcsRuntimeException; -import petascope.wcs.server.exceptions.XmlNotValidException; -import petascope.wcs2.server.templates.WcsNamespaceContext; - -/** - * Get Coverage operation for WCS 2.0 - * - * @author Andrei Aiordachioaie - */ -public class GetCoverage implements WcsOperation { - - private static Logger LOG = LoggerFactory.getLogger(GetCoverage.class); - private DocumentBuilder builder = null; - private XPathFactory xpathFactory = XPathFactory.newInstance(); - /* Template XMLs for response types */ - private String GetCoverageResponse; - private String rangeComponentTemplate; - /* Xml request */ - private Document doc; - /* for Metadata */ - private DbMetadataSource meta; - /* The new coverage domain */ - private String lowPoint, highPoint, newAxesLabels; - - public GetCoverage(DbMetadataSource metadata) throws WCSException { - meta = metadata; - GetCoverageResponse = ConfigManager.WCS2_GET_COVERAGE_TEMPLATE; - if (GetCoverageResponse == null) { - throw new InvalidServiceConfigurationException("Could not find template file."); - } - - /* Find the RangeField template string */ - String starttag = " it = coverage.getCellDomainIterator(); - Iterator it2 = coverage.getDomainIterator(); - i = 0; - while (it.hasNext() && it2.hasNext()) { - CellDomainElement cell = it.next(); - DomainElement dom = it2.next(); - LOG.trace(cell.toString()); - LOG.trace(dom.toString()); - high[i] = cell.getHi(); - low[i] = cell.getLo(); - axesLabels[i] = dom.getName(); - limits[i] = low[i] + ":" + high[i]; - sliced[i] = false; - trimmed[i] = false; - i++; - } - - NodeList list = null; - int axisIndex; - String axis, root; - NodeList trims, slices; - - trims = evalXPathList("//wcs:trimDimension", doc); - for (i = 0; i < trims.getLength(); i++) { - Node trim = trims.item(i); - - list = evalXPathList("wcs:dimension/text()", trim); - axis = list.item(0).getNodeValue(); - axisIndex = coverage.getDomainIndexByName(axis); - if (axisIndex == -1) { - throw new InvalidParameterValueException("dimension. Explanation: Unknown axis: " + axis); - } - if (trimmed[axisIndex] || sliced[axisIndex]) { - throw new NoApplicableCodeException("Already performed one subsetting operation on axis: " + axis); - } - - list = evalXPathList("wcs:trimLow/text()", trim); - if (list.getLength() > 0) { - try { - long val = Long.parseLong(list.item(0).getNodeValue()); - low[axisIndex] = BigInteger.valueOf(val); - } catch (NumberFormatException e) { - throw new InvalidParameterValueException("trimLow. Explanation: invalid integer number: " + list.item(0).getNodeValue()); - } - } - list = evalXPathList("wcs:trimHigh/text()", trim); - if (list.getLength() > 0) { - try { - long val = Long.parseLong(list.item(0).getNodeValue()); - high[axisIndex] = BigInteger.valueOf(val); - } catch (NumberFormatException e) { - throw new InvalidParameterValueException("trimHigh. Explanation: invalid integer number: " + list.item(0).getNodeValue()); - } - } - - trimmed[axisIndex] = true; - limits[axisIndex] = low[axisIndex] + ":" + high[axisIndex]; - LOG.debug("New limits for axis {}: {}", axis, limits[axisIndex]); - } - - slices = evalXPathList("//wcs:sliceDimension", doc); - for (i = 0; i < slices.getLength(); i++) { - Node slice = slices.item(i); - - list = evalXPathList("wcs:dimension/text()", slice); - axis = list.item(0).getNodeValue(); - axisIndex = coverage.getDomainIndexByName(axis); - if (axisIndex == -1) { - throw new InvalidParameterValueException("dimension. Explanation: Unknown axis name: " + axis); - } - if (trimmed[axisIndex] || sliced[axisIndex]) { - throw new NoApplicableCodeException("Already performed one subsetting operation on axis: " + axis); - } - - list = evalXPathList("wcs:slicePoint/text()", slice); - if (list.getLength() > 0) { - try { - long point = Long.parseLong(list.item(0).getNodeValue()); - low[axisIndex] = BigInteger.valueOf(point); - } catch (NumberFormatException e) { - throw new InvalidParameterValueException("slicePoint. Explanation: invalid integer number: " + list.item(0).getNodeValue()); - } - high[axisIndex] = low[axisIndex]; - limits[axisIndex] = list.item(0).getNodeValue(); - } - - sliced[axisIndex] = true; - LOG.debug("New limits for axis {}: {}", axis, limits[axisIndex]); - } - - // Compute the lowest, highest point and the labels - lowPoint = ""; - highPoint = ""; - newAxesLabels = ""; - int first = 0; - for (i = 0; i < dims; i++) { - if (sliced[i] == false) { - if (first == 0) { - lowPoint = low[i].toString(); - highPoint = high[i].toString(); - newAxesLabels = axesLabels[i]; - first++; - } else { - lowPoint += " " + low[i]; - highPoint += " " + high[i]; - newAxesLabels += " " + axesLabels[i]; - } - } - } - - // Concatenate all limits into a single string - String result = limits[0]; - - for (i = 1; i < dims; i++) { - result += ", " + limits[i]; - } - - return result; - } - - public String executeRasqlQuery(String query) throws WCSException { - byte[] result = null; - - Implementation impl = new RasImplementation(ConfigManager.RASDAMAN_URL); - Database db = impl.newDatabase(); - - try { - db.open(ConfigManager.RASDAMAN_DATABASE, Database.OPEN_READ_ONLY); - } catch (ODMGException odmge) { - try { - db.close(); - } catch (ODMGException e) { - } - - throw new InternalComponentException("Could not connect to rasdaman server at " + ConfigManager.RASDAMAN_URL + ", database " + ConfigManager.RASDAMAN_DATABASE, odmge); - } - - Transaction tr = impl.newTransaction(); - - tr.begin(); - OQLQuery q = impl.newOQLQuery(); - DBag resultSet; - - try { - q.create(query); - resultSet = (DBag) q.execute(); - - if (resultSet != null) { - Iterator resultIterator = resultSet.iterator(); - - if (resultIterator.hasNext()) { - Object current = resultIterator.next(); - - try { - RasGMArray resultArray = (RasGMArray) current; - result = resultArray.getArray(); - } catch (ClassCastException e) { - LOG.error("result=" + current.toString()); - result = current.toString().getBytes(); - } - } - } - } catch (QueryException qe) { - tr.commit(); - - try { - db.close(); - } catch (ODMGException odmge) { - } - - throw new InternalComponentException("Could not evaluate rasdaman query: '" + query + "'. Cause: " + qe.getMessage(), qe); - } - - tr.commit(); - - try { - db.close(); - } catch (ODMGException odmge) { - } - - return new String(result); - } - - /** Creates a string with the contents of the GetCoverage response XML */ - private String buildOutputXml(String coverageData, Metadata coverage) { - String xml = GetCoverageResponse; - xml = xml.replaceAll("\\{coverageId\\}", coverage.getCoverageName() + Math.random()); - xml = xml.replaceAll("\\{gridDimension\\}", String.valueOf(coverage.getDimension())); - xml = xml.replaceAll("\\{gridId\\}", "grid-" + coverage.getCoverageName()); - // low - xml = xml.replaceAll("\\{low\\}", lowPoint); - // high - xml = xml.replaceAll("\\{high\\}", highPoint); - // axisLabels - xml = xml.replaceAll("\\{axisLabels\\}", newAxesLabels); - // coverageData - xml = xml.replaceAll("\\{coverageData\\}", coverageData); - - - - // Build the range structure - Iterator it3 = coverage.getRangeIterator(); - int i = -1; - String rangeComponents = ""; - while (it3.hasNext()) { - String component = rangeComponentTemplate; - RangeElement range = it3.next(); - i++; - String rangeId = "range-" + coverage.getCoverageId() + "-" + range.getName(); - LOG.trace(range.toString()); - - component = component.replaceAll("\\{rangeFieldId\\}", rangeId); - component = component.replaceAll("\\{fieldName\\}", range.getName()); - component = component.replaceAll("\\{datatype\\}", DescribeCoverage.DATATYPE_URN_PREFIX + range.getType()); - - // Compute the null values for this range field - Set nullVals = new HashSet(); - Iterator it = coverage.getNullSetIterator(); - while (it.hasNext()) { - List nilVal = SDU.str2string(it.next()); - nullVals.add(nilVal.get(i)); - } - StringBuffer nullValsString = new StringBuffer(); - it = nullVals.iterator(); - while (it.hasNext()) { - nullValsString.append(" " + it.next()); - } - component = component.replaceAll("\\{nilValues\\}", nullValsString.toString().substring(1)); - - // And add this range field to the range structure - rangeComponents += component; - } - - xml = xml.replaceAll("\\{rangeFields\\}", rangeComponents); - xml = xml.replaceAll("\\{rangeStructureId\\}", "rangeStructure-" + coverage.getCoverageId()); - - xml = xml.replaceAll("\\{wcsSchemaUrl\\}", ConfigManager.WCS2_SCHEMA_URL); - - return xml; - } - - /** - * Retrieve the coverage data for a multi-band coverage, - * with particular subsetting parameters. - * @param coverage metadata for the coverage we want - * @param subsetting subsetting string, to be used in the RasQL query - * @return a string of space-separated values, where various bands of one - * pixel are comma-separated. For example, the string "1,2 3,4 5,6" can - * be the coverage data of a 1-by-3 coverage, with two bands - */ - private String buildCoverageData(Metadata coverage, String subsetting) throws WCSException { - String coverageName = coverage.getCoverageName(); - Iterator it = coverage.getRangeIterator(); - int bandcount = 0; - while (it.hasNext()) { - it.next(); - bandcount++; - } - LOG.debug("Coverage {} has {} bands", coverageName, bandcount); - String[][] pixels = new String[bandcount][]; - String currentBand = ""; - /* For all bands of the coverage, execute a rasql query */ - for (int band = 0; band < bandcount; band++) { - LOG.trace("Processing band {}", band); - // Construct rasql query - currentBand = "." + band; - // If this is a one-band image, then band-subsetting would result in an error - if (bandcount == 1) { - currentBand = ""; - } - String rasqlQuery = "select csv(cov[" + subsetting + "]" + currentBand + ") " - + "from " + coverageName + " as cov"; - - // Execute RasQl query => coverage data - LOG.trace("Executing query {}", rasqlQuery); - String output = executeRasqlQuery(rasqlQuery); - - // Remove the curly braces from the rasql output - LOG.trace("Removing curly braces..."); - output = output.replaceAll("\\{", ""); - output = output.replaceAll("\\}", ""); - - // Tokenize the input to get the pixel values of the current band - LOG.trace("Splitting values with comma..."); - pixels[band] = output.split(","); - - LOG.trace("Done processing band {}.", band); - } - - /* Combine all bands into one single string */ - int pixelcount = pixels[0].length; - StringBuilder data = new StringBuilder(pixelcount * bandcount); - LOG.debug("Going to combine {} pixels with {} bands...", pixelcount, bandcount); - for (int pix = 0; pix < pixelcount; pix++) { - if (pixelcount > 20 && pix % (pixelcount / 20) == 0) { - LOG.debug("Processing Pixel {} of " + pixelcount + " - {}%", pix, pix * 100 / (pixelcount - 1)); - } - for (int b = 0; b < bandcount - 1; b++) { - data.append(pixels[b][pix] + ","); - } - data.append(pixels[bandcount - 1][pix]); - data.append(" "); - } - return data.substring(0, data.length() - 2); - } -} diff --git a/petascope/src/petascope/wcs2/server/ops/WcsOperation.java b/petascope/src/petascope/wcs2/server/ops/WcsOperation.java deleted file mode 100644 index 1ad8eae..0000000 --- a/petascope/src/petascope/wcs2/server/ops/WcsOperation.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * This file is part of rasdaman community. - * - * Rasdaman community is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Rasdaman community is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with rasdaman community. If not, see . - * - * Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann / - rasdaman GmbH. - * - * For more information please see - * or contact Peter Baumann via . - */ -package petascope.wcs2.server.ops; - -//~--- non-JDK imports -------------------------------------------------------- -import petascope.wcs.server.exceptions.WCSException; - -/** - * Interface for all WCS Operations. - * @author Andrei Aiordachioaie - */ -public interface WcsOperation { - - /** Execute the operation */ - public String execute(String input) throws WCSException; -} diff --git a/petascope/src/petascope/wcs2/server/templates/DescribeCoverageTemplate.xml b/petascope/src/petascope/wcs2/server/templates/DescribeCoverageTemplate.xml deleted file mode 100644 index c431723..0000000 --- a/petascope/src/petascope/wcs2/server/templates/DescribeCoverageTemplate.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - {listOfCoverageDescriptions} - - - - - - {low} - {high} - - - {axisLabels} - - - - - {rangeFields} - - - {fieldName} - {datatype} - {nilValues} - - - - - - - {supportedFormats} - - - diff --git a/petascope/src/petascope/wcs2/server/templates/GetCapabilitiesTemplate.xml b/petascope/src/petascope/wcs2/server/templates/GetCapabilitiesTemplate.xml deleted file mode 100644 index 86631bf..0000000 --- a/petascope/src/petascope/wcs2/server/templates/GetCapabilitiesTemplate.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - WCS 2.0 Coverage Server @ Jacobs University - WCS 2.0 Server developed at jacobs University - OGC WCS - 2.0.0 - urn:ogc:def:extension:OGC-WCS:2.0:protocol:post - urn:ogc:def:extension:OGC-WCS:2.0:serviceModel:wcps:1.0 - urn:ogc:def:extension:OGC-WCS:2.0:serviceModel:wcst:1.0 - - - Jacobs University Bremen - - - Prof. Dr. Peter Baumann - - - Bremen - 28717 - Germany - p.baumann@jacobs-university.de - - - Project Leader - - - - - - - - - - - - text/xml - - - - - XML - - - - - - - - - - - - text/xml - - - - - XML - - - - - - - - - - - - text/xml - - - - - XML - - - - - - {Coverages} - - - - diff --git a/petascope/src/petascope/wcs2/server/templates/GetCoverageTemplate.xml b/petascope/src/petascope/wcs2/server/templates/GetCoverageTemplate.xml deleted file mode 100644 index 9b76cc9..0000000 --- a/petascope/src/petascope/wcs2/server/templates/GetCoverageTemplate.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - {low} - {high} - - - {axisLabels} - - - - - - - {coverageData} - - - - - - {rangeFields} - - - {fieldName} - {datatype} - {nilValues} - - - - - diff --git a/petascope/src/petascope/wcs2/server/templates/WcsNamespaceContext.java b/petascope/src/petascope/wcs2/server/templates/WcsNamespaceContext.java deleted file mode 100644 index 1f713e4..0000000 --- a/petascope/src/petascope/wcs2/server/templates/WcsNamespaceContext.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * This file is part of rasdaman community. - * - * Rasdaman community is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Rasdaman community is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with rasdaman community. If not, see . - * - * Copyright 2003, 2004, 2005, 2006, 2007, 2008, 2009 Peter Baumann / - rasdaman GmbH. - * - * For more information please see - * or contact Peter Baumann via . - */ -package petascope.wcs2.server.templates; - -import java.util.Iterator; -import javax.xml.XMLConstants; -import javax.xml.namespace.NamespaceContext; - -/** - * - * @author Andrei Aiordachioaie - */ -public class WcsNamespaceContext implements NamespaceContext { - - @Override - public String getNamespaceURI(String prefix) { - if (prefix == null) { - throw new NullPointerException("Null prefix"); - } else if ("wcs".equals(prefix)) { - return "http://www.opengis.net/wcs/2.0"; - } else if ("gml".equals(prefix)) { - return "http://www.opengis.net/gml/3.2"; - } - - return XMLConstants.NULL_NS_URI; - } - - // This method isn't necessary for XPath processing. - @Override - public String getPrefix(String uri) { - throw new UnsupportedOperationException(); - } - - // This method isn't necessary for XPath processing either. - @Override - public Iterator getPrefixes(String uri) { - throw new UnsupportedOperationException(); - } -} -- cgit