From 9a856a68f81896260cd0ed06d278aae7ebb91351 Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Thu, 14 Jul 2022 15:51:24 +0200 Subject: [PATCH] Using the right query parameter --- .../client/ResourceRegistryClientImpl.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 fbd0c4b..c0d8890 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/client/ResourceRegistryClientImpl.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/client/ResourceRegistryClientImpl.java @@ -34,7 +34,9 @@ import org.gcube.informationsystem.resourceregistry.api.exceptions.queries.Inval import org.gcube.informationsystem.resourceregistry.api.exceptions.queries.templates.QueryTemplateNotFoundException; import org.gcube.informationsystem.resourceregistry.api.exceptions.types.SchemaNotFoundException; import org.gcube.informationsystem.resourceregistry.api.rest.AccessPath; +import org.gcube.informationsystem.resourceregistry.api.rest.InstancePath; import org.gcube.informationsystem.resourceregistry.api.rest.QueryTemplatePath; +import org.gcube.informationsystem.resourceregistry.api.rest.TypePath; import org.gcube.informationsystem.resourceregistry.api.rest.httputils.HTTPUtility; import org.gcube.informationsystem.resourceregistry.api.utils.Utility; import org.gcube.informationsystem.types.TypeMapper; @@ -238,7 +240,7 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient { gxHTTPStringRequest.path(typeName); Map parameters = new HashMap<>(); - parameters.put(AccessPath._POLYMORPHIC_PARAM, Boolean.FALSE.toString()); + parameters.put(InstancePath.POLYMORPHIC_PARAM, Boolean.FALSE.toString()); gxHTTPStringRequest.queryParams(parameters); HttpURLConnection httpURLConnection = gxHTTPStringRequest.head(); @@ -285,7 +287,7 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient { gxHTTPStringRequest.path(typeName); Map parameters = new HashMap<>(); - parameters.put(AccessPath._POLYMORPHIC_PARAM, polymorphic.toString()); + parameters.put(TypePath.POLYMORPHIC_PARAM, polymorphic.toString()); gxHTTPStringRequest.queryParams(parameters); HttpURLConnection httpURLConnection = gxHTTPStringRequest.get(); @@ -330,7 +332,7 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient { gxHTTPStringRequest.path(type); Map parameters = new HashMap<>(); - parameters.put(AccessPath._POLYMORPHIC_PARAM, polymorphic.toString()); + parameters.put(InstancePath.POLYMORPHIC_PARAM, polymorphic.toString()); includeAdditionalQueryParameters(gxHTTPStringRequest, parameters); HttpURLConnection httpURLConnection = gxHTTPStringRequest.get();