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
This commit is contained in:
parent
4ed5e20f13
commit
9792af48fb
|
@ -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,11 +33,10 @@ public interface ResourceRegistryClient {
|
|||
UUID reference, Direction direction) throws
|
||||
ERException, SchemaException, ResourceRegistryException;
|
||||
|
||||
public <ERTYpe extends ER> List<TypeDefinition> getSchema(
|
||||
Class<ERTYpe> clazz, Boolean polymorphic)
|
||||
public <ISM extends ISManageable> List<TypeDefinition> getSchema(
|
||||
Class<ISM> clazz, Boolean polymorphic)
|
||||
throws SchemaNotFoundException;
|
||||
|
||||
|
||||
public String query(final String query, final int limit,
|
||||
final String fetchPlan) throws InvalidQueryException;
|
||||
|
||||
|
|
|
@ -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<ISManageable>) clazz, res);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -378,8 +379,8 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient {
|
|||
}
|
||||
|
||||
@Override
|
||||
public <ERTYpe extends ER> List<TypeDefinition> getSchema(
|
||||
Class<ERTYpe> clazz, Boolean polymorphic)
|
||||
public <ISM extends ISManageable> List<TypeDefinition> getSchema(
|
||||
Class<ISM> clazz, Boolean polymorphic)
|
||||
throws SchemaNotFoundException {
|
||||
|
||||
String type = clazz.getSimpleName();
|
||||
|
|
Loading…
Reference in New Issue