Skip to content
Snippets Groups Projects
Commit fd57537e authored by Tor-Einar Skog's avatar Tor-Einar Skog
Browse files

Updated REST endpoint documentation (Enunciate powered)

parent a53ad789
No related branches found
No related tags found
2 merge requests!17Develop,!11Te thredds exploration
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
The VIPSLogic service API gives access to stored pest predictions and organisms The VIPSLogic service API gives access to stored pest predictions and organisms
</description> </description>
<copyright>NIBIO</copyright> <copyright>NIBIO</copyright>
<contact>Tor-Einar Skog</contact> <contact><a href="https://www.nibio.no/ansatte/tor-einar-skog" target="new">Tor-Einar Skog</a></contact>
<application root="/"/> <application root="/"/>
......
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <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/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>no.nibio.vips.</groupId> <groupId>no.nibio.vips.</groupId>
<artifactId>VIPSLogic</artifactId> <artifactId>VIPSLogic</artifactId>
<packaging>war</packaging> <packaging>war</packaging>
<version>1.0-SNAPSHOT</version> <version>1.0-SNAPSHOT</version>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<geotools.version>13.4</geotools.version> <geotools.version>13.4</geotools.version>
</properties> </properties>
<name>VIPSLogic</name> <name>VIPSLogic</name>
<url>http://maven.apache.org</url> <url>http://maven.apache.org</url>
<repositories> <repositories>
<repository> <repository>
<id>jitpack.io</id> <id>jitpack.io</id>
<url>https://jitpack.io</url> <url>https://jitpack.io</url>
</repository> </repository>
<repository> <repository>
<id>bedatadriven</id> <id>bedatadriven</id>
<name>bedatadriven public repo</name> <name>bedatadriven public repo</name>
<url>https://nexus.bedatadriven.com/content/groups/public/</url> <url>https://nexus.bedatadriven.com/content/groups/public/</url>
</repository> </repository>
<repository> <repository>
<id>unidata-releases</id> <id>unidata-releases</id>
<name>Unidata Releases</name> <name>Unidata Releases</name>
<url>https://artifacts.unidata.ucar.edu/content/repositories/unidata-releases/</url> <url>https://artifacts.unidata.ucar.edu/content/repositories/unidata-releases/</url>
</repository> </repository>
</repositories> </repositories>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>edu.ucar</groupId> <groupId>edu.ucar</groupId>
<artifactId>cdm</artifactId> <artifactId>cdm</artifactId>
<version>4.6.10</version> <version>4.6.10</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.flywaydb</groupId> <groupId>org.flywaydb</groupId>
<artifactId>flyway-core</artifactId> <artifactId>flyway-core</artifactId>
<version>4.2.0</version> <version>4.2.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.github.bjornharrtell</groupId> <groupId>com.github.bjornharrtell</groupId>
<!--groupId>org.wololo</groupId--> <!--groupId>org.wololo</groupId-->
<artifactId>jts2geojson</artifactId> <artifactId>jts2geojson</artifactId>
<version>0.10.0</version> <version>0.10.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.hibernate</groupId> <groupId>org.hibernate</groupId>
<artifactId>hibernate-spatial</artifactId> <artifactId>hibernate-spatial</artifactId>
<version>5.0.10.Final</version> <version>5.0.10.Final</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<artifactId>postgresql</artifactId> <artifactId>postgresql</artifactId>
<groupId>postgresql</groupId> <groupId>postgresql</groupId>
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>dom4j</groupId> <groupId>dom4j</groupId>
<artifactId>dom4j</artifactId> <artifactId>dom4j</artifactId>
<version>1.6.1</version> <version>1.6.1</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.jboss.resteasy</groupId> <groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jaxrs</artifactId> <artifactId>resteasy-jaxrs</artifactId>
<version>3.0.9.Final</version> <version>3.0.9.Final</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.jboss.resteasy</groupId> <groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-client</artifactId> <artifactId>resteasy-client</artifactId>
<version>3.0.9.Final</version> <version>3.0.9.Final</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>no.nibio.vips.common</groupId> <groupId>no.nibio.vips.common</groupId>
<artifactId>VIPSCommon</artifactId> <artifactId>VIPSCommon</artifactId>
<version>1.0-SNAPSHOT</version> <version>1.0-SNAPSHOT</version>
<type>jar</type> <type>jar</type>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>org.python</groupId> <groupId>org.python</groupId>
<artifactId>jython-standalone</artifactId> <artifactId>jython-standalone</artifactId>
</exclusion> </exclusion>
<exclusion> <exclusion>
<groupId>org.renjin</groupId> <groupId>org.renjin</groupId>
<artifactId>renjin-script-engine</artifactId> <artifactId>renjin-script-engine</artifactId>
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.reflections</groupId> <groupId>org.reflections</groupId>
<artifactId>reflections</artifactId> <artifactId>reflections</artifactId>
<version>0.9.9</version> <version>0.9.9</version>
<type>jar</type> <type>jar</type>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.httpcomponents</groupId> <groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId> <artifactId>httpclient</artifactId>
<version>4.5</version> <version>4.5</version>
<type>jar</type> <type>jar</type>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<version>4.10</version> <version>4.10</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>commons-lang</groupId> <groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId> <artifactId>commons-lang</artifactId>
<version>2.5</version> <version>2.5</version>
<type>jar</type> <type>jar</type>
</dependency> </dependency>
<dependency> <dependency>
<groupId>de.micromata.jak</groupId> <groupId>de.micromata.jak</groupId>
<artifactId>JavaAPIforKml</artifactId> <artifactId>JavaAPIforKml</artifactId>
<version>2.2.0</version> <version>2.2.0</version>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/net.postgis/postgis-jdbc --> <!-- https://mvnrepository.com/artifact/net.postgis/postgis-jdbc -->
<dependency> <dependency>
<groupId>net.postgis</groupId> <groupId>net.postgis</groupId>
<artifactId>postgis-jdbc</artifactId> <artifactId>postgis-jdbc</artifactId>
<version>2.2.1</version> <version>2.2.1</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.fasterxml.jackson.core</groupId> <groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId> <artifactId>jackson-annotations</artifactId>
<version>2.7.4</version> <version>2.7.4</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.fasterxml.jackson.core</groupId> <groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId> <artifactId>jackson-core</artifactId>
<version>2.7.4</version> <version>2.7.4</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.fasterxml.jackson.core</groupId> <groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId> <artifactId>jackson-databind</artifactId>
<version>2.7.4</version> <version>2.7.4</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>log4j</groupId> <groupId>log4j</groupId>
<artifactId>log4j</artifactId> <artifactId>log4j</artifactId>
<version>1.2.14</version> <version>1.2.14</version>
<type>jar</type> <type>jar</type>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.passay</groupId> <groupId>org.passay</groupId>
<artifactId>passay</artifactId> <artifactId>passay</artifactId>
<version>1.1.0</version> <version>1.1.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.hibernate</groupId> <groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId> <artifactId>hibernate-core</artifactId>
<version>5.0.10.Final</version> <version>5.0.10.Final</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.postgresql</groupId> <groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId> <artifactId>postgresql</artifactId>
<version>9.4.1211</version> <version>9.4.1211</version>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId> <groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-csv</artifactId> <artifactId>jackson-dataformat-csv</artifactId>
<version>2.6.2</version> <version>2.6.2</version>
<type>jar</type> <type>jar</type>
</dependency> </dependency>
<dependency> <dependency>
<groupId>javax</groupId> <groupId>javax</groupId>
<artifactId>javaee-web-api</artifactId> <artifactId>javaee-web-api</artifactId>
<version>7.0</version> <version>7.0</version>
<type>jar</type> <type>jar</type>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>javax</groupId> <groupId>javax</groupId>
<artifactId>javaee-api</artifactId> <artifactId>javaee-api</artifactId>
<version>7.0</version> <version>7.0</version>
<type>jar</type> <type>jar</type>
<scope>provided</scope> <scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.freemarker</groupId> <groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId> <artifactId>freemarker</artifactId>
<version>2.3.24-incubating</version> <version>2.3.24-incubating</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>it.sauronsoftware.cron4j</groupId> <groupId>it.sauronsoftware.cron4j</groupId>
<artifactId>cron4j</artifactId> <artifactId>cron4j</artifactId>
<version>2.2.5</version> <version>2.2.5</version>
</dependency> </dependency>
<!--dependency> <!--dependency>
<groupId>org.openid4java</groupId> <groupId>org.openid4java</groupId>
<artifactId>openid4java</artifactId> <artifactId>openid4java</artifactId>
<version>0.9.8</version> <version>0.9.8</version>
</dependency--> </dependency-->
<dependency> <dependency>
<groupId>com.google.api-client</groupId> <groupId>com.google.api-client</groupId>
<artifactId>google-api-client</artifactId> <artifactId>google-api-client</artifactId>
<version>1.19.1</version> <version>1.19.1</version>
</dependency> </dependency>
<!--dependency> <!--dependency>
<groupId>edu.vt.middleware</groupId> <groupId>edu.vt.middleware</groupId>
<artifactId>vt-password</artifactId> <artifactId>vt-password</artifactId>
<version>3.1.2</version> <version>3.1.2</version>
</dependency--> </dependency-->
<dependency> <dependency>
<groupId>commons-fileupload</groupId> <groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId> <artifactId>commons-fileupload</artifactId>
<version>1.3.1</version> <version>1.3.1</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.ibm.icu</groupId> <groupId>com.ibm.icu</groupId>
<artifactId>icu4j</artifactId> <artifactId>icu4j</artifactId>
<version>52.1</version> <version>52.1</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>jaxen</groupId> <groupId>jaxen</groupId>
<artifactId>jaxen</artifactId> <artifactId>jaxen</artifactId>
<version>1.1.1</version> <version>1.1.1</version>
</dependency> </dependency>
<!--dependency> <!--dependency>
<groupId>org.postgresql</groupId> <groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId> <artifactId>postgresql</artifactId>
<version>9.4-1211</version> <version>9.4-1211</version>
<scope>provided</scope> <scope>provided</scope>
</dependency--> </dependency-->
<dependency> <dependency>
<groupId>org.openjdk.jol</groupId> <groupId>org.openjdk.jol</groupId>
<artifactId>jol-core</artifactId> <artifactId>jol-core</artifactId>
<version>0.9</version> <version>0.9</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.geotools</groupId> <groupId>org.geotools</groupId>
<artifactId>gt-api</artifactId> <artifactId>gt-api</artifactId>
<version>17.2</version> <version>17.2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.geotools</groupId> <groupId>org.geotools</groupId>
<artifactId>gt-epsg-hsql</artifactId> <artifactId>gt-epsg-hsql</artifactId>
<version>17.2</version> <version>17.2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.webcohesion.enunciate</groupId> <groupId>com.webcohesion.enunciate</groupId>
<artifactId>enunciate-core-annotations</artifactId> <artifactId>enunciate-core-annotations</artifactId>
<version>2.10.1</version> <version>2.10.1</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.webcohesion.enunciate</groupId> <groupId>com.webcohesion.enunciate</groupId>
<artifactId>enunciate-rt-util</artifactId> <artifactId>enunciate-rt-util</artifactId>
<version>2.10.1</version> <version>2.10.1</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.bedatadriven</groupId> <groupId>com.bedatadriven</groupId>
<artifactId>jackson-datatype-jts</artifactId> <artifactId>jackson-datatype-jts</artifactId>
<version>2.2</version> <version>2.2</version>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version> <version>2.0.2</version>
<configuration> <configuration>
<source>1.8</source> <source>1.8</source>
<target>1.8</target> <target>1.8</target>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.jvnet.jax-ws-commons</groupId> <groupId>org.jvnet.jax-ws-commons</groupId>
<artifactId>jaxws-maven-plugin</artifactId> <artifactId>jaxws-maven-plugin</artifactId>
<version>2.3</version> <version>2.3</version>
<executions> <executions>
<execution> <execution>
<goals> <goals>
<goal>wsimport</goal> <goal>wsimport</goal>
</goals> </goals>
<configuration> <configuration>
<wsdlFiles> <wsdlFiles>
<wsdlFile>dmiweatherservice-plant.dlbr.dk/DMIWeatherService.svc.wsdl</wsdlFile> <wsdlFile>dmiweatherservice-plant.dlbr.dk/DMIWeatherService.svc.wsdl</wsdlFile>
</wsdlFiles> </wsdlFiles>
<packageName>no.nibio.vips.util.weather.dnmipointweb</packageName> <packageName>no.nibio.vips.util.weather.dnmipointweb</packageName>
<vmArgs> <vmArgs>
<vmArg>-Djavax.xml.accessExternalSchema=all</vmArg> <vmArg>-Djavax.xml.accessExternalSchema=all</vmArg>
</vmArgs> </vmArgs>
<wsdlLocation>https://dmiweatherservice-plant.dlbr.dk/DMIWeatherService.svc?wsdl</wsdlLocation> <wsdlLocation>https://dmiweatherservice-plant.dlbr.dk/DMIWeatherService.svc?wsdl</wsdlLocation>
<staleFile>${project.build.directory}/jaxws/stale/DMIWeatherService.svc.stale</staleFile> <staleFile>${project.build.directory}/jaxws/stale/DMIWeatherService.svc.stale</staleFile>
<keep>true</keep> <keep>true</keep>
</configuration> </configuration>
<id>wsimport-generate-DMIWeatherService.svc</id> <id>wsimport-generate-DMIWeatherService.svc</id>
<phase>generate-sources</phase> <phase>generate-sources</phase>
</execution> </execution>
</executions> </executions>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>javax.xml</groupId> <groupId>javax.xml</groupId>
<artifactId>webservices-api</artifactId> <artifactId>webservices-api</artifactId>
<version>2.0</version> <version>2.0</version>
</dependency> </dependency>
</dependencies> </dependencies>
<configuration> <configuration>
<sourceDestDir>${project.build.directory}/generated-sources/jaxws-wsimport</sourceDestDir> <sourceDestDir>${project.build.directory}/generated-sources/jaxws-wsimport</sourceDestDir>
<xnocompile>true</xnocompile> <xnocompile>true</xnocompile>
<verbose>true</verbose> <verbose>true</verbose>
<extension>true</extension> <extension>true</extension>
<catalog>${basedir}/src/jax-ws-catalog.xml</catalog> <catalog>${basedir}/src/jax-ws-catalog.xml</catalog>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId> <artifactId>maven-war-plugin</artifactId>
<version>2.0.2</version> <version>2.0.2</version>
<configuration> <configuration>
<webResources> <webResources>
<resource> <resource>
<directory>src</directory> <directory>src</directory>
<targetPath>WEB-INF</targetPath> <targetPath>WEB-INF</targetPath>
<includes> <includes>
<include>jax-ws-catalog.xml</include> <include>jax-ws-catalog.xml</include>
<include>wsdl/**</include> <include>wsdl/**</include>
</includes> </includes>
</resource> </resource>
<resource> <resource>
<directory>src</directory> <directory>src</directory>
<targetPath>WEB-INF/classes/META-INF</targetPath> <targetPath>WEB-INF/classes/META-INF</targetPath>
<includes> <includes>
<include>jax-ws-catalog.xml</include> <include>jax-ws-catalog.xml</include>
<include>wsdl/**</include> <include>wsdl/**</include>
</includes> </includes>
</resource> </resource>
</webResources> </webResources>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
<version>2.10</version> <version>2.10</version>
<configuration> <configuration>
<argLine>-Xmx6048m</argLine> <argLine>-Xmx6048m</argLine>
</configuration> </configuration>
</plugin> </plugin>
<plugin> <plugin>
<groupId>com.webcohesion.enunciate</groupId> <groupId>com.webcohesion.enunciate</groupId>
<artifactId>enunciate-maven-plugin</artifactId> <artifactId>enunciate-maven-plugin</artifactId>
<version>2.10.1</version> <version>2.10.1</version>
<executions> <executions>
<execution> <execution>
<goals> <goals>
<!--goal>assemble</goal--> <!--goal>assemble</goal-->
<goal>docs</goal> <goal>docs</goal>
</goals> </goals>
<configuration> <configuration>
<docsDir>${project.build.directory}/${project.build.finalName}/public/RESTdocs</docsDir> <docsDir>${project.build.directory}/${project.build.finalName}/public/RESTdocs</docsDir>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
</project> </project>
...@@ -86,9 +86,30 @@ public class LogicService { ...@@ -86,9 +86,30 @@ public class LogicService {
/** /**
* Get all results for one pest prediction * Get all results for one pest prediction
* @param forecastConfigurationId * @param forecastConfigurationId Database id of the configured forecast
* @param userUUID if the forecast is private, the correct userUUID must be supplied. * @param userUUID if the forecast is private, the correct userUUID must be supplied.
* @return * @return JSON with result data. A list of ForecastResult objects. Example:
* <pre>
* {
"forecastResultId": 5710137,
"validTimeStart": "2019-01-22T23:00:00.000+0000",
"validTimeEnd": null,
"warningStatus": 0,
"forecastConfigurationId": -1000,
"validGeometry": { // NORMALLY SET ONLY IF the result set contains results for multiple locations
"type": "Point",
"coordinates": [
10.333252,
57.179002
]
},
"keys": [ // A list of the existing parameter names in this result object
"GRIDZYMOSE.WHS"
],
"allValues": { // Parameters with values. Everything is a String. Client must convert to numbers if necessary
"GRIDZYMOSE.WHS": "0"
}
}</pre>
*/ */
@GET @GET
@Path("forecastresults/{forecastConfigurationId}") @Path("forecastresults/{forecastConfigurationId}")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment