diff --git a/geoportal-service/src/main/resources/examples/Configuration.json b/test-data/profiledDocuments/Configuration.json similarity index 100% rename from geoportal-service/src/main/resources/examples/Configuration.json rename to test-data/profiledDocuments/Configuration.json diff --git a/test-data/profiledDocuments/basicProfile.json b/test-data/profiledDocuments/basicProfile.json index d241d16..9edd733 100644 --- a/test-data/profiledDocuments/basicProfile.json +++ b/test-data/profiledDocuments/basicProfile.json @@ -1,13 +1,115 @@ -{"id": "myProfileStructure", +{ + "id" : "profiledConcessioni", + "version" : "1.0.0", + "name" : "Concessione", - "schema": { - "_type" : "complex", - "_children" :[ - { "nome" : {"_type" : "Text", "_index" : ""}}, - { "abstract" : {"_type" : "complex", - "_children" :[ - {"name" : {"Type" : "Text"}}, - {"files" : {"Type" : "FileSet"}} - ]}} - ]} -} + "schema" : { + "relazioneScavo" : { "_max" : 1, "_min" : 1, + "children" : [ + {"fileset" :{"_type" : "RegisteredFileSet"}}, + {"title" : {"_max" : 1, "_min" : 1}} + ] + }, + "imgs" : { + "_max" : -1, + "children" : [ + {"fileset" :{"_type" : "RegisteredFileSet"}}, + {"title" : {"_max" : 1, "_min" : 1}} + ] + }, + "posizionamentoScavo" : { "_max" : 1, "_min" : 1, + "children" : [ + {"fileset" :{"_type" : "RegisteredFileSet"}}, + {"title" : {"_max" : 1, "_min" : 1}} + ] + } + }, + + + "description" : "Embedded profile for concessioni [mibac] management", + "creationInfo": { + "user" : { + "username": "fabio.sinibaldi" + } + }, + "data_access_policy" : [ + {"policy" : {"read" : "own", "write" : "own"}, "roles":[]}, + {"policy" : {"read" : "any", "write" : "none"}, "roles":["Guest"], + "enforcer": {"filter" : {"lifecycleInformation.phase" : {"$eq" : "Published"}}}}, + {"policy" : {"read" : "any", "write" : "none"}, "roles":["Admin"]}, + {"policy" : {"read" : "any", "write" : "any"}, "roles":["Data-Manager"]} + ], + + "handlers" : [ + { + "id" : "GNA-CONCESSIONI-LC", + "type" : "LifecycleManagement", + "configuration" : { + "step_access" : [ + {"STEP" : "PUBLISH", "roles" :[ "DataManager"]} + ] + } + }, + + { + "id" : "SDI-Default-Materializer", + "type" : "Materializer", + "configuration" : { + "registeredFileSetPaths" : [ + {"schemaField" : "pianteFineScavo","documentPath" : "pianteFineScavo[*]"}, + {"schemaField" : "posizionamentoScavo","documentPath" : "posizionamentoScavo"} + ] + } + }, + + + + { + "id" : "org.gcube....geoportal-data-entry-portlet", + "type" : "DATA_ENTRY_GUI", + "case" : "", + "configuration" : { + "gcubeProfiles" : [ + { + "gcubeCategory" : "", + "gcubeName" : "", + "order" : "", + "sectionName": "", + "sectionTitle" : "", + "cardinality" : "", + "parentName" : "", + "filePaths" : [ + {"field" : "field id from XML gcube Profile", + "path" : "$.abstract.associatedFiles" } + ] + + } + ] + + } + }, + + { + "id" : "org.gcube....geoportal-data-list", + "type" : "DATA_LIST_GUI", + "case" : "smallList", + "configuration" : { + "projection" : {"nome" : 1, "lifecycleInformation.phase" : 1}, + "orderPaths":[ + {"label" : "author", "path" : "info.creationInfo.user.username"}], + "searchPaths":[ + {"label" : "author", "path" : "info.creationInfo.user.username"}], + "actions" :[ + { "status" : "OK", + "phase" : "VALIDATE_DRAFT", + "butoonsDefintion" : [ + {"id" : "report_forward","action" : "STEP", "label" : "Sottometti"}, + {"id" : "list_back_workflow", "action" : "STEP" , "label" : "Rifiuta"}, + {"id" : "report_backward", "action" : "STEP" , "label" : "Rifiuta"} + ]} + ], + "implicit_filter":{"nome" : {"$eq" : "ciao" }} + } + } + ] +} \ No newline at end of file diff --git a/geoportal-service/src/main/resources/examples/centroids_index.json b/test-data/profiledDocuments/centroids_index.json similarity index 100% rename from geoportal-service/src/main/resources/examples/centroids_index.json rename to test-data/profiledDocuments/centroids_index.json diff --git a/test-data/profiledDocuments/emptyProfiledDocument.json b/test-data/profiledDocuments/emptyProfiledDocument.json new file mode 100644 index 0000000..3a20c27 --- /dev/null +++ b/test-data/profiledDocuments/emptyProfiledDocument.json @@ -0,0 +1,70 @@ +{ + "_id": "620a80dc11dc052195ae1d05", + "version": "1.0.1", + "info": + { + "creationInfo": + { + "user": + { + "username": "FAKE" + }, + "context": + { + "id": "/pred4s/preprod/preVRE", + "name": "/preVRE" + }, + "instant": "2022-02-14T17:18:36.594" + }, + "lastEditInfo": + { + "user": + { + "username": "FAKE" + }, + "context": + { + "id": "/pred4s/preprod/preVRE", + "name": "/preVRE" + }, + "instant": "2022-02-14T17:18:42.693" + }, + "access": + { + "policy": "OPEN", + "license": "" + } + }, + "profileID": "profiledConcessioni", + "profileVersion": "1.0.0", + "lifecycleInformation": + { + "phase": "DRAFT", + "lastInvokedStep": null, + "lastOperationStatus": null, + "errorMessages": null, + "warningMessages": null, + "triggeredEvents": + [ + { + "event": null, + "lastOperationStatus": null, + "errorMessages": null, + "warningMessages": null + }, + { + "event": null, + "lastOperationStatus": null, + "errorMessages": null, + "warningMessages": null + } + ] + }, + "relationships": null, + "spatialReference": null, + "temporalReference": null, + "theDocument": + { + "dumbKey": "dumbValue" + } +} \ No newline at end of file diff --git a/geoportal-service/src/main/resources/examples/layer.json b/test-data/profiledDocuments/layer.json similarity index 100% rename from geoportal-service/src/main/resources/examples/layer.json rename to test-data/profiledDocuments/layer.json diff --git a/test-data/profiledDocuments/profiledConcessioniExample.json b/test-data/profiledDocuments/profiledConcessioniExample.json new file mode 100644 index 0000000..3a20c27 --- /dev/null +++ b/test-data/profiledDocuments/profiledConcessioniExample.json @@ -0,0 +1,70 @@ +{ + "_id": "620a80dc11dc052195ae1d05", + "version": "1.0.1", + "info": + { + "creationInfo": + { + "user": + { + "username": "FAKE" + }, + "context": + { + "id": "/pred4s/preprod/preVRE", + "name": "/preVRE" + }, + "instant": "2022-02-14T17:18:36.594" + }, + "lastEditInfo": + { + "user": + { + "username": "FAKE" + }, + "context": + { + "id": "/pred4s/preprod/preVRE", + "name": "/preVRE" + }, + "instant": "2022-02-14T17:18:42.693" + }, + "access": + { + "policy": "OPEN", + "license": "" + } + }, + "profileID": "profiledConcessioni", + "profileVersion": "1.0.0", + "lifecycleInformation": + { + "phase": "DRAFT", + "lastInvokedStep": null, + "lastOperationStatus": null, + "errorMessages": null, + "warningMessages": null, + "triggeredEvents": + [ + { + "event": null, + "lastOperationStatus": null, + "errorMessages": null, + "warningMessages": null + }, + { + "event": null, + "lastOperationStatus": null, + "errorMessages": null, + "warningMessages": null + } + ] + }, + "relationships": null, + "spatialReference": null, + "temporalReference": null, + "theDocument": + { + "dumbKey": "dumbValue" + } +} \ No newline at end of file diff --git a/geoportal-service/src/main/resources/examples/registeredFileSet.json b/test-data/profiledDocuments/registeredFileSet.json similarity index 100% rename from geoportal-service/src/main/resources/examples/registeredFileSet.json rename to test-data/profiledDocuments/registeredFileSet.json