Class ResourceRegistrySchemaClientImpl
- java.lang.Object
-
- org.gcube.informationsystem.resourceregistry.schema.ResourceRegistrySchemaClientImpl
-
- All Implemented Interfaces:
ResourceRegistrySchemaClient
public class ResourceRegistrySchemaClientImpl extends Object implements ResourceRegistrySchemaClient
- Author:
- Luca Frosini (ISTI - CNR)
-
-
Constructor Summary
Constructors Constructor Description ResourceRegistrySchemaClientImpl(String address)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddHeader(String name, String value)<E extends org.gcube.informationsystem.base.reference.Element>
org.gcube.informationsystem.types.reference.Typecreate(Class<E> clz)Stringcreate(String typeDefinitition)<E extends org.gcube.informationsystem.base.reference.Element>
booleanexist(Class<E> clz)booleanexist(String typeName)protected org.gcube.common.gxhttp.request.GXHTTPStringRequestgetGXHTTPStringRequest()booleanincludeMeta()<E extends org.gcube.informationsystem.base.reference.Element>
List<org.gcube.informationsystem.types.reference.Type>read(Class<E> clz, Boolean polymorphic)Stringread(String typeName, Boolean polymorphic)voidsetIncludeMeta(boolean includeMeta)
-
-
-
Constructor Detail
-
ResourceRegistrySchemaClientImpl
public ResourceRegistrySchemaClientImpl(String address)
-
-
Method Detail
-
includeMeta
public boolean includeMeta()
-
setIncludeMeta
public void setIncludeMeta(boolean includeMeta)
-
addHeader
public void addHeader(String name, String value)
- Specified by:
addHeaderin interfaceResourceRegistrySchemaClient
-
getGXHTTPStringRequest
protected org.gcube.common.gxhttp.request.GXHTTPStringRequest getGXHTTPStringRequest()
-
create
public <E extends org.gcube.informationsystem.base.reference.Element> org.gcube.informationsystem.types.reference.Type create(Class<E> clz) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Specified by:
createin interfaceResourceRegistrySchemaClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
create
public String create(String typeDefinitition) throws org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextAlreadyPresentException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Specified by:
createin interfaceResourceRegistrySchemaClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextAlreadyPresentExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
exist
public <E extends org.gcube.informationsystem.base.reference.Element> boolean exist(Class<E> clz) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Specified by:
existin interfaceResourceRegistrySchemaClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
exist
public boolean exist(String typeName) throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Specified by:
existin interfaceResourceRegistrySchemaClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
read
public <E extends org.gcube.informationsystem.base.reference.Element> List<org.gcube.informationsystem.types.reference.Type> read(Class<E> clz, Boolean polymorphic) throws org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Specified by:
readin interfaceResourceRegistrySchemaClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
read
public String read(String typeName, Boolean polymorphic) throws org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundException, org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
- Specified by:
readin interfaceResourceRegistrySchemaClient- Throws:
org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextNotFoundExceptionorg.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
-
-