Improving documentation

This commit is contained in:
Luca Frosini 2022-09-28 16:58:17 +02:00
parent e86e9d0581
commit e5fe3ba68d
11 changed files with 43 additions and 7 deletions

View File

@ -2,8 +2,10 @@
<enunciate <enunciate
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://enunciate.webcohesion.com/schemas/enunciate-2.14.0.xsd"> xsi:noNamespaceSchemaLocation="http://enunciate.webcohesion.com/schemas/enunciate-2.14.0.xsd">
<description package="org.gcube.gcat.rest"/>
<api-classes> <api-classes>
<include pattern="org.gcube.gcat.rest.*" /> <include pattern="org.gcube.gcat.rest.*" />
<include pattern="org.gcube.gcat.rest.administration.*" />
<exclude pattern="org.gcube.gcat.*" /> <exclude pattern="org.gcube.gcat.*" />
</api-classes> </api-classes>
<modules> <modules>

View File

@ -2,7 +2,7 @@ package org.gcube.gcat;
import javax.ws.rs.ApplicationPath; import javax.ws.rs.ApplicationPath;
import org.gcube.gcat.rest.Group; import org.gcube.gcat.rest.administration.Group;
import org.glassfish.jersey.server.ResourceConfig; import org.glassfish.jersey.server.ResourceConfig;
/** /**

View File

@ -7,12 +7,14 @@ import javax.ws.rs.Produces;
import org.gcube.gcat.api.GCatConstants; import org.gcube.gcat.api.GCatConstants;
import org.gcube.gcat.persistence.ckan.CKANLicense; import org.gcube.gcat.persistence.ckan.CKANLicense;
import com.webcohesion.enunciate.metadata.rs.ResourceGroup;
import com.webcohesion.enunciate.metadata.rs.ResourceLabel; import com.webcohesion.enunciate.metadata.rs.ResourceLabel;
/** /**
* @author Luca Frosini (ISTI - CNR) * @author Luca Frosini (ISTI - CNR)
*/ */
@Path(License.LICENSES) @Path(License.LICENSES)
@ResourceGroup("Item Related APIs")
@ResourceLabel("License APIs") @ResourceLabel("License APIs")
public class License extends REST<CKANLicense> implements org.gcube.gcat.api.interfaces.License { public class License extends REST<CKANLicense> implements org.gcube.gcat.api.interfaces.License {

View File

@ -14,12 +14,14 @@ import org.gcube.datacatalogue.metadatadiscovery.bean.jaxb.NamespaceCategory;
import org.gcube.gcat.api.GCatConstants; import org.gcube.gcat.api.GCatConstants;
import org.gcube.gcat.profile.MetadataUtility; import org.gcube.gcat.profile.MetadataUtility;
import com.webcohesion.enunciate.metadata.rs.ResourceGroup;
import com.webcohesion.enunciate.metadata.rs.ResourceLabel; import com.webcohesion.enunciate.metadata.rs.ResourceLabel;
/** /**
* @author Luca Frosini (ISTI - CNR) * @author Luca Frosini (ISTI - CNR)
*/ */
@Path(Namespace.NAMESPACES) @Path(Namespace.NAMESPACES)
@ResourceGroup("Item Related APIs")
@ResourceLabel("Namespace APIs") @ResourceLabel("Namespace APIs")
public class Namespace extends BaseREST implements org.gcube.gcat.api.interfaces.Namespace { public class Namespace extends BaseREST implements org.gcube.gcat.api.interfaces.Namespace {

View File

@ -31,12 +31,14 @@ import org.gcube.gcat.api.GCatConstants;
import org.gcube.gcat.profile.ISProfile; import org.gcube.gcat.profile.ISProfile;
import org.xml.sax.SAXException; import org.xml.sax.SAXException;
import com.webcohesion.enunciate.metadata.rs.ResourceGroup;
import com.webcohesion.enunciate.metadata.rs.ResourceLabel; import com.webcohesion.enunciate.metadata.rs.ResourceLabel;
/** /**
* @author Luca Frosini (ISTI - CNR) * @author Luca Frosini (ISTI - CNR)
*/ */
@Path(Profile.PROFILES) @Path(Profile.PROFILES)
@ResourceGroup("Item Related APIs")
@ResourceLabel("Profile APIs") @ResourceLabel("Profile APIs")
public class Profile extends BaseREST implements org.gcube.gcat.api.interfaces.Profile<Response,Response> { public class Profile extends BaseREST implements org.gcube.gcat.api.interfaces.Profile<Response,Response> {

View File

@ -24,8 +24,8 @@ import com.webcohesion.enunciate.metadata.rs.ResourceLabel;
* @author Luca Frosini (ISTI - CNR) * @author Luca Frosini (ISTI - CNR)
*/ */
@Path(Trash.TRASH) @Path(Trash.TRASH)
@ResourceGroup("Item APIs") @ResourceGroup("Item Related APIs")
@ResourceLabel("Item's Trash APIs") @ResourceLabel("Trash APIs")
public class Trash extends BaseREST implements org.gcube.gcat.api.interfaces.Trash<Response> { public class Trash extends BaseREST implements org.gcube.gcat.api.interfaces.Trash<Response> {

View File

@ -1,4 +1,4 @@
package org.gcube.gcat.rest; package org.gcube.gcat.rest.administration;
import java.util.Iterator; import java.util.Iterator;
@ -34,9 +34,11 @@ import org.gcube.gcat.configuration.CatalogueConfigurationFactory;
import org.gcube.gcat.configuration.ServiceCatalogueConfiguration; import org.gcube.gcat.configuration.ServiceCatalogueConfiguration;
import org.gcube.gcat.persistence.ckan.CKANUser; import org.gcube.gcat.persistence.ckan.CKANUser;
import org.gcube.gcat.persistence.ckan.CKANUserCache; import org.gcube.gcat.persistence.ckan.CKANUserCache;
import org.gcube.gcat.rest.BaseREST;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import com.webcohesion.enunciate.metadata.rs.ResourceGroup;
import com.webcohesion.enunciate.metadata.rs.ResourceLabel; import com.webcohesion.enunciate.metadata.rs.ResourceLabel;
import com.webcohesion.enunciate.metadata.rs.ResponseCode; import com.webcohesion.enunciate.metadata.rs.ResponseCode;
import com.webcohesion.enunciate.metadata.rs.StatusCodes; import com.webcohesion.enunciate.metadata.rs.StatusCodes;
@ -46,6 +48,7 @@ import com.webcohesion.enunciate.metadata.swagger.OperationId;
* @author Luca Frosini (ISTI - CNR) * @author Luca Frosini (ISTI - CNR)
*/ */
@Path(Configuration.CONFIGURATIONS) @Path(Configuration.CONFIGURATIONS)
@ResourceGroup("Administration APIs")
@ResourceLabel("Configuration APIs") @ResourceLabel("Configuration APIs")
public class Configuration extends BaseREST implements org.gcube.gcat.api.interfaces.Configuration<Response,Response> { public class Configuration extends BaseREST implements org.gcube.gcat.api.interfaces.Configuration<Response,Response> {

View File

@ -1,4 +1,4 @@
package org.gcube.gcat.rest; package org.gcube.gcat.rest.administration;
import javax.ws.rs.Consumes; import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE; import javax.ws.rs.DELETE;
@ -20,13 +20,16 @@ import org.gcube.gcat.annotation.PURGE;
import org.gcube.gcat.api.GCatConstants; import org.gcube.gcat.api.GCatConstants;
//import org.gcube.gcat.api.roles.Role; //import org.gcube.gcat.api.roles.Role;
import org.gcube.gcat.persistence.ckan.CKANGroup; import org.gcube.gcat.persistence.ckan.CKANGroup;
import org.gcube.gcat.rest.REST;
import com.webcohesion.enunciate.metadata.rs.ResourceGroup;
import com.webcohesion.enunciate.metadata.rs.ResourceLabel; import com.webcohesion.enunciate.metadata.rs.ResourceLabel;
/** /**
* @author Luca Frosini (ISTI - CNR) * @author Luca Frosini (ISTI - CNR)
*/ */
@Path(Group.GROUPS) @Path(Group.GROUPS)
@ResourceGroup("Administration APIs")
@ResourceLabel("Group APIs") @ResourceLabel("Group APIs")
public class Group extends REST<CKANGroup> implements org.gcube.gcat.api.interfaces.Group<Response,Response> { public class Group extends REST<CKANGroup> implements org.gcube.gcat.api.interfaces.Group<Response,Response> {

View File

@ -1,4 +1,4 @@
package org.gcube.gcat.rest; package org.gcube.gcat.rest.administration;
import javax.ws.rs.Consumes; import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE; import javax.ws.rs.DELETE;
@ -20,11 +20,17 @@ import org.gcube.gcat.annotation.PURGE;
import org.gcube.gcat.api.GCatConstants; import org.gcube.gcat.api.GCatConstants;
//import org.gcube.gcat.api.roles.Role; //import org.gcube.gcat.api.roles.Role;
import org.gcube.gcat.persistence.ckan.CKANOrganization; import org.gcube.gcat.persistence.ckan.CKANOrganization;
import org.gcube.gcat.rest.REST;
import com.webcohesion.enunciate.metadata.rs.ResourceGroup;
import com.webcohesion.enunciate.metadata.rs.ResourceLabel;
/** /**
* @author Luca Frosini (ISTI - CNR) * @author Luca Frosini (ISTI - CNR)
*/ */
@Path(Organization.ORGANIZATIONS) @Path(Organization.ORGANIZATIONS)
@ResourceGroup("Administration APIs")
@ResourceLabel("Organization APIs")
public class Organization extends REST<CKANOrganization> public class Organization extends REST<CKANOrganization>
implements org.gcube.gcat.api.interfaces.Organization<Response,Response> { implements org.gcube.gcat.api.interfaces.Organization<Response,Response> {

View File

@ -1,4 +1,4 @@
package org.gcube.gcat.rest; package org.gcube.gcat.rest.administration;
import javax.ws.rs.Consumes; import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE; import javax.ws.rs.DELETE;
@ -22,13 +22,16 @@ import org.gcube.gcat.api.roles.Role;
//import org.gcube.gcat.api.roles.Role; //import org.gcube.gcat.api.roles.Role;
import org.gcube.gcat.persistence.ckan.CKANUser; import org.gcube.gcat.persistence.ckan.CKANUser;
import org.gcube.gcat.persistence.ckan.CKANUserCache; import org.gcube.gcat.persistence.ckan.CKANUserCache;
import org.gcube.gcat.rest.REST;
import com.webcohesion.enunciate.metadata.rs.ResourceGroup;
import com.webcohesion.enunciate.metadata.rs.ResourceLabel; import com.webcohesion.enunciate.metadata.rs.ResourceLabel;
/** /**
* @author Luca Frosini (ISTI - CNR) * @author Luca Frosini (ISTI - CNR)
*/ */
@Path(User.USERS) @Path(User.USERS)
@ResourceGroup("Administration APIs")
@ResourceLabel("User APIs") @ResourceLabel("User APIs")
public class User extends REST<CKANUser> implements org.gcube.gcat.api.interfaces.User<Response,Response> { public class User extends REST<CKANUser> implements org.gcube.gcat.api.interfaces.User<Response,Response> {

View File

@ -0,0 +1,13 @@
/**
* <h1>gCube Catalogue (gCat) Service</h1>
*
* <p>Welcome to gCube Catalogue Service (aka gCat) API documentation.</p>
*
* <p>
* To get a complete overview of gCat service take a look at
* <a href="../docs/index.html">wiki page</a>.
* </p>
*
*
*/
package org.gcube.gcat.rest;