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 ef5e83a..5d3cace 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/client/ResourceRegistryClientImpl.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/client/ResourceRegistryClientImpl.java @@ -73,8 +73,10 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient { logger.debug("{} with UUID {} exists", type, uuid); } catch (ResourceRegistryException e) { + //logger.trace("Error while checking if {} with UUID {} exists.", type, uuid, e); throw e; } catch (Exception e) { + //logger.trace("Error while checking if {} with UUID {} exists.", type, uuid, e); throw new RuntimeException(e); } } @@ -101,10 +103,10 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient { logger.debug("Got {} with UUID {} is {}", type, uuid, erType); return erType; } catch (ResourceRegistryException e) { - logger.error("Error while getting {} with UUID {}", type, uuid, e); + //logger.trace("Error while getting {} with UUID {}", type, uuid, e); throw e; } catch (Exception e) { - logger.error("Error while getting {} with UUID {}", type, uuid, e); + //logger.trace("Error while getting {} with UUID {}", type, uuid, e); throw new RuntimeException(e); } } @@ -128,14 +130,12 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient { String ret = httpCall.call(String.class, stringWriter.toString(), HTTPMETHOD.GET, parameters); logger.debug("Got instances of {} are {}", type, ret); - return ISMapper.unmarshalList(Entity.class, ret); - } catch (ResourceRegistryException e) { - logger.error("Error while getting {} instances", type, e); + //logger.trace("Error while getting {} instances", type, e); throw e; } catch (Exception e) { - logger.error("Error while getting {} instances", type, e); + //logger.trace("Error while getting {} instances", type, e); throw new RuntimeException(e); } } @@ -162,14 +162,12 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient { String ret = httpCall.call(String.class, stringWriter.toString(), HTTPMETHOD.GET, parameters); logger.debug("Got instances of {} from/to {} are {}", relationType, reference.toString(), ret); - return ISMapper.unmarshalList(Resource.class, ret); - } catch (ResourceRegistryException e) { - logger.error("Error while getting instances of {} from/to {}", relationType, e); + //logger.trace("Error while getting instances of {} from/to {}", relationType, e); throw e; } catch (Exception e) { - logger.error("Error while getting instances of {} from/to {}", relationType, e); + //logger.trace("Error while getting instances of {} from/to {}", relationType, e); throw new RuntimeException(e); } } @@ -196,16 +194,14 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient { String schema = httpCall.call(String.class, stringWriter.toString(), HTTPMETHOD.GET, parameters); logger.debug("Got schema for {} is {}", type, schema); - return TypeBinder.deserializeTypeDefinitions(schema); - } catch (ResourceRegistryException e) { - logger.error("Error while getting {}schema for {}", polymorphic ? AccessPath.POLYMORPHIC_PARAM + " " : "", - type, e); + //logger.trace("Error while getting {}schema for {}", polymorphic ? AccessPath.POLYMORPHIC_PARAM + " " : "", + // type, e); throw e; } catch (Exception e) { - logger.error("Error while getting {}schema for {}", polymorphic ? AccessPath.POLYMORPHIC_PARAM + " " : "", - type, e); + //logger.trace("Error while getting {}schema for {}", polymorphic ? AccessPath.POLYMORPHIC_PARAM + " " : "", + // type, e); throw new RuntimeException(e); } } @@ -215,7 +211,7 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient { throws InvalidQueryException, ResourceRegistryException { try { - logger.debug("Going to query. {}", query); + logger.info("Going to query. {}", query); StringWriter stringWriter = new StringWriter(); stringWriter.append(PATH_SEPARATOR); stringWriter.append(AccessPath.ACCESS_PATH_PART); @@ -235,14 +231,12 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient { String ret = httpCall.call(String.class, stringWriter.toString(), HTTPMETHOD.GET, parameters); logger.debug("Query result is {}", ret); - return ret; - } catch (ResourceRegistryException e) { - logger.error("Error while querying", e); + //logger.trace("Error while querying", e); throw e; } catch (Exception e) { - logger.error("Error while querying", e); + //logger.trace("Error while querying", e); throw new RuntimeException(e); } }