diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/er/relation/RelationManagement.java b/src/main/java/org/gcube/informationsystem/resourceregistry/er/relation/RelationManagement.java index daaa473..83288d9 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/er/relation/RelationManagement.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/er/relation/RelationManagement.java @@ -249,47 +249,6 @@ public abstract class RelationManagement %s ", IsParentOf.NAME, Context.NAME, - * erType, sourceEntityManagement.serialize(), - * targetEntityManagement.serialize()); throw new - * ResourceRegistryException(error); } } else { if (!(sourceEntityManagement - * instanceof ResourceManagement)) { String error = String.format( - * "Any type of %s can have only a %s as %s. " + - * "Cannot instatiate %s beetween %s -> %s ", Relation.NAME, Resource.NAME, - * Relation.SOURCE_PROPERTY, erType, sourceEntityManagement.serialize(), - * targetEntityManagement.serialize()); throw new - * ResourceRegistryException(error); } - * - * if (this instanceof IsRelatedToManagement) { if (!(targetEntityManagement - * instanceof ResourceManagement)) { String error = - * String.format("A %s can have only a %s as %s. " + - * "Cannot instatiate %s beetween %s -> %s ", accessType.getName(), - * Resource.NAME, Relation.TARGET_PROPERTY, erType, - * sourceEntityManagement.serialize(), targetEntityManagement.serialize()); - * throw new ResourceRegistryException(error); } } else if (this instanceof - * ConsistsOfManagement) { if (!(targetEntityManagement instanceof - * FacetManagement)) { String error = - * String.format("A %s can have only a %s as %s. " + - * "Cannot instatiate %s beetween %s -> %s ", accessType.getName(), Facet.NAME, - * Relation.TARGET_PROPERTY, erType, sourceEntityManagement.serialize(), - * targetEntityManagement.serialize()); throw new - * ResourceRegistryException(error); } } else { String error = - * String.format("{%s is not a %s nor a %s. " + - * "This is really strange and should not occur. " + "Please Investigate it.", - * this, IsRelatedToManagement.class.getSimpleName(), - * ConsistsOfManagement.class.getSimpleName()); throw new - * ResourceRegistryException(error); } - * - * } - */ - // end of if-else to be revisited - logger.trace("Creating {} beetween {} -> {}", erType, getSourceEntityManagement().serialize(), getTargetEntityManagement().serialize());