Skip to content

Commit 9a1346d

Browse files
committed
Merge branch 'release/v0.4.0'
2 parents e1edfd9 + 27feac2 commit 9a1346d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+3102
-181
lines changed

.travis.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,4 @@ deploy:
6868
on:
6969
branch: master
7070
#tags: true
71-
72-
notifications:
73-
# Notify the World Wind services mailing list on every build
74-
email:
75-
recipients:
76-
secure: "khLHCEeK0yziQdyvMMWdQ4b6qeGvwG1T1Ph9t361tc0aPvyfR/lreHGJPbKRoOJSfe1F0E4mruigcWJPXUawVJFgzSgF1aybw5JWpAj7ricRniHy3kfbxG3eedlzYtnQU+Bkxdl9yKC/SxCuUvy+dESrEyegO1weRnesSwNefJ2VjtNAn7JZhCiGHQLh4mAHQy64AH/In9cRcoh7YOaBF3dedQkGYItA1hQ7bIsVbteJIwzNRnuPRaQUQhIkpwUUq0MrTsOhRWn7XFw5qZTEOA87TNu7rT5fn4Eqot+1zzEBr5S4PnDQJbzbAPPodldeWGdQY93ceKOvSm+qdSTpEFqyau2+CEYP6og5XXVt8hNTYc3BDECjsYtHgXiJaxeniiyUuR6e815t0oSyiAbwsE5leU5HiG0zVVPEx9hxzHSwWkjprrlQJE9U+8elhBUR73JYbactdDBkxklY5jcCQ/V5dAYcs+vXupojv6IkFdKM58o+HM9rduaHRaqIunDEoyBoma2CLLdyJP8O0nznrKLG8ViWROm6FFqaGfMitKZMFP3K9jSd9gq4P2LwGl05lRtPEUF21G9xT5mvux3Dfn56ea/ZqUM5zrsP3jSJNvadgu88jCEwnpdIeTeLaxsl1o/Wk+Kkc4OOnz2Ly3nnub71f/GrG3IaYKLXxMkuAvU="
77-
on_success: always
78-
on_failure: always
71+

pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
<groupId>gov.nasa.worldwind.server</groupId>
3131
<artifactId>worldwind-serverkit</artifactId>
32-
<version>0.3.1</version>
32+
<version>0.4.0</version>
3333
<packaging>pom</packaging>
3434

3535
<!--=====================================================================-->
@@ -62,6 +62,7 @@
6262
<module>worldwind-gt-geopkg</module>
6363
<module>worldwind-gs-geopkg</module>
6464
<module>worldwind-gs-wms</module>
65+
<module>worldwind-gs-web</module>
6566
<module>worldwind-geoserver</module>
6667
<module>worldwind-geoserver-dist</module>
6768
</modules>

worldwind-geoserver-dist/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>gov.nasa.worldwind.server</groupId>
66
<artifactId>worldwind-serverkit</artifactId>
7-
<version>0.3.1</version>
7+
<version>0.4.0</version>
88
</parent>
99
<artifactId>worldwind-geoserver-dist</artifactId>
1010
<packaging>pom</packaging>

worldwind-geoserver/pom.xml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>gov.nasa.worldwind.server</groupId>
66
<artifactId>worldwind-serverkit</artifactId>
7-
<version>0.3.1</version>
7+
<version>0.4.0</version>
88
</parent>
99
<artifactId>worldwind-geoserver</artifactId>
1010
<packaging>war</packaging>
@@ -173,6 +173,13 @@
173173
<version>${gs.version}</version>
174174
</dependency>
175175

176+
<!--WorldWind GeoServer Core UI module-->
177+
<dependency>
178+
<groupId>${project.groupId}</groupId>
179+
<artifactId>worldwind-gs-web</artifactId>
180+
<version>${project.version}</version>
181+
</dependency>
182+
176183
<!--WorldWind GeoServer WMS module-->
177184
<dependency>
178185
<groupId>${project.groupId}</groupId>

worldwind-gs-geopkg/pom.xml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ application directory.
99
<parent>
1010
<groupId>gov.nasa.worldwind.server</groupId>
1111
<artifactId>worldwind-serverkit</artifactId>
12-
<version>0.3.1</version>
12+
<version>0.4.0</version>
1313
</parent>
1414

1515
<groupId>gov.nasa.worldwind.server</groupId>
@@ -117,6 +117,12 @@ application directory.
117117
<version>${project.version}</version>
118118
</dependency>
119119

