Fixing APIs to allow to request Property schemas
This commit is contained in:
parent
edc51232a5
commit
9fa32fa7c3
|
@ -2,7 +2,7 @@ package org.gcube.informationsystem.resourceregistry.schema;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.gcube.informationsystem.model.reference.ERElement;
|
import org.gcube.informationsystem.base.reference.Element;
|
||||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
|
||||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.schema.SchemaException;
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.schema.SchemaException;
|
||||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.schema.SchemaNotFoundException;
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.schema.SchemaNotFoundException;
|
||||||
|
@ -13,13 +13,13 @@ import org.gcube.informationsystem.types.reference.Type;
|
||||||
*/
|
*/
|
||||||
public interface ResourceRegistrySchemaClient {
|
public interface ResourceRegistrySchemaClient {
|
||||||
|
|
||||||
public <ERElem extends ERElement> Type create(Class<ERElem> clz)
|
public <E extends Element> Type create(Class<E> clz)
|
||||||
throws SchemaException, ResourceRegistryException;
|
throws SchemaException, ResourceRegistryException;
|
||||||
|
|
||||||
public String create(String typeDefinitition)
|
public String create(String typeDefinitition)
|
||||||
throws SchemaException, ResourceRegistryException;
|
throws SchemaException, ResourceRegistryException;
|
||||||
|
|
||||||
public <ERElem extends ERElement> List<Type> read(Class<ERElem> clz, Boolean polymorphic)
|
public <E extends Element> List<Type> read(Class<E> clz, Boolean polymorphic)
|
||||||
throws SchemaNotFoundException, ResourceRegistryException;
|
throws SchemaNotFoundException, ResourceRegistryException;
|
||||||
|
|
||||||
public String read(String typeName, Boolean polymorphic)
|
public String read(String typeName, Boolean polymorphic)
|
||||||
|
|
|
@ -7,7 +7,7 @@ import java.util.Map;
|
||||||
|
|
||||||
import org.gcube.common.gxhttp.reference.GXConnection;
|
import org.gcube.common.gxhttp.reference.GXConnection;
|
||||||
import org.gcube.common.gxhttp.request.GXHTTPStringRequest;
|
import org.gcube.common.gxhttp.request.GXHTTPStringRequest;
|
||||||
import org.gcube.informationsystem.model.reference.ERElement;
|
import org.gcube.informationsystem.base.reference.Element;
|
||||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
|
||||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.context.ContextAlreadyPresentException;
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.context.ContextAlreadyPresentException;
|
||||||
import org.gcube.informationsystem.resourceregistry.api.exceptions.context.ContextNotFoundException;
|
import org.gcube.informationsystem.resourceregistry.api.exceptions.context.ContextNotFoundException;
|
||||||
|
@ -36,7 +36,7 @@ public class ResourceRegistrySchemaClientImpl implements ResourceRegistrySchemaC
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <ERElem extends ERElement> Type create(Class<ERElem> clz)
|
public <E extends Element> Type create(Class<E> clz)
|
||||||
throws SchemaException, ResourceRegistryException {
|
throws SchemaException, ResourceRegistryException {
|
||||||
try {
|
try {
|
||||||
String typeDefinition = TypeMapper.serializeType(clz);
|
String typeDefinition = TypeMapper.serializeType(clz);
|
||||||
|
@ -78,7 +78,7 @@ public class ResourceRegistrySchemaClientImpl implements ResourceRegistrySchemaC
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <ERElem extends ERElement> List<Type> read(Class<ERElem> clz, Boolean polymorphic)
|
public <E extends Element> List<Type> read(Class<E> clz, Boolean polymorphic)
|
||||||
throws SchemaNotFoundException, ResourceRegistryException {
|
throws SchemaNotFoundException, ResourceRegistryException {
|
||||||
try {
|
try {
|
||||||
String typeName = Utility.getTypeName(clz);
|
String typeName = Utility.getTypeName(clz);
|
||||||
|
|
Loading…
Reference in New Issue