Aligned APIs refs #22011

This commit is contained in:
Luca Frosini 2021-09-15 11:45:05 +02:00
parent f9a2a599d9
commit 1c40bf3515
4 changed files with 10 additions and 26 deletions

View File

@ -2,16 +2,23 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
# Changelog for Resource Registry Client # Changelog for Resource Registry Client
## [v4.2.0-SNAPSHOT]
- Aligned APIs to other clients [#22011]
## [v4.1.0] ## [v4.1.0]
- Used ContextCache to make the client more efficient - Used ContextCache to make the client more efficient
- Added APIs to get instance contexts [#20013] - Added APIs to get instance contexts [#20013]
- Added support to request contexts in instances header [#20012] - Added support to request contexts in instances header [#20012]
## [v4.0.0] [r4.26.0] - 2020-11-11 ## [v4.0.0] [r4.26.0] - 2020-11-11
- Switched JSON management to gcube-jackson [#19116] - Switched JSON management to gcube-jackson [#19116]
## [v3.0.0] [r4.21.0] - 2020-03-30 ## [v3.0.0] [r4.21.0] - 2020-03-30
- Refactored code to support IS Model reorganization (e.g naming, packages) - Refactored code to support IS Model reorganization (e.g naming, packages)

View File

@ -9,7 +9,7 @@
<groupId>org.gcube.information-system</groupId> <groupId>org.gcube.information-system</groupId>
<artifactId>resource-registry-client</artifactId> <artifactId>resource-registry-client</artifactId>
<version>4.1.0</version> <version>4.2.0-SNAPSHOT</version>
<name>Resource Registry Client</name> <name>Resource Registry Client</name>
<description>Resource Registry Client is a library designed to interact with idempotent Resource Registry APIs</description> <description>Resource Registry Client is a library designed to interact with idempotent Resource Registry APIs</description>

View File

@ -5,7 +5,6 @@ import java.util.Map;
import java.util.Set; import java.util.Set;
import java.util.UUID; import java.util.UUID;
import org.gcube.informationsystem.base.reference.Element;
import org.gcube.informationsystem.context.reference.entities.Context; import org.gcube.informationsystem.context.reference.entities.Context;
import org.gcube.informationsystem.model.reference.ERElement; import org.gcube.informationsystem.model.reference.ERElement;
import org.gcube.informationsystem.model.reference.entities.Facet; import org.gcube.informationsystem.model.reference.entities.Facet;
@ -82,34 +81,13 @@ public interface ResourceRegistryClient {
public String getRelatedResources(String resourceType, String isRelatedToType, String referenceResourceType, public String getRelatedResources(String resourceType, String isRelatedToType, String referenceResourceType,
Direction direction, boolean polymorphic) throws ResourceRegistryException; Direction direction, boolean polymorphic) throws ResourceRegistryException;
/*
public <E extends Entity, R extends Relation<?,?>, RE extends Entity> List<E> getRelated(Class<E> entityClass,
Class<R> relationClass, Class<RE> referenceEntityClass, Direction direction, boolean polymorphic,
Map<String,Object> map) throws ResourceRegistryException;
public String getRelated(String entityType, String relationType, String referenceEntityType, Direction direction,
boolean polymorphic, Map<String,Object> map) throws ResourceRegistryException;
public <E extends Entity, R extends Relation<?,?>, RE extends Entity> List<E> getRelated(Class<E> entityClass,
Class<R> relationClass, Class<RE> referenceEntityClass, RE referenceEntity, Direction direction,
boolean polymorphic) throws ResourceRegistryException;
public <E extends Entity, R extends Relation<?,?>, RE extends Entity> List<E> getRelated(Class<E> entityClass,
Class<R> relationClass, Class<RE> 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) public String query(final String query, final int limit, final String fetchPlan)
throws InvalidQueryException, ResourceRegistryException; throws InvalidQueryException, ResourceRegistryException;
public String query(final String query, final int limit, final String fetchPlan, boolean raw) public String query(final String query, final int limit, final String fetchPlan, boolean raw)
throws InvalidQueryException, ResourceRegistryException; throws InvalidQueryException, ResourceRegistryException;
public <E extends Element> List<Type> getSchema(Class<E> clazz, Boolean polymorphic) public <ERElem extends ERElement> List<Type> getSchema(Class<ERElem> clazz, Boolean polymorphic)
throws SchemaNotFoundException, ResourceRegistryException; throws SchemaNotFoundException, ResourceRegistryException;
public Context getContext(UUID uuid) throws ContextNotFoundException, ResourceRegistryException; public Context getContext(UUID uuid) throws ContextNotFoundException, ResourceRegistryException;

View File

@ -10,7 +10,6 @@ import java.util.UUID;
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.base.reference.Element;
import org.gcube.informationsystem.context.reference.entities.Context; import org.gcube.informationsystem.context.reference.entities.Context;
import org.gcube.informationsystem.model.reference.ERElement; import org.gcube.informationsystem.model.reference.ERElement;
import org.gcube.informationsystem.model.reference.entities.Entity; import org.gcube.informationsystem.model.reference.entities.Entity;
@ -183,7 +182,7 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient {
} }
@Override @Override
public <E extends Element> List<Type> getSchema(Class<E> clazz, Boolean polymorphic) public <ERElem extends ERElement> List<Type> getSchema(Class<ERElem> clazz, Boolean polymorphic)
throws SchemaNotFoundException, ResourceRegistryException { throws SchemaNotFoundException, ResourceRegistryException {
String type = Utility.getTypeName(clazz); String type = Utility.getTypeName(clazz);
try { try {