diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/client/ResourceRegistryClient.java b/src/main/java/org/gcube/informationsystem/resourceregistry/client/ResourceRegistryClient.java index 33e12b9..fc3d3ce 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/client/ResourceRegistryClient.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/client/ResourceRegistryClient.java @@ -7,12 +7,10 @@ import java.util.UUID; import org.gcube.informationsystem.model.ER; import org.gcube.informationsystem.model.ISManageable; import org.gcube.informationsystem.model.entity.Context; -import org.gcube.informationsystem.model.entity.Entity; import org.gcube.informationsystem.model.entity.Facet; import org.gcube.informationsystem.model.entity.Resource; import org.gcube.informationsystem.model.relation.ConsistsOf; import org.gcube.informationsystem.model.relation.IsRelatedTo; -import org.gcube.informationsystem.model.relation.Relation; import org.gcube.informationsystem.resourceregistry.api.exceptions.AvailableInAnotherContextException; import org.gcube.informationsystem.resourceregistry.api.exceptions.NotFoundException; import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException; @@ -84,11 +82,11 @@ public interface ResourceRegistryClient { public String getRelatedResources(String resourceType, String isRelatedToType, String referenceResourceType, Direction direction, boolean polymorphic) throws ResourceRegistryException; + /* public , RE extends Entity> List getRelated(Class entityClass, Class relationClass, Class referenceEntityClass, Direction direction, boolean polymorphic, Map map) throws ResourceRegistryException; - public String getRelated(String entityType, String relationType, String referenceEntityType, Direction direction, boolean polymorphic, Map map) throws ResourceRegistryException; @@ -102,7 +100,7 @@ public interface ResourceRegistryClient { 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) 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 bfbcadb..59c707d 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/client/ResourceRegistryClientImpl.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/client/ResourceRegistryClientImpl.java @@ -351,7 +351,7 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient { stringWriter.append(PATH_SEPARATOR); stringWriter.append(referenceEntityType); - Map parameters = new HashMap<>(map); + Map parameters = new HashMap<>(); parameters.put(AccessPath.DIRECTION_PARAM, direction); parameters.put(AccessPath.POLYMORPHIC_PARAM, polymorphic); @@ -501,8 +501,8 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient { } @SuppressWarnings("unchecked") - @Override - public , RE extends Entity> List getRelated(Class entityClass, + // @Override + protected , RE extends Entity> List getRelated(Class entityClass, Class relationClass, Class referenceEntityClass, Direction direction, boolean polymorphic, Map map) throws ResourceRegistryException { String entityType = Utility.getType(entityClass); @@ -516,14 +516,14 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient { } } - @Override - public String getRelated(String entityType, String relationType, String referenceEntityType, Direction direction, + // @Override + protected String getRelated(String entityType, String relationType, String referenceEntityType, Direction direction, boolean polymorphic, Map map) throws ResourceRegistryException { return getRelated(entityType, relationType, referenceEntityType, null, direction, polymorphic, map); } - @Override - public , RE extends Entity> List getRelated(Class entityClass, + // @Override + protected , RE extends Entity> List getRelated(Class entityClass, Class relationClass, Class referenceEntityClass, RE referenceEntity, Direction direction, boolean polymorphic) throws ResourceRegistryException { UUID referenceEntityUUID = referenceEntity.getHeader().getUUID(); @@ -532,8 +532,8 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient { } @SuppressWarnings("unchecked") - @Override - public , RE extends Entity> List getRelated(Class entityClass, + // @Override + protected , RE extends Entity> List getRelated(Class entityClass, Class relationClass, Class referenceEntityClass, UUID referenceEntityUUID, Direction direction, boolean polymorphic) throws ResourceRegistryException { String entityType = Utility.getType(entityClass); @@ -548,8 +548,8 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient { } } - @Override - public String getRelated(String entityType, String relationType, String referenceEntityType, UUID referenceEntity, + // @Override + protected String getRelated(String entityType, String relationType, String referenceEntityType, UUID referenceEntity, Direction direction, boolean polymorphic) throws ResourceRegistryException { return getRelated(entityType, relationType, referenceEntityType, referenceEntity, direction, polymorphic, null); }