forked from deegree/deegree3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request deegree#1597 from gritGmbH/enhancement/optimize-wm…
…s-controller-spi Optimize deegree SPI and its documentation
- Loading branch information
Showing
6 changed files
with
160 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
.../main/java/org/deegree/services/wms/controller/plugins/DefaultGetFeatureInfoProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/*---------------------------------------------------------------------------- | ||
This file is part of deegree, http://deegree.org/ | ||
Copyright (C) 2023 by: | ||
- Department of Geography, University of Bonn - | ||
and | ||
- grit graphische Informationstechnik Beratungsgesellschaft mbH - | ||
This library is free software; you can redistribute it and/or modify it under | ||
the terms of the GNU Lesser General Public License as published by the Free | ||
Software Foundation; either version 2.1 of the License, or (at your option) | ||
any later version. | ||
This library 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 Lesser General Public License for more | ||
details. | ||
You should have received a copy of the GNU Lesser General Public License | ||
along with this library; if not, write to the Free Software Foundation, Inc., | ||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
Contact information: | ||
grit graphische Informationstechnik Beratungsgesellschaft mbH | ||
Landwehrstr. 143, 59368 Werne | ||
Germany | ||
https://www.grit.de/ | ||
Department of Geography, University of Bonn | ||
Prof. Dr. Klaus Greve | ||
Postfach 1147, 53001 Bonn | ||
Germany | ||
http://www.geographie.uni-bonn.de/deegree/ | ||
e-mail: [email protected] | ||
----------------------------------------------------------------------------*/ | ||
package org.deegree.services.wms.controller.plugins; | ||
|
||
import java.io.IOException; | ||
import java.util.List; | ||
import org.deegree.commons.ows.exception.OWSException; | ||
import org.deegree.feature.FeatureCollection; | ||
import org.deegree.protocol.wms.ops.GetFeatureInfo; | ||
import org.deegree.services.wms.MapService; | ||
import org.deegree.services.wms.controller.WMSController; | ||
|
||
public class DefaultGetFeatureInfoProvider implements GetFeatureInfoProvider { | ||
|
||
@Override | ||
public FeatureCollection query(WMSController wmsController, MapService service, GetFeatureInfo fi, | ||
List<String> queryLayers, List<String> headers) throws OWSException, IOException { | ||
return service.getFeatures(fi, headers); | ||
} | ||
|
||
} |
59 changes: 59 additions & 0 deletions
59
...wms/src/main/java/org/deegree/services/wms/controller/plugins/GetFeatureInfoProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/*---------------------------------------------------------------------------- | ||
This file is part of deegree, http://deegree.org/ | ||
Copyright (C) 2023 by: | ||
- Department of Geography, University of Bonn - | ||
and | ||
- grit graphische Informationstechnik Beratungsgesellschaft mbH - | ||
This library is free software; you can redistribute it and/or modify it under | ||
the terms of the GNU Lesser General Public License as published by the Free | ||
Software Foundation; either version 2.1 of the License, or (at your option) | ||
any later version. | ||
This library 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 Lesser General Public License for more | ||
details. | ||
You should have received a copy of the GNU Lesser General Public License | ||
along with this library; if not, write to the Free Software Foundation, Inc., | ||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
Contact information: | ||
grit graphische Informationstechnik Beratungsgesellschaft mbH | ||
Landwehrstr. 143, 59368 Werne | ||
Germany | ||
https://www.grit.de/ | ||
Department of Geography, University of Bonn | ||
Prof. Dr. Klaus Greve | ||
Postfach 1147, 53001 Bonn | ||
Germany | ||
http://www.geographie.uni-bonn.de/deegree/ | ||
e-mail: [email protected] | ||
----------------------------------------------------------------------------*/ | ||
package org.deegree.services.wms.controller.plugins; | ||
|
||
import java.io.IOException; | ||
import java.util.List; | ||
import org.deegree.commons.ows.exception.OWSException; | ||
import org.deegree.feature.FeatureCollection; | ||
import org.deegree.protocol.wms.ops.GetFeatureInfo; | ||
import org.deegree.services.wms.MapService; | ||
import org.deegree.services.wms.controller.WMSController; | ||
|
||
public interface GetFeatureInfoProvider { | ||
|
||
/** | ||
* @param wmsController Controller handling the request | ||
* @param service MapService providing the data | ||
* @param fi Info request | ||
* @param queryLayers Original layer in map request | ||
* @param headers may not be null. Extra HTTP headers will be added, as required by | ||
* the WMS spec. | ||
* @return a FeatureCollection from the requested service | ||
*/ | ||
FeatureCollection query(WMSController wmsController, MapService service, GetFeatureInfo fi, | ||
List<String> queryLayers, List<String> headers) throws OWSException, IOException; | ||
|
||
} |
1 change: 1 addition & 0 deletions
1
...rces/META-INF/services/org.deegree.services.wms.controller.plugins.GetFeatureInfoProvider
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# This must be provided by the extension module that provides the non-default implementation |
2 changes: 1 addition & 1 deletion
2
...ources/META-INF/services/org.deegree.services.wms.controller.plugins.OutputFormatProvider
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
org.deegree.services.wms.controller.plugins.DefaultOutputFormatProvider | ||
# This must be provided by the extension module that provides the non-default implementation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters