Reorganizing components

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry-api@141385 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2016-12-22 16:27:26 +00:00
parent 649721ca66
commit d755b55bbe
5 changed files with 1 additions and 256 deletions

View File

@ -1,4 +1,4 @@
package org.gcube.informationsystem.resourceregistry;
package org.gcube.informationsystem.resourceregistry.api;
/**
* @author Luca Frosini (ISTI - CNR)

View File

@ -1,29 +0,0 @@
/**
*
*/
package org.gcube.informationsystem.resourceregistry.api;
import java.util.UUID;
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
import org.gcube.informationsystem.resourceregistry.api.exceptions.context.ContextCreationException;
import org.gcube.informationsystem.resourceregistry.api.exceptions.context.ContextException;
import org.gcube.informationsystem.resourceregistry.api.exceptions.context.ContextNotFoundException;
/**
* @author Luca Frosini (ISTI - CNR)
*/
public interface ContextManagement {
public String create(UUID parentContext, String name) throws ContextCreationException, ResourceRegistryException;
public String read(UUID context) throws ContextNotFoundException, ContextException;
public String rename(UUID context, String newName) throws ContextNotFoundException, ContextException;
public String move(UUID newParent, UUID contextToMove) throws ContextNotFoundException, ContextException;
public boolean delete(UUID context) throws ContextNotFoundException, ContextException;
}

View File

@ -1,104 +0,0 @@
/**
*
*/
package org.gcube.informationsystem.resourceregistry.api;
import java.util.UUID;
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
import org.gcube.informationsystem.resourceregistry.api.exceptions.context.ContextNotFoundException;
import org.gcube.informationsystem.resourceregistry.api.exceptions.entity.facet.FacetAlreadyPresentException;
import org.gcube.informationsystem.resourceregistry.api.exceptions.entity.facet.FacetNotFoundException;
import org.gcube.informationsystem.resourceregistry.api.exceptions.entity.resource.ResourceAlreadyPresentException;
import org.gcube.informationsystem.resourceregistry.api.exceptions.entity.resource.ResourceNotFoundException;
/**
* @author Luca Frosini (ISTI - CNR)
*
*/
public interface EntityManagement {
/* Facets Methods */
public String createFacet(String facetType, String jsonRepresentation)
throws FacetAlreadyPresentException, ResourceRegistryException;
public String readFacet(UUID uuid) throws FacetNotFoundException,
ResourceRegistryException;
public String readFacet(UUID uuid, String facetType)
throws FacetNotFoundException, ResourceRegistryException;
public String updateFacet(UUID uuid, String jsonRepresentation)
throws FacetNotFoundException, ResourceRegistryException;
public boolean deleteFacet(UUID uuid) throws FacetNotFoundException,
ResourceRegistryException;
/* Resources Methods */
public String createResource(String resourceType, String jsonRepresentation)
throws ResourceAlreadyPresentException, ResourceRegistryException;
public String readResource(UUID uuid) throws ResourceNotFoundException,
ResourceRegistryException;
public String readResource(UUID uuid, String resourceType)
throws ResourceNotFoundException, ResourceRegistryException;
/**
* Update a resource means update ConsistsOf relations and related Facets
* presents in the jsonRepresentation argument. If some ConsistsOf relations
* does not exist they are created together with the Facet.
*
* All IsRelatedTo relations and related resources (if any) are ignored.
*
* @param resourceUUID
* @param jsonRepresentation
* @return
* @throws ResourceNotFoundException
* @throws ResourceRegistryException
*/
public String updateResource(UUID resourceUUID, String jsonRepresentation)
throws ResourceNotFoundException, ResourceRegistryException;
public boolean deleteResource(UUID uuid) throws ResourceNotFoundException,
ResourceRegistryException, ResourceRegistryException;
/* Relations Methods */
public String attachFacet(UUID resourceUUID, UUID facetUUID,
String consistOfType, String jsonRepresentation)
throws FacetNotFoundException, ResourceNotFoundException,
ResourceRegistryException;
public boolean detachFacet(UUID consistsOfUUID)
throws ResourceRegistryException;
public String attachResource(UUID sourceResourceUUID,
UUID targetResourceUUID, String relatedToType,
String jsonRepresentation) throws ResourceNotFoundException,
ResourceRegistryException;
public boolean detachResource(UUID isRelatedToUUID)
throws ResourceRegistryException;
/* Context toggle methods */
public boolean addResourceToContext(UUID uuid)
throws ResourceNotFoundException, ContextNotFoundException,
ResourceRegistryException;
public boolean addFacetToContext(UUID uuid) throws FacetNotFoundException,
ContextNotFoundException, ResourceRegistryException;
public boolean removeResourceFromContext(UUID uuid)
throws ResourceNotFoundException, ContextNotFoundException,
ResourceRegistryException;
public boolean removeFacetFromContext(UUID uuid) throws FacetNotFoundException,
ContextNotFoundException, ResourceRegistryException;
}

