added javadoc to GeoportalExporter
This commit is contained in:
parent
4f6bf4613e
commit
82e8674d2c
|
@ -1,6 +1,8 @@
|
||||||
# gCube URI Resolver
|
# gCube URI Resolver
|
||||||
|
|
||||||
The URI Resolver is a RESTful service which gives access via HTTP(s) to different gCube Resolver services and gCube Applications
|
The URI Resolver is a RESTful service which gives access via HTTP(s) to different gCube Resolver services and gCube Applications.
|
||||||
|
|
||||||
|
The URI Resolver production service is available at [D4Science URI Resolver](https://data.d4science.org/)
|
||||||
|
|
||||||
## Built With
|
## Built With
|
||||||
|
|
||||||
|
@ -11,7 +13,7 @@ The URI Resolver is a RESTful service which gives access via HTTP(s) to differen
|
||||||
|
|
||||||
You can find the URI Resolver documentation at [URI Resolver Wiki Page](https://wiki.gcube-system.org/gcube/URI_Resolver)
|
You can find the URI Resolver documentation at [URI Resolver Wiki Page](https://wiki.gcube-system.org/gcube/URI_Resolver)
|
||||||
|
|
||||||
The API documentation accessible by [links](https://wiki.gcube-system.org/gcube/URI_Resolver#Instances) is provided by [Enunciate](https://github.com/stoicflame/enunciate/)
|
The API documentation accessible by this [link](https://wiki.gcube-system.org/gcube/URI_Resolver#Instances) is provided by [Enunciate](https://github.com/stoicflame/enunciate/)
|
||||||
|
|
||||||
## Change log
|
## Change log
|
||||||
|
|
||||||
|
|
|
@ -80,11 +80,13 @@ public class GeoportalExporter {
|
||||||
* Export.
|
* Export.
|
||||||
*
|
*
|
||||||
* @param req the req
|
* @param req the req
|
||||||
* @param export_type the export type
|
* @param export_type the export type. Must be a value of the enum
|
||||||
|
* {#ACCEPTED_EXPORT_TYPE}
|
||||||
* @param ucdID the ucd ID
|
* @param ucdID the ucd ID
|
||||||
* @param projectID the project ID
|
* @param projectID the project ID
|
||||||
* @param asURL the as URL
|
* @param asURL the as URL. If true returns the project exported as an URL
|
||||||
* @return the response
|
* in the response
|
||||||
|
* @return the response. Can be an URL or a Stream of the project exported.
|
||||||
* @throws WebApplicationException the web application exception
|
* @throws WebApplicationException the web application exception
|
||||||
*/
|
*/
|
||||||
@GET
|
@GET
|
||||||
|
@ -141,8 +143,8 @@ public class GeoportalExporter {
|
||||||
+ " seems to be not configured in the context: " + context,
|
+ " seems to be not configured in the context: " + context,
|
||||||
this.getClass(), helpURI);
|
this.getClass(), helpURI);
|
||||||
}
|
}
|
||||||
|
// if the configuration exists in the context
|
||||||
if (checked) {
|
if (checked) {
|
||||||
|
|
||||||
if (getAsURL) {
|
if (getAsURL) {
|
||||||
try {
|
try {
|
||||||
LOG.info("Serving request as getAsURL...");
|
LOG.info("Serving request as getAsURL...");
|
||||||
|
@ -219,11 +221,12 @@ public class GeoportalExporter {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Healthcheck.
|
* Healthcheck. Checks if the export facility is configured in the context (i.e.
|
||||||
*
|
* the scope read from input token).
|
||||||
|
*
|
||||||
* @param req the req
|
* @param req the req
|
||||||
* @param export_type the export type
|
* @param export_type the export type
|
||||||
* @return the response
|
* @return an object of type {#GeoportalJsonResponse) that contains the response
|
||||||
* @throws WebApplicationException the web application exception
|
* @throws WebApplicationException the web application exception
|
||||||
*/
|
*/
|
||||||
@GET
|
@GET
|
||||||
|
@ -275,11 +278,14 @@ public class GeoportalExporter {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* View job.
|
* View job. Check the job export status.
|
||||||
*
|
*
|
||||||
* @param req the req
|
* @param req the req
|
||||||
* @param jobCode the job code
|
* @param jobCode the job code. The job ID assigned by export facility that
|
||||||
* @return the response
|
* returns a waiting HTML page
|
||||||
|
* @return the response. It is a {#GeoportalJsonResponse} with the status of the
|
||||||
|
* job. An export job completed contains the URL of the project
|
||||||
|
* exported.
|
||||||
* @throws WebApplicationException the web application exception
|
* @throws WebApplicationException the web application exception
|
||||||
*/
|
*/
|
||||||
@GET
|
@GET
|
||||||
|
@ -307,7 +313,7 @@ public class GeoportalExporter {
|
||||||
|
|
||||||
if (fetchedPDF == null) {
|
if (fetchedPDF == null) {
|
||||||
theJson.setState(Status.NOT_FOUND.getReasonPhrase());
|
theJson.setState(Status.NOT_FOUND.getReasonPhrase());
|
||||||
theJson.setMessage("No job found with id: "+jobCode);
|
theJson.setMessage("No job found with id: " + jobCode);
|
||||||
try {
|
try {
|
||||||
jsonReponse = responseToString(theJson);
|
jsonReponse = responseToString(theJson);
|
||||||
LOG.info("viewJob returning not found: " + jsonReponse);
|
LOG.info("viewJob returning not found: " + jsonReponse);
|
||||||
|
|
Loading…
Reference in New Issue