Removed commented code which is not needed anymore
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry@158746 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
c4a2a28b68
commit
635e8b5f6d
|
@ -249,47 +249,6 @@ public abstract class RelationManagement<R extends Relation, S extends EntityMan
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Revisit this if-else because should be not needed anymore.
|
|
||||||
/*
|
|
||||||
* if(this instanceof IsParentOfManagement) { if (!(sourceEntityManagement
|
|
||||||
* instanceof ContextManagement && targetEntityManagement instanceof
|
|
||||||
* ContextManagement)) { String error = String.format(
|
|
||||||
* "A %s can be only created beetween two %s. " +
|
|
||||||
* "Cannot instatiate %s beetween %s -> %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(),
|
logger.trace("Creating {} beetween {} -> {}", erType, getSourceEntityManagement().serialize(),
|
||||||
getTargetEntityManagement().serialize());
|
getTargetEntityManagement().serialize());
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue