diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/instances/base/ElementManagement.java b/src/main/java/org/gcube/informationsystem/resourceregistry/instances/base/ElementManagement.java index cb0e850..fade2d4 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/instances/base/ElementManagement.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/instances/base/ElementManagement.java @@ -309,16 +309,13 @@ public abstract class ElementManagement { public String getTypeName() throws NotFoundException, AvailableInAnotherContextException, ResourceRegistryException { if(typeName==null) { if(element!=null) { - typeName = element.getProperty(Element.CLASS_PROPERTY); + typeName = getOClass().getName(); } if(typeName==null && jsonNode!=null) { this.typeName = getClassProperty(jsonNode); } - if(typeName==null) { - typeName = getOClass().getName(); - } } return typeName; }