-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added dispatcher and output format #1
base: ogc-nsg-profile
Are you sure you want to change the base?
Changes from 6 commits
223d9f3
d4e1cae
62df0e3
b22d6b6
abaf78f
d4fd093
a7d3149
39427d2
3c7dfc0
500a364
50f6260
0585f09
cc6e0c5
7e15e64
21754e0
0d594db
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
.. _community_nsg_profile: | ||
|
||
NSG Profile | ||
=========== | ||
|
||
|
||
Index Result Type | ||
----------------- | ||
|
||
|
||
PageResults Operation | ||
--------------------- |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
<?xml version="1.0" encoding="ISO-8859-1"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<parent> | ||
<groupId>org.geoserver</groupId> | ||
<artifactId>community</artifactId> | ||
<version>2.12-SNAPSHOT</version> | ||
</parent> | ||
<groupId>org.geoserver.community</groupId> | ||
<artifactId>gs-nsg-profile</artifactId> | ||
<packaging>jar</packaging> | ||
<version>2.12-SNAPSHOT</version> | ||
<name>NSG Profile</name> | ||
<dependencies> | ||
<!-- geoserver dependencies --> | ||
<dependency> | ||
<groupId>org.geoserver</groupId> | ||
<artifactId>gs-main</artifactId> | ||
<classifier>tests</classifier> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.geoserver</groupId> | ||
<artifactId>gs-wfs</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.geoserver.web</groupId> | ||
<artifactId>gs-web-core</artifactId> | ||
</dependency> | ||
<!-- geotools dependencies --> | ||
<dependency> | ||
<groupId>org.geotools.jdbc</groupId> | ||
<artifactId>gt-jdbc-h2</artifactId> | ||
</dependency> | ||
<!-- emf dependencies--> | ||
<dependency> | ||
<groupId>org.eclipse.emf</groupId> | ||
<artifactId>org.eclipse.emf.ecore.xmi</artifactId> | ||
<version>2.12.0</version> | ||
</dependency> | ||
<!-- geoserver tests dependencies --> | ||
<dependency> | ||
<groupId>org.geoserver</groupId> | ||
<artifactId>gs-wfs</artifactId> | ||
<classifier>tests</classifier> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.geoserver.web</groupId> | ||
<artifactId>gs-web-core</artifactId> | ||
<version>${project.version}</version> | ||
<classifier>tests</classifier> | ||
<scope>test</scope> | ||
</dependency> | ||
<!-- other tests dependencies --> | ||
<dependency> | ||
<groupId>org.hamcrest</groupId> | ||
<artifactId>hamcrest-library</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-test</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>javax.servlet</groupId> | ||
<artifactId>javax.servlet-api</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
</dependencies> | ||
<build> | ||
<resources> | ||
<resource> | ||
<directory>${basedir}/src/main/java</directory> | ||
<includes> | ||
<include>**/*.html</include> | ||
</includes> | ||
</resource> | ||
<resource> | ||
<directory>${basedir}/src/main/resources</directory> | ||
<includes> | ||
<include>**/*</include> | ||
</includes> | ||
</resource> | ||
</resources> | ||
</build> | ||
</project> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
/* (c) 2017 Open Source Geospatial Foundation - all rights reserved | ||
* This code is licensed under the GPL 2.0 license, available at the root | ||
* application directory. | ||
*/ | ||
|
||
package org.geoserver.nsg.pagination.random; | ||
|
||
import java.util.Map; | ||
|
||
import org.geoserver.platform.resource.Resource; | ||
import org.geotools.data.DataStore; | ||
|
||
/** | ||
* | ||
* Class used to store the index result type configuration managed by {@link IndexInitializer} | ||
* | ||
* @author sandr | ||
* | ||
*/ | ||
public class IndexConfiguration { | ||
|
||
private static DataStore currentDataStore; | ||
|
||
private static Resource storageResource; | ||
|
||
private static Long timeToLive = 600l; | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The time unit used should be explicitly stayed. |
||
private static Map<String, Object> currentDataStoreParams; | ||
|
||
/** | ||
* Store the DB parameters and the relative {@link DataStore} | ||
* | ||
* @param currentDataStoreParams | ||
* @param currentDataStore | ||
*/ | ||
public static void setCurrentDataStore(Map<String, Object> currentDataStoreParams, | ||
DataStore currentDataStore) { | ||
IndexConfiguration.currentDataStoreParams = currentDataStoreParams; | ||
IndexConfiguration.currentDataStore = currentDataStore; | ||
} | ||
|
||
/** | ||
* Store the reference to resource used to archive the serialized GetFeatureRequest | ||
* | ||
* @param currentDataStoreParams | ||
* @param currentDataStore | ||
*/ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Invalid java-doc |
||
public static void setStorageResource(Resource storageResource) { | ||
IndexConfiguration.storageResource = storageResource; | ||
} | ||
|
||
/** | ||
* Store the value of time to live of stored GetFeatureRequest | ||
* | ||
* @param timeToLive | ||
*/ | ||
public static void setTimeToLive(Long timeToLive) { | ||
IndexConfiguration.timeToLive = timeToLive; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When dealing with times the time unit should always be clearly defined, for example |
||
} | ||
|
||
public static DataStore getCurrentDataStore() { | ||
return currentDataStore; | ||
} | ||
|
||
public static Map<String, Object> getCurrentDataStoreParams() { | ||
return currentDataStoreParams; | ||
} | ||
|
||
public static Resource getStorageResource() { | ||
return storageResource; | ||
} | ||
|
||
public static Long getTimeToLive() { | ||
return timeToLive; | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar to the setter method, the time unit used should be clearly stayed, for example |
||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to declare the version here (and it should not be done here anyway), GS root
pom.xml
dependency-management section already declare this dependency with the same version.All dependencies should always be declared on the root
pom.xml
dependency management section to force every core module, extension and community module to sue the same version.