2017-12-18 15:37:22 +01:00
|
|
|
package org.gcube.informationsystem.resourceregistry.schema;
|
2017-12-18 15:34:25 +01:00
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
2021-09-20 12:15:14 +02:00
|
|
|
import org.gcube.informationsystem.base.reference.Element;
|
2017-12-18 15:34:25 +01:00
|
|
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
|
2021-10-25 11:01:48 +02:00
|
|
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaException;
|
|
|
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException;
|
2020-02-03 10:52:50 +01:00
|
|
|
import org.gcube.informationsystem.types.reference.Type;
|
2017-12-18 15:34:25 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @author Luca Frosini (ISTI - CNR)
|
|
|
|
*/
|
|
|
|
public interface ResourceRegistrySchemaClient {
|
|
|
|
|
2022-02-09 12:14:19 +01:00
|
|
|
public <E extends Element> Type create(Class<E> clz) throws SchemaException, ResourceRegistryException;
|
|
|
|
|
|
|
|
public String create(String typeDefinitition) throws SchemaException, ResourceRegistryException;
|
|
|
|
|
|
|
|
public <E extends Element> boolean exist(Class<E> clz) throws ResourceRegistryException;
|
|
|
|
|
|
|
|
public boolean exist(String typeName) throws ResourceRegistryException;
|
|
|
|
|
2021-09-20 12:15:14 +02:00
|
|
|
public <E extends Element> List<Type> read(Class<E> clz, Boolean polymorphic)
|
2017-12-18 15:34:25 +01:00
|
|
|
throws SchemaNotFoundException, ResourceRegistryException;
|
2022-02-09 12:14:19 +01:00
|
|
|
|
|
|
|
public String read(String typeName, Boolean polymorphic) throws SchemaNotFoundException, ResourceRegistryException;
|
|
|
|
|
2017-12-18 15:34:25 +01:00
|
|
|
}
|