improved documentation

This commit is contained in:
Francesco Mangiacrapa 2022-04-01 10:25:30 +02:00
parent dba18685f6
commit e430a4acbe
7 changed files with 16 additions and 27 deletions

View File

@ -5,7 +5,7 @@
<api-classes> <api-classes>
<exclude <exclude
pattern="org.gcube.datatransfer.resolver.services.UriResolverDocs" /> pattern="org.gcube.datatransfer.resolver.services.DocsGenerator" />
<exclude <exclude
pattern="org.gcube.datatransfer.resolver.services.UriResolverIndex" /> pattern="org.gcube.datatransfer.resolver.services.UriResolverIndex" />
<exclude <exclude
@ -17,14 +17,13 @@
</api-classes> </api-classes>
<modules> <modules>
<gwt-json-overlay disabled=" <gwt-json-overlay disabled="true" />
true " />
<php-json-client disabled="true" /> <php-json-client disabled="true" />
<ruby-json-client disabled="true" /> <ruby-json-client disabled="true" />
<java-json-client disabled="true" /> <java-json-client disabled="true" />
<javascript-client disabled="true" /> <javascript-client disabled="true" />
<docs docsDir="${project.build.directory}" docsSubdir="docs" /> <docs docsDir="${project.build.directory}" docsSubdir="docs" />
<!-- <swagger scheme="https" /> --> <!-- <swagger basePath="[YOUR_APPLICATION-NAME]" /> -->
</modules> </modules>
</enunciate> </enunciate>

View File

@ -57,10 +57,9 @@ import org.slf4j.LoggerFactory;
import org.xml.sax.SAXException; import org.xml.sax.SAXException;
/** /**
* The AnalyticsCreateResolver provides a method to get the Analytics URLs (that * The AnalyticsCreateResolver provides a method to get the Analytics URLs by
* are simply URLs) by which is possible to invoke through the DataMiner * which is possible to invoke through the DataMiner Executor the run of an
* Executor the run of an algorithm stored in a certain VRE. By the DataMiner * algorithm stored in a certain VRE.
* Executor then the user is able to monitoring the algorithm execution.
* *
* See more at * See more at
* https://gcube.wiki.gcube-system.org/gcube/URI_Resolver#Analytics_Resolver * https://gcube.wiki.gcube-system.org/gcube/URI_Resolver#Analytics_Resolver

View File

@ -18,16 +18,16 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
/** /**
* The UriResolverDocs provides the URI Resolver API Documentation * The Class DocsGenerator.
* *
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it * @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
* *
* Mar 24, 2022 * Apr 1, 2022
*/ */
@Path("docs") @Path("docs")
public class UriResolverDocs { public class DocsGenerator {
private static Logger logger = LoggerFactory.getLogger(UriResolverDocs.class); private static Logger logger = LoggerFactory.getLogger(DocsGenerator.class);
/** /**
* To doc. * To doc.
@ -39,14 +39,15 @@ public class UriResolverDocs {
@GET @GET
@Path("/{any: .*}") @Path("/{any: .*}")
public InputStream toDoc(@Context HttpServletRequest req) throws WebApplicationException { public InputStream toDoc(@Context HttpServletRequest req) throws WebApplicationException {
logger.info(UriResolverDocs.class.getSimpleName() + " toDoc called"); logger.info(DocsGenerator.class.getSimpleName() + " toDoc called");
String pathInfo = req.getPathInfo(); String pathInfo = req.getPathInfo();
logger.info("pathInfo {}", pathInfo); logger.info("pathInfo {}", pathInfo);
try { try {
if (pathInfo.endsWith("/docs/")) if (pathInfo.endsWith("/docs/")) {
pathInfo += "index.html"; pathInfo += "index.html";
}
logger.info("redirecting to {}", pathInfo); logger.info("redirecting to {}", pathInfo);

View File

@ -48,11 +48,8 @@ import org.slf4j.LoggerFactory;
import org.w3c.dom.Document; import org.w3c.dom.Document;
/** /**
* The GeonetworkResolver is a "middle tier" (like a Proxy) to perform queries * The GeonetworkResolver is a "middle tier" to perform queries
* on D4Science Geonetwork services. * to D4Science's Geonetwork services.
*
* Request format
* [GEONETWORK_RESOLVER_BASE_URL]/[SCOPE]/[MODE]/[VISIBILITY]/[FILTER_KEY]/[FILTER_VALUE]/$$
* *
* See more at * See more at
* https://gcube.wiki.gcube-system.org/gcube/URI_Resolver#Geonetwork_Resolver * https://gcube.wiki.gcube-system.org/gcube/URI_Resolver#Geonetwork_Resolver

View File

@ -35,8 +35,7 @@ import com.google.common.cache.CacheLoader.InvalidCacheLoadException;
/** /**
* The GisResolver is able to resolve GIS Links (as a redirect to Gis Viewer * The GisResolver is able to resolve GIS Links (as a redirect to Gis Viewer
* Application) in order to display and navigate on web-map the gis layers * Application) in order to display and navigate on web-map the gis layers
* stored in D4Science Geonetwork * stored in D4Science's Geonetwork
* (e.g. http://wiki.i-marine.eu/index.php/Blue_Hackathon_iMarine_Data_Challenges#iMarine_GeoNetwork)
* *
* See more at * See more at
* https://gcube.wiki.gcube-system.org/gcube/URI_Resolver#GIS_Resolver * https://gcube.wiki.gcube-system.org/gcube/URI_Resolver#GIS_Resolver

View File

@ -38,9 +38,6 @@ import org.slf4j.LoggerFactory;
/** /**
* The StorageIDResolver is able to give HTTP resolution to storage resource by ID * The StorageIDResolver is able to give HTTP resolution to storage resource by ID
* *
* Request Format
* [URI_RESOLVER_SERVICE_ENDPOINT]/[STORAGE_ID]
*
* See more at * See more at
* https://gcube.wiki.gcube-system.org/gcube/URI_Resolver#STORAGE-ID_Resolver * https://gcube.wiki.gcube-system.org/gcube/URI_Resolver#STORAGE-ID_Resolver
* *

View File

@ -39,9 +39,6 @@ import org.slf4j.LoggerFactory;
* The WekeoResolver provides a method to wrap the basic authentication from * The WekeoResolver provides a method to wrap the basic authentication from
* D4Science account to WekeoBroker service. * D4Science account to WekeoBroker service.
* *
* Request format
* [URI_RESOLVER_SERVICE_ENDPOINT]/wekeo/gettoken?gcube-token=[YOUR_GCUBE_TOKEN]
*
* See more at * See more at
* https://gcube.wiki.gcube-system.org/gcube/URI_Resolver#Wekeo_Resolver * https://gcube.wiki.gcube-system.org/gcube/URI_Resolver#Wekeo_Resolver
* *