diff --git a/geoportal-service/src/main/resources/profiles/profiledConcessioni.json b/geoportal-service/src/main/resources/profiles/profiledConcessioni.json index 9edd733..c4ed286 100644 --- a/geoportal-service/src/main/resources/profiles/profiledConcessioni.json +++ b/geoportal-service/src/main/resources/profiles/profiledConcessioni.json @@ -22,6 +22,12 @@ {"fileset" :{"_type" : "RegisteredFileSet"}}, {"title" : {"_max" : 1, "_min" : 1}} ] + }, + "pianteFineScavo" : { "_max" : -1, "_min" : 1, + "children" : [ + {"fileset" :{"_type" : "RegisteredFileSet"}}, + {"title" : {"_max" : 1, "_min" : 1}} + ] } }, @@ -56,8 +62,8 @@ "type" : "Materializer", "configuration" : { "registeredFileSetPaths" : [ - {"schemaField" : "pianteFineScavo","documentPath" : "pianteFineScavo[*]"}, - {"schemaField" : "posizionamentoScavo","documentPath" : "posizionamentoScavo"} + {"schemaField" : "pianteFineScavo","documentPath" : "pianteFineScavo[*].fileset"}, + {"schemaField" : "posizionamentoScavo","documentPath" : "posizionamentoScavo.fileset"} ] } }, diff --git a/geoportal-service/src/test/java/org/gcube/application/geoportal/service/DummyProfiledDocumentTest.java b/geoportal-service/src/test/java/org/gcube/application/geoportal/service/DummyProfiledDocumentTest.java index b51c97d..33f5001 100644 --- a/geoportal-service/src/test/java/org/gcube/application/geoportal/service/DummyProfiledDocumentTest.java +++ b/geoportal-service/src/test/java/org/gcube/application/geoportal/service/DummyProfiledDocumentTest.java @@ -116,6 +116,15 @@ public class DummyProfiledDocumentTest extends AbstractProfiledDocumentsTests{ req.setStepID("SUBMIT-FOR-REVIEW"); doc=step(doc.get_id(),req); System.out.println(doc); + if(doc.getLifecycleInformation().getErrorMessages()!=null) { + System.out.println("ERROR MESSAGES"); + doc.getLifecycleInformation().getErrorMessages().forEach(s -> System.out.println(s)); + } + if(doc.getLifecycleInformation().getWarningMessages()!=null) { + System.out.println("WARNING MESSAGES"); + doc.getLifecycleInformation().getWarningMessages().forEach(s -> System.out.println(s)); + } + assertTrue(doc.getLifecycleInformation().getLastOperationStatus().equals(LifecycleInformation.Status.OK)); JSONPathWrapper wrapper = new JSONPathWrapper(doc.getTheDocument().toJson()); RegisteredFileSet fs = Serialization.convert(wrapper.getByPath("$..fileset").get(0),RegisteredFileSet.class);