52 lines
2.1 KiB
Java
52 lines
2.1 KiB
Java
package org.gcube.informationsystem.resourceregistry.schema;
|
|
|
|
import java.util.List;
|
|
|
|
import org.gcube.informationsystem.base.reference.Element;
|
|
import org.gcube.informationsystem.model.knowledge.ModelKnowledge;
|
|
import org.gcube.informationsystem.model.reference.ERElement;
|
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
|
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaException;
|
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException;
|
|
import org.gcube.informationsystem.tree.Node;
|
|
import org.gcube.informationsystem.types.knowledge.TypeInformation;
|
|
import org.gcube.informationsystem.types.reference.Type;
|
|
|
|
/**
|
|
* @author Luca Frosini (ISTI - CNR)
|
|
*/
|
|
public interface ResourceRegistrySchemaClient {
|
|
|
|
public ModelKnowledge<Type, TypeInformation> getModelKnowledge();
|
|
|
|
public void renewModelKnowledge();
|
|
|
|
public void addHeader(String name, String value);
|
|
|
|
public String create(String typeDefinitition) throws SchemaException, ResourceRegistryException;
|
|
|
|
public <E extends Element> Type create(Class<E> clz) throws SchemaException, ResourceRegistryException;
|
|
|
|
public boolean exist(String typeName) throws ResourceRegistryException;
|
|
|
|
public <ERElem extends ERElement> boolean exist(Class<ERElem> clz) throws ResourceRegistryException;
|
|
|
|
public String read(String typeName, Boolean polymorphic) throws SchemaNotFoundException, ResourceRegistryException;
|
|
|
|
public <ERElem extends ERElement> List<Type> read(Class<ERElem> clazz, Boolean polymorphic)
|
|
throws SchemaNotFoundException, ResourceRegistryException;
|
|
|
|
public String read(String typeName, int level)
|
|
throws SchemaNotFoundException, ResourceRegistryException;
|
|
|
|
public <ERElem extends ERElement> List<Type> read(Class<ERElem> clazz, int level)
|
|
throws SchemaNotFoundException, ResourceRegistryException;
|
|
|
|
public <ERElem extends ERElement> Node<Type> getTypeTreeNode(String typeName)
|
|
throws SchemaNotFoundException, ResourceRegistryException;
|
|
|
|
public <ERElem extends ERElement> Node<Type> getTypeTreeNode(Class<ERElem> clazz)
|
|
throws SchemaNotFoundException, ResourceRegistryException;
|
|
|
|
}
|