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 79b8740..cb0e850 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 @@ -142,7 +142,7 @@ public abstract class ElementManagement { this.ignoreKeys.add(Element.SUPERCLASSES_PROPERTY); this.ignoreKeys.add(IdentifiableElement.UUID_PROPERTY); this.ignoreKeys.add(IdentifiableElement.METADATA_PROPERTY); - + this.ignoreStartWithKeys = new HashSet(); this.ignoreStartWithKeys.add(ElementManagement.AT); this.ignoreStartWithKeys.add(ElementManagement.UNDERSCORE); diff --git a/src/test/java/org/gcube/informationsystem/resourceregistry/contexts/ContextManagementTest.java b/src/test/java/org/gcube/informationsystem/resourceregistry/contexts/ContextManagementTest.java index f8a9628..afb1b03 100644 --- a/src/test/java/org/gcube/informationsystem/resourceregistry/contexts/ContextManagementTest.java +++ b/src/test/java/org/gcube/informationsystem/resourceregistry/contexts/ContextManagementTest.java @@ -450,8 +450,7 @@ public class ContextManagementTest extends ContextTest { return all; } - /* - // @Test + @Test public void deleteAll() throws Exception { ContextTest.setContextByName(PARENT_DEFAULT_TEST_SCOPE); List all = getAll(); @@ -460,13 +459,12 @@ public class ContextManagementTest extends ContextTest { logger.trace(ElementMapper.marshal(context)); List children = context.getChildren(); if(children==null || children.size()==0) { - // delete(context); + delete(context); } } all = getAll(); } } - */ @Test public void testGetAll() throws Exception { diff --git a/src/test/java/org/gcube/informationsystem/resourceregistry/instances/InvalidOperationTest.java b/src/test/java/org/gcube/informationsystem/resourceregistry/instances/InvalidOperationTest.java index a63c5ac..b9cf3cf 100644 --- a/src/test/java/org/gcube/informationsystem/resourceregistry/instances/InvalidOperationTest.java +++ b/src/test/java/org/gcube/informationsystem/resourceregistry/instances/InvalidOperationTest.java @@ -42,7 +42,7 @@ public class InvalidOperationTest extends ERManagementTest { private static Logger logger = LoggerFactory.getLogger(InvalidOperationTest.class); public static final String ACTIVATES = "{\"propagationConstraint\":{\"@class\":\"PropagationConstraint\",\"add\":\"propagate\",\"remove\":\"cascade\",\"delete\":\"cascade\"},\"@class\":\"Activates\",\"source\":{\"@class\":\"Configuration\",\"uuid\":\"CONFIGURATION_UUID\"},\"target\":{\"uuid\":\"ESERVICE_UUID\",\"@class\":\"EService\"}}"; - public static final String ACTOR = "{\"@class\":\"Actor\",\"@metadata\":null,\"consistsOf\":[{\"@class\":\"IsIdentifiedBy\",\"@metadata\":null,\"propagationConstraint\":{\"@class\":\"PropagationConstraint\",\"remove\":\"cascade\",\"delete\":\"cascade\",\"add\":\"propagate\"},\"source\":{\"@class\":\"Actor\",\"@metadata\":null},\"target\":{\"@class\":\"ContactFacet\",\"@metadata\":null,\"title\":\"Dr.\",\"name\":\"Frosini\",\"middleName\":null,\"surname\":null,\"eMail\":\"luca.frosini@isti.cnr.it\"}}],\"isRelatedTo\":[]}"; + public static final String ACTOR = "{\"@class\":\"Actor\",\"metadata\":null,\"consistsOf\":[{\"@class\":\"IsIdentifiedBy\",\"metadata\":null,\"propagationConstraint\":{\"@class\":\"PropagationConstraint\",\"remove\":\"cascade\",\"delete\":\"cascade\",\"add\":\"propagate\"},\"source\":{\"@class\":\"Actor\",\"metadata\":null},\"target\":{\"@class\":\"ContactFacet\",\"metadata\":null,\"title\":\"Dr.\",\"name\":\"Frosini\",\"middleName\":null,\"surname\":null,\"eMail\":\"luca.frosini@isti.cnr.it\"}}],\"isRelatedTo\":[]}"; @Test(expected = SchemaViolationException.class) public void createInvalidIsRealtedTo() throws Exception { diff --git a/src/test/resources/queries/query5.json b/src/test/resources/queries/query5.json index af17704..40e98ee 100644 --- a/src/test/resources/queries/query5.json +++ b/src/test/resources/queries/query5.json @@ -8,11 +8,11 @@ "$or": [ {"$and": { "uuid" : "aec0ef31-c735-4a4c-b2f4-57dfbd2fe925", - "@metadata" :{ "createdBy": {"$ne": "luca.frosini"} } + "metadata" :{ "createdBy": {"$ne": "luca.frosini"} } }}, {"$and": { "uuid" : "0255b7ec-e3da-4071-b456-9a2907ece1db", - "@metadata" : { "createdBy": "DataTransfer:data-transfer-service:pc-frosini.isti.cnr.it_8080" } + "metadata" : { "createdBy": "DataTransfer:data-transfer-service:pc-frosini.isti.cnr.it_8080" } }} ] } diff --git a/src/test/resources/queries/query5.query b/src/test/resources/queries/query5.query index 19328ee..67c75f9 100644 --- a/src/test/resources/queries/query5.query +++ b/src/test/resources/queries/query5.query @@ -1 +1 @@ -SELECT FROM ( TRAVERSE inV("StateFacet") FROM ( TRAVERSE outE("ConsistsOf") FROM ( SELECT FROM ( SELECT FROM EService) WHERE ((uuid = "aec0ef31-c735-4a4c-b2f4-57dfbd2fe925" AND @metadata.createdBy <> "luca.frosini") OR (uuid = "0255b7ec-e3da-4071-b456-9a2907ece1db" AND @metadata.createdBy = "DataTransfer:data-transfer-service:pc-frosini.isti.cnr.it_8080"))))) WHERE value = "down" \ No newline at end of file +SELECT FROM ( TRAVERSE inV("StateFacet") FROM ( TRAVERSE outE("ConsistsOf") FROM ( SELECT FROM ( SELECT FROM EService) WHERE ((uuid = "aec0ef31-c735-4a4c-b2f4-57dfbd2fe925" AND metadata.createdBy <> "luca.frosini") OR (uuid = "0255b7ec-e3da-4071-b456-9a2907ece1db" AND metadata.createdBy = "DataTransfer:data-transfer-service:pc-frosini.isti.cnr.it_8080"))))) WHERE value = "down" \ No newline at end of file diff --git a/src/test/resources/queries/query7.json b/src/test/resources/queries/query7.json index b8ab603..167f7e5 100644 --- a/src/test/resources/queries/query7.json +++ b/src/test/resources/queries/query7.json @@ -7,11 +7,11 @@ "$or": [ {"$and": { "uuid" : "aec0ef31-c735-4a4c-b2f4-57dfbd2fe925", - "@metadata" :{ "createdBy": {"$ne": "luca.frosini"} } + "metadata" :{ "createdBy": {"$ne": "luca.frosini"} } }}, {"$and": { "uuid" : "0255b7ec-e3da-4071-b456-9a2907ece1db", - "@metadata" : { "createdBy": "DataTransfer:data-transfer-service:pc-frosini.isti.cnr.it_8080" } + "metadata" : { "createdBy": "DataTransfer:data-transfer-service:pc-frosini.isti.cnr.it_8080" } }} ] } diff --git a/src/test/resources/queries/query7.query b/src/test/resources/queries/query7.query index 4f8210e..1335e03 100644 --- a/src/test/resources/queries/query7.query +++ b/src/test/resources/queries/query7.query @@ -1 +1 @@ -SELECT FROM ( TRAVERSE inV("StateFacet") FROM ( TRAVERSE outE("ConsistsOf") FROM ( SELECT FROM ( SELECT FROM EService) WHERE ((uuid = "aec0ef31-c735-4a4c-b2f4-57dfbd2fe925" AND @metadata.createdBy <> "luca.frosini") OR (uuid = "0255b7ec-e3da-4071-b456-9a2907ece1db" AND metadata.createdBy = "DataTransfer:data-transfer-service:pc-frosini.isti.cnr.it_8080"))))) \ No newline at end of file +SELECT FROM ( TRAVERSE inV("StateFacet") FROM ( TRAVERSE outE("ConsistsOf") FROM ( SELECT FROM ( SELECT FROM EService) WHERE ((uuid = "aec0ef31-c735-4a4c-b2f4-57dfbd2fe925" AND metadata.createdBy <> "luca.frosini") OR (uuid = "0255b7ec-e3da-4071-b456-9a2907ece1db" AND metadata.createdBy = "DataTransfer:data-transfer-service:pc-frosini.isti.cnr.it_8080"))))) \ No newline at end of file