2016-07-18 11:57:37 +02:00
|
|
|
package org.gcube.informationsystem.resourceregistry.client.proxy;
|
|
|
|
|
2017-01-12 16:39:53 +01:00
|
|
|
import java.util.List;
|
2016-10-18 10:52:05 +02:00
|
|
|
import java.util.UUID;
|
2016-09-12 14:45:05 +02:00
|
|
|
|
2017-01-12 16:39:53 +01:00
|
|
|
import org.gcube.informationsystem.model.ER;
|
2017-01-25 15:34:53 +01:00
|
|
|
import org.gcube.informationsystem.model.ISManageable;
|
2017-01-12 16:39:53 +01:00
|
|
|
import org.gcube.informationsystem.model.entity.Entity;
|
2017-01-13 17:57:33 +01:00
|
|
|
import org.gcube.informationsystem.model.entity.Resource;
|
2016-10-18 10:52:05 +02:00
|
|
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
|
2017-01-12 16:39:53 +01:00
|
|
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.er.ERNotFoundException;
|
|
|
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.query.InvalidQueryException;
|
2016-10-18 10:52:05 +02:00
|
|
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.schema.SchemaNotFoundException;
|
2017-01-12 16:39:53 +01:00
|
|
|
import org.gcube.informationsystem.types.TypeBinder.TypeDefinition;
|
2016-07-18 11:57:37 +02:00
|
|
|
|
|
|
|
/**
|
2016-10-12 14:35:20 +02:00
|
|
|
* @author Luca Frosini (ISTI - CNR)
|
2016-07-18 11:57:37 +02:00
|
|
|
*/
|
2016-10-18 10:52:05 +02:00
|
|
|
public interface ResourceRegistryClient {
|
2016-07-18 11:57:37 +02:00
|
|
|
|
2017-03-28 16:00:55 +02:00
|
|
|
public <ERType extends ER> void exists(
|
|
|
|
Class<ERType> clazz, UUID uuid) throws ERNotFoundException,
|
|
|
|
ResourceRegistryException;
|
|
|
|
|
2017-01-12 16:39:53 +01:00
|
|
|
public <ERType extends ER> ERType getInstance(
|
|
|
|
Class<ERType> clazz, UUID uuid) throws ERNotFoundException,
|
|
|
|
ResourceRegistryException;
|
2016-07-18 11:57:37 +02:00
|
|
|
|
2017-01-13 18:19:48 +01:00
|
|
|
public List<? extends Entity> getInstances(
|
|
|
|
String type, Boolean polymorphic) throws
|
2017-02-24 12:01:33 +01:00
|
|
|
ResourceRegistryException;
|
2016-10-18 10:52:05 +02:00
|
|
|
|
2017-01-13 18:19:48 +01:00
|
|
|
public List<Resource> getInstancesFromEntity(
|
|
|
|
String relationType, Boolean polymorphic,
|
2017-01-12 16:39:53 +01:00
|
|
|
UUID reference, Direction direction) throws
|
2017-02-24 12:01:33 +01:00
|
|
|
ResourceRegistryException;
|
2016-10-18 10:52:05 +02:00
|
|
|
|
2017-01-25 15:34:53 +01:00
|
|
|
public <ISM extends ISManageable> List<TypeDefinition> getSchema(
|
|
|
|
Class<ISM> clazz, Boolean polymorphic)
|
2017-02-24 12:01:33 +01:00
|
|
|
throws SchemaNotFoundException, ResourceRegistryException;
|
2016-10-18 10:52:05 +02:00
|
|
|
|
|
|
|
public String query(final String query, final int limit,
|
|
|
|
final String fetchPlan) throws InvalidQueryException;
|
2016-07-18 11:57:37 +02:00
|
|
|
|
|
|
|
}
|