Cleaning code

This commit is contained in:
Luca Frosini 2021-02-26 18:37:57 +01:00
parent 9deed7214b
commit cc908bf1b0
2 changed files with 7 additions and 3 deletions

View File

@ -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();

View File

@ -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);