From 9792af48fb887421264bb508362e53f9ada5e491 Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Wed, 25 Jan 2017 14:34:53 +0000 Subject: [PATCH] Improved generic declaration based on IS-model improvement git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry-client@141780 82a268e6-3cf1-43bd-a215-b396298e98cf --- .../client/proxy/ResourceRegistryClient.java | 6 +++--- .../client/proxy/ResourceRegistryClientImpl.java | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) 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();