Changed DataTime Pattern import due to changes in IS Model

This commit is contained in:
Luca Frosini 2020-02-04 09:44:38 +01:00
parent aa72d03b4f
commit 8413b94a86
2 changed files with 3 additions and 4 deletions

View File

@ -14,7 +14,6 @@ import java.util.UUID;
import org.gcube.common.encryption.SymmetricKey; import org.gcube.common.encryption.SymmetricKey;
import org.gcube.informationsystem.base.reference.AccessType; import org.gcube.informationsystem.base.reference.AccessType;
import org.gcube.informationsystem.base.reference.ISConstants;
import org.gcube.informationsystem.base.reference.Element; import org.gcube.informationsystem.base.reference.Element;
import org.gcube.informationsystem.base.reference.entities.EntityElement; import org.gcube.informationsystem.base.reference.entities.EntityElement;
import org.gcube.informationsystem.base.reference.properties.PropertyElement; import org.gcube.informationsystem.base.reference.properties.PropertyElement;
@ -318,7 +317,7 @@ public class DatabaseEnvironment {
} }
protected static void setDateTimeFormat(ODatabaseDocument oDatabaseDocument) { protected static void setDateTimeFormat(ODatabaseDocument oDatabaseDocument) {
oDatabaseDocument.set(ATTRIBUTES.DATETIMEFORMAT, ISConstants.DATETIME_PATTERN); oDatabaseDocument.set(ATTRIBUTES.DATETIMEFORMAT, Element.DATETIME_PATTERN);
} }
private static boolean initGraphDB() throws Exception { private static boolean initGraphDB() throws Exception {

View File

@ -1,6 +1,6 @@
package org.gcube.informationsystem.resourceregistry.dbinitialization; package org.gcube.informationsystem.resourceregistry.dbinitialization;
import org.gcube.informationsystem.base.reference.ISConstants; import org.gcube.informationsystem.base.reference.Element;
import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException; import org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException;
import org.gcube.informationsystem.resourceregistry.contexts.ContextUtility; import org.gcube.informationsystem.resourceregistry.contexts.ContextUtility;
import org.gcube.informationsystem.resourceregistry.contexts.security.SecurityContext.PermissionMode; import org.gcube.informationsystem.resourceregistry.contexts.security.SecurityContext.PermissionMode;
@ -27,7 +27,7 @@ public class DatabaseEnvironmentTest {
ODatabaseDocument oDatabaseDocument = ContextUtility.getAdminSecurityContext().getDatabaseDocument(PermissionMode.WRITER); ODatabaseDocument oDatabaseDocument = ContextUtility.getAdminSecurityContext().getDatabaseDocument(PermissionMode.WRITER);
DatabaseEnvironment.setDateTimeFormat(oDatabaseDocument); DatabaseEnvironment.setDateTimeFormat(oDatabaseDocument);
String dateTime = oDatabaseDocument.get(ATTRIBUTES.DATETIMEFORMAT).toString(); String dateTime = oDatabaseDocument.get(ATTRIBUTES.DATETIMEFORMAT).toString();
Assert.assertTrue(dateTime.compareTo(ISConstants.DATETIME_PATTERN)==0); Assert.assertTrue(dateTime.compareTo(Element.DATETIME_PATTERN)==0);
} }