120+
<dependency>
121+
<groupId>${project.groupId}</groupId>
122+
<artifactId>worldwind-gs-web</artifactId>
123+
<version>${project.version}</version>
124+
</dependency>
125+
120126
<!--Module Dependencies-->
121127
<dependency>
122128
<groupId>org.geoserver.web</groupId>
@@ -216,13 +222,19 @@ application directory.
216222
<plugins />
217223
<resources>
218224
<resource>
225+
<!--
226+
Include applicationContext.xml Spring bean factory configuration,
227+
Wicket html markup files and images.
228+
-->
219229
<directory>${basedir}/src/main/java</directory>
220-
<includes>
221-
<!--Spring bean factory configuration-->
222-
<include>applicationContext.xml</include>
223-
</includes>
224-
</resource>
230+
<excludes>
231+
<exclude>**/*.java</exclude>
232+
</excludes>
233+
</resource>
225234
<resource>
235+
<!--
236+
Include i8n GeoServerApplication.properties file(s)
237+
-->
226238
<directory>${basedir}/src/main/resources</directory>
227239
<includes>
228240
<include>**/*</include>

worldwind-gs-geopkg/src/main/java/applicationContext.xml

Lines changed: 47 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,33 @@ application directory.
77
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
88
<beans>
99

10-
<!--GeoPackageModuleStatus provides an entry in the "Server Status" > "Modules" page-->
10+
<!--
11+
GeoPackageModuleStatus provides an entry in the "Server Status | Modules" page.
12+
-->
1113
<bean class="gov.nasa.worldwind.gs.geopkg.GeoPackageModuleStatus"/>
1214

15+
<!--
16+
The GeoPackageGetMapOutputFormat is a WFSGetFeatureOutputFormat subclass
17+
that generates a response to a WFS GetFeature operation for a GeoPackage
18+
mime type ("application/x-gpkg").
19+
-->
1320
<bean id="GeoPackageGetMapOutputFormat" class="gov.nasa.worldwind.gs.geopkg.GeoPackageGetMapOutputFormat">
1421
<constructor-arg ref="webMapService" />
1522
<constructor-arg ref="wms" />
1623
<constructor-arg ref="gwcFacade" />
1724
</bean>
1825

26+
<!--
27+
The GeoPackageGetFeatureOutputFormat is a GetMapOutputFormat implemenation that
28+
generates the WMS GetMap output for a GeoPackage mime type ("application/x-gpkg").
29+
-->
1930
<bean id="GeoPackageGetFeatureOutputFormat" class="gov.nasa.worldwind.gs.geopkg.GeoPackageGetFeatureOutputFormat">
2031
<constructor-arg ref="geoServer" />
2132
</bean>
2233

34+
<!--
35+
The GeoPackageProcess is responsible for processing a WPS GeoPackageProcessRequest.
36+
-->
2337
<bean id="GeoPackageProcess" class="gov.nasa.worldwind.gs.geopkg.wps.GeoPackageProcess">
2438
<constructor-arg index="0" ref="geoServer"/>
2539
<constructor-arg index="1" ref="GeoPackageGetMapOutputFormat" />
@@ -28,24 +42,53 @@ application directory.
2842
</bean>
2943

3044
<!--
31-
Depends on the wpsXmlConfiguration-1.0.0 WPSConfiguration object registered in
32-
the wps-core module to execute WPS requests.
45+
The GeoPackageProcessRequestPPIO is the WPS process parameter input/output
46+
for the GeoPackage mime type: "text/xml; subtype=geoserver/geopackage"
47+
It depends on the wpsXmlConfiguration-1.0.0 WPSConfiguration object
48+
registered in the wps-core module to execute WPS requests.
3349
-->
3450
<bean id="GeoPackageProcessRequestPPIO" class="gov.nasa.worldwind.gs.geopkg.wps.GeoPackageProcessRequestPPIO" >
3551
<constructor-arg index="0" ref="entityResolverProvider"/>
3652
<constructor-arg index="1" ref="wpsXmlConfiguration-1.0.0" />
3753
</bean>
3854

55+
<!--
56+
The GeoPackageDataStoreFactoryInitializer initializes GeoPkgDataStoreFactory.
57+
-->
3958
<bean id="GeoPackageDataStoreFactoryInitializer" class="gov.nasa.worldwind.gs.geopkg.GeoPkgDataStoreFactoryInitializer">
4059
<property name="resourceLoader" ref="resourceLoader"/>
4160
</bean>
4261

