From 8f67beb172c2974920b129094c9851e6d4df6c02 Mon Sep 17 00:00:00 2001 From: Luca Frosini Date: Fri, 21 Apr 2023 14:30:07 +0200 Subject: [PATCH] Fixed getTypeName --- .../resourceregistry/instances/base/ElementManagement.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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; }