From 9fa32fa7c3d8d1a53c4b54d01f20b0db81543203 Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Mon, 20 Sep 2021 12:15:14 +0200 Subject: [PATCH] Fixing APIs to allow to request Property schemas --- .../schema/ResourceRegistrySchemaClient.java | 6 +++--- .../schema/ResourceRegistrySchemaClientImpl.java | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/schema/ResourceRegistrySchemaClient.java b/src/main/java/org/gcube/informationsystem/resourceregistry/schema/ResourceRegistrySchemaClient.java index 8b634f7..8d7133e 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/schema/ResourceRegistrySchemaClient.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/schema/ResourceRegistrySchemaClient.java @@ -2,7 +2,7 @@ package org.gcube.informationsystem.resourceregistry.schema; 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.schema.SchemaException; import org.gcube.informationsystem.resourceregistry.api.exceptions.schema.SchemaNotFoundException; @@ -13,13 +13,13 @@ import org.gcube.informationsystem.types.reference.Type; */ public interface ResourceRegistrySchemaClient { - public Type create(Class clz) + public Type create(Class clz) throws SchemaException, ResourceRegistryException; public String create(String typeDefinitition) throws SchemaException, ResourceRegistryException; - public List read(Class clz, Boolean polymorphic) + public List read(Class clz, Boolean polymorphic) throws SchemaNotFoundException, ResourceRegistryException; public String read(String typeName, Boolean polymorphic) diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/schema/ResourceRegistrySchemaClientImpl.java b/src/main/java/org/gcube/informationsystem/resourceregistry/schema/ResourceRegistrySchemaClientImpl.java index d4baf0b..452fd32 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/schema/ResourceRegistrySchemaClientImpl.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/schema/ResourceRegistrySchemaClientImpl.java @@ -7,7 +7,7 @@ import java.util.Map; import org.gcube.common.gxhttp.reference.GXConnection; 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.context.ContextAlreadyPresentException; import org.gcube.informationsystem.resourceregistry.api.exceptions.context.ContextNotFoundException; @@ -36,7 +36,7 @@ public class ResourceRegistrySchemaClientImpl implements ResourceRegistrySchemaC } @Override - public Type create(Class clz) + public Type create(Class clz) throws SchemaException, ResourceRegistryException { try { String typeDefinition = TypeMapper.serializeType(clz); @@ -78,7 +78,7 @@ public class ResourceRegistrySchemaClientImpl implements ResourceRegistrySchemaC @Override - public List read(Class clz, Boolean polymorphic) + public List read(Class clz, Boolean polymorphic) throws SchemaNotFoundException, ResourceRegistryException { try { String typeName = Utility.getTypeName(clz);