View File

@ -1,25 +0,0 @@
/**
*
*/
package org.gcube.informationsystem.resourceregistry.api;
import org.gcube.informationsystem.resourceregistry.api.exceptions.InvalidQueryException;
/**
* @author Luca Frosini (ISTI - CNR)
*
*/
public interface Query {
/**
* @param query
* @param limit
* @param fetchPlan
* @return
* @throws InvalidQueryException
* http://orientdb.com/docs/last/OrientDB-REST.html#query
*/
public String query(String query, int limit, String fetchPlan)
throws InvalidQueryException;
}

View File

@ -1,97 +0,0 @@
package org.gcube.informationsystem.resourceregistry.api;
import org.gcube.informationsystem.resourceregistry.api.exceptions.schema.SchemaException;
import org.gcube.informationsystem.resourceregistry.api.exceptions.schema.SchemaNotFoundException;
/**
* Service Endpoint Interface
* @author Luca Frosini (ISTI - CNR)
*
* For JSON schema see
* http://orientdb.com/docs/last/OrientDB-REST.html#class
*
*/
public interface SchemaManagement {
public String registerEntitySchema(String jsonSchema) throws SchemaException;
public String getEntitySchema(String entityType) throws SchemaNotFoundException;
public String updateEntitySchema(String entityType, String jsonSchema) throws SchemaNotFoundException, SchemaException;
public String deleteEntitySchema(String entityType) throws SchemaNotFoundException;
public String getEntityTypes(String entityType, boolean includeSchema) throws SchemaNotFoundException, SchemaException;
public String registerFacetSchema(String jsonSchema) throws SchemaException;
public String getFacetSchema(String facetType) throws SchemaNotFoundException;
public String updateFacetSchema(String facetType, String jsonSchema) throws SchemaNotFoundException, SchemaException;
public String deleteFacetSchema(String facetType) throws SchemaNotFoundException;
public String getFacetTypes(String facetType, boolean includeSchema) throws SchemaNotFoundException, SchemaException;
public String registerResourceSchema(String jsonSchema) throws SchemaException;
public String getResourceSchema(String resourceType) throws SchemaNotFoundException;
public String updateResourceSchema(String resourceType, String jsonSchema) throws SchemaNotFoundException, SchemaException;
public String deleteResourceSchema(String resourceType) throws SchemaNotFoundException;
public String getResourceTypes(String resourceType, boolean includeSchema) throws SchemaNotFoundException, SchemaException;
public String registerEmbeddedTypeSchema(String jsonSchema) throws SchemaException;
public String getEmbeddedTypeSchema(String embeddedType) throws SchemaNotFoundException;
public String updateEmbeddedTypeSchema(String embeddedType, String jsonSchema) throws SchemaNotFoundException, SchemaException;
public String deleteEmbeddedTypeSchema(String embeddedType) throws SchemaNotFoundException;
public String getEmbeddedTypes(String embeddedType, boolean includeSchema) throws SchemaNotFoundException, SchemaException;
public String registerRelationSchema(String jsonSchema) throws SchemaException;
public String getRelationSchema(String relationType) throws SchemaNotFoundException;
public String updateRelationSchema(String relationType, String jsonSchema) throws SchemaNotFoundException, SchemaException;
public String deleteRelationSchema(String relationType) throws SchemaNotFoundException;
public String getRelationTypes(String relationType, boolean includeSchema) throws SchemaNotFoundException, SchemaException;
public String registerConsistsOfSchema(String jsonSchema) throws SchemaException;
public String getConsistsOfSchema(String consistsOfType) throws SchemaNotFoundException;
public String updateConsistsOfSchema(String consistsOfType, String jsonSchema) throws SchemaNotFoundException, SchemaException;
public String deleteConsistsOfSchema(String consistsOfType) throws SchemaException;
public String getConsistsOfTypes(String consistsOfType, boolean includeSchema) throws SchemaNotFoundException, SchemaException;
public String registerIsRelatedToSchema(String jsonSchema) throws SchemaException;
public String getIsRelatedToSchema(String isRelatedToType) throws SchemaNotFoundException;
public String updateIsRelatedToSchema(String isRelatedToType, String jsonSchema) throws SchemaNotFoundException, SchemaException;
public String deleteIsRelatedToSchema(String isRelatedToType) throws SchemaException;
public String getIsRelatedToTypes(String isRelatedToType, boolean includeSchema) throws SchemaNotFoundException, SchemaException;
}