resource-registry/src/main/java/org/gcube/informationsystem/resourceregistry/schema/SchemaManagement.java

88 lines
3.9 KiB
Java
Raw Normal View History

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