Removed unneeded query parameter management

This commit is contained in:
Luca Frosini 2023-05-10 17:34:50 +02:00
parent 9933344e63
commit ef7d845903
1 changed files with 0 additions and 24 deletions

View File

@ -10,9 +10,7 @@ import org.gcube.common.gxhttp.reference.GXConnection;
import org.gcube.common.gxhttp.request.GXHTTPStringRequest;
import org.gcube.common.http.GXHTTPUtility;
import org.gcube.informationsystem.base.reference.Element;
import org.gcube.informationsystem.base.reference.IdentifiableElement;
import org.gcube.informationsystem.model.reference.properties.Metadata;
import org.gcube.informationsystem.resourceregistry.api.contexts.ContextCache;
import org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException;
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
import org.gcube.informationsystem.resourceregistry.api.exceptions.contexts.ContextAlreadyPresentException;
@ -47,12 +45,6 @@ public class ResourceRegistrySchemaClientImpl implements ResourceRegistrySchemaC
*/
protected boolean includeMeta;
/**
* Track if the client must request to include {@link Metadata} in all
* {@link IdentifiableElement} or just in the root instance
*/
protected boolean allMeta;
public boolean includeMeta() {
return includeMeta;
}
@ -61,17 +53,8 @@ public class ResourceRegistrySchemaClientImpl implements ResourceRegistrySchemaC
this.includeMeta = includeMeta;
}
public boolean allMeta() {
return allMeta;
}
public void setAllMeta(boolean allMeta) {
this.allMeta = allMeta;
}
private void addOptionalQueryParameters(Map<String,String> queryParams) throws UnsupportedEncodingException {
addIncludeMeta(queryParams);
addIncludeAllMeta(queryParams);
}
private GXHTTPStringRequest includeAdditionalQueryParameters(GXHTTPStringRequest gxHTTPStringRequest) throws UnsupportedEncodingException{
@ -93,12 +76,6 @@ public class ResourceRegistrySchemaClientImpl implements ResourceRegistrySchemaC
}
}
private void addIncludeAllMeta(Map<String,String> queryParams) throws UnsupportedEncodingException{
if(allMeta) {
queryParams.put(AccessPath.INCLUDE_META_IN_ALL_INSTANCES_QUERY_PARAMETER, Boolean.toString(allMeta));
}
}
@Override
public void addHeader(String name, String value) {
headers.put(name, value);
@ -117,7 +94,6 @@ public class ResourceRegistrySchemaClientImpl implements ResourceRegistrySchemaC
this.address = address;
this.headers = new HashMap<>();
this.includeMeta = false;
this.allMeta = false;
}
@Override