2016-12-22 17:27:26 +01:00
|
|
|
package org.gcube.informationsystem.resourceregistry.schema;
|
|
|
|
|
|
|
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.schema.SchemaException;
|
|
|
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.schema.SchemaNotFoundException;
|
2017-01-10 14:58:13 +01:00
|
|
|
import org.gcube.informationsystem.resourceregistry.rest.AccessType;
|
2016-12-22 17:27:26 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @author Luca Frosini (ISTI - CNR)
|
|
|
|
*
|
|
|
|
* For JSON schema see
|
|
|
|
* http://orientdb.com/docs/last/OrientDB-REST.html#class
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
public interface SchemaManagement {
|
|
|
|
|
2017-01-10 14:58:13 +01:00
|
|
|
public String create(String json, AccessType accessType) throws SchemaException;
|
2016-12-22 17:27:26 +01:00
|
|
|
|
2017-01-10 14:58:13 +01:00
|
|
|
public String read(String type, AccessType accessType, boolean includeSubtypes) throws SchemaNotFoundException, SchemaException;
|
2016-12-30 17:31:12 +01:00
|
|
|
|
2017-01-10 14:58:13 +01:00
|
|
|
public String update(String type, AccessType accessType, String json) throws SchemaNotFoundException, SchemaException;
|
2016-12-30 17:31:12 +01:00
|
|
|
|
2017-01-10 14:58:13 +01:00
|
|
|
public String delete(String type, AccessType accessType) throws SchemaNotFoundException;
|
2016-12-30 17:31:12 +01:00
|
|
|
|
2017-01-10 14:58:13 +01:00
|
|
|
/*
|
2016-12-30 17:31:12 +01:00
|
|
|
public String createEntitySchema(String jsonSchema) throws SchemaException;
|
|
|
|
|
|
|
|
public String readEntitySchema(String entityType, boolean includeSubtypes, boolean includeSchema) throws SchemaNotFoundException, SchemaException;
|
2016-12-22 17:27:26 +01:00
|
|
|
|
|
|
|
public String updateEntitySchema(String entityType, String jsonSchema) throws SchemaNotFoundException, SchemaException;
|
|
|
|
|
|
|
|
public String deleteEntitySchema(String entityType) throws SchemaNotFoundException;
|
|
|
|
|
|
|
|
|
2016-12-30 17:31:12 +01:00
|
|
|
public String createFacetSchema(String jsonSchema) throws SchemaException;
|
2016-12-22 17:27:26 +01:00
|
|
|
|
2016-12-30 17:31:12 +01:00
|
|
|
public String readFacetSchema(String facetType, boolean includeSubtypes, boolean includeSchema) throws SchemaNotFoundException, SchemaException;
|
2016-12-22 17:27:26 +01:00
|
|
|
|
|
|
|
public String updateFacetSchema(String facetType, String jsonSchema) throws SchemaNotFoundException, SchemaException;
|
|
|
|
|
|
|
|
public String deleteFacetSchema(String facetType) throws SchemaNotFoundException;
|
|
|
|
|
|
|
|
|
|
|
|
public String registerResourceSchema(String jsonSchema) throws SchemaException;
|
|
|
|
|
2016-12-30 17:31:12 +01:00
|
|
|
public String getResourceSchema(String resourceType, boolean includeSubtypes, boolean includeSchema) throws SchemaNotFoundException, SchemaException;
|
2016-12-22 17:27:26 +01:00
|
|
|
|
|
|
|
public String updateResourceSchema(String resourceType, String jsonSchema) throws SchemaNotFoundException, SchemaException;
|
|
|
|
|
|
|
|
public String deleteResourceSchema(String resourceType) throws SchemaNotFoundException;
|
|
|
|
|
|
|
|
|
|
|
|
public String registerEmbeddedTypeSchema(String jsonSchema) throws SchemaException;
|
|
|
|
|
2016-12-30 17:31:12 +01:00
|
|
|
public String getEmbeddedTypeSchema(String embeddedType, boolean includeSubtypes, boolean includeSchema) throws SchemaNotFoundException, SchemaException;
|
2016-12-22 17:27:26 +01:00
|
|
|
|
|
|
|
public String updateEmbeddedTypeSchema(String embeddedType, String jsonSchema) throws SchemaNotFoundException, SchemaException;
|
|
|
|
|
|
|
|
public String deleteEmbeddedTypeSchema(String embeddedType) throws SchemaNotFoundException;
|
|
|
|
|
|
|
|
|
|
|
|
public String registerRelationSchema(String jsonSchema) throws SchemaException;
|
|
|
|
|
2016-12-30 17:31:12 +01:00
|
|
|
public String getRelationSchema(String relationType, boolean includeSubtypes, boolean includeSchema) throws SchemaNotFoundException, SchemaException;
|
2016-12-22 17:27:26 +01:00
|
|
|
|
|
|
|
public String updateRelationSchema(String relationType, String jsonSchema) throws SchemaNotFoundException, SchemaException;
|
|
|
|
|
|
|
|
public String deleteRelationSchema(String relationType) throws SchemaNotFoundException;
|
|
|
|
|
2016-12-30 17:31:12 +01:00
|
|
|
|
2016-12-22 17:27:26 +01:00
|
|
|
public String registerConsistsOfSchema(String jsonSchema) throws SchemaException;
|
|
|
|
|
2016-12-30 17:31:12 +01:00
|
|
|
public String getConsistsOfSchema(String consistsOfType, boolean includeSubtypes, boolean includeSchema) throws SchemaNotFoundException, SchemaException;
|
2016-12-22 17:27:26 +01:00
|
|
|
|
|
|
|
public String updateConsistsOfSchema(String consistsOfType, String jsonSchema) throws SchemaNotFoundException, SchemaException;
|
|
|
|
|
|
|
|
public String deleteConsistsOfSchema(String consistsOfType) throws SchemaException;
|
|
|
|
|
|
|
|
|
|
|
|
public String registerIsRelatedToSchema(String jsonSchema) throws SchemaException;
|
|
|
|
|
2016-12-30 17:31:12 +01:00
|
|
|
public String getIsRelatedToSchema(String isRelatedToType, boolean includeSubtypes, boolean includeSchema) throws SchemaNotFoundException, SchemaException;
|
2016-12-22 17:27:26 +01:00
|
|
|
|
|
|
|
public String updateIsRelatedToSchema(String isRelatedToType, String jsonSchema) throws SchemaNotFoundException, SchemaException;
|
|
|
|
|
|
|
|
public String deleteIsRelatedToSchema(String isRelatedToType) throws SchemaException;
|
2017-01-10 14:58:13 +01:00
|
|
|
*/
|
|
|
|
|
2016-12-22 17:27:26 +01:00
|
|
|
}
|