Added Raw Parameter to query method

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry-client@176704 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Luca Frosini 2019-01-21 10:41:16 +00:00
parent 567bdba174
commit 467e2fd620
2 changed files with 11 additions and 1 deletions

View File

@ -106,6 +106,9 @@ public interface ResourceRegistryClient {
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 <ISM extends ISManageable> List<TypeDefinition> getSchema(Class<ISM> clazz, Boolean polymorphic)
throws SchemaNotFoundException, ResourceRegistryException;

View File

@ -279,6 +279,12 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient {
@Override
public String query(String query, int limit, String fetchPlan)
throws InvalidQueryException, ResourceRegistryException {
return query(query, limit, fetchPlan, false);
}
@Override
public String query(String query, int limit, String fetchPlan, boolean raw)
throws InvalidQueryException, ResourceRegistryException {
try {
logger.info("Going to query. {}", query);
@ -293,8 +299,9 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient {
limit = AccessPath.UNBOUNDED;
}
parameters.put(AccessPath.LIMIT_PARAM, Integer.toString(limit));
parameters.put(AccessPath.RAW_PARAM, Boolean.toString(raw));
if(fetchPlan != null) {
if(fetchPlan != null && fetchPlan.compareTo("")!=0) {
parameters.put(AccessPath.FETCH_PLAN_PARAM, fetchPlan);
}