From 1ebb7a3aefe85bf8195aa1b56d99f24dc51d3fd4 Mon Sep 17 00:00:00 2001 From: "francesco.mangiacrapa" Date: Thu, 21 Dec 2023 16:40:58 +0100 Subject: [PATCH] updated profiledConcessioni with "apply_regex" config --- .../profiles/Concessioni.json | 465 +++++++++++------- 1 file changed, 293 insertions(+), 172 deletions(-) diff --git a/test-data/profiledDocuments/profiles/Concessioni.json b/test-data/profiledDocuments/profiles/Concessioni.json index fae29ba..387829e 100644 --- a/test-data/profiledDocuments/profiles/Concessioni.json +++ b/test-data/profiledDocuments/profiles/Concessioni.json @@ -1,7 +1,7 @@ { "_id": "profiledConcessioni", "_version": "1.0.0", - "_name": "Concessione", + "_name": "Indagini svolte in regime di concessione", "_schema": { "abstractRelazione": { "_min": 1, @@ -42,7 +42,7 @@ ] }, "immaginiRappresentative": { - "_max": 8, + "_max": 4, "_children": [ { "fileset": { @@ -91,10 +91,10 @@ ] } }, - "_description": "Embedded profile for concessioni [mibac] management", + "_description": "Embedded profile for concessioni management", "_creationInfo": { "_user": { - "_username": "fabio.sinibaldi" + "_username": "francesco.mangiacrapa" } }, "_dataAccessPolicies": [ @@ -103,7 +103,18 @@ "_read": "any", "_write": "any" }, - "_roles": [] + "_roles": [ + "Data-Manager" + ] + }, + { + "_policy": { + "_read": "own", + "_write": "own" + }, + "_roles": [ + "Data-Editor" + ] }, { "_policy": { @@ -111,7 +122,7 @@ "_write": "none" }, "_roles": [ - "Guest" + "Member" ], "_enforcer": { "_filter": "{\"_lifecycleInformation._phase\" : {\"$eq\" : \"Published\"}}" @@ -119,21 +130,10 @@ }, { "_policy": { - "_read": "any", + "_read": "none", "_write": "none" }, - "_roles": [ - "Admin" - ] - }, - { - "_policy": { - "_read": "any", - "_write": "any" - }, - "_roles": [ - "Data-Manager" - ] + "_roles": [] } ], "_handlers": [ @@ -149,7 +149,8 @@ { "STEP": "REJECT-DRAFT", "roles": [ - "Data-Manager" + "Data-Manager", + "Data-Editor" ] }, { @@ -157,6 +158,12 @@ "roles": [ "Data-Manager" ] + }, + { + "STEP": "UNPUBLISH", + "roles": [ + "Data-Manager" + ] } ] } @@ -191,13 +198,13 @@ "type": "TEXT" }, { - "name": "anno", - "path": "$._theDocument.dataFineProgetto", + "name": "data_inizio_progetto", + "path": "$._theDocument.dataInizioProgetto", "type": "TEXT" }, { "name": "descrizione", - "path": "$._theDocument.iontroduzione", + "path": "$._theDocument.introduzione", "type": "TEXT" }, { @@ -246,7 +253,7 @@ "type": "TEXT" }, { - "name": "date_scavo", + "name": "data_fine_progetto", "path": "$._theDocument.dataFineProgetto", "type": "TEXT" }, @@ -279,7 +286,17 @@ "name": "parole_chiave", "path": "$._theDocument.paroleChiaveLibere", "type": "TEXT" - } + }, + { + "name": "cronologia_macrofase", + "path": "$._theDocument.cronologia_macrofase", + "type": "TEXT", + "apply_regex": { + "type": "replaceAll", + "regex": "(\\s)?\\([\\s\\S]*", + "replacement": "" + } + } ], "jslt": {}, "additionalLayers": [ @@ -295,7 +312,6 @@ { "_id": "org.gcube.portlets.user.geoportal-data-entry-app", "_type": "DATA_ENTRY_GUI", - "_item_type": "Concessione", "_configuration": { "gcubeProfiles": [ { @@ -308,7 +324,7 @@ "gcubeSecondaryType": "GeoNaMetadata", "gcubeName": "Abstract_Relazione_di_Scavo", "sectionName": "abstractRelazione", - "sectionTitle": "Abstract Relazione Scavo", + "sectionTitle": "Abstract della Relazione Scientifica", "parentName": "$.", "filePaths": [ { @@ -327,11 +343,11 @@ "gcubeSecondaryType": "GeoNaMetadata", "gcubeName": "Relazione_di_Scavo", "sectionName": "relazioneScavo", - "sectionTitle": "Relazione di Scavo", + "sectionTitle": "Relazione Scientifica", "parentName": "$.", "filePaths": [ { - "gcubeProfileFieldName": "Relazione di fine scavo (in PDF)", + "gcubeProfileFieldName": "Relazione scientifica (in PDF)", "fieldDefinition": "$.relazioneScavo._children[?(@.fileset)]", "fieldName": "fileset" } @@ -343,7 +359,7 @@ "sectionName": "immaginiRappresentative", "sectionTitle": "Immagini Rappresentative", "minOccurs": 1, - "maxOccurs": 8, + "maxOccurs": 4, "parentName": "$.", "filePaths": [ { @@ -371,7 +387,7 @@ "gcubeSecondaryType": "GeoNaMetadata", "gcubeName": "Pianta_di_fine_Scavo", "sectionName": "pianteFineScavo", - "sectionTitle": "Piante di fine Scavo", + "sectionTitle": "Piante di Fine Indagine", "parentName": "$.", "minOccurs": 0, "maxOccurs": 0, @@ -384,140 +400,141 @@ ] } ], - "saveStep": "SUBMIT-FOR-REVIEW" + "saveStep": "" } }, { - "_id": "org.gcube.portlets.user.geoportal-data-list", - "_type": "DATA_LIST_GUI", - "_configuration": { - "itemFields": [ - { - "label": "Any Field", - "paths": [ - "_theDocument.nome", - "_theDocument.introduzione", - "_theDocument.authors", - "_theDocument.contributore", - "_theDocument.titolari", - "_theDocument.editore", - "_theDocument.responsabile", - "_theDocument.paroleChiaveLibere", - "_theDocument.paroleChiaveICCD" - ], - "operator": "$or", - "searchable": true, - "sortable": false, - "asResult": false - }, - { - "label": "Name", - "paths": [ - "_theDocument.nome" - ], - "operator": "$and", - "searchable": true, - "sortable": true, - "asResult": true - }, - { - "label": "Introduction", - "paths": [ - "_theDocument.introduzione" - ], - "operator": "$and", - "searchable": true, - "sortable": false, - "asResult": true - }, - { - "label": "Author/s", - "paths": [ - "_theDocument.authors" - ], - "operator": "$and", - "searchable": false, - "sortable": true, - "asResult": true - }, - { - "label": "Project Start", - "paths": [ - "_theDocument.dataInizioProgetto" - ], - "operator": "$and", - "searchable": false, - "sortable": true, - "asResult": true - }, - { - "label": "Director/Staff", - "paths": [ - "_theDocument.authors", - "_theDocument.contributore", - "_theDocument.titolari", - "_theDocument.editore", - "_theDocument.responsabile" - ], - "operator": "$or", - "searchable": true, - "sortable": false, - "asResult": true - }, - { - "label": "Keywords", - "paths": [ - "_theDocument.paroleChiaveLibere", - "_theDocument.paroleChiaveICCD" - ], - "operator": "$or", - "searchable": true, - "sortable": false, - "asResult": true - }, - { - "label": "Creator", - "paths": [ - "_info._creationInfo._user._username" - ], - "operator": "$or", - "searchable": true, - "sortable": false, - "asResult": false - }, - { - "label": "Updated", - "paths": [ - "_info._lastEditInfo._instant" - ], - "operator": "$or", - "searchable": false, - "sortable": true, - "asResult": false - }, - { - "label": "Phase", - "paths": [ - "_lifecycleInformation._phase" - ], - "operator": "$or", - "searchable": true, - "sortable": true, - "asResult": false - }, - { - "label": "Status", - "paths": [ - "_lifecycleInformation._lastOperationStatus" - ], - "operator": "$or", - "searchable": true, - "sortable": true, - "asResult": false + "_id": "org.gcube.portlets.user.geoportal-data-list", + "_type": "DATA_LIST_GUI", + "_configuration": { + "itemFields": [ + { + "label": "Descriptive Fields", + "paths": [ + "_theDocument.nome", + "_theDocument.introduzione", + "_theDocument.authors", + "_theDocument.contributore", + "_theDocument.titolari", + "_theDocument.dataInizioProgetto", + "_theDocument.editore", + "_theDocument.responsabile", + "_theDocument.paroleChiaveLibere", + "_theDocument.paroleChiaveICCD" + ], + "operator": "$or", + "searchable": true, + "sortable": false, + "asResult": false + }, + { + "label": "Name", + "paths": [ + "_theDocument.nome" + ], + "operator": "$and", + "searchable": true, + "sortable": true, + "asResult": true + }, + { + "label": "Introduction", + "paths": [ + "_theDocument.introduzione" + ], + "operator": "$and", + "searchable": true, + "sortable": false, + "asResult": true + }, + { + "label": "Author/s", + "paths": [ + "_theDocument.authors" + ], + "operator": "$and", + "searchable": false, + "sortable": true, + "asResult": true + }, + { + "label": "Project Start (yyyy-mm-dd)", + "paths": [ + "_theDocument.dataInizioProgetto" + ], + "operator": "$and", + "searchable": true, + "sortable": true, + "asResult": true + }, + { + "label": "Director/Staff", + "paths": [ + "_theDocument.authors", + "_theDocument.contributore", + "_theDocument.titolari", + "_theDocument.editore", + "_theDocument.responsabile" + ], + "operator": "$or", + "searchable": true, + "sortable": false, + "asResult": true + }, + { + "label": "Keywords", + "paths": [ + "_theDocument.paroleChiaveLibere", + "_theDocument.paroleChiaveICCD" + ], + "operator": "$or", + "searchable": true, + "sortable": false, + "asResult": true + }, + { + "label": "Creator", + "paths": [ + "_info._creationInfo._user._username" + ], + "operator": "$or", + "searchable": true, + "sortable": false, + "asResult": false + }, + { + "label": "Updated", + "paths": [ + "_info._lastEditInfo._instant" + ], + "operator": "$or", + "searchable": false, + "sortable": true, + "asResult": false + }, + { + "label": "Phase", + "paths": [ + "_lifecycleInformation._phase" + ], + "operator": "$or", + "searchable": true, + "sortable": true, + "asResult": false + }, + { + "label": "Status", + "paths": [ + "_lifecycleInformation._lastOperationStatus" + ], + "operator": "$or", + "searchable": true, + "sortable": true, + "asResult": false + } + ] } - ] - } -}, + }, { "_id": "org.gcube.portlets.user.geoportal-basic-data-list", "_type": "BASIC_DATA_LIST_GUI", @@ -571,6 +588,16 @@ "sortable": false, "asResult": true }, + { + "label": "Project Start (YEAR)", + "paths": [ + "_theDocument.dataInizioProgetto" + ], + "operator": "$and", + "searchable": true, + "sortable": false, + "asResult": false + }, { "label": "Director/Staff", "paths": [ @@ -598,8 +625,7 @@ } ] } - } -, + }, { "_id": "org.gcube.portlets.user.geoportal-timeline-json-template", "_type": "TIMELINE_JSON_TEMPLATE", @@ -612,6 +638,86 @@ } } }, + { + "_id": "org.gcube.portlets.user.grouped_overlay_layers", + "_type": "GROUPED_OVERLAY_LAYERS", + "_configuration": { + "grouped_overlay_layers": [ + { + "name": "Limiti Amministrativi Italiani 2023 (fonte ISTAT)", + "description": "Layers automatically added to the Map", + "layers": [ + { + "title": "Regioni", + "name": "limiti_amministrativi:regioni", + "wms_url": "https://geoserver-1.cloud-dev.d4science.org/geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=limiti_amministrativi:regioni&styles=&bbox=6.626621368537682,35.49285260122859,18.520381599098922,47.09178374646218&width=768&height=748&srs=EPSG:4326&format=application%2Fopenlayers", + "display": true + }, + { + "title": "Province", + "name": "limiti_amministrativi:province", + "wms_url": "https://geoserver-1.cloud-dev.d4science.org/geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=limiti_amministrativi:province&styles=&bbox=6.626621368537682,35.49285260122859,18.520381599098922,47.09178374646218&width=768&height=748&srs=EPSG:4326&format=application%2Fopenlayers", + "display": true + }, + { + "title": "Comuni", + "name": "limiti_amministrativi:comuni", + "wms_url": "https://geoserver-1.cloud-dev.d4science.org/geoserver/wms?service=WMS&version=1.1.0&request=GetMap&layers=limiti_amministrativi:comuni&styles=&bbox=6.626621368537682,35.49285260122859,18.520381599098922,47.09178374646218&width=768&height=748&srs=EPSG:4326&format=application%2Fopenlayers", + "display": true + } + ] + } + ] + } + }, + { + "_id": "org.gcube.portlets.user.grouped_cross_filtering_layers", + "_type": "GROUPED_CROSS_FILTERING_LAYERS", + "_configuration": { + "grouped_cross_filtering_layers": [ + { + "name": "Limiti Amministrativi Italiani 2023 (fonte ISTAT)", + "description": "Spatial filtering for the selected layer", + "layers": [ + { + "title": "Regioni", + "description": "Le Regioni Italiane", + "name": "limiti_amministrativi:regioni", + "wfs_url": "https://geoserver-1.cloud-dev.d4science.org/geoserver/ows?service=WFS&version=1.1.0&request=GetFeature&typeName=limiti_amministrativi:regioni&maxFeatures=50&outputFormat=application%2Fjson&propertyName=COD_REG,DEN_REG&sortby=DEN_REG", + "table_show_field": "DEN_REG", + "table_key_field": "COD_REG", + "table_parent_key_field": "", + "table_geometry_name": "the_geom", + "related_to": [ + { + "title": "Province", + "description": "Le Province Italiane", + "name": "limiti_amministrativi:province", + "wfs_url": "https://geoserver-1.cloud-dev.d4science.org/geoserver/ows?service=WFS&version=1.1.0&request=GetFeature&typeName=limiti_amministrativi:province&maxFeatures=150&outputFormat=application%2Fjson&propertyName=COD_PROV,DEN_PROV,COD_REG&sortby=DEN_PROV", + "table_show_field": "DEN_PROV", + "table_key_field": "COD_PROV", + "table_parent_key_field": "COD_REG", + "table_geometry_name": "the_geom", + "related_to": [ + { + "title": "Comuni", + "description": "I Comuni Italiani", + "name": "limiti_amministrativi:comuni", + "wfs_url": "https://geoserver-1.cloud-dev.d4science.org/geoserver/ows?service=WFS&version=1.1.0&request=GetFeature&typeName=limiti_amministrativi:comuni&maxFeatures=9000&outputFormat=application%2Fjson&propertyName=PRO_COM,COMUNE,COD_PROV&sortby=COMUNE", + "table_show_field": "COMUNE", + "table_key_field": "PRO_COM", + "table_parent_key_field": "COD_PROV", + "table_geometry_name": "the_geom" + } + ] + } + ] + } + ] + } + ] + } + }, { "_id": "org.gcube.portlets.user.geoportal-workflow-action-list", "_type": "WORKFLOW_ACTION_LIST_GUI", @@ -620,9 +726,7 @@ { "id": "post_creation_action", "title": "Post Creation Action", - "call_STEPS": [ - "SUBMIT-FOR-REVIEW" - ], + "call_STEPS": [], "description": "Action fired after the Project creation", "display_on_phase": [] }, @@ -658,15 +762,32 @@ "display_on_phase": [ "Pending Approval" ] + }, + { + "id": "unpublish", + "title": "UnPublish", + "call_STEPS": [ + "UNPUBLISH" + ], + "description": "UnPublish the Project", + "display_on_phase": [ + "Published" + ] } ] } } ], - "_relationshipDefinitions" : [ - {"_id": "precedes", "_label" : "Precede", - "_reverseRelationId" : "follows"}, - {"_id": "follows", "_label" : "Segue", - "_reverseRelationId" : "precedes"} + "_relationshipDefinitions": [ + { + "_id": "precedes", + "_label": "Precede", + "_reverseRelationId": "follows" + }, + { + "_id": "follows", + "_label": "Segue", + "_reverseRelationId": "precedes" + } ] -} +} \ No newline at end of file