43-
<!--UI Component for browsing to a GeoPackage file-->
62+
<!--
63+
The GeoPackageDataStorePanel is the UI Component for browsing to a GeoPackage
64+
file when creating a Data Store
65+
-->
4466
<bean id="GeoPackageDataStorePanel" class="org.geoserver.web.data.resource.DataStorePanelInfo">
4567
<property name="id" value="gpkgRaster"/>
4668
<property name="factoryClass" value="gov.nasa.worldwind.geopkg.mosaic.GeoPackageFormat"/>
4769
<property name="iconBase" value="org.geoserver.web.GeoServerApplication"/>
4870
<property name="icon" value="img/icons/geosilk/page_white_raster.png"/>
4971
<property name="componentClass" value="gov.nasa.worldwind.gs.geopkg.GeoPackageRasterEditPanel"/>
5072
</bean>
73+
74+
75+
<!--
76+
Bean to create a link to the "Export GeoPackage" in the WWSK category.
77+
-->
78+
<bean id="exportGeoPackageLink" class="org.geoserver.web.MenuPageInfo">
79+
<!-- An internal identifier for the link component -->
80+
<property name="id" value="exportGeoPackage"/>
81+
<!-- The i18n key for the link title -->
82+
<property name="titleKey" value="ExportGeoPackagePage.page.title"/>
83+
<!-- The i18n key for a longer description of the page used for a tooltip -->
84+
<property name="descriptionKey" value="ExportGeoPackagePage.page.description"/>
85+
<!-- The fully qualified name of the page class -->
86+
<property name="componentClass" value="gov.nasa.worldwind.gs.geopkg.web.ExportGeoPackagePage"/>
87+
<!-- Optional, an icon to display alongside the link. -->
88+
<!--<property name="icon" value="img/icons/silk/help.png"/>-->
89+
<!-- Optional, the bean id of the menu category in which the link should be grouped. -->
90+
<property name="category" ref="wwskCategory"/>
91+
<!-- Optional, a key used to order the links in the menu. -->
92+
<property name="order" value="110"/>
93+
</bean>
5194
</beans>

worldwind-gs-geopkg/src/main/java/gov/nasa/worldwind/gs/geopkg/GeoPkgDataStoreFactoryInitializer.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,9 @@
1010
import org.geoserver.data.DataStoreFactoryInitializer;
1111
import org.geoserver.platform.GeoServerResourceLoader;
1212

