diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/dbinitialization/DatabaseEnvironment.java b/src/main/java/org/gcube/informationsystem/resourceregistry/dbinitialization/DatabaseEnvironment.java index 3b330f3..7c5558c 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/dbinitialization/DatabaseEnvironment.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/dbinitialization/DatabaseEnvironment.java @@ -136,6 +136,9 @@ public class DatabaseEnvironment { private static final Key KEY; + public static final String V = "V"; + public static final String E = "E"; + static { Properties properties = new Properties(); InputStream input = null; @@ -381,10 +384,10 @@ public class DatabaseEnvironment { OSchema oSchema = oMetadata.getSchema(); OClass oRestricted = oSchema.getClass(OSecurity.RESTRICTED_CLASSNAME); - OClass v = oSchema.getClass("V"); + OClass v = oSchema.getClass(V); v.addSuperClass(oRestricted); - OClass e = oSchema.getClass("E"); + OClass e = oSchema.getClass(E); e.addSuperClass(oRestricted); oDatabaseSession.commit(); diff --git a/src/main/java/org/gcube/informationsystem/resourceregistry/utils/HeaderUtility.java b/src/main/java/org/gcube/informationsystem/resourceregistry/utils/HeaderUtility.java index dac4ae7..d907fe9 100644 --- a/src/main/java/org/gcube/informationsystem/resourceregistry/utils/HeaderUtility.java +++ b/src/main/java/org/gcube/informationsystem/resourceregistry/utils/HeaderUtility.java @@ -21,7 +21,6 @@ import org.slf4j.LoggerFactory; import com.orientechnologies.orient.core.record.OElement; import com.orientechnologies.orient.core.record.impl.ODocument; -import com.tinkerpop.blueprints.Edge; /** * @author Luca Frosini (ISTI - CNR) @@ -121,11 +120,13 @@ public class HeaderUtility { return header; } + /* public static Header addHeader(Edge edge, UUID uuid) { Header header = createHeader(uuid); edge.setProperty(IdentifiableElement.HEADER_PROPERTY, header); return header; } + */ public static Header getHeader(OElement element) throws ResourceRegistryException { return Utility.getPropertyDocument(Header.class, element, IdentifiableElement.HEADER_PROPERTY);