diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/client/proxy/ResourceRegistryClient.java b/src/main/java/org/gcube/informationsystem/resourceregistry/client/proxy/ResourceRegistryClient.java index 3cccf6e..9ab59b5 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/client/proxy/ResourceRegistryClient.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/client/proxy/ResourceRegistryClient.java @@ -4,6 +4,7 @@ import java.util.List; import java.util.UUID; import org.gcube.informationsystem.model.ER; +import org.gcube.informationsystem.model.ISManageable; import org.gcube.informationsystem.model.entity.Entity; import org.gcube.informationsystem.model.entity.Resource; import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException; @@ -32,10 +33,9 @@ public interface ResourceRegistryClient { UUID reference, Direction direction) throws ERException, SchemaException, ResourceRegistryException; - public List getSchema( - Class clazz, Boolean polymorphic) + public List getSchema( + Class clazz, Boolean polymorphic) throws SchemaNotFoundException; - public String query(final String query, final int limit, final String fetchPlan) throws InvalidQueryException; diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/client/proxy/ResourceRegistryClientImpl.java b/src/main/java/org/gcube/informationsystem/resourceregistry/client/proxy/ResourceRegistryClientImpl.java index bb3a3e5..07eb660 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/client/proxy/ResourceRegistryClientImpl.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/client/proxy/ResourceRegistryClientImpl.java @@ -28,6 +28,7 @@ import org.gcube.common.clients.delegates.ProxyDelegate; import org.gcube.common.scope.api.ScopeProvider; import org.gcube.informationsystem.impl.utils.Entities; import org.gcube.informationsystem.model.ER; +import org.gcube.informationsystem.model.ISManageable; import org.gcube.informationsystem.model.entity.Entity; import org.gcube.informationsystem.model.entity.Resource; import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException; @@ -263,7 +264,7 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient { return (C) res; } - return Entities.unmarshal(clazz, res); + return (C) Entities.unmarshal((Class) clazz, res); } } @@ -378,8 +379,8 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient { } @Override - public List getSchema( - Class clazz, Boolean polymorphic) + public List getSchema( + Class clazz, Boolean polymorphic) throws SchemaNotFoundException { String type = clazz.getSimpleName();