diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/schema/ResourceRegistrySchemaClient.java b/src/main/java/org/gcube/informationsystem/resourceregistry/schema/ResourceRegistrySchemaClient.java index a6f0ccf..4e656aa 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/schema/ResourceRegistrySchemaClient.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/schema/ResourceRegistrySchemaClient.java @@ -2,7 +2,7 @@ package org.gcube.informationsystem.resourceregistry.schema; import java.util.List; -import org.gcube.informationsystem.base.reference.ISManageable; +import org.gcube.informationsystem.base.reference.Element; import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException; import org.gcube.informationsystem.resourceregistry.api.exceptions.schema.SchemaException; import org.gcube.informationsystem.resourceregistry.api.exceptions.schema.SchemaNotFoundException; @@ -13,14 +13,14 @@ import org.gcube.informationsystem.types.reference.TypeDefinition; */ public interface ResourceRegistrySchemaClient { - public TypeDefinition create(Class clz) + public TypeDefinition create(Class clz) throws SchemaException, ResourceRegistryException; public String create(String baseType, String typeDefinitition) throws SchemaException, ResourceRegistryException; - public List read(Class clz, Boolean polymorphic) + public List read(Class clz, Boolean polymorphic) throws SchemaNotFoundException, ResourceRegistryException; public String read(String type, Boolean polymorphic) diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/schema/ResourceRegistrySchemaClientImpl.java b/src/main/java/org/gcube/informationsystem/resourceregistry/schema/ResourceRegistrySchemaClientImpl.java index cccdb8e..88278f1 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/schema/ResourceRegistrySchemaClientImpl.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/schema/ResourceRegistrySchemaClientImpl.java @@ -8,7 +8,7 @@ import java.util.Map; import org.gcube.common.gxhttp.reference.GXConnection; import org.gcube.common.gxhttp.request.GXHTTPStringRequest; import org.gcube.informationsystem.base.reference.AccessType; -import org.gcube.informationsystem.base.reference.ISManageable; +import org.gcube.informationsystem.base.reference.Element; import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException; import org.gcube.informationsystem.resourceregistry.api.exceptions.context.ContextAlreadyPresentException; import org.gcube.informationsystem.resourceregistry.api.exceptions.context.ContextNotFoundException; @@ -37,7 +37,7 @@ public class ResourceRegistrySchemaClientImpl implements ResourceRegistrySchemaC } @Override - public TypeDefinition create(Class clz) + public TypeDefinition create(Class clz) throws SchemaException, ResourceRegistryException { try { String typeDefinition = TypeBinder.serializeType(clz); @@ -79,7 +79,7 @@ public class ResourceRegistrySchemaClientImpl implements ResourceRegistrySchemaC @Override - public List read(Class clz, Boolean polymorphic) + public List read(Class clz, Boolean polymorphic) throws SchemaNotFoundException, ResourceRegistryException { try { String type = Utility.getType(clz);