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 java.util.UUID;
|
||||||
|
|
||||||
import org.gcube.informationsystem.model.ER;
|
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.Entity;
|
||||||
import org.gcube.informationsystem.model.entity.Resource;
|
import org.gcube.informationsystem.model.entity.Resource;
|
||||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
|
||||||
|
@ -32,11 +33,10 @@ public interface ResourceRegistryClient {
|
||||||
UUID reference, Direction direction) throws
|
UUID reference, Direction direction) throws
|
||||||
ERException, SchemaException, ResourceRegistryException;
|
ERException, SchemaException, ResourceRegistryException;
|
||||||
|
|
||||||
public <ERTYpe extends ER> List<TypeDefinition> getSchema(
|
public <ISM extends ISManageable> List<TypeDefinition> getSchema(
|
||||||
Class<ERTYpe> clazz, Boolean polymorphic)
|
Class<ISM> clazz, Boolean polymorphic)
|
||||||
throws SchemaNotFoundException;
|
throws SchemaNotFoundException;
|
||||||
|
|
||||||
|
|
||||||
public String query(final String query, final int limit,
|
public String query(final String query, final int limit,
|
||||||
final String fetchPlan) throws InvalidQueryException;
|
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.common.scope.api.ScopeProvider;
|
||||||
import org.gcube.informationsystem.impl.utils.Entities;
|
import org.gcube.informationsystem.impl.utils.Entities;
|
||||||
import org.gcube.informationsystem.model.ER;
|
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.Entity;
|
||||||
import org.gcube.informationsystem.model.entity.Resource;
|
import org.gcube.informationsystem.model.entity.Resource;
|
||||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
|
||||||
|
@ -263,7 +264,7 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient {
|
||||||
return (C) res;
|
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
|
@Override
|
||||||
public <ERTYpe extends ER> List<TypeDefinition> getSchema(
|
public <ISM extends ISManageable> List<TypeDefinition> getSchema(
|
||||||
Class<ERTYpe> clazz, Boolean polymorphic)
|
Class<ISM> clazz, Boolean polymorphic)
|
||||||
throws SchemaNotFoundException {
|
throws SchemaNotFoundException {
|
||||||
|
|
||||||
String type = clazz.getSimpleName();
|
String type = clazz.getSimpleName();
|
||||||
|
|
Loading…
Reference in New Issue