diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/er/ERManagement.java b/src/main/java/org/gcube/informationsystem/resourceregistry/er/ERManagement.java index 2e9009c..4556835 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/er/ERManagement.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/er/ERManagement.java @@ -92,9 +92,6 @@ public abstract class ERManagement { protected Class elementClass; protected AccessType accessType; - //protected Class erTypeClass; - //protected String baseType; - protected OrientGraph orientGraph; protected UUID uuid; @@ -346,13 +343,17 @@ public abstract class ERManagement { throws ERNotFoundException { switch (accessType) { + case RESOURCE: throw new ResourceNotFoundException(e); case FACET: throw new FacetNotFoundException(e); - case RELATION: + case IS_RELATED_TO: + throw new RelationNotFoundException(e); + + case CONSISTS_OF: throw new RelationNotFoundException(e); default: @@ -373,9 +374,12 @@ public abstract class ERManagement { case FACET: throw new FacetAvailableInAnotherContextException(e); - case RELATION: + case IS_RELATED_TO: throw new RelationAvailableInAnotherContextException(e); + case CONSISTS_OF: + throw new RelationAvailableInAnotherContextException(e); + default: break; }