13-
14-
1513
/**
16-
* Initializes an GeoPkg data store factory setting its location to the geoserver
17-
* data directory.
14+
* Initializes an GeoPkg data store factory by setting its location to the
15+
* GeoServer data directory.
1816
*
1917
* @author Justin Deoliveira, Boundless
2018
*
@@ -25,14 +23,15 @@ public class GeoPkgDataStoreFactoryInitializer extends
2523
GeoServerResourceLoader resourceLoader;
2624

2725
public GeoPkgDataStoreFactoryInitializer() {
28-
super( GeoPkgDataStoreFactory.class );
26+
super(GeoPkgDataStoreFactory.class);
2927
}
3028

3129
public void setResourceLoader(GeoServerResourceLoader resourceLoader) {
3230
this.resourceLoader = resourceLoader;
3331
}
3432

33+
@Override
3534
public void initialize(GeoPkgDataStoreFactory factory) {
36-
factory.setBaseDirectory( resourceLoader.getBaseDirectory() );
35+
factory.setBaseDirectory(resourceLoader.getBaseDirectory());
3736
}
3837
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<html>
2+
<head>
3+
<title><wicket:message key="title">BBox Panel</wicket:message></title>
4+
</head>
5+
<body>
6+
<wicket:panel>
7+
<!-- <form wicket:id="form"> -->
8+
<ul class="selfclear">
9+
<li class="leftwise">
10+
<label for="minX" wicket:id="minXL">minX</label>
11+
<input wicket:id="minX" id="minX" type="text" class="text" style="width: 100px;"/>
12+
</li>
13+
<li class="leftwise">
14+
<label for="minY" wicket:id="minYL">Min Y</label>
15+
<input wicket:id="minY" id="minY" type="text" class="text" style="width: 100px;"/>
16+
</li>
17+
<li class="leftwise">
18+
<label for="maxX" wicket:id="maxXL">Max X</label>
19+
<input wicket:id="maxX" id="maxX" type="text" class="text" style="width: 100px;"/>
20+
</li>
21+
<li class="leftwise">
22+
<label for="maxY" wicket:id="maxYL">Max Y</label>
23+
<input wicket:id="maxY" id="maxY" type="text" class="text" style="width: 100px;"/>
24+
</li>
25+
<br/>
26+
<!-- <li class="clearBoth" wicket:id="crsContainer">
27+
<label for="crs"><wicket:message key="crs">Coordinate Reference System</wicket:message></label>
28+
<span wicket:id="crs"/>
29+
</li>-->
30+
</ul>
31+
<!-- </form> -->
32+
</wicket:panel>
33+
</body>
34+
</html>
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
/* (c) 2014 - 2016 Open Source Geospatial Foundation - all rights reserved
2+
* (c) 2001 - 2013 OpenPlans
3+
* This code is licensed under the GPL 2.0 license, available at the root
4+
* application directory.
5+
*/
6+
package gov.nasa.worldwind.gs.geopkg.web;
7+
8+
import org.apache.wicket.markup.html.basic.Label;
9+
import org.apache.wicket.markup.html.form.FormComponentPanel;
10+
import org.apache.wicket.markup.html.form.TextField;
11+
import org.apache.wicket.model.IModel;
12+
import org.apache.wicket.model.Model;
13+
import org.apache.wicket.model.PropertyModel;
14+
import org.apache.wicket.model.ResourceModel;
15+
16+
import com.vividsolutions.jts.geom.Envelope;
17+
import org.apache.wicket.Component;
18+
import org.apache.wicket.util.visit.IVisit;
19+
import org.apache.wicket.util.visit.IVisitor;
20+
import org.geoserver.web.wicket.DecimalTextField;
21+
22+
/**
23+
* A form component for a {@link Envelope} object.
24+
*
25+
* @author Justin Deoliveira, OpenGeo
26+
* @author Andrea Aime, OpenGeo
27+
*/
28+
public class BBoxPanel extends FormComponentPanel<Envelope> {
29+
30+
private static final long serialVersionUID = -2975427786330616705L;
31+
32+
protected Label minXLabel, minYLabel, maxXLabel, maxYLabel;
33+
34+
protected Double minX, minY, maxX, maxY;
35+
36+
protected DecimalTextField minXInput, minYInput, maxXInput, maxYInput;
37+
38+
public BBoxPanel(String id) {
39+
super(id);
40+
41+
initComponents();
42+
}
43+
44+
public BBoxPanel(String id, Envelope e) {
45+
this(id, new Model<Envelope>(e));
46+
}
47+
48+
public BBoxPanel(String id, IModel<Envelope> model) {
49+
super(id, model);
50+
51+
initComponents();
52+
}
53+
54+
public void setLabelsVisibility(boolean visible) {
55+
minXLabel.setVisible(visible);
56+
minYLabel.setVisible(visible);
57+
maxXLabel.setVisible(visible);
58+
maxYLabel.setVisible(visible);
59+
}
60+
61+
void initComponents() {
62+
updateFields();
63+
64+
add(minXLabel = new Label("minXL", new ResourceModel("minX")));
65+
add(minYLabel = new Label("minYL", new ResourceModel("minY")));
66+
add(maxXLabel = new Label("maxXL", new ResourceModel("maxX")));
67+
add(maxYLabel = new Label("maxYL", new ResourceModel("maxY")));
68+
69+
add(minXInput = new DecimalTextField("minX", new PropertyModel<>(this, "minX")));
70+
add(minYInput = new DecimalTextField("minY", new PropertyModel<>(this, "minY")));
71+
add(maxXInput = new DecimalTextField("maxX", new PropertyModel<>(this, "maxX")));
72+
add(maxYInput = new DecimalTextField("maxY", new PropertyModel<>(this, "maxY")));
73+
74+
}
75+
76+
@Override
77+
protected void onBeforeRender() {
78+
updateFields();
79+
super.onBeforeRender();
80+
}
81+
82+
private void updateFields() {
83+
Envelope e = (Envelope) getModelObject();
84+
if (e != null) {
85+
this.minX = e.getMinX();
86+
this.minY = e.getMinY();
87+
this.maxX = e.getMaxX();
88+
this.maxY = e.getMaxY();
89+
}
90+
}
91+
92+
@SuppressWarnings("unchecked")
93+
@Override
94+
public void convertInput() {
95+
visitChildren(TextField.class, (component, visit) -> {
96+
((TextField<String>) component).processInput();
97+
});
98+
99+
// update the envelope model
100+
if (minX != null && maxX != null && minY != null && maxY != null) {
101+
setConvertedInput(new Envelope(minX, maxX, minY, maxY));
102+
} else {
103+
setConvertedInput(null);
104+
}
105+
}
106+
107+
@SuppressWarnings("unchecked")
108+
@Override
109+
protected void onModelChanged() {
110+
// when the client programmatically changed the model, update the fields
111+
// so that the textfields will change too
112+
updateFields();
113+
visitChildren(TextField.class, (Component component, IVisit<Object> visit) -> {
114+
((TextField<String>) component).clearInput();
115+
});
116+
}
117+
118+
}

0 commit comments

Comments
 (0)