diff --git a/CHANGELOG.md b/CHANGELOG.md index 95220a9..c08c92f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,16 +2,23 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm # Changelog for Resource Registry Client +## [v4.2.0-SNAPSHOT] + +- Aligned APIs to other clients [#22011] + + ## [v4.1.0] - Used ContextCache to make the client more efficient - Added APIs to get instance contexts [#20013] - Added support to request contexts in instances header [#20012] + ## [v4.0.0] [r4.26.0] - 2020-11-11 - Switched JSON management to gcube-jackson [#19116] + ## [v3.0.0] [r4.21.0] - 2020-03-30 - Refactored code to support IS Model reorganization (e.g naming, packages) diff --git a/pom.xml b/pom.xml index c989c3d..6601ed4 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ org.gcube.information-system resource-registry-client - 4.1.0 + 4.2.0-SNAPSHOT Resource Registry Client Resource Registry Client is a library designed to interact with idempotent Resource Registry APIs diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/client/ResourceRegistryClient.java b/src/main/java/org/gcube/informationsystem/resourceregistry/client/ResourceRegistryClient.java index 5998c82..58391b1 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/client/ResourceRegistryClient.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/client/ResourceRegistryClient.java @@ -5,7 +5,6 @@ import java.util.Map; import java.util.Set; import java.util.UUID; -import org.gcube.informationsystem.base.reference.Element; import org.gcube.informationsystem.context.reference.entities.Context; import org.gcube.informationsystem.model.reference.ERElement; import org.gcube.informationsystem.model.reference.entities.Facet; @@ -82,34 +81,13 @@ public interface ResourceRegistryClient { public String getRelatedResources(String resourceType, String isRelatedToType, String referenceResourceType, Direction direction, boolean polymorphic) throws ResourceRegistryException; - /* - public , RE extends Entity> List getRelated(Class entityClass, - Class relationClass, Class referenceEntityClass, Direction direction, boolean polymorphic, - Map map) throws ResourceRegistryException; - - public String getRelated(String entityType, String relationType, String referenceEntityType, Direction direction, - boolean polymorphic, Map map) throws ResourceRegistryException; - - public , RE extends Entity> List getRelated(Class entityClass, - Class relationClass, Class referenceEntityClass, RE referenceEntity, Direction direction, - boolean polymorphic) throws ResourceRegistryException; - - public , RE extends Entity> List getRelated(Class entityClass, - Class relationClass, Class referenceEntityClass, UUID referenceEntityUUID, Direction direction, - boolean polymorphic) throws ResourceRegistryException; - - public String getRelated(String entityType, String relationType, String referenceEntityType, UUID referenceEntity, - Direction direction, boolean polymorphic) throws ResourceRegistryException; - */ - - public String query(final String query, final int limit, final String fetchPlan) throws InvalidQueryException, ResourceRegistryException; public String query(final String query, final int limit, final String fetchPlan, boolean raw) throws InvalidQueryException, ResourceRegistryException; - public List getSchema(Class clazz, Boolean polymorphic) + public List getSchema(Class clazz, Boolean polymorphic) throws SchemaNotFoundException, ResourceRegistryException; public Context getContext(UUID uuid) throws ContextNotFoundException, ResourceRegistryException; diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/client/ResourceRegistryClientImpl.java b/src/main/java/org/gcube/informationsystem/resourceregistry/client/ResourceRegistryClientImpl.java index 47d360e..8d4de09 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/client/ResourceRegistryClientImpl.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/client/ResourceRegistryClientImpl.java @@ -10,7 +10,6 @@ import java.util.UUID; import org.gcube.common.gxhttp.reference.GXConnection; import org.gcube.common.gxhttp.request.GXHTTPStringRequest; -import org.gcube.informationsystem.base.reference.Element; import org.gcube.informationsystem.context.reference.entities.Context; import org.gcube.informationsystem.model.reference.ERElement; import org.gcube.informationsystem.model.reference.entities.Entity; @@ -183,7 +182,7 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient { } @Override - public List getSchema(Class clazz, Boolean polymorphic) + public List getSchema(Class clazz, Boolean polymorphic) throws SchemaNotFoundException, ResourceRegistryException { String type = Utility.getTypeName(clazz); try {