diff --git a/src/module_extraction/README.md b/src/module_extraction/README.md new file mode 100644 index 0000000000000000000000000000000000000000..2bf5eb5277169ad7162e37165eaf8313088b0882 --- /dev/null +++ b/src/module_extraction/README.md @@ -0,0 +1,3 @@ +# module_extraction + +Module extraction for Vitis \ No newline at end of file diff --git a/src/module_extraction/_install/dependency.xml b/src/module_extraction/_install/dependency.xml new file mode 100755 index 0000000000000000000000000000000000000000..f8953c391d61601d251acb3624b2f30f5a0eb83d --- /dev/null +++ b/src/module_extraction/_install/dependency.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<installer> + <schema> + <name>s_extraction</name> + <dependenciesCollection> + <dependency> + <nature>schema</nature> + <name>s_vitis</name> + <object>vitis</object> + </dependency> + </dependenciesCollection> + </schema> + <dependenciesCollection> + <dependency> + <nature>framework</nature> + <name>vitis</name> + </dependency> + </dependenciesCollection> +</installer> diff --git a/src/module_extraction/_install/fileToDelete.txt b/src/module_extraction/_install/fileToDelete.txt new file mode 100755 index 0000000000000000000000000000000000000000..0f43fe95ffffa53fcfefcacba2c2e5215d7b6a89 --- /dev/null +++ b/src/module_extraction/_install/fileToDelete.txt @@ -0,0 +1,6 @@ +javascript/deps.js +javascript/script_module.js +javascript/statistics.js +javascript/widget/script_widget.js +javascript/widget/widgetMod.js +javascript/widget/deps.js \ No newline at end of file diff --git a/src/module_extraction/_install/folderToDelete.txt b/src/module_extraction/_install/folderToDelete.txt new file mode 100755 index 0000000000000000000000000000000000000000..b92d8976db30897968846102e68520be453b8313 --- /dev/null +++ b/src/module_extraction/_install/folderToDelete.txt @@ -0,0 +1,2 @@ +javascript/controllers +javascript/directives \ No newline at end of file diff --git a/src/module_extraction/module/forms/extraction/extraction_extraction_extraction.js b/src/module_extraction/module/forms/extraction/extraction_extraction_extraction.js new file mode 100755 index 0000000000000000000000000000000000000000..63009cb49219f78083750e264acbee437bfece67 --- /dev/null +++ b/src/module_extraction/module/forms/extraction/extraction_extraction_extraction.js @@ -0,0 +1,500 @@ +/* global angular, goog, vitisApp, bootbox */ + +//bloque les delete du destructeur à éviter +//'use strict'; + +console.info("Generateur_wab_generator_1 loaded --> your functions are ready"); +/*********************************************************************************** + Signaletique_Recap_0 Javascript + ***********************************************************************************/ + +var oFormRequired = { + "sUrl": "", + "scope_": {}, + "toDestructor": [] +}; +/** + * constructor_form + * Fonction appelé à l'initialisation du formulaire si dans la structure json javascript vaut "true" + * @param {type} scope + * @param {type} s_url + * @returns {undefined} + */ +var constructor_form = function (scope, s_url) { + ////////////////////////////////////////////////////////// + //Ne pas toucher + console.log("Constructor"); + + oFormRequired.sUrl = s_url; + oFormRequired.scope_ = scope; + //console.log(scope); + ////////////////////////////////////////////////////////// + // Permet de recharge le javascript d'une section à une autre + var envSrvc = angular.element(vitisApp.appWorkspaceListDrtv).injector().get(["envSrvc"]); + var formSrvc = angular.element(vitisApp.appMainDrtv).injector().get(["formSrvc"]); + // + var oElemDefCt = formSrvc["getFormElementDefinition"]("id_conseil", envSrvc["sFormDefinitionName"], envSrvc["oFormDefinition"]); + var oElemDefCom = formSrvc["getFormElementDefinition"]("id_com", envSrvc["sFormDefinitionName"], envSrvc["oFormDefinition"]); + var oElemDefExtent = formSrvc["getFormElementDefinition"]("extent", envSrvc["sFormDefinitionName"], envSrvc["oFormDefinition"]); + + + //Comportements différents selon le mode (insert, update, search, display) (GTF : accés uniquement au mode insert) + //if (oFormRequired.scope_.sFormDefinitionName.indexOf("insert") > -1 || (oFormRequired.scope_.sFormDefinitionName.indexOf("update") > -1)) { + oFormRequired.toDestructor.push(oFormRequired.scope_.$watch("oFormValues." + oFormRequired.scope_.sFormDefinitionName + ".extent_method.selectedOption", function (value) { + //console.log(value); + if (value) { + if (value["value"]) { + //oFormRequired.scope_.oFormValues[oFormRequired.scope_.sFormDefinitionName]["name"] = value["value"] + "_"; + if (value["value"] == "id_conseil") + { + oElemDefCt["visible"] = true; + oElemDefCom["visible"] = false; + oElemDefExtent["visible"] = false; + } + else if (value["value"] == "id_com") + { + oElemDefCt["visible"] = false; + oElemDefCom["visible"] = true; + oElemDefExtent["visible"] = false; + } + else + { + oElemDefCt["visible"] = false; + oElemDefCom["visible"] = false; + oElemDefExtent["visible"] = true; + } + } + else + { + oElemDefCt["visible"] = false; + oElemDefCom["visible"] = false; + } + + } + })); + //Evènement lorsqu'on choisie un CT + oFormRequired.toDestructor.push(oFormRequired.scope_.$watch("oFormValues." + oFormRequired.scope_.sFormDefinitionName + ".id_conseil.selectedOption", function (value) { + if (value && typeof(oFormRequired) !== "undefined") + { + getLayerTree(oFormRequired.scope_.oFormValues[oFormRequired.scope_.sFormDefinitionName]).then( function(aNodes){ + var oTreeview = $("#layers_9_1_treeview")["treeview"](true); + $("layers_9_1_treeview")["treeview"](true); + //On recréer un arbre + oTreeview["init"]({"data": aNodes, + "onNodeChecked": oTreeview.options.onNodeChecked, + "onNodeUnchecked": oTreeview.options.onNodeUnchecked, + "showBorder": false, + "levels": 0, + "showCheckbox": true, + "expandIcon": "glyphicon glyphicon-folder-close", + "collapseIcon": "glyphicon glyphicon-folder-open", + "highlightSelected": false, + "multiSelect": true}); + scope.$applyAsync(); + }); + + getStatsTree(oFormRequired.scope_.oFormValues[oFormRequired.scope_.sFormDefinitionName]).then( function(aNodes){ + var oTreeview = $("#statistique_9_1_treeview")["treeview"](true); + $("statistique_9_1_treeview")["treeview"](true); + //On recréer un arbre + oTreeview["init"]({"data": aNodes, + "onNodeChecked": oTreeview.options.onNodeChecked, + "onNodeUnchecked": oTreeview.options.onNodeUnchecked, + "showBorder": false, + "levels": 0, + "showCheckbox": true, + "expandIcon": "glyphicon glyphicon-folder-close", + "collapseIcon": "glyphicon glyphicon-folder-open", + "highlightSelected": false, + "multiSelect": true}); + scope.$applyAsync(); + }); + } + + })); + //Evènement lorsqu'on choisie une commune + oFormRequired.toDestructor.push(oFormRequired.scope_.$watch("oFormValues." + oFormRequired.scope_.sFormDefinitionName + ".id_com.selectedOption", function (value) { + if (value && typeof(oFormRequired) !== "undefined") + { + getLayerTree(oFormRequired.scope_.oFormValues[oFormRequired.scope_.sFormDefinitionName]).then( function(aNodes){ + var oTreeview = $("#layers_9_1_treeview")["treeview"](true); + $("layers_9_1_treeview")["treeview"]({"data":aNodes}); + //On recréer un arbre + oTreeview["init"]({"data": aNodes, + "onNodeChecked": oTreeview.options.onNodeChecked, + "onNodeUnchecked": oTreeview.options.onNodeUnchecked, + "showBorder": false, + "levels": 0, + "showCheckbox": true, + "expandIcon": "glyphicon glyphicon-folder-close", + "collapseIcon": "glyphicon glyphicon-folder-open", + "highlightSelected": false, + "multiSelect": true}); + scope.$applyAsync(); + + }); + + getStatsTree(oFormRequired.scope_.oFormValues[oFormRequired.scope_.sFormDefinitionName]).then( function(aNodes){ + var oTreeview = $("#statistique_9_1_treeview")["treeview"](true); + $("statistique_9_1_treeview")["treeview"](true); + //On recréer un arbre + oTreeview["init"]({"data": aNodes, + "onNodeChecked": oTreeview.options.onNodeChecked, + "onNodeUnchecked": oTreeview.options.onNodeUnchecked, + "showBorder": false, + "levels": 0, + "showCheckbox": true, + "expandIcon": "glyphicon glyphicon-folder-close", + "collapseIcon": "glyphicon glyphicon-folder-open", + "highlightSelected": false, + "multiSelect": true}); + scope.$applyAsync(); + }); + } + })); + //Evenement lorsqu'on saisie un nouveau polygone + oFormRequired.toDestructor.push(oFormRequired.scope_.$watch("oFormValues." + oFormRequired.scope_.sFormDefinitionName + ".extent", function (value) { + if (value && typeof(oFormRequired) !== "undefined") + { + //getLayerTree(value, "geom"); + getLayerTree(oFormRequired.scope_.oFormValues[oFormRequired.scope_.sFormDefinitionName]).then( function(aNodes){ + //console.log(aNodes); + //layers_9_1_treeview + var oTreeview = $("#layers_9_1_treeview")["treeview"](true); + $("layers_9_1_treeview")["treeview"]({"data":aNodes}); + //On recréer un arbre + oTreeview["init"]({"data": aNodes, + "onNodeChecked": oTreeview.options.onNodeChecked, + "onNodeUnchecked": oTreeview.options.onNodeUnchecked, + "showBorder": false, + "levels": 0, + "showCheckbox": true, + "expandIcon": "glyphicon glyphicon-folder-close", + "collapseIcon": "glyphicon glyphicon-folder-open", + "highlightSelected": false, + "multiSelect": true}); + scope.$applyAsync(); + + }); + + getStatsTree(oFormRequired.scope_.oFormValues[oFormRequired.scope_.sFormDefinitionName]).then( function(aNodes){ + var oTreeview = $("#statistique_9_1_treeview")["treeview"](true); + $("statistique_9_1_treeview")["treeview"](true); + //On recréer un arbre + oTreeview["init"]({"data": aNodes, + "onNodeChecked": oTreeview.options.onNodeChecked, + "onNodeUnchecked": oTreeview.options.onNodeUnchecked, + "showBorder": false, + "levels": 0, + "showCheckbox": true, + "expandIcon": "glyphicon glyphicon-folder-close", + "collapseIcon": "glyphicon glyphicon-folder-open", + "highlightSelected": false, + "multiSelect": true}); + scope.$applyAsync(); + }); + + + } + })); +}; + +/** + * Fonction appelée lorsqu'on choisit la CT ou la commune ou si on saisit un polygone dans le formulaire + * @return undefined + */ +function getLayerTree(oFormValues) { + var $log = angular.element(vitisApp.appMainDrtv).injector().get(["$log"]); + var envSrvc = angular.element(vitisApp.appMainDrtv).injector().get(["envSrvc"]); + var propertiesSrvc = angular.element(vitisApp.appMainDrtv).injector().get(["propertiesSrvc"]); + var $q = angular.element(vitisApp.appHtmlFormDrtv).injector().get(["$q"]); + // + $log.info("getLayerTree"); + // Charge la liste des couches. + + var deferred = $q.defer(); + var promise = deferred.promise; + if (oFormValues.extent_method.selectedOption["value"] != "") { + ajaxRequest({ + "method": "GET", + "url": propertiesSrvc["web_server_name"] + "/" + propertiesSrvc["services_alias"] + "/extraction/extractions/Layers", + "params": getUrlParams(), + "scope": angular.element("form[name='" + envSrvc["oFormDefinition"][envSrvc["sFormDefinitionName"]]["name"] + "']").scope(), + "success": function(response) { + if (response["data"]["status"] == 1) { + console.log(response["data"]); + var scope = angular.element("form[name='" + envSrvc["oFormDefinition"][envSrvc["sFormDefinitionName"]]["name"] + "']").scope(); + // Création de l'arborescence des couches pour le champ "treeview". + var aLayers = response["data"]["layers"]; + var aNodes = []; + var stats = true; + + if (typeof(aLayers) != "undefined") { + var aCategories = Object.keys(aLayers); + for (var i in aCategories) { + var aNode = {"text": aCategories[i], "nodes": []} + for (var j in aLayers[aCategories[i]]) { + if (aLayers[aCategories[i]][j]["statistique"] !== true) + { + stats = false; + aNode["nodes"].push({"text": aLayers[aCategories[i]][j]["text"], "value": aLayers[aCategories[i]][j]["value"], "mutualized": aLayers[aCategories[i]][j]["mutualized"]}); + } + } + if (stats !== true) + { + aNodes.push(aNode); + } + stats = true; + } + } + + this["setTreeviewNodesState"] = function (aNodes) { + for (var i in aNodes) { + if (typeof (aNodes[i]["nodes"]) != "undefined") + this["setTreeviewNodesState"](aNodes[i]["nodes"]); + else { + if (typeof (aNodes[i]["state"]) == "undefined") + { + aNodes[i]["state"] = {}; + } + var aCheckedItem = []; + var sValue = scope["oFormValues"][envSrvc["sFormDefinitionName"]]["layers"]; + if (typeof (sValue) == "string" && sValue != "") + { + aCheckedItem = sValue.split("|"); + } + if (aCheckedItem.indexOf(String(aNodes[i]["value"])) != -1) + { + aNodes[i]["state"]["checked"] = true; + } + //Si la couche est mutualisée + if (aNodes[i]['mutualized'] == true) + { + console.log(propertiesSrvc["color_mutualized"]); + aNodes[i]["color"] = propertiesSrvc["color_mutualized"]; + } else if (aNodes[i]['mutualized'] == false) { + aNodes[i]["color"] = propertiesSrvc["color_no_mutualized"]; + } + } + } + } + this["setTreeviewNodesState"](aNodes); + deferred.resolve(aNodes); + } else { + // + var oOptions = { + "className": "modal-danger" + }; + // Message d'erreur ? + if (response["data"]["errorMessage"] != null) + oOptions["message"] = response["data"]["errorMessage"]; + scope.$root["modalWindow"]("alert", "REQUEST_ERROR", oOptions); + } + } + }); + } + return promise; +} + +/** + * Fonction appelée lorsqu'on choisit la CT ou la commune ou si on saisit un polygone dans le formulaire + * @return undefined + */ +function getStatsTree(oFormValues) { + var $log = angular.element(vitisApp.appMainDrtv).injector().get(["$log"]); + var envSrvc = angular.element(vitisApp.appMainDrtv).injector().get(["envSrvc"]); + var propertiesSrvc = angular.element(vitisApp.appMainDrtv).injector().get(["propertiesSrvc"]); + var $q = angular.element(vitisApp.appHtmlFormDrtv).injector().get(["$q"]); + // + $log.info("getLayerTree"); + // Charge la liste des couches. + + var deferred = $q.defer(); + var promise = deferred.promise; + if (oFormValues.extent_method.selectedOption["value"] != "") { + ajaxRequest({ + "method": "GET", + "url": propertiesSrvc["web_server_name"] + "/" + propertiesSrvc["services_alias"] + "/extraction/extractions/Layers", + "params": getUrlParams(), + "scope": angular.element("form[name='" + envSrvc["oFormDefinition"][envSrvc["sFormDefinitionName"]]["name"] + "']").scope(), + "success": function(response) { + if (response["data"]["status"] == 1) { + console.log(response["data"]); + var scope = angular.element("form[name='" + envSrvc["oFormDefinition"][envSrvc["sFormDefinitionName"]]["name"] + "']").scope(); + // Création de l'arborescence des statistiques pour le champ "treeview". + var aLayers = response["data"]["layers"]; + var aNodes = []; + var stats = false; + + if (typeof(aLayers) != "undefined") { + var aCategories = Object.keys(aLayers); + for (var i in aCategories) { + var aNode = {"text": aCategories[i], "nodes": []} + for (var j in aLayers[aCategories[i]]) { + if (aLayers[aCategories[i]][j]["statistique"] === true) + { + stats = true; + aNode["nodes"].push({"text": aLayers[aCategories[i]][j]["text"], "value": aLayers[aCategories[i]][j]["value"], "mutualized": aLayers[aCategories[i]][j]["mutualized"]}); + } + } + if (stats === true) + { + aNodes.push(aNode); + } + stats = false; + } + } + + this["setTreeviewNodesState"] = function (aNodes) { + for (var i in aNodes) { + if (typeof (aNodes[i]["nodes"]) != "undefined") + this["setTreeviewNodesState"](aNodes[i]["nodes"]); + else { + if (typeof (aNodes[i]["state"]) == "undefined") + { + aNodes[i]["state"] = {}; + } + var aCheckedItem = []; + var sValue = scope["oFormValues"][envSrvc["sFormDefinitionName"]]["statistique"]; + if (typeof (sValue) == "string" && sValue != "") + { + aCheckedItem = sValue.split("|"); + } + if (aCheckedItem.indexOf(String(aNodes[i]["value"])) != -1) + { + aNodes[i]["state"]["checked"] = true; + } + //Si la couche est mutualisée + if (aNodes[i]['mutualized'] == true) + { + aNodes[i]["color"] = propertiesSrvc["color_mutualized"]; + } else if (aNodes[i]['mutualized'] == false) { + aNodes[i]["color"] = propertiesSrvc["color_no_mutualized"]; + } + } + } + } + this["setTreeviewNodesState"](aNodes); + deferred.resolve(aNodes); + } else { + // + var oOptions = { + "className": "modal-danger" + }; + // Message d'erreur ? + if (response["data"]["errorMessage"] != null) + oOptions["message"] = response["data"]["errorMessage"]; + scope.$root["modalWindow"]("alert", "REQUEST_ERROR", oOptions); + } + } + }); + } + return promise; +} + +/** + * Fonction qui renvoie les paramètres pour effectuer la requête AJAX + * @returns {getUrlParams.oUrlParams} + */ +function getUrlParams() { + var propertiesSrvc = angular.element(vitisApp.appMainDrtv).injector().get(["propertiesSrvc"]); + var sTable = ""; + var sCompare_operator = ""; + var sColumn = ""; + var aValue = []; + var aValeur = []; + + if (oFormValues.extent_method.selectedOption["value"] == "id_conseil") + { + sTable = "ct"; + sColumn = "ct_id"; + sCompare_operator = "IN"; + aValue = oFormValues.id_conseil.selectedOption; + } + else if (oFormValues.extent_method.selectedOption["value"] == "id_com") + { + sTable = "commune"; + sColumn = "commune_id"; + sCompare_operator = "IN"; + aValue = oFormValues.id_com.selectedOption; + } + + if (oFormValues.extent_method.selectedOption["value"] == "extent") + { + sTable = "ct"; + sColumn = "geom"; + sCompare_operator = "INTERSECT"; + aValeur = "SRID=2154;"+ oFormValues.extent; + //console.log('Compare_operator ' + compare_operator + ' valeur ' + valeur ); + } + else + { + if(aValue) + { + for (var i = 0; i < aValue.length; i++) + { + //Si c'est une sélection vide + if(aValue[i]["value"] == "") + { + //On remplace la valeur vide par un id négatif + aValeur[i] = "-1"; + } + else if (oFormValues.extent_method.selectedOption["value"] == "id_conseil") + { + aValeur[i] = aValue[i]["value"]; + } + else if (oFormValues.extent_method.selectedOption["value"] == "id_com") + { + aValeur[i] = aValue[i]["value"]; + } + else if (oFormValues.extent_method.selectedOption["value"] == "id_conseil") + { + aValeur[i] = aValue[i]["value"]; + } + } + } + else + { + aValeur[0] = "-1"; + } + } + + var oUrlParams = { + "schema": propertiesSrvc["schema_extraction"], + "table": sTable, + "distinct": true, + "filter": { + "column": sColumn, + "compare_operator": sCompare_operator, + "value": aValeur + } + } + return oUrlParams; +} + +/** + * destructor_form + * Fonction appelé quand on quitte le formulaire nettoie toute les fonctions pour les rendres inutilisable en dehors du formulaire + * @returns {undefined} + */ +var destructor_form = function () { + console.log("Destructor"); + + for (var i = 0; i < oFormRequired.toDestructor.length; i++) { + oFormRequired.toDestructor[i] = undefined; + delete oFormRequired.toDestructor[i]; + } + + //supprimer la balise script du js pour pouvoir le recharger si on reviens sur le formulaire plus tard + angular.element('[src="' + oFormRequired.sUrl + '?version=' + oFormRequired.scope_["oProperties"]["build"] + '"]').remove(); + + oFormRequired = undefined; + delete oFormRequired; + + constructor_form = undefined; + delete constructor_form; + destructor_form = undefined; + delete destructor_form; +}; + +/**********************************************************************************/ \ No newline at end of file diff --git a/src/module_extraction/module/forms/extraction/extraction_extraction_extraction.json b/src/module_extraction/module/forms/extraction/extraction_extraction_extraction.json new file mode 100755 index 0000000000000000000000000000000000000000..7cd9f2928d152472153680eeb50e4059f471fa71 --- /dev/null +++ b/src/module_extraction/module/forms/extraction/extraction_extraction_extraction.json @@ -0,0 +1,4838 @@ +{ + "display": { + "name": "extraction_extraction_extraction-form", + "title": "EXTRACTION_EXTRACTION_EXTRACTION_TITLE", + "input_size": "xxs", + "initEvent": "initExtractionExtractionForm()", + "nb_cols": 12, + "javascript": true, + "rows": [ + { + "fields": [ + { + "type": "label", + "name": "bo_id", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_BO_ID", + "required": false, + "nb_cols": 12, + "id": "bo_id_1_1" + } + ] + }, + { + "fields": [ + { + "type": "checkbox", + "name": "preco_tech", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_TECHNIQUE", + "nb_cols": 4, + "id": "Element_6_2_1" + }, + { + "type": "checkbox", + "name": "chart_graph", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_CARTOGRAPHIQUE", + "nb_cols": 4, + "id": "Element_6_2_2" + }, + { + "type": "checkbox", + "name": "metadonnees", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ISOGEO", + "nb_cols": 4, + "id": "Element_6_2_3" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "status", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_STATUS", + "required": false, + "nb_cols": 4, + "id": "status_2_1" + }, + { + "type": "label", + "name": "creation_date", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_CREATION_DATE", + "required": false, + "nb_cols": 6, + "id": "creation_date_4_1" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "email", + "label": "FORM_EMAIL_USERS_USER", + "required": false, + "nb_cols": 4, + "id": "email_3_1" + }, + { + "type": "label", + "name": "company", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_COMPANY", + "required": false, + "nb_cols": 4, + "id": "company_8_1" + }, + { + "type": "label", + "name": "requestor", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_REQUESTOR", + "required": false, + "nb_cols": 4, + "id": "requestor_5_1" + } + ] + }, + { + "fields": [ + { + "type": "linkurl", + "name": "ae", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_AE", + "required": false, + "nb_cols": 12, + "id": "ae_6_1" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "layers", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_LAYERS", + "required": false, + "nb_cols": 12, + "id": "layers_9_1" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "coordsys_id", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_COORDSYS_ID", + "required": false, + "nb_cols": 4, + "id": "coordsys_id_11_1" + }, + { + "type": "label", + "name": "vector_format_id", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_VECTOR_FORMAT_ID", + "required": false, + "nb_cols": 4, + "id": "vector_format_id_10_1" + }, + { + "type": "label", + "name": "raster_format_id", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_RASTER_FORMAT_ID", + "required": false, + "nb_cols": 4, + "id": "raster_format_id_14_1" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "extent_method", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_EXTENT_METHOD", + "required": false, + "nb_cols": 12, + "id": "extent_method_15_1" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "id_com", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ID_COM", + "required": false, + "nb_cols": 12, + "id": "id_com_22_1" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "id_conseil", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ID_CONSEIL", + "required": false, + "nb_cols": 12, + "id": "id_conseil_23_1" + } + ] + }, + { + "fields": [ + { + "type": "map_vmap", + "name": "extent", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_EXTENT", + "required": false, + "nb_cols": 12, + "id": "extent_7_1", + "style": { + "height": "250px" + }, + "map_options": { + "proj": "EPSG:2154", + "type": "vmap", + "center": { + "extent": [ + 4510838297753.592, + 313452152357706.75, + 4510842604414.408, + 313452153911336.25 + ], + "coord": [ + 4510840451084, + 313452153134521.5 + ], + "scale": 23468294 + }, + "controls": { + "MP": true, + "ZO": true, + "SL": true, + "CP": true + }, + "layers": [], + "interactions": { + "multi_geometry": false, + "full_screen": true, + "RA": true, + "RO": true, + "ED": true, + "DP": false, + "DL": false, + "DPol": true, + "SE": true + }, + "draw_color": "rgba(54,184,255,0.6)", + "contour_color": "rgba(0,0,0,0.4)", + "contour_size": 2, + "circle_radius": 6, + "features": [], + "coord_accuracy": 8, + "tree": { + "name": "Tree", + "children": [ + { + "view": { + "center": [ + "902168", + "6269043" + ], + "zoom": 7, + "maxZoom": 28, + "minZoom": 0, + "projection": "EPSG:2154", + "extent": [ + 4510835482577.04, + 313452150322452.2, + 4510845419590.96, + 313452155946590.8 + ] + } + }, + { + "name": "extraction", + "children": [ + { + "name": "REF_ortho2011", + "layerType": "tilewms", + "url": "http://SCPA441.cpa.fr:8399/arcgis/services/REF_ortho2011/MapServer/WMSServer", + "index": -1, + "visible": true, + "opacity": 1, + "is_dynamic": false, + "is_filtered": false, + "version": "1.3.0", + "params": { + "LAYERS": "0", + "VERSION": "1.3.0", + "STYLES": "" + }, + "bo_queryable": false, + "layer_id": 1, + "select": true + }, + { + "name": "REF_CPA_LIMITE_COMMUNE", + "layerType": "tilewms", + "url": "http://SCPA441.cpa.fr:8399/arcgis/services/REF_CPA_LIMITE_COMMUNE/MapServer/WMSServer", + "index": -1, + "visible": true, + "opacity": 1, + "is_dynamic": false, + "is_filtered": false, + "version": "1.3.0", + "params": { + "LAYERS": "0,1", + "VERSION": "1.3.0", + "STYLES": "" + }, + "bo_queryable": false, + "layer_id": 2, + "select": true + } + ], + "visible": true + } + ] + } + } + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "history", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_HISTORY", + "required": false, + "nb_cols": 12, + "id": "history_3_1" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "note", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_NOTE", + "required": false, + "nb_cols": 12, + "id": "note_12_1" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "note_line", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_NOTE_LINE", + "required": false, + "nb_cols": 12, + "id": "note_line_13_1" + } + ] + }, + { + "fields": [ + { + "type": "label", + "options": { + "choices": [ + { + "label": "oui", + "value": true + }, + { + "label": "non", + "value": false + } + ] + }, + "name": "signed", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_SIGNED", + "required": false, + "nb_cols": 3, + "id": "signed_16_1" + }, + { + "type": "label", + "options": { + "choices": [ + { + "label": "oui", + "value": true + }, + { + "label": "non", + "value": false + } + ] + }, + "name": "accepted_by_cpa", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ACCEPTED_BY_CPA", + "required": false, + "nb_cols": 3, + "id": "accepted_by_cpa_17_1" + }, + { + "type": "label", + "options": { + "choices": [ + { + "label": "oui", + "value": true + }, + { + "label": "non", + "value": false + } + ] + }, + "name": "identification_complete", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_IDENTIFICATION_COMPLETE", + "required": false, + "nb_cols": 3, + "id": "identification_complete_18_1" + }, + { + "type": "label", + "options": { + "choices": [ + { + "label": "oui", + "value": true + }, + { + "label": "non", + "value": false + } + ] + }, + "name": "definition_complete", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_DEFINITION_COMPLETE", + "required": false, + "nb_cols": 3, + "id": "definition_complete_19_1" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "comment", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_COMMENT", + "required": false, + "nb_cols": 12, + "id": "comment_20_1" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "priority_id", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_PRIORITY_ID", + "required": false, + "nb_cols": 12, + "id": "priority_id_21_1" + } + ] + }, + { + "fields": [ + { + "type": "hidden", + "name": "status_name", + "nb_cols": 6, + "id": "Element_0_25_1" + }, + { + "type": "hidden", + "name": "tr_status_method", + "nb_cols": 6, + "id": "Element_0_25_2" + } + ] + }, + { + "class": "wab-method-button", + "fields": [ + { + "type": "button", + "class": "btn-ungroup btn-group-sm", + "nb_cols": 1, + "name": "display_button", + "id": "display_button", + "buttons": [ + { + "type": "button", + "name": "return_list", + "label": "FORM_RETURN_LIST", + "class": "btn-primary", + "event": "setMode(\"search\")", + "disabled": false + } + ] + }, + { + "type": "button", + "name": "Element_0", + "nb_cols": 1, + "id": "Element_0_25_2", + "class": "btn-ungroup btn-group-sm", + "buttons": [ + { + "type": "button", + "name": "form_submit", + "label": "Autoriser l'extraction", + "class": "btn-primary", + "event": "setWabStatusMethod('trAutoriser')" + } + ] + }, + { + "type": "button", + "name": "Element_1", + "nb_cols": 1, + "id": "Element_1_25_3", + "class": "btn-ungroup btn-group-sm", + "buttons": [ + { + "type": "button", + "name": "form_submit", + "label": "Demander l'AE", + "class": "btn-primary", + "event": "setWabStatusMethod('trDemander')", + "disabled": false + } + ] + }, + { + "type": "button", + "name": "Element_2", + "nb_cols": 1, + "id": "Element_2_25_4", + "class": "btn-ungroup btn-group-sm", + "buttons": [ + { + "type": "button", + "name": "form_submit", + "label": "Générer l'AE", + "class": "btn-primary", + "event": "setWabStatusMethod('trGenerer')" + } + ] + }, + { + "type": "button", + "name": "Element_3", + "nb_cols": 1, + "id": "Element_3_25_5", + "class": "btn-ungroup btn-group-sm", + "buttons": [ + { + "type": "button", + "name": "form_submit", + "label": "Créer", + "class": "btn-primary", + "event": "setWabStatusMethod('trNouveau')" + } + ] + }, + { + "type": "button", + "name": "Element_4", + "nb_cols": 1, + "id": "Element_4_25_6", + "class": "btn-ungroup btn-group-sm", + "buttons": [ + { + "type": "button", + "name": "form_submit", + "label": "Refuser l'extraction", + "class": "btn-primary", + "event": "setWabStatusMethod('trRefuser')", + "disabled": false + } + ] + }, + { + "type": "button", + "name": "Element_5", + "nb_cols": 1, + "id": "Element_5_25_7", + "class": "btn-ungroup btn-group-sm", + "buttons": [ + { + "type": "button", + "name": "form_submit", + "label": "Recharger l'acte d'engagement", + "class": "btn-primary", + "event": "setWabStatusMethod('trResoumettre')" + } + ] + }, + { + "type": "button", + "name": "Element_7", + "nb_cols": 1, + "id": "Element_7_25_9", + "class": "btn-ungroup btn-group-sm", + "buttons": [ + { + "type": "button", + "name": "form_submit", + "label": "Soumettre l'AE", + "class": "btn-primary", + "event": "setWabStatusMethod('trSoumettre')" + } + ] + }, + { + "type": "button", + "name": "Element_8", + "nb_cols": 1, + "id": "Element_8_25_10", + "class": "btn-ungroup btn-group-sm", + "buttons": [ + { + "type": "button", + "name": "form_submit", + "label": "Terminer", + "class": "btn-primary", + "event": "setWabStatusMethod('trTerminer')" + } + ] + } + ] + } + ], + "wab": { + "START": { + "controleur": { + "company": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "bo_id": "", + "status_name": "", + "tr_status_method": "", + "display_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "email": "", + "Element_1": "", + "statistique": "" + }, + "demandeur": { + "email": "rw", + "company": "rw", + "layers": "rw", + "coordsys_id": "rw", + "vector_format_id": "rw", + "raster_format_id": "rw", + "extent_method": "rw", + "id_com": "rw", + "id_conseil": "rw", + "extent": "rw", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "bo_id": "", + "status_name": "rw", + "tr_status_method": "rw", + "display_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "Element_1": "", + "statistique": "" + } + }, + "Nouveau": { + "controleur": { + "company": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "bo_id": "", + "status_name": "", + "tr_status_method": "", + "display_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "email": "", + "Element_1": "", + "statistique": "" + }, + "demandeur": { + "email": "rw", + "company": "rw", + "layers": "rw", + "coordsys_id": "rw", + "vector_format_id": "rw", + "raster_format_id": "rw", + "extent_method": "rw", + "id_com": "rw", + "id_conseil": "rw", + "extent": "rw", + "status": "r", + "history": "", + "creation_date": "r", + "requestor": "rw", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "bo_id": "r", + "status_name": "rw", + "tr_status_method": "rw", + "display_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "preco_tech": "r", + "chart_graph": "r", + "metadonnees": "r", + "Element_1": "", + "statistique": "" + } + }, + "AE Demandé": { + "controleur": { + "company": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "bo_id": "", + "status_name": "", + "tr_status_method": "", + "display_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "email": "", + "Element_1": "", + "statistique": "" + }, + "demandeur": { + "email": "r", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "status": "r", + "history": "", + "creation_date": "r", + "requestor": "r", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "bo_id": "r", + "status_name": "rw", + "tr_status_method": "rw", + "display_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "Element_1": "", + "statistique": "" + } + }, + "AE Généré": { + "controleur": { + "company": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "bo_id": "", + "status_name": "", + "tr_status_method": "", + "display_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "email": "", + "Element_1": "", + "statistique": "" + }, + "demandeur": { + "email": "r", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "status": "r", + "history": "", + "creation_date": "r", + "requestor": "r", + "ae": "rw", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "bo_id": "r", + "status_name": "rw", + "tr_status_method": "rw", + "display_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "preco_tech": "r", + "chart_graph": "r", + "metadonnees": "r", + "Element_1": "", + "statistique": "" + } + }, + "AE Soumis": { + "controleur": { + "email": "r", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "status": "r", + "history": "r", + "creation_date": "r", + "requestor": "r", + "ae": "", + "note": "", + "note_line": "", + "signed": "rw", + "accepted_by_cpa": "rw", + "identification_complete": "rw", + "definition_complete": "rw", + "comment": "rw", + "priority_id": "r", + "bo_id": "r", + "status_name": "rw", + "tr_status_method": "rw", + "display_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "preco_tech": "r", + "chart_graph": "r", + "metadonnees": "r", + "Element_1": "", + "statistique": "" + }, + "demandeur": { + "email": "r", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "status": "r", + "history": "", + "creation_date": "r", + "requestor": "r", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "r", + "bo_id": "r", + "status_name": "rw", + "tr_status_method": "rw", + "display_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "preco_tech": "r", + "chart_graph": "r", + "metadonnees": "r", + "Element_1": "", + "statistique": "" + } + }, + "Autorisée": { + "controleur": { + "email": "r", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "status": "r", + "history": "r", + "creation_date": "r", + "requestor": "r", + "ae": "r", + "note": "", + "note_line": "", + "signed": "r", + "accepted_by_cpa": "r", + "identification_complete": "r", + "definition_complete": "r", + "comment": "r", + "priority_id": "rw", + "bo_id": "r", + "status_name": "rw", + "tr_status_method": "rw", + "display_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "preco_tech": "r", + "chart_graph": "r", + "metadonnees": "r", + "Element_1": "", + "statistique": "" + }, + "demandeur": { + "email": "", + "company": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "bo_id": "", + "status_name": "", + "tr_status_method": "", + "display_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "Element_1": "", + "statistique": "" + } + }, + "Refusée": { + "controleur": { + "email": "r", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "status": "r", + "history": "r", + "creation_date": "r", + "requestor": "r", + "ae": "", + "note": "", + "note_line": "", + "signed": "r", + "accepted_by_cpa": "r", + "identification_complete": "r", + "definition_complete": "r", + "comment": "r", + "priority_id": "r", + "bo_id": "r", + "status_name": "rw", + "tr_status_method": "rw", + "display_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "preco_tech": "r", + "chart_graph": "r", + "metadonnees": "r", + "Element_1": "", + "statistique": "" + }, + "demandeur": { + "email": "r", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "status": "r", + "history": "", + "creation_date": "r", + "requestor": "r", + "ae": "", + "note": "", + "note_line": "", + "signed": "r", + "accepted_by_cpa": "r", + "identification_complete": "r", + "definition_complete": "r", + "comment": "r", + "priority_id": "r", + "bo_id": "r", + "status_name": "rw", + "tr_status_method": "rw", + "display_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "preco_tech": "r", + "chart_graph": "r", + "metadonnees": "r", + "Element_1": "", + "statistique": "" + } + }, + "Terminée": { + "controleur": { + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "", + "raster_format_id": "r", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "r", + "status": "r", + "history": "r", + "creation_date": "r", + "requestor": "r", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "r", + "priority_id": "", + "bo_id": "r", + "status_name": "rw", + "tr_status_method": "rw", + "display_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "preco_tech": "r", + "chart_graph": "r", + "metadonnees": "r", + "email": "", + "Element_1": "", + "statistique": "" + }, + "demandeur": { + "email": "r", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "", + "raster_format_id": "r", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "r", + "status": "r", + "history": "r", + "creation_date": "r", + "requestor": "r", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "r", + "priority_id": "", + "bo_id": "r", + "status_name": "rw", + "tr_status_method": "rw", + "display_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "preco_tech": "r", + "chart_graph": "r", + "metadonnees": "r", + "Element_1": "", + "statistique": "" + } + } + }, + "tabs": { + "position": "top", + "list": [ + { + "label": "Tab 0", + "elements": [ + "bo_id", + "status", + "history", + "creation_date", + "requestor", + "ae", + "extent", + "email", + "company", + "layers", + "vector_format_id", + "coordsys_id", + "note", + "note_line", + "raster_format_id", + "extent_method", + "signed", + "accepted_by_cpa", + "identification_complete", + "definition_complete", + "comment", + "priority_id", + "id_com", + "id_conseil", + "display_button", + "status_name", + "ct_list", + "statistique", + "Element_3", + "Element_4", + "Element_5", + "Element_7", + "Element_8", + "tr_status_method", + "format", + "preco_tech", + "chart_graph", + "metadonnees" + ] + } + ] + } + }, + "search": { + "name": "extraction_extraction_extraction-form", + "title": "EXTRACTION_EXTRACTION_EXTRACTION_TITLE", + "input_size": "xxs", + "nb_cols": 12, + "javascript": false, + "rows": [ + { + "fields": [ + { + "type": "text", + "name": "company", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_COMPANY", + "nb_cols": 12, + "id": "company_8_1" + } + ] + }, + { + "fields": [ + { + "type": "button", + "class": "btn-ungroup btn-group-xs", + "nb_cols": 12, + "name": "search_button", + "id": "search_button", + "buttons": [ + { + "type": "button", + "name": "search", + "label": "FORM_SEARCH_BUTTON", + "class": "btn-primary", + "event": "setGridFilter()" + }, + { + "type": "reset", + "name": "reset", + "label": "FORM_RESET_BUTTON", + "class": "btn-primary", + "event": "resetGridFilter()" + } + ] + } + ] + } + ], + "tabs": { + "position": "top", + "list": [ + { + "label": "Tab 0", + "elements": [ + "company", + "search_button" + ] + } + ] + } + }, + "insert": { + "name": "extraction_extraction_extraction-form", + "title": "EXTRACTION_EXTRACTION_EXTRACTION_TITLE_INSERT", + "input_size": "xxs", + "nb_cols": 12, + "javascript": true, + "rows": [ + { + "fields": [ + { + "type": "label", + "name": "bo_id", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_TECHNIQUE", + "nb_cols": 12, + "id": "Element_0_2_1" + } + ] + }, + { + "fields": [ + { + "type": "checkbox", + "name": "preco_tech", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_TECHNIQUE", + "required": false, + "nb_cols": 4, + "id": "checkbox_tech_2_1" + }, + { + "type": "checkbox", + "name": "chart_graph", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_CARTOGRAPHIQUE", + "required": false, + "nb_cols": 4, + "id": "checkbox_carto" + }, + { + "type": "checkbox", + "name": "metadonnees", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ISOGEO", + "required": false, + "nb_cols": 4, + "id": "checkbox_iso" + } + ] + }, + { + "fields": [ + { + "type": "email", + "name": "email", + "label": "FORM_EMAIL_USERS_USER", + "required": true, + "nb_cols": 6, + "id": "email_3_1", + "pattern": "^(([a-zA-Z]|[0-9])|([-]|[_]|[.]))+[@](([a-zA-Z]|[0-9])|([-]|[_]|[.])){2,63}[.](([a-zA-Z0-9]){2,63})+$" + }, + { + "type": "text", + "name": "company", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_COMPANY", + "required": true, + "nb_cols": 6, + "id": "company_8_1" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "extent_method", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_EXTENT_METHOD", + "required": true, + "nb_cols": 12, + "id": "extent_method_15_1", + "options": [ + "Commmunes|id_com", + "Conseils de Territoire|id_conseil", + "Etendue libre|extent" + ], + "id_from": "extent_method_15_1_from" + } + ] + }, + { + "fields": [ + { + "type": "list", + "name": "id_com", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ID_COM", + "required": false, + "nb_cols": 12, + "datasource": { + "datasource_id": "datasource_9", + "sort_order": "ASC", + "distinct": "true", + "label_key": "name", + "order_by": "name", + "id_key": "commune_id", + "attributs": "commune_id|name" + }, + "id": "id_com_22_1", + "id_from": "id_com_22_1_from", + "size": 10 + } + ] + }, + { + "fields": [ + { + "type": "list", + "name": "id_conseil", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ID_CONSEIL", + "required": false, + "nb_cols": 12, + "datasource": { + "datasource_id": "datasource_8", + "sort_order": "ASC", + "distinct": "true", + "label_key": "name", + "order_by": "name", + "id_key": "ct_id", + "attributs": "ct_id|name" + }, + "id": "id_conseil_23_1", + "id_from": "id_conseil_23_1_from", + "size": 10 + } + ] + }, + { + "fields": [ + { + "type": "map_vmap", + "name": "extent", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_EXTENT", + "required": false, + "nb_cols": 12, + "id": "extent_7_1", + "style": { + "height": "250px" + }, + "map_options": { + "proj": "EPSG:2154", + "type": "vmap", + "center": { + "extent": [ + -1736177.943496094, + 5863277.723320313, + 2570482.873496094, + 7416907.166679688 + ], + "coord": [ + 417152.46499999985, + 6640092.445 + ], + "scale": 23468294 + }, + "controls": { + "MP": true, + "ZO": true, + "SL": true, + "CP": true + }, + "layers": [], + "interactions": { + "multi_geometry": false, + "full_screen": true, + "RA": true, + "RO": true, + "ED": true, + "DP": false, + "DL": false, + "DPol": true, + "SE": true + }, + "draw_color": "rgba(54,184,255,0.6)", + "contour_color": "rgba(0,0,0,0.4)", + "contour_size": 2, + "circle_radius": 6, + "features": [], + "coord_accuracy": 8, + "tree": { + "name": "Tree", + "children": [ + { + "view": { + "center": [ + "902168", + "6269043" + ], + "zoom": 7, + "maxZoom": 28, + "minZoom": 0, + "projection": "EPSG:2154", + "extent": [ + 4510835482577.04, + 313452150322452.2, + 4510845419590.96, + 313452155946590.8 + ] + } + }, + { + "name": "extraction", + "children": [ + { + "name": "REF_ortho2011", + "layerType": "tilewms", + "url": "http://SCPA441.cpa.fr:8399/arcgis/services/REF_ortho2011/MapServer/WMSServer", + "index": -1, + "visible": true, + "opacity": 1, + "is_dynamic": false, + "is_filtered": false, + "version": "1.3.0", + "params": { + "LAYERS": "0", + "VERSION": "1.3.0", + "STYLES": "" + }, + "bo_queryable": false, + "layer_id": 1, + "select": true + }, + { + "name": "REF_CPA_LIMITE_COMMUNE", + "layerType": "tilewms", + "url": "http://SCPA441.cpa.fr:8399/arcgis/services/REF_CPA_LIMITE_COMMUNE/MapServer/WMSServer", + "index": -1, + "visible": true, + "opacity": 1, + "is_dynamic": false, + "is_filtered": false, + "version": "1.3.0", + "params": { + "LAYERS": "0,1", + "VERSION": "1.3.0", + "STYLES": "" + }, + "bo_queryable": false, + "layer_id": 2, + "select": true + } + ], + "visible": true + } + ] + } + } + } + ] + }, + { + "class": "extraction-treeview", + "fields": [ + { + "type": "treeview", + "name": "layers", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_LAYERS", + "required": false, + "nb_cols": 12, + "id": "layers_9_1", + "size": 20, + "options": { + "showBorder": false, + "levels": 0, + "showCheckbox": true, + "expandIcon": "glyphicon glyphicon-folder-close", + "collapseIcon": "glyphicon glyphicon-folder-open", + "highlightSelected": false, + "multiSelect": true, + "data": "getExtractionLayersTree()" + } + } + ] + }, + { + "fields": [ + { + "type": "treeview", + "name": "statistique", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_STATISTIQUE", + "required": false, + "pattern": "", + "nb_cols": 12, + "id": "statistique_9_1", + "options": { + "showBorder": false, + "levels": 0, + "showCheckbox": true, + "expandIcon": "glyphicon glyphicon-folder-close", + "collapseIcon": "glyphicon glyphicon-folder-open", + "highlightSelected": false, + "multiSelect": true, + "data": "getExtractionStatsTree()" + } + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "coordsys_id", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_COORDSYS_ID", + "required": false, + "nb_cols": 4, + "id": "coordsys_id_11_1", + "datasource": { + "datasource_id": "datasource_1", + "sort_order": "ASC", + "distinct": "true", + "label_key": "coordsys", + "order_by": "coordsys", + "id_key": "coordsys_id", + "attributs": "coordsys_id|coordsys" + }, + "default_value": "Lambert93", + "id_from": "coordsys_id_11_1_from" + }, + { + "type": "select", + "name": "vector_format_id", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_VECTOR_FORMAT_ID", + "required": false, + "nb_cols": 4, + "id": "vector_format_id_10_1", + "datasource": { + "datasource_id": "datasource_2", + "sort_order": "ASC", + "distinct": "true", + "label_key": "format", + "order_by": "format", + "id_key": "format_id", + "attributs": "format_id|format" + }, + "default_value": "SHAPE", + "id_from": "vector_format_id_10_1_from" + }, + { + "type": "select", + "name": "raster_format_id", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_RASTER_FORMAT_ID", + "required": false, + "nb_cols": 4, + "id": "raster_format_id_14_1", + "datasource": { + "datasource_id": "datasource_3", + "sort_order": "ASC", + "distinct": "true", + "label_key": "format", + "order_by": "format", + "id_key": "format_id", + "attributs": "format_id|format" + }, + "default_value": "ECW", + "id_from": "raster_format_id_14_1_from" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "status", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_STATUS", + "required": false, + "nb_cols": 12, + "id": "status_2_1" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "history", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_HISTORY", + "required": false, + "nb_cols": 12, + "id": "history_3_1" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "creation_date", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_CREATION_DATE", + "required": false, + "nb_cols": 12, + "id": "creation_date_4_1" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "requestor", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_REQUESTOR", + "required": false, + "nb_cols": 12, + "id": "requestor_5_1" + } + ] + }, + { + "fields": [ + { + "type": "file_wsdata", + "name": "ae", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_AE", + "required": false, + "nb_cols": 12, + "id": "ae_6_1" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "note", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_NOTE", + "required": false, + "nb_cols": 12, + "id": "note_12_1" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "note_line", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_NOTE_LINE", + "required": false, + "nb_cols": 12, + "id": "note_line_13_1" + } + ] + }, + { + "fields": [ + { + "type": "radio", + "options": { + "choices": [ + { + "label": "oui", + "value": true + }, + { + "label": "non", + "value": false + } + ] + }, + "name": "signed", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_SIGNED", + "required": false, + "nb_cols": 12, + "id": "signed_16_1" + } + ] + }, + { + "fields": [ + { + "type": "radio", + "options": { + "choices": [ + { + "label": "oui", + "value": true + }, + { + "label": "non", + "value": false + } + ] + }, + "name": "accepted_by_cpa", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ACCEPTED_BY_CPA", + "required": false, + "nb_cols": 12, + "id": "accepted_by_cpa_17_1" + } + ] + }, + { + "fields": [ + { + "type": "radio", + "options": { + "choices": [ + { + "label": "oui", + "value": true + }, + { + "label": "non", + "value": false + } + ] + }, + "name": "identification_complete", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_IDENTIFICATION_COMPLETE", + "required": false, + "nb_cols": 12, + "id": "identification_complete_18_1" + } + ] + }, + { + "fields": [ + { + "type": "radio", + "options": { + "choices": [ + { + "label": "oui", + "value": true + }, + { + "label": "non", + "value": false + } + ] + }, + "name": "definition_complete", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_DEFINITION_COMPLETE", + "required": false, + "nb_cols": 12, + "id": "definition_complete_19_1" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "comment", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_COMMENT", + "required": false, + "nb_cols": 12, + "id": "comment_20_1" + } + ] + }, + { + "fields": [ + { + "type": "integer", + "name": "priority_id", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_PRIORITY_ID", + "required": false, + "nb_cols": 12, + "id": "priority_id_21_1" + } + ] + }, + { + "fields": [ + { + "type": "hidden", + "name": "status_name", + "nb_cols": 6, + "id": "Element_0_26_1", + "default_value": "START" + }, + { + "type": "hidden", + "name": "tr_status_method", + "nb_cols": 6, + "id": "Element_0_25_2" + } + ] + }, + { + "class": "wab-method-button", + "fields": [ + { + "type": "button", + "class": "btn-ungroup btn-group-sm", + "nb_cols": 6, + "name": "insert_button", + "id": "insert_button", + "buttons": [ + { + "type": "submit", + "name": "form_submit", + "label": "FORM_CREATE", + "class": "btn-primary" + } + ] + }, + { + "type": "button", + "name": "return_list_button", + "nb_cols": 6, + "id": "return_list_button", + "class": "btn-ungroup btn-group-sm", + "buttons": [ + { + "type": "button", + "name": "return_list", + "label": "FORM_RETURN_LIST", + "class": "btn-primary", + "event": "setMode(\"search\")" + } + ] + } + ] + } + ], + "initEvent": "initExtractionExtractionForm()", + "beforeEvent": "setWabStatusMethod('trNouveau')", + "event": "sendSimpleForm()", + "afterEvent": "editSectionForm()", + "tabs": { + "position": "top", + "list": [ + { + "label": "Tab 0", + "elements": [ + "bo_id", + "status", + "history", + "creation_date", + "requestor", + "ae", + "email", + "extent", + "company", + "layers", + "vector_format_id", + "coordsys_id", + "note", + "note_line", + "raster_format_id", + "extent_method", + "signed", + "accepted_by_cpa", + "identification_complete", + "definition_complete", + "comment", + "priority_id", + "id_com", + "id_conseil", + "insert_button", + "bo_id", + "status_name", + "tr_status_method", + "return_list_button", + "statistique" + ] + } + ] + }, + "wab": { + "START": { + "controleur": { + "email": "", + "company": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "insert_button": "", + "bo_id": "", + "status_name": "", + "tr_status_method": "", + "return_list_button": "rw", + "chart_graph": "", + "metadonnees": "", + "preco_tech": "", + "statistique": "" + }, + "demandeur": { + "email": "rw", + "company": "rw", + "layers": "rw", + "coordsys_id": "rw", + "vector_format_id": "rw", + "raster_format_id": "rw", + "extent_method": "rw", + "id_com": "rw", + "id_conseil": "rw", + "extent": "rw", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "insert_button": "rw", + "bo_id": "", + "status_name": "", + "tr_status_method": "", + "return_list_button": "rw", + "chart_graph": "rw", + "metadonnees": "rw", + "preco_tech": "rw", + "statistique": "rw" + } + }, + "Nouveau": { + "controleur": { + "email": "", + "company": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "insert_button": "", + "bo_id": "", + "status_name": "", + "tr_status_method": "", + "return_list_button": "rw", + "chart_graph": "", + "metadonnees": "", + "preco_tech": "", + "statistique": "" + }, + "demandeur": { + "email": "rw", + "company": "rw", + "layers": "rw", + "coordsys_id": "rw", + "vector_format_id": "rw", + "raster_format_id": "rw", + "extent_method": "rw", + "id_com": "rw", + "id_conseil": "rw", + "extent": "rw", + "status": "r", + "history": "", + "creation_date": "r", + "requestor": "r", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "insert_button": "", + "bo_id": "r", + "status_name": "", + "tr_status_method": "", + "return_list_button": "rw", + "chart_graph": "rw", + "metadonnees": "rw", + "preco_tech": "rw", + "statistique": "rw" + } + }, + "AE Demandé": { + "controleur": { + "email": "", + "company": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "insert_button": "", + "bo_id": "", + "status_name": "", + "tr_status_method": "", + "return_list_button": "", + "chart_graph": "", + "metadonnees": "", + "preco_tech": "", + "statistique": "" + }, + "demandeur": { + "email": "r", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "status": "r", + "history": "", + "creation_date": "r", + "requestor": "r", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "insert_button": "", + "bo_id": "r", + "status_name": "rw", + "tr_status_method": "rw", + "return_list_button": "rw", + "chart_graph": "r", + "metadonnees": "r", + "preco_tech": "r", + "statistique": "r" + } + }, + "AE Généré": { + "controleur": { + "email": "", + "company": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "insert_button": "", + "bo_id": "", + "status_name": "", + "tr_status_method": "", + "return_list_button": "", + "chart_graph": "", + "metadonnees": "", + "preco_tech": "", + "statistique": "" + }, + "demandeur": { + "email": "r", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "status": "r", + "history": "", + "creation_date": "r", + "requestor": "r", + "ae": "rw", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "insert_button": "", + "bo_id": "r", + "status_name": "r", + "tr_status_method": "r", + "return_list_button": "rw", + "chart_graph": "r", + "metadonnees": "r", + "preco_tech": "r", + "statistique": "r" + } + }, + "AE Soumis": { + "controleur": { + "email": "r", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "status": "r", + "history": "r", + "creation_date": "r", + "requestor": "r", + "ae": "", + "note": "", + "note_line": "", + "signed": "rw", + "accepted_by_cpa": "rw", + "identification_complete": "rw", + "definition_complete": "rw", + "comment": "rw", + "priority_id": "r", + "insert_button": "", + "bo_id": "r", + "status_name": "r", + "tr_status_method": "r", + "return_list_button": "rw", + "chart_graph": "", + "metadonnees": "", + "preco_tech": "", + "statistique": "" + }, + "demandeur": { + "email": "r", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "status": "r", + "history": "", + "creation_date": "r", + "requestor": "r", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "r", + "insert_button": "", + "bo_id": "r", + "status_name": "r", + "tr_status_method": "r", + "return_list_button": "rw", + "chart_graph": "r", + "metadonnees": "r", + "preco_tech": "r", + "statistique": "r" + } + }, + "Autorisée": { + "controleur": { + "email": "r", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "status": "r", + "history": "r", + "creation_date": "r", + "requestor": "r", + "ae": "r", + "note": "", + "note_line": "", + "signed": "r", + "accepted_by_cpa": "r", + "identification_complete": "r", + "definition_complete": "r", + "comment": "r", + "priority_id": "r", + "insert_button": "", + "bo_id": "r", + "status_name": "r", + "tr_status_method": "r", + "return_list_button": "rw", + "chart_graph": "", + "metadonnees": "", + "preco_tech": "", + "statistique": "" + }, + "demandeur": { + "email": "", + "company": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "insert_button": "", + "bo_id": "", + "status_name": "", + "tr_status_method": "", + "return_list_button": "rw", + "chart_graph": "", + "metadonnees": "", + "preco_tech": "", + "statistique": "" + } + }, + "Refusée": { + "controleur": { + "email": "r", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "status": "r", + "history": "r", + "creation_date": "r", + "requestor": "r", + "ae": "", + "note": "", + "note_line": "", + "signed": "r", + "accepted_by_cpa": "r", + "identification_complete": "r", + "definition_complete": "r", + "comment": "r", + "priority_id": "r", + "insert_button": "", + "bo_id": "r", + "status_name": "r", + "tr_status_method": "r", + "return_list_button": "rw", + "chart_graph": "", + "metadonnees": "", + "preco_tech": "", + "statistique": "" + }, + "demandeur": { + "email": "r", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "status": "r", + "history": "", + "creation_date": "r", + "requestor": "r", + "ae": "", + "note": "", + "note_line": "", + "signed": "r", + "accepted_by_cpa": "r", + "identification_complete": "r", + "definition_complete": "r", + "comment": "r", + "priority_id": "r", + "insert_button": "", + "bo_id": "r", + "status_name": "rw", + "tr_status_method": "rw", + "return_list_button": "rw", + "chart_graph": "r", + "metadonnees": "r", + "preco_tech": "r", + "statistique": "r" + } + }, + "Extraction terminée": { + "controleur": { + "bo_id": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "email": "", + "company": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "status_name": "", + "tr_status_method": "", + "insert_button": "", + "return_list_button": "", + "statistique": "" + }, + "demandeur": { + "bo_id": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "email": "", + "company": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "status_name": "", + "tr_status_method": "", + "insert_button": "", + "return_list_button": "", + "statistique": "" + } + }, + "Fichier invalidé": { + "controleur": { + "bo_id": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "email": "", + "company": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "status_name": "", + "tr_status_method": "", + "insert_button": "", + "return_list_button": "", + "statistique": "" + }, + "demandeur": { + "bo_id": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "email": "", + "company": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "status_name": "", + "tr_status_method": "", + "insert_button": "", + "return_list_button": "", + "statistique": "" + } + }, + "Fichier déposé": { + "controleur": { + "bo_id": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "email": "", + "company": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "status_name": "", + "tr_status_method": "", + "insert_button": "", + "return_list_button": "", + "statistique": "" + }, + "demandeur": { + "bo_id": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "email": "", + "company": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "status_name": "", + "tr_status_method": "", + "insert_button": "", + "return_list_button": "", + "statistique": "" + } + }, + "Fichier accepté": { + "controleur": { + "bo_id": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "email": "", + "company": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "status_name": "", + "tr_status_method": "", + "insert_button": "", + "return_list_button": "", + "statistique": "" + }, + "demandeur": { + "bo_id": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "email": "", + "company": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "status_name": "", + "tr_status_method": "", + "insert_button": "", + "return_list_button": "", + "statistique": "" + } + }, + "Dépôt terminé": { + "controleur": { + "bo_id": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "email": "", + "company": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "status_name": "", + "tr_status_method": "", + "insert_button": "", + "return_list_button": "", + "statistique": "" + }, + "demandeur": { + "bo_id": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "email": "", + "company": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "status": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "status_name": "", + "tr_status_method": "", + "insert_button": "", + "return_list_button": "", + "statistique": "" + } + } + } + }, + "update": { + "name": "extraction_extraction_extraction-form", + "title": "EXTRACTION_EXTRACTION_EXTRACTION_TITLE", + "input_size": "xxs", + "nb_cols": 12, + "javascript": true, + "rows": [ + { + "fields": [ + { + "type": "label", + "name": "bo_id", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_BO_ID", + "required": false, + "nb_cols": 12, + "id": "bo_id_1_1" + } + ] + }, + { + "fields": [ + { + "type": "label", + "name": "status_name", + "nb_cols": 12, + "id": "Element_6_25_1" + }, + { + "type": "checkbox", + "name": "preco_tech", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_TECHNIQUE", + "required": false, + "nb_cols": 4, + "id": "checkbox_tech_2_1" + }, + { + "type": "checkbox", + "name": "chart_graph", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_CARTOGRAPHIQUE", + "required": false, + "nb_cols": 4, + "id": "checkbox_carto" + }, + { + "type": "checkbox", + "name": "metadonnees", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ISOGEO", + "required": false, + "nb_cols": 4, + "id": "checkbox_iso" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "creation_date", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_CREATION_DATE", + "required": false, + "nb_cols": 12, + "id": "creation_date_4_1" + } + ] + }, + { + "fields": [ + { + "type": "email", + "name": "email", + "label": "FORM_EMAIL_USERS_USER", + "required": false, + "nb_cols": 4, + "id": "email_3_1", + "pattern": "^(([a-zA-Z]|[0-9])|([-]|[_]|[.]))+[@](([a-zA-Z]|[0-9])|([-]|[_]|[.])){2,63}[.](([a-zA-Z0-9]){2,63})+$" + }, + { + "type": "text", + "name": "company", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_COMPANY", + "required": true, + "nb_cols": 4, + "id": "company_8_1" + }, + { + "type": "text", + "name": "requestor", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_REQUESTOR", + "required": false, + "nb_cols": 4, + "id": "requestor_5_1" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "extent_method", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_EXTENT_METHOD", + "required": true, + "nb_cols": 12, + "id": "extent_method_15_1", + "options": [ + "Commmunes|id_com", + "Conseils de Territoire|id_conseil", + "Etendue libre|extent" + ], + "id_from": "extent_method_15_1_from" + } + ] + }, + { + "fields": [ + { + "type": "list", + "name": "id_com", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ID_COM", + "required": false, + "nb_cols": 12, + "datasource": { + "datasource_id": "datasource_9", + "sort_order": "ASC", + "distinct": "true", + "label_key": "name", + "order_by": "name", + "id_key": "commune_id", + "attributs": "commune_id|name" + }, + "id": "id_com_22_1", + "id_from": "id_com_22_1_from", + "size": 10 + } + ] + }, + { + "fields": [ + { + "type": "list", + "name": "id_conseil", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ID_CONSEIL", + "required": false, + "nb_cols": 12, + "datasource": { + "datasource_id": "datasource_8", + "sort_order": "ASC", + "distinct": "true", + "label_key": "name", + "order_by": "name", + "id_key": "ct_id", + "attributs": "ct_id|name" + }, + "id": "id_conseil_23_1", + "id_from": "id_conseil_23_1_from", + "size": 10 + } + ] + }, + { + "fields": [ + { + "type": "map_vmap", + "name": "extent", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_EXTENT", + "required": false, + "nb_cols": 12, + "id": "extent_7_1", + "style": { + "height": "250px" + }, + "map_options": { + "proj": "EPSG:2154", + "type": "vmap", + "center": { + "extent": [ + 4510838297753.592, + 313452152357706.75, + 4510842604414.408, + 313452153911336.25 + ], + "coord": [ + 4510840451084, + 313452153134521.5 + ], + "scale": 23468294 + }, + "controls": { + "MP": true, + "ZO": true, + "SL": true, + "CP": true + }, + "layers": [], + "interactions": { + "multi_geometry": false, + "full_screen": true, + "RA": true, + "RO": true, + "ED": true, + "DP": false, + "DL": false, + "DPol": true, + "SE": true + }, + "draw_color": "rgba(54,184,255,0.6)", + "contour_color": "rgba(0,0,0,0.4)", + "contour_size": 2, + "circle_radius": 6, + "features": [], + "coord_accuracy": 8, + "tree": { + "name": "Tree", + "children": [ + { + "view": { + "center": [ + "902168", + "6269043" + ], + "zoom": 7, + "maxZoom": 28, + "minZoom": 0, + "projection": "EPSG:2154", + "extent": [ + 4510835482577.04, + 313452150322452.2, + 4510845419590.96, + 313452155946590.8 + ] + } + }, + { + "name": "extraction", + "children": [ + { + "name": "REF_ortho2011", + "layerType": "tilewms", + "url": "http://SCPA441.cpa.fr:8399/arcgis/services/REF_ortho2011/MapServer/WMSServer", + "index": -1, + "visible": true, + "opacity": 1, + "is_dynamic": false, + "is_filtered": false, + "version": "1.3.0", + "params": { + "LAYERS": "0", + "VERSION": "1.3.0", + "STYLES": "" + }, + "bo_queryable": false, + "layer_id": 1, + "select": true + }, + { + "name": "REF_CPA_LIMITE_COMMUNE", + "layerType": "tilewms", + "url": "http://SCPA441.cpa.fr:8399/arcgis/services/REF_CPA_LIMITE_COMMUNE/MapServer/WMSServer", + "index": -1, + "visible": true, + "opacity": 1, + "is_dynamic": false, + "is_filtered": false, + "version": "1.3.0", + "params": { + "LAYERS": "0,1", + "VERSION": "1.3.0", + "STYLES": "" + }, + "bo_queryable": false, + "layer_id": 2, + "select": true + } + ], + "visible": true + } + ] + } + } + } + ] + }, + { + "class": "extraction-treeview", + "fields": [ + { + "type": "treeview", + "name": "layers", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_LAYERS", + "required": false, + "nb_cols": 12, + "id": "layers_9_1", + "size": 20, + "options": { + "showBorder": false, + "levels": 0, + "showCheckbox": true, + "expandIcon": "glyphicon glyphicon-folder-close", + "collapseIcon": "glyphicon glyphicon-folder-open", + "highlightSelected": false, + "multiSelect": true, + "data": "getExtractionLayersTree()" + } + } + ] + }, + { + "fields": [ + { + "type": "treeview", + "name": "statistique", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_STATISTIQUE", + "required": false, + "pattern": "", + "nb_cols": 12, + "id": "statistique_9_1", + "options": { + "showBorder": false, + "levels": 0, + "showCheckbox": true, + "expandIcon": "glyphicon glyphicon-folder-close", + "collapseIcon": "glyphicon glyphicon-folder-open", + "highlightSelected": false, + "multiSelect": true, + "data": "getExtractionStatsTree()" + } + } + ] + }, + { + "fields": [ + { + "type": "file_wsdata", + "name": "ae", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_AE", + "required": false, + "nb_cols": 12, + "id": "ae_6_1" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "coordsys_id", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_COORDSYS_ID", + "required": false, + "nb_cols": 4, + "id": "coordsys_id_11_1", + "datasource": { + "datasource_id": "datasource_1", + "sort_order": "ASC", + "distinct": "true", + "label_key": "coordsys", + "order_by": "coordsys", + "id_key": "coordsys_id", + "attributs": "coordsys_id|coordsys" + }, + "id_from": "coordsys_id_11_1_from" + }, + { + "type": "select", + "name": "vector_format_id", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_VECTOR_FORMAT_ID", + "required": false, + "nb_cols": 4, + "id": "vector_format_id_10_1", + "datasource": { + "datasource_id": "datasource_2", + "sort_order": "ASC", + "distinct": "true", + "label_key": "format", + "order_by": "format", + "id_key": "format_id", + "attributs": "format_id|format" + }, + "id_from": "vector_format_id_10_1_from" + }, + { + "type": "select", + "name": "raster_format_id", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_RASTER_FORMAT_ID", + "required": false, + "nb_cols": 4, + "id": "raster_format_id_14_1", + "datasource": { + "datasource_id": "datasource_3", + "sort_order": "ASC", + "distinct": "true", + "label_key": "format", + "order_by": "format", + "id_key": "format_id", + "attributs": "format_id|format" + }, + "id_from": "raster_format_id_14_1_from" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "history", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_HISTORY", + "required": false, + "nb_cols": 12, + "id": "history_3_1" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "note", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_NOTE", + "required": false, + "nb_cols": 12, + "id": "note_12_1" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "note_line", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_NOTE_LINE", + "required": false, + "nb_cols": 12, + "id": "note_line_13_1" + } + ] + }, + { + "fields": [ + { + "type": "radio", + "options": { + "choices": [ + { + "label": "oui", + "value": true, + "$$hashKey": "object:2269" + }, + { + "label": "non", + "value": false, + "$$hashKey": "object:2270" + } + ] + }, + "name": "signed", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_SIGNED", + "required": false, + "nb_cols": 3, + "id": "signed_16_1" + }, + { + "type": "radio", + "options": { + "choices": [ + { + "label": "oui", + "value": true, + "$$hashKey": "object:2277" + }, + { + "label": "non", + "value": false, + "$$hashKey": "object:2278" + } + ] + }, + "name": "accepted_by_cpa", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ACCEPTED_BY_CPA", + "required": false, + "nb_cols": 3, + "id": "accepted_by_cpa_17_1" + }, + { + "type": "radio", + "options": { + "choices": [ + { + "label": "oui", + "value": true, + "$$hashKey": "object:2285" + }, + { + "label": "non", + "value": false, + "$$hashKey": "object:2286" + } + ] + }, + "name": "identification_complete", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_IDENTIFICATION_COMPLETE", + "required": false, + "nb_cols": 3, + "id": "identification_complete_18_1" + }, + { + "type": "radio", + "options": { + "choices": [ + { + "label": "oui", + "value": true, + "$$hashKey": "object:2293" + }, + { + "label": "non", + "value": false, + "$$hashKey": "object:2294" + } + ] + }, + "name": "definition_complete", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_DEFINITION_COMPLETE", + "required": false, + "nb_cols": 3, + "id": "definition_complete_19_1" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "comment", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_COMMENT", + "required": false, + "nb_cols": 12, + "id": "comment_20_1" + } + ] + }, + { + "fields": [ + { + "type": "select", + "name": "priority_id", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_PRIORITY_ID", + "required": false, + "nb_cols": 12, + "id": "priority_id_21_1", + "options": [ + "Heures Pleines|1", + "Heures creuses|0" + ], + "id_from": "priority_id_21_1_from" + } + ] + }, + { + "fields": [ + { + "type": "file_wsdata", + "name": "input_deposit", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_INPUT_DEPOSIT", + "required": false, + "pattern": "", + "nb_cols": 12, + "id": "Element_6_19_1" + } + ] + }, + { + "class": "wab-method-button", + "fields": [ + { + "type": "button", + "class": "btn-ungroup btn-group-sm", + "nb_cols": 1, + "name": "update_button", + "id": "update_button", + "buttons": [ + { + "type": "submit", + "name": "form_submit", + "label": "FORM_UPDATE", + "class": "btn-primary" + } + ] + }, + { + "type": "button", + "name": "return_list_button", + "nb_cols": 1, + "id": "return_list_button", + "class": "btn-ungroup btn-group-sm", + "buttons": [ + { + "type": "button", + "name": "return_list", + "label": "FORM_RETURN_LIST", + "class": "btn-primary", + "event": "setMode(\"search\")" + } + ] + }, + { + "type": "button", + "name": "Element_2", + "nb_cols": 1, + "id": "Element_2_20_1", + "class": "btn-ungroup btn-group-sm", + "buttons": [ + { + "type": "submit", + "name": "form_submit", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_DEPOSIT", + "class": "btn-primary", + "event": "callBoMethod('trDeposer')" + } + ] + }, + { + "type": "button", + "name": "Element_0", + "nb_cols": 1, + "id": "Element_0_25_2", + "class": "btn-ungroup btn-group-sm", + "buttons": [ + { + "type": "submit", + "name": "form_submit", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ALLOW_EXTRACTION", + "class": "btn-primary", + "event": "callBoMethod('trAutoriser')" + } + ] + }, + { + "type": "button", + "name": "Element_1", + "nb_cols": 1, + "id": "Element_1_25_3", + "class": "btn-ungroup btn-group-sm", + "buttons": [ + { + "type": "submit", + "name": "form_submit", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ASK_AE", + "class": "btn-primary", + "event": "callBoMethod('trDemander')", + "disabled": false + } + ] + }, + { + "type": "button", + "name": "Element_3", + "nb_cols": 1, + "id": "Element_3_25_5", + "class": "btn-ungroup btn-group-sm", + "buttons": [ + { + "type": "submit", + "name": "form_submit", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_CREATE", + "class": "btn-primary", + "event": "callBoMethod('trNouveau')" + } + ] + }, + { + "type": "button", + "name": "Element_4", + "nb_cols": 1, + "id": "Element_4_25_6", + "class": "btn-ungroup btn-group-sm", + "buttons": [ + { + "type": "submit", + "name": "form_submit", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_REJECT_EXTRACTION", + "class": "btn-primary", + "event": "callBoMethod('trRefuser')" + } + ] + }, + { + "type": "button", + "name": "Element_5", + "nb_cols": 1, + "id": "Element_5_25_7", + "class": "btn-ungroup btn-group-sm", + "buttons": [ + { + "type": "submit", + "name": "form_submit", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_RELOAD_AE", + "class": "btn-primary", + "event": "callBoMethod('trResoumettre')" + } + ] + }, + { + "type": "button", + "name": "Element_7", + "nb_cols": 1, + "id": "Element_7_25_9", + "class": "btn-ungroup btn-group-sm", + "buttons": [ + { + "type": "submit", + "name": "form_submit", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_SEND_AE", + "class": "btn-primary", + "event": "callBoMethod('trSoumettre')" + } + ] + }, + { + "type": "button", + "name": "Element_8", + "nb_cols": 1, + "id": "Element_8_25_10", + "class": "btn-ungroup btn-group-sm", + "buttons": [ + { + "type": "submit", + "name": "form_submit", + "label": "EXTRACTION_EXTRACTION_EXTRACTION_FORM_TERMINATE", + "class": "btn-primary", + "event": "callBoMethod('trTerminer')" + } + ] + } + ] + } + ], + "initEvent": "initExtractionExtractionForm()", + "event": "sendSimpleForm()", + "afterEvent": "editSectionForm()", + "tabs": { + "position": "top", + "list": [ + { + "label": "Tab 0", + "elements": [ + "bo_id", + "history", + "creation_date", + "requestor", + "ae", + "extent", + "company", + "layers", + "vector_format_id", + "coordsys_id", + "note", + "note_line", + "raster_format_id", + "extent_method", + "signed", + "accepted_by_cpa", + "identification_complete", + "definition_complete", + "comment", + "priority_id", + "id_com", + "id_conseil", + "update_button", + "status_name", + "Element_3", + "Element_4", + "Element_5", + "Element_7", + "Element_8", + "status_name", + "return_list_button", + "preco_tech", + "chart_graph", + "metadonnees", + "statistique", + "Element_2", + "input_deposit" + ] + } + ] + }, + "wab": { + "START": { + "controleur": { + "email": "", + "company": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "bo_id": "", + "status_name": "", + "update_button": "", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "return_list_button": "rw", + "Element_1": "", + "chart_graph": "", + "metadonnees": "", + "preco_tech": "", + "Element_0": "", + "statistique": "", + "Element_2": "", + "input_deposit": "" + }, + "demandeur": { + "email": "rw", + "company": "rw", + "layers": "rw", + "coordsys_id": "rw", + "vector_format_id": "rw", + "raster_format_id": "rw", + "extent_method": "rw", + "id_com": "rw", + "id_conseil": "rw", + "extent": "rw", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "bo_id": "", + "status_name": "", + "update_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "return_list_button": "rw", + "Element_1": "", + "chart_graph": "", + "metadonnees": "", + "preco_tech": "", + "Element_0": "", + "statistique": "rw", + "Element_2": "", + "input_deposit": "" + } + }, + "Nouveau": { + "controleur": { + "email": "", + "company": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "bo_id": "", + "status_name": "", + "update_button": "", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "return_list_button": "rw", + "Element_1": "", + "chart_graph": "", + "metadonnees": "", + "preco_tech": "", + "Element_0": "", + "statistique": "", + "Element_2": "", + "input_deposit": "" + }, + "demandeur": { + "email": "rw", + "company": "rw", + "layers": "rw", + "coordsys_id": "rw", + "vector_format_id": "rw", + "raster_format_id": "rw", + "extent_method": "rw", + "id_com": "rw", + "id_conseil": "rw", + "extent": "rw", + "history": "", + "creation_date": "r", + "requestor": "rw", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "bo_id": "r", + "status_name": "", + "update_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "return_list_button": "rw", + "Element_1": "rw", + "chart_graph": "rw", + "metadonnees": "rw", + "preco_tech": "rw", + "Element_0": "", + "statistique": "rw", + "Element_2": "", + "input_deposit": "" + } + }, + "AE Demandé": { + "controleur": { + "email": "", + "company": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "bo_id": "", + "status_name": "", + "update_button": "", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "return_list_button": "rw", + "Element_1": "", + "chart_graph": "", + "metadonnees": "", + "preco_tech": "", + "Element_0": "", + "statistique": "", + "Element_2": "", + "input_deposit": "" + }, + "demandeur": { + "email": "r", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "history": "", + "creation_date": "r", + "requestor": "r", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "bo_id": "r", + "status_name": "", + "update_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "return_list_button": "rw", + "Element_1": "", + "chart_graph": "r", + "metadonnees": "r", + "preco_tech": "r", + "Element_0": "", + "statistique": "r", + "Element_2": "", + "input_deposit": "" + } + }, + "AE Généré": { + "controleur": { + "email": "", + "company": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "bo_id": "", + "status_name": "", + "update_button": "", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "return_list_button": "rw", + "Element_1": "", + "chart_graph": "", + "metadonnees": "", + "preco_tech": "", + "Element_0": "", + "statistique": "", + "Element_2": "", + "input_deposit": "" + }, + "demandeur": { + "email": "r", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "history": "", + "creation_date": "r", + "requestor": "r", + "ae": "rw", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "bo_id": "r", + "status_name": "", + "update_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "rw", + "Element_8": "", + "return_list_button": "rw", + "Element_1": "", + "chart_graph": "r", + "metadonnees": "r", + "preco_tech": "r", + "Element_0": "", + "statistique": "r", + "Element_2": "", + "input_deposit": "" + } + }, + "AE Soumis": { + "controleur": { + "email": "r", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "history": "r", + "creation_date": "r", + "requestor": "r", + "ae": "r", + "note": "", + "note_line": "", + "signed": "rw", + "accepted_by_cpa": "rw", + "identification_complete": "rw", + "definition_complete": "rw", + "comment": "rw", + "priority_id": "r", + "bo_id": "r", + "status_name": "", + "update_button": "rw", + "Element_3": "", + "Element_4": "rw", + "Element_5": "rw", + "Element_7": "", + "Element_8": "", + "return_list_button": "rw", + "Element_1": "", + "chart_graph": "r", + "metadonnees": "r", + "preco_tech": "r", + "Element_0": "rw", + "statistique": "r", + "Element_2": "", + "input_deposit": "" + }, + "demandeur": { + "email": "r", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "history": "", + "creation_date": "r", + "requestor": "r", + "ae": "r", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "r", + "bo_id": "r", + "status_name": "", + "update_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "return_list_button": "rw", + "Element_1": "", + "chart_graph": "r", + "metadonnees": "r", + "preco_tech": "", + "Element_0": "", + "statistique": "r", + "Element_2": "", + "input_deposit": "" + } + }, + "Autorisée": { + "controleur": { + "email": "r", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "history": "r", + "creation_date": "r", + "requestor": "r", + "ae": "r", + "note": "", + "note_line": "", + "signed": "r", + "accepted_by_cpa": "r", + "identification_complete": "r", + "definition_complete": "r", + "comment": "r", + "priority_id": "rw", + "bo_id": "r", + "status_name": "", + "update_button": "", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "return_list_button": "rw", + "Element_1": "", + "chart_graph": "r", + "metadonnees": "r", + "preco_tech": "r", + "Element_0": "", + "statistique": "r", + "Element_2": "", + "input_deposit": "" + }, + "demandeur": { + "email": "", + "company": "", + "layers": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "history": "", + "creation_date": "", + "requestor": "", + "ae": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "bo_id": "", + "status_name": "", + "update_button": "", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "return_list_button": "rw", + "Element_1": "", + "chart_graph": "", + "metadonnees": "", + "preco_tech": "", + "Element_0": "", + "statistique": "", + "Element_2": "", + "input_deposit": "" + } + }, + "Refusée": { + "controleur": { + "email": "", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "history": "r", + "creation_date": "r", + "requestor": "r", + "ae": "", + "note": "", + "note_line": "", + "signed": "r", + "accepted_by_cpa": "r", + "identification_complete": "r", + "definition_complete": "r", + "comment": "r", + "priority_id": "r", + "bo_id": "r", + "status_name": "", + "update_button": "", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "return_list_button": "rw", + "Element_1": "", + "chart_graph": "r", + "metadonnees": "r", + "preco_tech": "r", + "Element_0": "", + "statistique": "", + "Element_2": "", + "input_deposit": "r" + }, + "demandeur": { + "email": "r", + "company": "r", + "layers": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "history": "", + "creation_date": "r", + "requestor": "r", + "ae": "rw", + "note": "", + "note_line": "", + "signed": "r", + "accepted_by_cpa": "r", + "identification_complete": "r", + "definition_complete": "r", + "comment": "r", + "priority_id": "r", + "bo_id": "r", + "status_name": "", + "update_button": "rw", + "Element_3": "", + "Element_4": "", + "Element_5": "rw", + "Element_7": "", + "Element_8": "", + "return_list_button": "rw", + "Element_1": "", + "chart_graph": "", + "metadonnees": "", + "preco_tech": "", + "Element_0": "", + "statistique": "r", + "Element_2": "", + "input_deposit": "r" + } + }, + "Fichier invalidé": { + "controleur": { + "bo_id": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "creation_date": "", + "email": "", + "company": "", + "requestor": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "layers": "", + "ae": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "history": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "status_name": "", + "update_button": "", + "return_list_button": "", + "Element_1": "", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "Element_0": "", + "statistique": "", + "Element_2": "", + "input_deposit": "r" + }, + "demandeur": { + "bo_id": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "creation_date": "", + "email": "", + "company": "", + "requestor": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "layers": "", + "ae": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "history": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "status_name": "", + "update_button": "", + "return_list_button": "", + "Element_1": "", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "Element_0": "", + "statistique": "", + "Element_2": "", + "input_deposit": "r" + } + }, + "Fichier déposé": { + "controleur": { + "bo_id": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "creation_date": "", + "email": "", + "company": "", + "requestor": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "layers": "", + "ae": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "history": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "status_name": "", + "update_button": "", + "return_list_button": "", + "Element_1": "", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "Element_0": "", + "statistique": "", + "Element_2": "", + "input_deposit": "r" + }, + "demandeur": { + "bo_id": "r", + "preco_tech": "r", + "chart_graph": "r", + "metadonnees": "r", + "creation_date": "r", + "email": "r", + "company": "r", + "requestor": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "layers": "r", + "ae": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "history": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "status_name": "", + "update_button": "", + "return_list_button": "rw", + "Element_1": "", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "Element_0": "", + "statistique": "r", + "Element_2": "", + "input_deposit": "r" + } + }, + "Fichier accepté": { + "controleur": { + "bo_id": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "creation_date": "", + "email": "", + "company": "", + "requestor": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "layers": "", + "ae": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "history": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "status_name": "", + "update_button": "", + "return_list_button": "", + "Element_1": "", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "Element_0": "", + "statistique": "", + "Element_2": "", + "input_deposit": "r" + }, + "demandeur": { + "bo_id": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "creation_date": "", + "email": "", + "company": "", + "requestor": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "layers": "", + "ae": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "history": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "status_name": "", + "update_button": "", + "return_list_button": "", + "Element_1": "", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "Element_0": "", + "statistique": "", + "Element_2": "", + "input_deposit": "r" + } + }, + "Dépôt terminé": { + "controleur": { + "bo_id": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "creation_date": "", + "email": "", + "company": "", + "requestor": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "layers": "", + "ae": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "history": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "status_name": "", + "update_button": "", + "return_list_button": "", + "Element_1": "", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "Element_0": "", + "statistique": "", + "Element_2": "", + "input_deposit": "r" + }, + "demandeur": { + "bo_id": "", + "preco_tech": "", + "chart_graph": "", + "metadonnees": "", + "creation_date": "", + "email": "", + "company": "", + "requestor": "", + "extent_method": "", + "id_com": "", + "id_conseil": "", + "extent": "", + "layers": "", + "ae": "", + "coordsys_id": "", + "vector_format_id": "", + "raster_format_id": "", + "history": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "status_name": "", + "update_button": "", + "return_list_button": "", + "Element_1": "", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "Element_0": "", + "statistique": "", + "Element_2": "", + "input_deposit": "r" + } + }, + "Extraction terminée": { + "controleur": { + "bo_id": "r", + "preco_tech": "r", + "chart_graph": "r", + "metadonnees": "r", + "creation_date": "r", + "email": "r", + "company": "r", + "requestor": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "layers": "r", + "ae": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "history": "r", + "note": "", + "note_line": "", + "signed": "r", + "accepted_by_cpa": "r", + "identification_complete": "r", + "definition_complete": "r", + "comment": "r", + "priority_id": "r", + "status_name": "", + "update_button": "", + "return_list_button": "rw", + "Element_1": "", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "Element_0": "", + "statistique": "r", + "Element_2": "", + "input_deposit": "r" + }, + "demandeur": { + "bo_id": "r", + "preco_tech": "r", + "chart_graph": "r", + "metadonnees": "r", + "creation_date": "r", + "email": "r", + "company": "r", + "requestor": "r", + "extent_method": "r", + "id_com": "r", + "id_conseil": "r", + "extent": "r", + "layers": "r", + "ae": "r", + "coordsys_id": "r", + "vector_format_id": "r", + "raster_format_id": "r", + "history": "", + "note": "", + "note_line": "", + "signed": "", + "accepted_by_cpa": "", + "identification_complete": "", + "definition_complete": "", + "comment": "", + "priority_id": "", + "status_name": "", + "update_button": "", + "return_list_button": "rw", + "Element_1": "", + "Element_3": "", + "Element_4": "", + "Element_5": "", + "Element_7": "", + "Element_8": "", + "Element_0": "", + "statistique": "r", + "Element_2": "rw", + "input_deposit": "rw" + } + } + } + }, + "datasources": { + "datasource_1": { + "type": "web_service", + "dataType": "tableValue", + "name": "datasource_coordsys", + "description": "", + "parameters": { + "schema": "s_extraction", + "table": "rt_coordsys" + }, + "ressource_id": "vitis/genericquerys", + "id": "datasource_1" + }, + "datasource_2": { + "type": "web_service", + "dataType": "tableValue", + "name": "datasource_vector_format", + "description": "", + "parameters": { + "schema": "s_extraction", + "table": "rt_format", + "filter": { + "use_for_vector": true + } + }, + "ressource_id": "vitis/genericquerys", + "id": "datasource_2" + }, + "datasource_3": { + "type": "web_service", + "dataType": "tableValue", + "name": "datasource_raster_format", + "description": "", + "parameters": { + "schema": "s_extraction", + "table": "rt_format", + "filter": { + "use_for_raster": true + } + }, + "ressource_id": "vitis/genericquerys", + "id": "datasource_3" + }, + "datasource_4": { + "type": "web_service", + "dataType": "externalDatabase", + "name": "datasource_commune", + "description": "", + "parameters": { + "server": "scpa7717", + "port": "5432", + "sgbd": "pgsql", + "login": "sigl", + "password": "sigl28sig", + "database": "sig", + "schema": "cad93", + "table": "commune" + }, + "ressource_id": "vitis/genericquerys", + "id": "datasource_4" + }, + "datasource_5": { + "type": "web_service", + "dataType": "externalDatabase", + "name": "datasource_commune", + "description": "", + "parameters": { + "server": "scpa7717", + "port": "5432", + "sgbd": "pgsql", + "login": "sigl", + "password": "sigl28sig", + "database": "sig", + "schema": "ref93", + "table": "ref_amp_lim_ct" + }, + "ressource_id": "vitis/genericquerys", + "id": "datasource_5" + }, + "datasource_6": { + "type": "web_service", + "dataType": "externalDatabase", + "name": "datasource_ct", + "description": "", + "parameters": { + "filter": { + "relation": "AND", + "operators": [] + }, + "server": "scpa7717", + "port": "5432", + "sgbd": "pgsql", + "login": "sigl", + "password": "sigl28sig", + "database": "sig", + "schema": "ref93", + "table": "ct" + }, + "ressource_id": "vitis/genericquerys/ct", + "id": "datasource_6" + }, + "datasource_7": { + "type": "web_service", + "dataType": "externalDatabase", + "name": "datasource_com", + "description": "", + "parameters": { + "filter": { + "relation": "AND", + "operators": [] + }, + "server": "GEWURZTRAMINER", + "port": "5432", + "sgbd": "pgsql", + "login": "postgres", + "password": "postgres", + "database": "vitis_gtf", + "schema": "s_extraction", + "table": "commune" + }, + "ressource_id": "vitis/genericquerys/commune", + "id": "datasource_7" + }, + "datasource_8": { + "type": "web_service", + "dataType": "tableValue", + "name": "datasource_8", + "description": "", + "parameters": { + "filter": { + "relation": "AND", + "operators": [] + }, + "schema": "s_extraction", + "table": "ct" + }, + "ressource_id": "vitis/genericquerys", + "id": "datasource_8" + }, + "datasource_9": { + "type": "web_service", + "dataType": "tableValue", + "name": "datasource_9", + "description": "", + "parameters": { + "filter": { + "relation": "AND", + "operators": [] + }, + "schema": "s_extraction", + "table": "commune" + }, + "ressource_id": "vitis/genericquerys", + "id": "datasource_9" + }, + "datasource_10": { + "type": "object", + "dataType": "text", + "name": "datasource_format", + "description": "", + "options": [ + "Vecteur|vector", + "Raster|raster" + ], + "id": "datasource_10" + } + } +} \ No newline at end of file diff --git a/src/module_extraction/module/forms/extraction_depot/extraction_depot_extraction_extraction_depot.js b/src/module_extraction/module/forms/extraction_depot/extraction_depot_extraction_extraction_depot.js new file mode 100755 index 0000000000000000000000000000000000000000..4c00e00a7614a9773a887984e2d98b8b6723bf5e --- /dev/null +++ b/src/module_extraction/module/forms/extraction_depot/extraction_depot_extraction_extraction_depot.js @@ -0,0 +1,254 @@ +/* global angular, goog, vitisApp, bootbox */ + +//bloque les delete du destructeur à éviter +//'use strict'; + +console.info("Generateur_wab_generator_1 loaded --> your functions are ready"); +/*********************************************************************************** + Signaletique_Recap_0 Javascript + ***********************************************************************************/ + +var oFormRequired = { + "sUrl": "", + "scope_": {}, + "toDestructor": [] +}; +/** + * constructor_form + * Fonction appelé à l'initialisation du formulaire si dans la structure json javascript vaut "true" + * @param {type} scope + * @param {type} s_url + * @returns {undefined} + */ +var constructor_form = function (scope, s_url) { + ////////////////////////////////////////////////////////// + //Ne pas toucher + console.log("Constructor"); + + oFormRequired.sUrl = s_url; + oFormRequired.scope_ = scope; + //console.log(scope); + ////////////////////////////////////////////////////////// + // Permet de recharge le javascript d'une section à une autre + var envSrvc = angular.element(vitisApp.appWorkspaceListDrtv).injector().get(["envSrvc"]); + var formSrvc = angular.element(vitisApp.appMainDrtv).injector().get(["formSrvc"]); + var propertiesSrvc = angular.element(vitisApp.appMainDrtv).injector().get(["propertiesSrvc"]); + + /*oFormRequired.toDestructor.push(oFormRequired.scope_.$watch("oFormValues." + oFormRequired.scope_.sFormDefinitionName + ".btn_refresh_treeview", function (value) { + console.log("DJFHVHJCHSJCJH"); + }*/ + + /** + * loadTreeview function. + * Crée le treeview des fichiers du projet fme. + **/ + scope["loadTreeviewDepot"] = function() { + var $log = angular.element(vitisApp.appMainDrtv).injector().get(["$log"]); + // + $log.info("loadTreeviewDepot"); + + // Charge l'arborescence des logs. + ajaxRequest({ + "method": "GET", + "url": propertiesSrvc["web_server_name"] + "/" + propertiesSrvc["services_alias"] + "/extraction/extraction_depots/Tree", + "scope": scope, + "success": function(response) { + if (response["data"]["status"] == 1) { + var aNodes = []; + data = response["data"]["tree"]; + scope["aSelectedWorkspaceFile"] = []; + scope["aTreeviewLogs"] = data; + // Crée l'arborescence dans l'élément. + + for (var i in response["data"]["content"]) { + var aNode = {"text": response["data"]["content"][i]["filename"].split("/").pop(), "nodes": []} + for (var j in response["data"]["content"][i]["content"]) { + aNode["nodes"].push({"text": response["data"]["content"][i]["content"][j]["filename"].split("/").pop(), "tags": response["data"]["content"][i]["content"][j]["lastModification"].split(),}); + } + aNodes.push(aNode); + } + + $("#Element_0_2_1_treeview")["treeview"]({ + "showBorder": false, + "expandIcon": "glyphicon glyphicon-folder-close", + "collapseIcon": "glyphicon glyphicon-folder-open", + "highlightSelected": true, + "multiSelect": false, + "showTags": true, + "data": aNodes + }); + } + } + }); + }; + + scope["deleteFileDepot"] = function () { + var $log = angular.element(vitisApp.appMainDrtv).injector().get(["$log"]); + // + $log.info("deleteFileDepot"); + + var aSelectedNode = $("#Element_0_2_1_treeview")["treeview"]('getSelected') + + if (aSelectedNode.length > 0) + { + var aNodeParent = $("#Element_0_2_1_treeview")["treeview"]('getNode', aSelectedNode[0]["parentId"]); + ajaxRequest({ + "method": "DELETES", + "params": { + "file_name": aNodeParent["text"] + "/" + aSelectedNode[0]["text"] + }, + "url": propertiesSrvc["web_server_name"] + "/" + propertiesSrvc["services_alias"] + "/extraction/extraction_depots", + "scope": scope, + "success": function(response) { + if (response["data"]["status"] == 1) { + } + } + }); + scope["loadTreeviewDepot"](); + } + else + { + var sErrorMessage = "EXTRACTION_DEPOT_DELETE_SELECT_A_FILE"; + var oOptions = { + "className": "modal-danger", + "message": sErrorMessage + }; + //$('#myModal').modal('toggle'); + scope.$root["modalWindow"]("dialog", "EXTRACTION_DEPORT_DELETE_NO_SELECTED", oOptions); + //$('#myModal').modal('hide'); + } + + } + scope["loadTreeviewDepot"](); + + scope["downloadFileDepot"] = function () { + var $log = angular.element(vitisApp.appMainDrtv).injector().get(["$log"]); + // + $log.info("downloadFileDepot"); + + var aSelectedNode = $("#Element_0_2_1_treeview")["treeview"]('getSelected'); + var sFileName = aSelectedNode[0]["text"]; + var aNodeParent = $("#Element_0_2_1_treeview")["treeview"]('getNode', aSelectedNode[0]["parentId"]); + + if (aSelectedNode[0]["parentId"] == "") + { + if (sFileName != "") + { + ajaxRequest({ + "method": "GET", + "url": propertiesSrvc["web_server_name"] + "/" + propertiesSrvc["services_alias"] + "/extraction/extraction_depots/File", + "scope": scope, + "params": { + "file_name": aNodeParent["text"] + "/" + aSelectedNode[0]["text"] + }, + "responseType": 'blob', + "success": function(response) { + if (typeof(window.navigator.msSaveOrOpenBlob) == "undefined") { + // Crée un lien et simule un click dessus. + var link = document.createElement('a'); + link.href = window.URL.createObjectURL(response["data"]); + link.download = sFileName; + link.style.display = 'none'; + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); + } + else { + // Pour Edge et IE. + window.navigator.msSaveOrOpenBlob(response["data"], sFileName); + } + } + }); + } + } + } + //var iMaxUploadFileSize = parseInt(propertiesSrvc["max_upload_file_size"]); + + /** + * beforeProjectDirectory function. + * Traitement avant l'envoi du formulaire de la section "Répertoire Projet" (publication > Projet FME). + */ + angular.element(vitisApp.appMainDrtv).scope()["beforeDepositDirectory"] = function () { + // Injection des services. + var $log = angular.element(vitisApp.appMainDrtv).injector().get(["$log"]); + var $q = angular.element(vitisApp.appHtmlFormDrtv).injector().get(["$q"]); + var envSrvc = angular.element(vitisApp.appMainDrtv).injector().get(["envSrvc"]); + var propertiesSrvc = angular.element(vitisApp.appMainDrtv).injector().get(["propertiesSrvc"]); + // + $log.info("beforeDepositDirectory"); + envSrvc.sMode = "update"; + var scope = this; + var deferred = $q.defer(); + var promise = deferred.promise; + // + var oFile = envSrvc["oFormValues"][envSrvc["sFormDefinitionName"]]["control_file"]; + var iMaxUploadFileSize = parseInt(propertiesSrvc["max_upload_file_size"]); + var sErrorMessage; + + // Vérification du fichier .fmw. + if (typeof (oFile) === "object" && typeof (oFile["aFiles"]) !== "undefined" && oFile["aFiles"].length > 0) { + // Taille maxi du fichier. + if (oFile["aFiles"][0]["size"] > iMaxUploadFileSize) + sErrorMessage = "ERROR_FILE_SIZE_EXTRACTION_LOAD_DEPOSIT_DIRECTORY"; + } + // Validation du formulaire. + if (typeof (sErrorMessage) === "undefined") + deferred.resolve(); + + // Affichage de la fenêtre modale d'erreur. + if (typeof (sErrorMessage) !== "undefined") { + var oOptions = { + "className": "modal-danger", + "message": sErrorMessage + }; + scope.$root["modalWindow"]("dialog", "FORM_VALIDATION_ERROR", oOptions); + } + // + return promise; + }; + + /** + * afterProjectDirectory function. + * Actions à effectuer après l'upload d'un fichier dans le répertoire d'un projet fme. + */ + angular.element(vitisApp.appMainDrtv).scope()["afterDepositDirectory"] = function () { + // Injection des services. + var $log = angular.element(vitisApp.appMainDrtv).injector().get(["$log"]); + // + $log.info("afterDepositDirectory"); + // Remise à zéro du formulaire. + this["resetForm"](); + angular.element("input[type=file]")["fileinput"]("clear"); + // Recharge la liste des fichiers. + this["loadTreeviewDepot"](); + } + // +}; + + +/** + * destructor_form + * Fonction appelé quand on quitte le formulaire nettoie toute les fonctions pour les rendres inutilisable en dehors du formulaire + * @returns {undefined} + */ +var destructor_form = function () { + console.log("Destructor"); + + for (var i = 0; i < oFormRequired.toDestructor.length; i++) { + oFormRequired.toDestructor[i] = undefined; + delete oFormRequired.toDestructor[i]; + } + + //supprimer la balise script du js pour pouvoir le recharger si on reviens sur le formulaire plus tard + angular.element('[src="' + oFormRequired.sUrl + '?version=' + oFormRequired.scope_["oProperties"]["build"] + '"]').remove(); + + oFormRequired = undefined; + delete oFormRequired; + + constructor_form = undefined; + delete constructor_form; + destructor_form = undefined; + delete destructor_form; +}; + +/**********************************************************************************/ \ No newline at end of file diff --git a/src/module_extraction/module/forms/extraction_depot/extraction_depot_extraction_extraction_depot.json b/src/module_extraction/module/forms/extraction_depot/extraction_depot_extraction_extraction_depot.json new file mode 100755 index 0000000000000000000000000000000000000000..6a36d947ec8e590d2577149e2020be105b55b46a --- /dev/null +++ b/src/module_extraction/module/forms/extraction_depot/extraction_depot_extraction_extraction_depot.json @@ -0,0 +1,291 @@ +{ + "search": { + "name": "extraction_deposit_directory_update_form", + "title": "EXTRACTION_DEPOT_TITLE", + "beforeEvent": "beforeDepositDirectory()", + "event": "sendSimpleForm()", + "afterEvent": "afterDepositDirectory()", + "input_size": "xs", + "nb_cols": 12, + "class": "project-directory-upload-form", + "javascript": true, + "rows": [ + { + "fields": [ + { + "type": "treeview", + "name": "FileTreeView", + "label": "", + "required": false, + "pattern": "", + "nb_cols": 12, + "id": "Element_0_2_1", + "options": { + "showBorder": false, + "levels": 0, + "showCheckbox": true, + "expandIcon": "glyphicon glyphicon-folder-close", + "collapseIcon": "glyphicon glyphicon-folder-open", + "highlightSelected": false, + "multiSelect": true, + "data": "", + "dataLoadingEvent": "" + } + } + ] + }, + { + "fields": [ + { + "type": "button", + "class": "btn-ungroup btn-group-xs", + "name": "group-button", + "nb_cols": 12, + "buttons": [ + { + "type": "button", + "name": "btn_download_file", + "glyphicon": "download", + "class": "btn-primary btn-xs", + "event": "downloadFileDepot()", + "tooltip": { + "title": "FORM_DOWNLOAD_FILE_PUBLICATION_WORKSPACE_LOAD_PROJECT_DIRECTORY", + "placement": "bottom", + "trigger": "hover", + "container": "body" + } + }, + { + "type": "button", + "name": "btn_refresh_treeview", + "glyphicon": "refresh", + "class": "btn-primary btn-xs", + "event": "loadTreeviewDepot()", + "tooltip": { + "title": "FORM_RELOAD_DIRECTORY_PUBLICATION_WORKSPACE_LOAD_PROJECT_DIRECTORY", + "placement": "bottom", + "trigger": "hover", + "container": "body" + } + }, + { + "type": "button", + "name": "btn_delete_file", + "glyphicon": "trash", + "class": "btn-primary btn-xs", + "event": "deleteFileDepot()", + "tooltip": { + "title": "FORM_DELETE_FILE_PUBLICATION_WORKSPACE_LOAD_PROJECT_DIRECTORY", + "placement": "bottom", + "trigger": "hover" + } + } + ], + "id": "undefined_1_1" + } + ] + }, + { + "class": "form-field-inline", + "fields": [ + { + "type": "upload", + "name": "control_file", + "label": "EXTRACTION_DEPOT_FILE_UPLOAD", + "nb_cols": 6, + "id": "fmw_file_2_1" + } + ] + }, + { + "fields": [ + { + "type": "button", + "name": "Element_0", + "nb_cols": 12, + "id": "Element_0_5_1", + "class": "btn-ungroup btn-group-sm", + "buttons": [ + { + "type": "submit", + "name": "form_submit", + "label": "EXTRACTION_DEPOT_FILE_UPDATE", + "class": "btn-primary" + } + ] + } + ] + } + ], + "tabs": { + "position": "top", + "list": [ + { + "label": "Tab 0", + "elements": [ + "btn_download_file", + "btn_refresh_treeview", + "btn_delete_file", + "control_file", + "btn_upload_fmw_file", + "FileTreeView", + "Element_0" + ] + } + ] + } + }, + "update": { + "name": "extraction_deposit_directory_update_form", + "title": "EXTRACTION_DEPOT_TITLE", + "beforeEvent": "beforeProjectDirectory()", + "event": "sendSimpleForm()", + "afterEvent": "afterProjectDirectory()", + "input_size": "xs", + "nb_cols": 12, + "class": "project-directory-upload-form", + "rows": [ + { + "fields": [ + { + "type": "treeview", + "name": "FileTreeView", + "label": "", + "required": false, + "pattern": "", + "nb_cols": 12, + "id": "Element_0_2_1", + "options": { + "showBorder": false, + "levels": 0, + "showCheckbox": true, + "expandIcon": "glyphicon glyphicon-folder-close", + "collapseIcon": "glyphicon glyphicon-folder-open", + "highlightSelected": false, + "multiSelect": true, + "data": "", + "dataLoadingEvent": "" + } + } + ] + }, + { + "fields": [ + { + "type": "button", + "class": "btn-ungroup btn-group-xs", + "name": "group-button", + "nb_cols": 12, + "buttons": [ + { + "type": "button", + "name": "btn_download_file", + "glyphicon": "download", + "class": "btn-primary btn-xs", + "event": "downloadFile()", + "tooltip": { + "title": "FORM_DOWNLOAD_FILE_PUBLICATION_WORKSPACE_LOAD_PROJECT_DIRECTORY", + "placement": "bottom", + "trigger": "hover", + "container": "body" + } + }, + { + "type": "button", + "name": "btn_refresh_treeview", + "glyphicon": "refresh", + "class": "btn-primary btn-xs", + "event": "loadTreeviewDepot()", + "tooltip": { + "title": "FORM_RELOAD_DIRECTORY_PUBLICATION_WORKSPACE_LOAD_PROJECT_DIRECTORY", + "placement": "bottom", + "trigger": "hover", + "container": "body" + } + }, + { + "type": "button", + "name": "btn_delete_file", + "glyphicon": "trash", + "class": "btn-primary btn-xs", + "event": "deleteFile()", + "tooltip": { + "title": "FORM_DELETE_FILE_PUBLICATION_WORKSPACE_LOAD_PROJECT_DIRECTORY", + "placement": "bottom", + "trigger": "hover" + } + } + ], + "id": "undefined_1_1" + } + ] + }, + { + "class": "form-field-inline", + "fields": [ + { + "type": "upload", + "name": "control_file", + "label": "EXTRACTION_DEPOT_FILE_UPLOAD", + "nb_cols": 6, + "id": "fmw_file_2_1" + } + ] + }, + { + "fields": [ + { + "type": "button", + "name": "Element_0", + "nb_cols": 12, + "id": "Element_0_5_1", + "class": "btn-ungroup btn-group-sm", + "buttons": [ + { + "type": "submit", + "name": "form_submit", + "label": "FORM_UPLOAD_FILE_DEPOSIT", + "class": "btn-primary" + } + ] + } + ] + } + ], + "tabs": { + "position": "top", + "list": [ + { + "label": "Tab 0", + "elements": [ + "btn_download_file", + "btn_refresh_treeview", + "btn_delete_file", + "control_file", + "btn_upload_fmw_file", + "FileTreeView", + "Element_0" + ] + } + ] + } + }, + "insert": {}, + "display": { + "name": "gtf_workspace_project_directory_display_form", + "title": "EXTRACTION_DEPOT_TITLE", + "input_size": "xs", + "nb_cols": 8, + "rows": [], + "tabs": { + "position": "top", + "list": [ + { + "label": "Tab 0", + "elements": [] + } + ] + } + }, + "datasources": {} +} \ No newline at end of file diff --git a/src/module_extraction/module/forms/extraction_ref/extraction_ref_extraction_coordsys.json b/src/module_extraction/module/forms/extraction_ref/extraction_ref_extraction_coordsys.json new file mode 100755 index 0000000000000000000000000000000000000000..5aa5221df726feb7afc0c8c75288d33a75631585 --- /dev/null +++ b/src/module_extraction/module/forms/extraction_ref/extraction_ref_extraction_coordsys.json @@ -0,0 +1,240 @@ +{ + "display":{ + "name":"extraction_ref_extraction_coordsys-form", + "title":"EXTRACTION_REF_EXTRACTION_COORDSYS_TITLE", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields":[ + { + "type":"label", + "name":"coordsys_id", + "label":"EXTRACTION_REF_EXTRACTION_COORDSYS_FORM_COORDSYS_ID", + "disabled":false, + "required":false, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"label", + "name":"coordsys", + "label":"EXTRACTION_REF_EXTRACTION_COORDSYS_FORM_COORDSYS", + "disabled":false, + "required":false, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"display_button", + "id":"display_button", + "buttons":[ + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ] + }, + "search":{ + "name":"extraction_ref_extraction_coordsys-form", + "title":"EXTRACTION_REF_EXTRACTION_COORDSYS_TITLE", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields":[ + { + "type":"text", + "name":"coordsys", + "label":"EXTRACTION_REF_EXTRACTION_COORDSYS_FORM_COORDSYS", + "disabled":false, + "required":false, + "nb_cols":4 + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-xs", + "nb_cols":12, + "name":"search_button", + "id":"search_button", + "buttons":[ + { + "type":"button", + "name":"search", + "label":"FORM_SEARCH_BUTTON", + "class":"btn-primary", + "event":"setGridFilter()" + }, + { + "type":"reset", + "name":"reset", + "label":"FORM_RESET_BUTTON", + "class":"btn-primary", + "event":"resetGridFilter()" + } + ] + } + ] + } + ] + }, + "insert":{ + "name":"extraction_ref_extraction_coordsys-form", + "title":"EXTRACTION_REF_EXTRACTION_COORDSYS_TITLE_INSERT", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields":[ + { + "type":"text", + "name":"coordsys_id", + "label":"EXTRACTION_REF_EXTRACTION_COORDSYS_FORM_COORDSYS_ID", + "disabled":false, + "required":true, + "nb_cols":12, + "id":"coordsys_id_1_1" + } + ] + }, + { + "fields":[ + { + "type":"text", + "name":"coordsys", + "label":"EXTRACTION_REF_EXTRACTION_COORDSYS_FORM_COORDSYS", + "disabled":false, + "required":false, + "nb_cols":12, + "id":"coordsys_2_1" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"insert_button", + "id":"insert_button", + "buttons":[ + { + "type":"submit", + "name":"form_submit", + "label":"FORM_CREATE", + "class":"btn-primary" + }, + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "event":"sendSimpleForm()", + "afterEvent":"editSectionForm()", + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "coordsys_id", + "coordsys", + "insert_button" + ] + } + ] + } + }, + "update":{ + "name":"extraction_ref_extraction_coordsys-form", + "title":"EXTRACTION_REF_EXTRACTION_COORDSYS_TITLE", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields":[ + { + "type":"text", + "name":"coordsys_id", + "label":"EXTRACTION_REF_EXTRACTION_COORDSYS_FORM_COORDSYS_ID", + "disabled":false, + "required":true, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"text", + "name":"coordsys", + "label":"EXTRACTION_REF_EXTRACTION_COORDSYS_FORM_COORDSYS", + "disabled":false, + "required":false, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"update_button", + "id":"update_button", + "buttons":[ + { + "type":"submit", + "name":"form_submit", + "label":"FORM_UPDATE", + "class":"btn-primary" + }, + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "event":"sendSimpleForm()", + "afterEvent":"editSectionForm()" + } +} \ No newline at end of file diff --git a/src/module_extraction/module/forms/extraction_ref/extraction_ref_extraction_format.json b/src/module_extraction/module/forms/extraction_ref/extraction_ref_extraction_format.json new file mode 100755 index 0000000000000000000000000000000000000000..115f79f1a2f83c0ddb5d0dcba014275b6f057f5d --- /dev/null +++ b/src/module_extraction/module/forms/extraction_ref/extraction_ref_extraction_format.json @@ -0,0 +1,393 @@ +{ + "display":{ + "name":"extraction_ref_extraction_format-form", + "title":"EXTRACTION_REF_EXTRACTION_FORMAT_TITLE", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields":[ + { + "type":"label", + "name":"format_id", + "label":"EXTRACTION_REF_EXTRACTION_FORMAT_FORM_FORMAT_ID", + "disabled":false, + "required":false, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"label", + "name":"format", + "label":"EXTRACTION_REF_EXTRACTION_FORMAT_FORM_FORMAT", + "disabled":false, + "required":false, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"label", + "options":{ + "choices":[ + { + "label":"oui", + "value":true + }, + { + "label":"non", + "value":false + } + ] + }, + "name":"use_for_raster", + "label":"EXTRACTION_REF_EXTRACTION_FORMAT_FORM_USE_FOR_RASTER", + "disabled":false, + "required":false, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"label", + "options":{ + "choices":[ + { + "label":"oui", + "value":true + }, + { + "label":"non", + "value":false + } + ] + }, + "name":"use_for_vector", + "label":"EXTRACTION_REF_EXTRACTION_FORMAT_FORM_USE_FOR_VECTOR", + "disabled":false, + "required":false, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"display_button", + "id":"display_button", + "buttons":[ + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ] + }, + "search":{ + "name":"extraction_ref_extraction_format-form", + "title":"EXTRACTION_REF_EXTRACTION_FORMAT_TITLE", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields":[ + { + "type":"text", + "name":"format", + "label":"EXTRACTION_REF_EXTRACTION_FORMAT_FORM_FORMAT", + "disabled":false, + "required":false, + "nb_cols":4, + "id":"format_2_1" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-xs", + "nb_cols":12, + "name":"search_button", + "id":"search_button", + "buttons":[ + { + "type":"button", + "name":"search", + "label":"FORM_SEARCH_BUTTON", + "class":"btn-primary", + "event":"setGridFilter()" + }, + { + "type":"reset", + "name":"reset", + "label":"FORM_RESET_BUTTON", + "class":"btn-primary", + "event":"resetGridFilter()" + } + ] + } + ] + } + ] + }, + "insert":{ + "name":"extraction_ref_extraction_format-form", + "title":"EXTRACTION_REF_EXTRACTION_FORMAT_TITLE_INSERT", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields":[ + { + "type":"text", + "name":"format_id", + "label":"EXTRACTION_REF_EXTRACTION_FORMAT_FORM_FORMAT_ID", + "disabled":false, + "required":true, + "nb_cols":12, + "id":"format_id_1_1" + } + ] + }, + { + "fields":[ + { + "type":"text", + "name":"format", + "label":"EXTRACTION_REF_EXTRACTION_FORMAT_FORM_FORMAT", + "disabled":false, + "required":false, + "nb_cols":12, + "id":"format_2_1" + } + ] + }, + { + "fields":[ + { + "type":"radio", + "options":{ + "choices":[ + { + "label":"oui", + "value":true, + "$$hashKey":"object:1221" + }, + { + "label":"non", + "value":false, + "$$hashKey":"object:1222" + } + ] + }, + "name":"use_for_raster", + "label":"EXTRACTION_REF_EXTRACTION_FORMAT_FORM_USE_FOR_RASTER", + "disabled":false, + "required":false, + "nb_cols":12, + "id":"use_for_raster_3_1" + } + ] + }, + { + "fields":[ + { + "type":"radio", + "options":{ + "choices":[ + { + "label":"oui", + "value":true, + "$$hashKey":"object:1234" + }, + { + "label":"non", + "value":false, + "$$hashKey":"object:1235" + } + ] + }, + "name":"use_for_vector", + "label":"EXTRACTION_REF_EXTRACTION_FORMAT_FORM_USE_FOR_VECTOR", + "disabled":false, + "required":false, + "nb_cols":12, + "id":"use_for_vector_4_1" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"insert_button", + "id":"insert_button", + "buttons":[ + { + "type":"submit", + "name":"form_submit", + "label":"FORM_CREATE", + "class":"btn-primary" + }, + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "event":"sendSimpleForm()", + "afterEvent":"editSectionForm()", + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "format_id", + "format", + "use_for_raster", + "use_for_vector", + "insert_button" + ] + } + ] + } + }, + "update":{ + "name":"extraction_ref_extraction_format-form", + "title":"EXTRACTION_REF_EXTRACTION_FORMAT_TITLE", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields":[ + { + "type":"text", + "name":"format_id", + "label":"EXTRACTION_REF_EXTRACTION_FORMAT_FORM_FORMAT_ID", + "disabled":false, + "required":true, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"text", + "name":"format", + "label":"EXTRACTION_REF_EXTRACTION_FORMAT_FORM_FORMAT", + "disabled":false, + "required":false, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"radio", + "options":{ + "choices":[ + { + "label":"oui", + "value":true + }, + { + "label":"non", + "value":false + } + ] + }, + "name":"use_for_raster", + "label":"EXTRACTION_REF_EXTRACTION_FORMAT_FORM_USE_FOR_RASTER", + "disabled":false, + "required":false, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"radio", + "options":{ + "choices":[ + { + "label":"oui", + "value":true + }, + { + "label":"non", + "value":false + } + ] + }, + "name":"use_for_vector", + "label":"EXTRACTION_REF_EXTRACTION_FORMAT_FORM_USE_FOR_VECTOR", + "disabled":false, + "required":false, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"update_button", + "id":"update_button", + "buttons":[ + { + "type":"submit", + "name":"form_submit", + "label":"FORM_UPDATE", + "class":"btn-primary" + }, + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "event":"sendSimpleForm()", + "afterEvent":"editSectionForm()" + } +} \ No newline at end of file diff --git a/src/module_extraction/module/forms/extraction_ref/extraction_ref_extraction_layer.json b/src/module_extraction/module/forms/extraction_ref/extraction_ref_extraction_layer.json new file mode 100755 index 0000000000000000000000000000000000000000..0a47f292c15a1c2a35c13876c06025118848f201 --- /dev/null +++ b/src/module_extraction/module/forms/extraction_ref/extraction_ref_extraction_layer.json @@ -0,0 +1,355 @@ +{ + "display":{ + "name":"extraction_ref_extraction_layer-form", + "title":"EXTRACTION_REF_EXTRACTION_LAYER_TITLE", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields":[ + { + "type":"label", + "name":"layer_id", + "label":"EXTRACTION_REF_EXTRACTION_LAYER_FORM_LAYER_ID", + "disabled":false, + "required":false, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"label", + "name":"layer", + "label":"EXTRACTION_REF_EXTRACTION_LAYER_FORM_LAYER", + "disabled":false, + "required":false, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"label", + "name":"category", + "label":"EXTRACTION_REF_EXTRACTION_LAYER_FORM_CATEGORY", + "disabled":false, + "required":false, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"label", + "name":"restriction", + "label":"EXTRACTION_REF_EXTRACTION_LAYER_FORM_RESTRICTION", + "disabled":false, + "required":false, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"label", + "name":"unused_attributes", + "label":"EXTRACTION_REF_EXTRACTION_LAYER_FORM_UNUSED_ATTRIBUTES", + "disabled":false, + "required":false, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"display_button", + "id":"display_button", + "buttons":[ + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ] + }, + "search":{ + "name":"extraction_ref_extraction_layer-form", + "title":"EXTRACTION_REF_EXTRACTION_LAYER_TITLE", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields":[ + { + "type":"text", + "name":"layer", + "label":"EXTRACTION_REF_EXTRACTION_LAYER_FORM_LAYER", + "disabled":false, + "required":false, + "nb_cols":4, + "id":"layer_2_1" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-xs", + "nb_cols":12, + "name":"search_button", + "id":"search_button", + "buttons":[ + { + "type":"button", + "name":"search", + "label":"FORM_SEARCH_BUTTON", + "class":"btn-primary", + "event":"setGridFilter()" + }, + { + "type":"reset", + "name":"reset", + "label":"FORM_RESET_BUTTON", + "class":"btn-primary", + "event":"resetGridFilter()" + } + ] + } + ] + } + ] + }, + "insert":{ + "name":"extraction_ref_extraction_layer-form", + "title":"EXTRACTION_REF_EXTRACTION_LAYER_TITLE_INSERT", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields":[ + { + "type":"text", + "name":"layer_id", + "label":"EXTRACTION_REF_EXTRACTION_LAYER_FORM_LAYER_ID", + "disabled":false, + "required":true, + "nb_cols":12, + "id":"layer_id_1_1" + } + ] + }, + { + "fields":[ + { + "type":"text", + "name":"layer", + "label":"EXTRACTION_REF_EXTRACTION_LAYER_FORM_LAYER", + "disabled":false, + "required":false, + "nb_cols":12, + "id":"layer_2_1" + } + ] + }, + { + "fields":[ + { + "type":"text", + "name":"category", + "label":"EXTRACTION_REF_EXTRACTION_LAYER_FORM_CATEGORY", + "disabled":false, + "required":false, + "nb_cols":12, + "id":"category_3_1" + } + ] + }, + { + "fields":[ + { + "type":"text", + "name":"restriction", + "label":"EXTRACTION_REF_EXTRACTION_LAYER_FORM_RESTRICTION", + "disabled":false, + "required":false, + "nb_cols":12, + "id":"restriction_4_1" + } + ] + }, + { + "fields":[ + { + "type":"text", + "name":"unused_attributes", + "label":"EXTRACTION_REF_EXTRACTION_LAYER_FORM_UNUSED_ATTRIBUTES", + "disabled":false, + "required":false, + "nb_cols":12, + "id":"unused_attributes_5_1" + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"insert_button", + "id":"insert_button", + "buttons":[ + { + "type":"submit", + "name":"form_submit", + "label":"FORM_CREATE", + "class":"btn-primary" + }, + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "event":"sendSimpleForm()", + "afterEvent":"editSectionForm()", + "tabs":{ + "position":"top", + "list":[ + { + "label":"Tab 0", + "elements":[ + "layer_id", + "layer", + "category", + "restriction", + "unused_attributes", + "insert_button" + ] + } + ] + } + }, + "update":{ + "name":"extraction_ref_extraction_layer-form", + "title":"EXTRACTION_REF_EXTRACTION_LAYER_TITLE", + "input_size":"xxs", + "nb_cols":12, + "javascript":false, + "rows":[ + { + "fields":[ + { + "type":"text", + "name":"layer_id", + "label":"EXTRACTION_REF_EXTRACTION_LAYER_FORM_LAYER_ID", + "disabled":false, + "required":true, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"text", + "name":"layer", + "label":"EXTRACTION_REF_EXTRACTION_LAYER_FORM_LAYER", + "disabled":false, + "required":false, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"text", + "name":"category", + "label":"EXTRACTION_REF_EXTRACTION_LAYER_FORM_CATEGORY", + "disabled":false, + "required":false, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"text", + "name":"restriction", + "label":"EXTRACTION_REF_EXTRACTION_LAYER_FORM_RESTRICTION", + "disabled":false, + "required":false, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"text", + "name":"unused_attributes", + "label":"EXTRACTION_REF_EXTRACTION_LAYER_FORM_UNUSED_ATTRIBUTES", + "disabled":false, + "required":false, + "nb_cols":12 + } + ] + }, + { + "fields":[ + { + "type":"button", + "class":"btn-ungroup btn-group-sm", + "nb_cols":12, + "name":"update_button", + "id":"update_button", + "buttons":[ + { + "type":"submit", + "name":"form_submit", + "label":"FORM_UPDATE", + "class":"btn-primary" + }, + { + "type":"button", + "name":"return_list", + "label":"FORM_RETURN_LIST", + "class":"btn-primary", + "event":"setMode(\"search\")" + } + ] + } + ] + } + ], + "event":"sendSimpleForm()", + "afterEvent":"editSectionForm()" + } +} \ No newline at end of file diff --git a/src/module_extraction/module/forms/login/sign_up.json b/src/module_extraction/module/forms/login/sign_up.json new file mode 100755 index 0000000000000000000000000000000000000000..cc5bc1e559d8233dcbc5c1f679e74a23ba834094 --- /dev/null +++ b/src/module_extraction/module/forms/login/sign_up.json @@ -0,0 +1,230 @@ +{ + "search": { + "name": "login_form", + "input_size": "xs", + "event": "sendInscriptionRequest()", + "rows": [ + { + "fields": [ + { + "type": "text", + "name": "username", + "label": "SIGNUPUSERNAME", + "required": true, + "pattern": "^([a-zA-Z_0-9])+", + "nb_cols": 12, + "id": "Element_0_2_1" + } + ] + }, + { + "fields": [ + { + "type": "password", + "name": "password", + "label": "SIGNUPPASSWORD", + "required": true, + "pattern": "", + "nb_cols": 12, + "id": "Element_0_4_1" + } + ] + }, + { + "fields": [ + { + "type": "password", + "name": "signuppasswordconfirmation", + "label": "SIGNUPPASSWORDCONFIRMATION", + "required": true, + "pattern": "", + "nb_cols": 12, + "id": "Element_0_4_1" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "company", + "label": "SIGNUPORGANIZATION", + "required": true, + "pattern": "", + "nb_cols": 12, + "id": "Element_3_4_1", + "id_from": "Element_3_4_1_from" + } + ] + }, + { + "fields": [ + { + "type": "email", + "name": "mail", + "label": "SIGNUPMAIL", + "required": true, + "pattern": "^(([a-zA-Z]|[0-9])|([-]|[_]|[.]))+[@](([a-zA-Z]|[0-9])|([-]|[_]|[.])){2,63}[.](([a-zA-Z0-9]){2,63})+$", + "nb_cols": 12, + "id": "Element_2_3_1" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "phone", + "label": "SIGN_UP_PHONE", + "required": false, + "pattern": "^(\\+[0-9]{1,3})?([0-9]{8,15})$", + "nb_cols": 12, + "id": "Element_0_5_1" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "public_ip", + "label": "SIGN_UP_PUBLIC_IP", + "required": false, + "pattern": "^([0-9]{3}.[0-9]{3}.[0-9]{3})((/[0-9]+)?)$", + "nb_cols": 12, + "id": "Element_0_6_1" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "demandeur", + "label": "SIGN_UP_DEMANDEUR", + "required": false, + "pattern": "", + "nb_cols": 12, + "id": "Element_0_8_1" + } + ] + }, + { + "fields": [ + { + "type": "email", + "name": "mail_demandeur", + "label": "SIGN_UP_MAIL_DEMANDEUR", + "required": false, + "pattern": "^(([a-zA-Z]|[0-9])|([-]|[_]|[.]))+[@](([a-zA-Z]|[0-9])|([-]|[_]|[.])){2,63}[.](([a-zA-Z0-9]){2,63})+$", + "nb_cols": 12, + "id": "Element_0_9_1" + } + ] + }, + { + "fields": [ + { + "type": "text", + "name": "study_object", + "label": "SIGN_UP_STUDY_OBJECT", + "required": false, + "pattern": "", + "nb_cols": 12, + "id": "Element_0_7_1" + } + ] + }, + { + "fields": [ + { + "type": "date", + "name": "start_date", + "label": "SIGN_UP_START_DATE", + "nb_cols": 6, + "id": "Element_0_10_1" + }, + { + "type": "date", + "name": "end_date", + "label": "SIGN_UP_END_DATE", + "nb_cols": 6, + "id": "Element_0_10_1" + } + ] + }, + { + "fields": [ + { + "type": "checkbox", + "name": "signupcgu", + "label": "ACCEPT_CGU", + "required": true, + "nb_cols": 12, + "id": "Element_5_5_1" + } + ] + }, + { + "fields": [ + { + "type": "captcha", + "nb_cols": 12, + "name": "captcha", + "class": "center", + "id": "captcha", + "key": "6LdWLR8UAAAAAExA8zTXKFIsIwhacAJw1tdpuFw1" + } + ] + }, + { + "fields": [ + { + "type": "button", + "name": "btn_signup", + "nb_cols": 12, + "id": "Element_42_5_1", + "class": "btn-ungroup btn-group-sm login-connect-btn", + "buttons": [ + { + "type": "submit", + "name": "form_signup", + "label": "SIGNUP_BUTTON", + "class": "btn-primary" + } + ] + } + ] + } + ], + "tabs": { + "position": "top", + "list": [ + { + "label": "Tab 0", + "elements": [ + "username", + "password", + "signuppasswordconfirmation", + "mail", + "company", + "signupcgu", + "captcha", + "btn_signup", + "phone", + "public_ip", + "study_object", + "end_date", + "start_date", + "demandeur", + "mail_demandeur" + ] + } + ] + } + }, + "update": {}, + "insert": {}, + "display": {}, + "datasources": {} +} \ No newline at end of file diff --git a/src/module_extraction/module/javascript/script_module.js b/src/module_extraction/module/javascript/script_module.js new file mode 100755 index 0000000000000000000000000000000000000000..a654272f62d1fee6fbf8fd5b4f47e43f6e660011 --- /dev/null +++ b/src/module_extraction/module/javascript/script_module.js @@ -0,0 +1,391 @@ +/* global vitisApp, goog, angular, bootbox, oVFB */ + +'use strict'; +goog.provide('extraction.script_module'); +vitisApp.on('appMainDrtvLoaded', function () { + /** + * setWabStatusMethod function. + * Définition de la méthode de transition. + * @param {string} sMethodName Nom de la méthode wab. + **/ + angular.element(vitisApp.appMainDrtv).scope()["setWabStatusMethod"] = function (sMethodName) { + // Injection des services. + var $log = angular.element(vitisApp.appMainDrtv).injector().get(["$log"]); + //var $rootScope = angular.element(vitisApp.appMainDrtv).injector().get(["$rootScope"]); + var envSrvc = angular.element(vitisApp.appMainDrtv).injector().get(["envSrvc"]); + // + $log.info("setWabStatusMethod", sMethodName); + envSrvc["oFormValues"][envSrvc["sFormDefinitionName"]]["tr_status_method"] = sMethodName; + // Envoi le formulaire. + if (envSrvc["sMode"] != "display") { + var sFormElementName = envSrvc["oFormDefinition"][envSrvc["sFormDefinitionName"]]["name"]; + var formScope = angular.element("form[name='" + sFormElementName + "']").scope(); + if (envSrvc["sMode"] == "update") + formScope["sendForm"](); + } + }; + + /** + * initExtractionExtractionForm function. + * Traitements avant l'affichage du formulaire de l'onglet "Extraction". + **/ + angular.element(vitisApp.appMainDrtv).scope()["initExtractionExtractionForm"] = function () { + // Injection des services. + var $log = angular.element(vitisApp.appMainDrtv).injector().get(["$log"]); + var $rootScope = angular.element(vitisApp.appMainDrtv).injector().get(["$rootScope"]); + var envSrvc = angular.element(vitisApp.appMainDrtv).injector().get(["envSrvc"]); + var formSrvc = angular.element(vitisApp.appMainDrtv).injector().get(["formSrvc"]); + // + $log.info("initExtractionExtractionForm"); + var oFormValues = envSrvc["oFormValues"][envSrvc["sFormDefinitionName"]]; + var oElemDef; + // Affiche le champ de form. correspondant au type de méthode choisie. + var aExtentMethod = ["id_com", "id_conseil", "extent"]; + for (var i in aExtentMethod) { + var oElemDef = formSrvc["getFormElementDefinition"](aExtentMethod[i], envSrvc["sFormDefinitionName"], envSrvc["oFormDefinition"]); + if (oFormValues["extent_method"] == aExtentMethod[i]) + oElemDef["visible"] = true; + else + oElemDef["visible"] = false; + } + // Libellé des champs "Commune" et "Bassin de vie". + if (envSrvc["sMode"] == "display") { + oFormValues["id_com"] = oFormValues["id_com_label"]; + oFormValues["id_conseil"] = oFormValues["id_conseil_label"]; + } + // Attends la fin du chargement de tous les champs du formulaire. + var clearListener = $rootScope.$on('formExtracted', function (event, sFormDefinitionName) { + // Supprime le "listener". + clearListener(); + // Evènement sur le <select> "méthode choisie" : affiche le champ de form. correspondant au choix. + var oExtentMethod = formSrvc["getFormElementDefinition"]("extent_method", envSrvc["sFormDefinitionName"], envSrvc["oFormDefinition"]); + if (oExtentMethod["type"] == "select" && document.getElementById(oExtentMethod["id"]) != null) { + document.getElementById(oExtentMethod["id"]).addEventListener("change", function () { + for (var i in aExtentMethod) { + var oElemDef = formSrvc["getFormElementDefinition"](aExtentMethod[i], envSrvc["sFormDefinitionName"], envSrvc["oFormDefinition"]); + if (this.value == aExtentMethod[i]) + oElemDef["visible"] = true; + else + oElemDef["visible"] = false; + } + var formScope = angular.element("form[name='" + envSrvc["oFormDefinition"][envSrvc["sFormDefinitionName"]]["name"]).scope(); + formScope.$apply(); + }); + } + }); + }; + + /** + * getExtractionLayersTree function. + * Retourne l'arborescence pour le champ treeview "layers". + **/ + angular.element(vitisApp.appMainDrtv).scope()["getExtractionLayersTree"] = function () { + // Injection des services. + var $log = angular.element(vitisApp.appMainDrtv).injector().get(["$log"]); + var envSrvc = angular.element(vitisApp.appMainDrtv).injector().get(["envSrvc"]); + var propertiesSrvc = angular.element(vitisApp.appMainDrtv).injector().get(["propertiesSrvc"]); + var $q = angular.element(vitisApp.appHtmlFormDrtv).injector().get(["$q"]); + // + $log.info("getExtractionLayersTree"); + var deferred = $q.defer(); + var promise = deferred.promise; + // Charge la liste des couches. + ajaxRequest({ + "method": "GET", + "url": propertiesSrvc["web_server_name"] + "/" + propertiesSrvc["services_alias"] + "/extraction/extractions/Layers", + "scope": angular.element("form[name='" + envSrvc["oFormDefinition"][envSrvc["sFormDefinitionName"]]["name"] + "']").scope(), + "success": function(response) { + if (response["data"]["status"] == 1) { + // Création de l'arborescence des couches pour le champ "treeview". + var aLayers = response["data"]["layers"]; + var aNodes = []; + var stats = true; + if (typeof(aLayers) != "undefined") { + var aCategories = Object.keys(aLayers); + for (var i in aCategories) { + var aNode = {"text": aCategories[i], "nodes": []} + for (var j in aLayers[aCategories[i]]) { + if (aLayers[aCategories[i]][j]["statistique"] !== true) + { + stats = false; + aNode["nodes"].push({"text": aLayers[aCategories[i]][j]["text"], "value": aLayers[aCategories[i]][j]["value"], "mutualized": aLayers[aCategories[i]][j]["mutualized"]}); + } + } + if (stats !== true) + { + aNodes.push(aNode); + } + stats = true; + } + } + + this["setTreeviewNodesState"] = function (aNodes) { + for (var i in aNodes) { + if (typeof (aNodes[i]["nodes"]) != "undefined") + { + this["setTreeviewNodesState"](aNodes[i]["nodes"]); + } + else { + //Si la couche est mutualisée + if (aNodes[i]['mutualized'] == true) + { + aNodes[i]["color"] = propertiesSrvc["color_mutualized"]; + } else if (aNodes[i]['mutualized'] == false) { + aNodes[i]["color"] = propertiesSrvc["color_no_mutualized"]; + } + } + } + } + this["setTreeviewNodesState"](aNodes); + + deferred.resolve(aNodes); + } else { + // + var oOptions = { + "className": "modal-danger" + }; + // Message d'erreur ? + if (response["data"]["errorMessage"] != null) + oOptions["message"] = response["data"]["errorMessage"]; + scope.$root["modalWindow"]("alert", "REQUEST_ERROR", oOptions); + } + } + }); + return promise; + }; + + + /** + * getExtractionLayersTree function. + * Retourne l'arborescence pour le champ treeview "layers". + **/ + angular.element(vitisApp.appMainDrtv).scope()["getExtractionStatsTree"] = function () { + // Injection des services. + var $log = angular.element(vitisApp.appMainDrtv).injector().get(["$log"]); + var envSrvc = angular.element(vitisApp.appMainDrtv).injector().get(["envSrvc"]); + var propertiesSrvc = angular.element(vitisApp.appMainDrtv).injector().get(["propertiesSrvc"]); + var $q = angular.element(vitisApp.appHtmlFormDrtv).injector().get(["$q"]); + // + $log.info("getExtractionStatsTree"); + var deferred = $q.defer(); + var promise = deferred.promise; + // Charge la liste des couches. + ajaxRequest({ + "method": "GET", + "url": propertiesSrvc["web_server_name"] + "/" + propertiesSrvc["services_alias"] + "/extraction/extractions/Layers", + "scope": angular.element("form[name='" + envSrvc["oFormDefinition"][envSrvc["sFormDefinitionName"]]["name"] + "']").scope(), + "success": function(response) { + if (response["data"]["status"] == 1) { + // Création de l'arborescence des couches pour le champ "treeview". + var aLayers = response["data"]["layers"]; + var aNodes = []; + var stats = false; + if (typeof(aLayers) != "undefined") { + var aCategories = Object.keys(aLayers); + for (var i in aCategories) { + var aNode = {"text": aCategories[i], "nodes": []} + for (var j in aLayers[aCategories[i]]) { + if (aLayers[aCategories[i]][j]["statistique"] === true) + { + stats = true; + aNode["nodes"].push({"text": aLayers[aCategories[i]][j]["text"], "value": aLayers[aCategories[i]][j]["value"], "mutualized": aLayers[aCategories[i]][j]["mutualized"]}); + } + } + if (stats === true) + { + aNodes.push(aNode); + } + stats = false; + } + } + + this["setTreeviewNodesState"] = function (aNodes) { + for (var i in aNodes) { + if (typeof (aNodes[i]["nodes"]) != "undefined") + { + this["setTreeviewNodesState"](aNodes[i]["nodes"]); + } + else { + //Si la couche est mutualisée + if (aNodes[i]['mutualized'] == true) + { + aNodes[i]["color"] = propertiesSrvc["color_mutualized"]; + } else if (aNodes[i]['mutualized'] == false) { + aNodes[i]["color"] = propertiesSrvc["color_no_mutualized"]; + } + } + } + } + this["setTreeviewNodesState"](aNodes); + + deferred.resolve(aNodes); + } else { + // + var oOptions = { + "className": "modal-danger" + }; + // Message d'erreur ? + if (response["data"]["errorMessage"] != null) + oOptions["message"] = response["data"]["errorMessage"]; + scope.$root["modalWindow"]("alert", "REQUEST_ERROR", oOptions); + } + } + }); + return promise; + }; + + /** + * appExtractionLayersColumn directive. + * Mise en forme de la colonne "layers" dans la liste de l'onglet "Extraction". + * @param {service} $translate Translate service. + * @ngInject + **/ + vitisApp.appExtractionLayersColumnDrtv = function ($translate) { + return { + link: function (scope, element, attrs) { + // 1er affichage ou tri de la liste : maj de la mise en forme. + var clearObserver = attrs.$observe("appExtractionLayersColumn", function (value) { + // Si le champ est vide : supprime l'icône. + if (scope["row"]["entity"][scope["col"]["field"]] == null || scope["row"]["entity"][scope["col"]["field"]] == "") + element[0].className = ""; + else { + // Classes css (ui-grid + spécifiques). + element[0].className = "ui-grid-cell-contents info-icon"; + // Traduction du titre et du contenu. + $translate(["EXTRACTION_REF_EXTRACTION_LAYER_LAYERS_TOOLTIP_TITLE"]).then(function (translations) { + // Création du "tooltip". + $(element)["popover"]({ + "trigger": "hover", + "container": "body", + "title": function () { + return translations["EXTRACTION_REF_EXTRACTION_LAYER_LAYERS_TOOLTIP_TITLE"]; + }, + "content": function () { + var sValue = scope["row"]["entity"][scope["col"]["field"]]; + return sValue.replace(/\|/g, "<br>"); + }, + // Placement du tooltip à gauche ou à droite suivant la position horizontale de l'élément. + "placement": function (oPopoverNode, oElementNode) { + return scope.$root["workspaceTooltipPlacement"](oElementNode); + }, + "html": true + }); + }); + } + }); + // Attends la suppression du scope. + scope.$on("$destroy", function () { + // Supprime le tooltip. + $(element)["popover"]("destroy"); + // Supprime l'observateur. + clearObserver(); + }); + } + } + }; + vitisApp["compileProvider"].directive('appExtractionLayersColumn', vitisApp.appExtractionLayersColumnDrtv); + + /** + * appExtractionRefUnusedAttributesColumn directive. + * Mise en forme de la colonne "unused_attributes" dans la liste de l'onglet "Extraction". + * @param {service} $translate Translate service. + * @ngInject + **/ + vitisApp.appExtractionRefUnusedAttributesColumnDrtv = function ($translate) { + return { + link: function (scope, element, attrs) { + // 1er affichage ou tri de la liste : maj de la mise en forme. + var clearObserver = attrs.$observe("appExtractionRefUnusedAttributesColumn", function (value) { + // Si le champ est vide : supprime l'icône. + if (scope["row"]["entity"][scope["col"]["field"]] == null || scope["row"]["entity"][scope["col"]["field"]] == "") + element[0].className = ""; + else { + // Classes css (ui-grid + spécifiques). + element[0].className = "ui-grid-cell-contents info-icon"; + // Traduction du titre et du contenu. + $translate(["EXTRACTION_REF_EXTRACTION_LAYER_UNUSED_ATTRIBUTES_TOOLTIP_TITLE"]).then(function (translations) { + // Création du "tooltip". + $(element)["popover"]({ + "trigger": "hover", + "container": "body", + "title": function () { + return translations["EXTRACTION_REF_EXTRACTION_LAYER_UNUSED_ATTRIBUTES_TOOLTIP_TITLE"]; + }, + "content": function () { + var sValue = scope["row"]["entity"][scope["col"]["field"]]; + return sValue.replace(/;/g, "<br>"); + }, + // Placement du tooltip à gauche ou à droite suivant la position horizontale de l'élément. + "placement": function (oPopoverNode, oElementNode) { + return scope.$root["workspaceTooltipPlacement"](oElementNode); + }, + "html": true + }); + }); + } + }); + // Attends la suppression du scope. + scope.$on("$destroy", function () { + // Supprime le tooltip. + $(element)["popover"]("destroy"); + // Supprime l'observateur. + clearObserver(); + }); + } + } + }; + vitisApp["compileProvider"].directive('appExtractionRefUnusedAttributesColumn', vitisApp.appExtractionRefUnusedAttributesColumnDrtv); + + angular.element(vitisApp.appMainDrtv).scope()["showModalSignUp"] = function () { + $("#modal_sign_up").modal('open'); + + var oFormValues = {}; + oFormValues["search"] = {}; + ajaxRequest({ + 'method': 'GET', + 'url': propertiesSrvc["web_server_name"] + '/' + propertiesSrvc["application"] + "/modules/extraction/forms/sign_up.json", + 'success': function (response) { + hideAjaxLoader(); + + var oFormReaderScope = angular.element($("#modal_sign_up_form_container").children()).scope(); + oFormReaderScope.$evalAsync(function () { + oFormReaderScope['ctrl']['setDefinitionName']("search"); + oFormReaderScope['ctrl']['setFormValues'](oFormValues); + oFormReaderScope['ctrl']['setFormDefinition'](response["data"]); + oFormReaderScope['ctrl']['loadForm'](); + }); + + $this.$timeout_(function () { + //Materialize.updateTextFields(); + $(".checkbox").removeClass("checkbox checkbox-margin"); + + //$this.cssSelectFormDefinitionListener(oFormReaderScope); + }, 100); + }, + 'error': function (response) { + hideAjaxLoader(); + console.error("ERROR"); + } + }); + }; +}); + +vitisApp.on('appInitCtrlLoaded', function () { + var $rootScope = angular.element(vitisApp.appMainDrtv).injector().get(["$rootScope"]); + var envSrvc = angular.element(vitisApp.appMainDrtv).injector().get(["envSrvc"]); + var $translatePartialLoader = angular.element(vitisApp.appMainDrtv).injector().get(["$translatePartialLoader"]); + var $translate = angular.element(vitisApp.appMainDrtv).injector().get(["$translate"]); + // Chargement du template de login et des formulaires spécifiques à Extraction. + //envSrvc["sLoginTemplate"] = "modules/calimap/templates/loginTpl.html"; + //envSrvc["sLoginForm"] = "modules/extraction/forms/extraction/login.json"; + //envSrvc["sForgottenPasswordForm"] = "modules/calimap/forms/login/forgotten_password.json"; + envSrvc["sSignUpForm"] = "modules/extraction/forms/login/sign_up.json"; + // Chargement du fichier less pour le login. + //loadExternalCss(["modules/calimap/less/login.less"]); + // Chargement des fichiers de langues du module. + var clearListener = $rootScope.$on('endFormNgRepeat', function (event) { + clearListener(); + $translatePartialLoader["addPart"]("modules/extraction/lang"); + $translate["refresh"](); + }); +}); \ No newline at end of file diff --git a/src/module_extraction/module/lang/lang-en.json b/src/module_extraction/module/lang/lang-en.json new file mode 100755 index 0000000000000000000000000000000000000000..de3d253d26b49e3f25fd4bb66b0425d87bcb3a5c --- /dev/null +++ b/src/module_extraction/module/lang/lang-en.json @@ -0,0 +1,111 @@ +{ + "TEXT_MODE_EXTRACTION" : "Gestion des extractions", + "TITLE_MODE_EXTRACTION" : "Extraction", + "TEXT_MODE_EXTRACTION_REF" : "Gestion références des extractions", + "TITLE_MODE_EXTRACTION_REF" : "extraction_ref", + "EXTRACTION_EXTRACTION_EXTRACTION_TITLE" : "Extraction", + "EXTRACTION_EXTRACTION_EXTRACTION_TITLE_INSERT" : "Extraction", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_BO_ID" : "Id métier", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_STATUS" : "Etat", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_CREATION_DATE" : "Date de création", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_REQUESTOR" : "Demandeur", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_AE" : "Acte d'engagement", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_EXTENT" : "Etendue", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_COMPANY" : "Organisme", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_LAYERS" : "Couches", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_STATISTIQUE" : "Données statistiques", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_VECTOR_FORMAT_ID" : "Format Vecteurs", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_COORDSYS_ID" : "Système de coordonnées", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_NOTE" : "note", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_NOTE_LINE" : "note_line", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_RASTER_FORMAT_ID" : "Format Images", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_EXTENT_METHOD" : "Méthode de saisie", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_SIGNED" : "Acte d'engagement signé", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ACCEPTED_BY_CPA" : "Validation de l'usage décrit pour les données", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_IDENTIFICATION_COMPLETE" : "Cadre d'identification complet", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_DEFINITION_COMPLETE" : "Définition des traitements non renseignée", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_CREATE" : "Créer", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_REJECT_EXTRACTION" : "Refuser l'extraction", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_RELOAD_AE" : "Recharger l'acte d'engagement", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_SEND_AE" : "Soumettre l'AE", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_TERMINATE" : "Terminer", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ASK_AE" : "Demander l'AE", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_GENERATE_AE" : "Générer l'AE", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ALLOW_EXTRACTION" : "Autoriser l'extraction", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_COMMENT" : "Commentaires", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_PRIORITY_ID" : "Priorité", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ID_COM" : "Commune", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ID_CONSEIL" : "Conseil de Territoire", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_HISTORY" : "Historique", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_TECHNIQUE" : "Générer précaunisations techniques", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_CARTOGRAPHIQUE" : "Générer charte cartographique", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_LISTE_TERRITOIRE" : "Liste des territoires", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_LISTE_COMMUNE" : "Liste des communes", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_FORMAT" : "Format", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ISOGEO" : "Générer métadonnées isogéo", + "EXTRACTION_REF_EXTRACTION_COORDSYS_TITLE" : "Système de coordonnées {{::coordsys_id}}", + "EXTRACTION_REF_EXTRACTION_COORDSYS_TITLE_INSERT" : "Système de coordonnées", + "EXTRACTION_REF_EXTRACTION_COORDSYS_FORM_COORDSYS_ID" : "ID", + "EXTRACTION_REF_EXTRACTION_COORDSYS_FORM_COORDSYS" : "Nom", + "EXTRACTION_REF_EXTRACTION_FORMAT_TITLE" : "Format {{::format_id}}", + "EXTRACTION_REF_EXTRACTION_FORMAT_TITLE_INSERT" : "Format", + "EXTRACTION_REF_EXTRACTION_FORMAT_SELECT" : "Sélectionner un format :", + "EXTRACTION_REF_EXTRACTION_FORMAT_FORM_FORMAT_ID" : "ID", + "EXTRACTION_REF_EXTRACTION_FORMAT_FORM_FORMAT" : "Nom", + "EXTRACTION_REF_EXTRACTION_FORMAT_FORM_USE_FOR_RASTER" : "Raster", + "EXTRACTION_REF_EXTRACTION_FORMAT_FORM_USE_FOR_VECTOR" : "Vecteur", + "EXTRACTION_REF_EXTRACTION_LAYER_TITLE" : "Couche {{::layer_id}}", + "EXTRACTION_REF_EXTRACTION_LAYER_TITLE_INSERT" : "Couche", + "EXTRACTION_REF_EXTRACTION_LAYER_FORM_LAYER_ID" : "ID", + "EXTRACTION_REF_EXTRACTION_LAYER_FORM_LAYER" : "Nom", + "EXTRACTION_REF_EXTRACTION_LAYER_FORM_CATEGORY" : "Catégorie", + "EXTRACTION_REF_EXTRACTION_LAYER_FORM_RESTRICTION" : "Restriction", + "EXTRACTION_REF_EXTRACTION_LAYER_FORM_UNUSED_ATTRIBUTES" : "Attributs inutilisés", + "EXTRACTION_REF_EXTRACTION_LAYER_LAYERS_TOOLTIP_TITLE" : "Couches", + "EXTRACTION_REF_EXTRACTION_LAYER_UNUSED_ATTRIBUTES_TOOLTIP_TITLE" : "Attributs inutilisés", + "CONFIGURATION_VITIS_CONFIGURATION_EXTRACTIONCONFIG_FORM_SCHEMA_EXTRACTION" : "", + "CONFIGURATION_VITIS_CONFIGURATION_EXTRACTIONCONFIG_FORM_COLOR_MUTUALIZED" : "", + "CONFIGURATION_VITIS_CONFIGURATION_EXTRACTIONCONFIG_FORM_COLOR_NO_MUTUALIZED" : "", + "TEXT_MODE_EXTRACTION_FORM" : "", + "TITLE_MODE_EXTRACTION_FORM" : "extraction_form", + "SIGN_UP_END_DATE" : "Date de fin de contrat", + "SIGN_UP_START_DATE" : "Date de début de contrat", + "SIGN_UP_STUDY_OBJECT" : "Objet de l'étude", + "SIGN_UP_PUBLIC_IP" : "IP publique fixe", + "SIGN_UP_PHONE" : "Téléphone", + "SIGN_UP_DEMANDEUR" : "Nom du demandeur", + "SIGN_UP_MAIL_DEMANDEUR" : "Adresse mail du demandeur", + "TEXT_MODE_EXTRACTION_DEPOT" : "", + "TITLE_MODE_EXTRACTION_DEPOT" : "extraction_depot", + "EXTRACTION_EXTRACTION_CP_TITLE_INSERT" : "Extraction", + "EXTRACTION_EXTRACTION_CP_FORM_TECHNIQUE" : "Générer précaunisations techniques", + "EXTRACTION_EXTRACTION_CP_FORM_CARTOGRAPHIQUE" : "Générer charte cartographique", + "EXTRACTION_EXTRACTION_CP_FORM_ISOGEO" : "Générer métadonnées isogéo", + "EXTRACTION_EXTRACTION_CP_FORM_COMPANY" : "Organisme", + "EXTRACTION_EXTRACTION_CP_FORM_EXTENT_METHOD" : "Méthode de saisie", + "EXTRACTION_EXTRACTION_CP_FORM_ID_COM" : "Commune", + "EXTRACTION_EXTRACTION_CP_FORM_ID_CONSEIL" : "Conseil de Territoire", + "EXTRACTION_EXTRACTION_CP_FORM_EXTENT" : "Etendue", + "EXTRACTION_EXTRACTION_CP_FORM_LAYERS" : "Couches", + "EXTRACTION_EXTRACTION_CP_FORM_STATISTIQUE" : "Données statistiques", + "EXTRACTION_EXTRACTION_CP_FORM_COORDSYS_ID" : "Système de coordonnées", + "EXTRACTION_EXTRACTION_CP_FORM_VECTOR_FORMAT_ID" : "Format Vecteurs", + "EXTRACTION_EXTRACTION_CP_FORM_RASTER_FORMAT_ID" : "Format Images", + "EXTRACTION_EXTRACTION_CP_FORM_STATUS" : "Etat", + "EXTRACTION_EXTRACTION_CP_FORM_HISTORY" : "Historique", + "EXTRACTION_EXTRACTION_CP_FORM_CREATION_DATE" : "Date de création", + "EXTRACTION_EXTRACTION_CP_FORM_REQUESTOR" : "Demandeur", + "EXTRACTION_EXTRACTION_CP_FORM_AE" : "Acte d'engagement", + "EXTRACTION_EXTRACTION_CP_FORM_NOTE" : "note", + "EXTRACTION_EXTRACTION_CP_FORM_NOTE_LINE" : "note_line", + "EXTRACTION_EXTRACTION_CP_FORM_SIGNED" : "Acte d'engagement signé", + "EXTRACTION_EXTRACTION_CP_FORM_ACCEPTED_BY_CPA" : "Validation de l'usage décrit pour les données", + "EXTRACTION_EXTRACTION_CP_FORM_IDENTIFICATION_COMPLETE" : "Cadre d'identification complet", + "EXTRACTION_EXTRACTION_CP_FORM_DEFINITION_COMPLETE" : "Définition des traitements non renseignée", + "EXTRACTION_EXTRACTION_CP_FORM_COMMENT" : "Commentaires", + "EXTRACTION_EXTRACTION_CP_FORM_PRIORITY_ID" : "Priorité", + "EXTRACTION_EXTRACTION_CP_TITLE" : "Extraction", + "EXTRACTION_EXTRACTION_CP_FORM_BO_ID" : "Id métier", + "EXTRACTION_DEPOT_EXTRACTION_EXTRACTION_DEPOT_TITLE" : "", + "EXTRACTION_DEPOT_EXTRACTION_EXTRACTION_DEPOT_TITLE_INSERT" : "" +} \ No newline at end of file diff --git a/src/module_extraction/module/lang/lang-fr.json b/src/module_extraction/module/lang/lang-fr.json new file mode 100755 index 0000000000000000000000000000000000000000..d5a02d2b416ca966cd0e818b7863b9b62059f4df --- /dev/null +++ b/src/module_extraction/module/lang/lang-fr.json @@ -0,0 +1,119 @@ +{ + "TEXT_MODE_EXTRACTION" : "Gestion des extractions", + "TITLE_MODE_EXTRACTION" : "Extraction", + "TEXT_MODE_EXTRACTION_REF" : "Gestion références des extractions", + "TITLE_MODE_EXTRACTION_REF" : "extraction_ref", + "EXTRACTION_EXTRACTION_EXTRACTION_TITLE" : "Extraction", + "EXTRACTION_EXTRACTION_EXTRACTION_TITLE_INSERT" : "Extraction", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_BO_ID" : "Id métier", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_STATUS" : "Etat", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_CREATION_DATE" : "Date de création", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_REQUESTOR" : "Demandeur", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_AE" : "Acte d'engagement", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_EXTENT" : "Etendue", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_COMPANY" : "Organisme", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_LAYERS" : "Couches", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_STATISTIQUE" : "Données statistiques", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_VECTOR_FORMAT_ID" : "Format Vecteurs", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_COORDSYS_ID" : "Système de coordonnées", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_NOTE" : "note", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_NOTE_LINE" : "note_line", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_RASTER_FORMAT_ID" : "Format Images", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_EXTENT_METHOD" : "Méthode de saisie", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_SIGNED" : "Acte d'engagement signé", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ACCEPTED_BY_CPA" : "Validation de l'usage décrit pour les données", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_IDENTIFICATION_COMPLETE" : "Cadre d'identification complet", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_DEFINITION_COMPLETE" : "Définition des traitements non renseignée", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_CREATE" : "Créer", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_REJECT_EXTRACTION" : "Refuser l'extraction", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_RELOAD_AE" : "Recharger l'acte d'engagement", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_SEND_AE" : "Soumettre l'AE", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_TERMINATE" : "Terminer", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ASK_AE" : "Demander l'AE", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_GENERATE_AE" : "Générer l'AE", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ALLOW_EXTRACTION" : "Autoriser l'extraction", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_COMMENT" : "Commentaires", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_PRIORITY_ID" : "Priorité", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ID_COM" : "Commune", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ID_CONSEIL" : "Conseil de Territoire", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_HISTORY" : "Historique", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_TECHNIQUE" : "Générer précaunisations techniques", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_CARTOGRAPHIQUE" : "Générer charte cartographique", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_LISTE_TERRITOIRE" : "Liste des territoires", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_LISTE_COMMUNE" : "Liste des communes", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_FORMAT" : "Format", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_ISOGEO" : "Générer métadonnées isogéo", + "EXTRACTION_REF_EXTRACTION_COORDSYS_TITLE" : "Système de coordonnées {{::coordsys_id}}", + "EXTRACTION_REF_EXTRACTION_COORDSYS_TITLE_INSERT" : "Système de coordonnées", + "EXTRACTION_REF_EXTRACTION_COORDSYS_FORM_COORDSYS_ID" : "ID", + "EXTRACTION_REF_EXTRACTION_COORDSYS_FORM_COORDSYS" : "Nom", + "EXTRACTION_REF_EXTRACTION_FORMAT_TITLE" : "Format {{::format_id}}", + "EXTRACTION_REF_EXTRACTION_FORMAT_TITLE_INSERT" : "Format", + "EXTRACTION_REF_EXTRACTION_FORMAT_SELECT" : "Sélectionner un format :", + "EXTRACTION_REF_EXTRACTION_FORMAT_FORM_FORMAT_ID" : "ID", + "EXTRACTION_REF_EXTRACTION_FORMAT_FORM_FORMAT" : "Nom", + "EXTRACTION_REF_EXTRACTION_FORMAT_FORM_USE_FOR_RASTER" : "Raster", + "EXTRACTION_REF_EXTRACTION_FORMAT_FORM_USE_FOR_VECTOR" : "Vecteur", + "EXTRACTION_REF_EXTRACTION_LAYER_TITLE" : "Couche {{::layer_id}}", + "EXTRACTION_REF_EXTRACTION_LAYER_TITLE_INSERT" : "Couche", + "EXTRACTION_REF_EXTRACTION_LAYER_FORM_LAYER_ID" : "ID", + "EXTRACTION_REF_EXTRACTION_LAYER_FORM_LAYER" : "Nom", + "EXTRACTION_REF_EXTRACTION_LAYER_FORM_CATEGORY" : "Catégorie", + "EXTRACTION_REF_EXTRACTION_LAYER_FORM_RESTRICTION" : "Restriction", + "EXTRACTION_REF_EXTRACTION_LAYER_FORM_UNUSED_ATTRIBUTES" : "Attributs inutilisés", + "EXTRACTION_REF_EXTRACTION_LAYER_LAYERS_TOOLTIP_TITLE" : "Couches", + "EXTRACTION_REF_EXTRACTION_LAYER_UNUSED_ATTRIBUTES_TOOLTIP_TITLE" : "Attributs inutilisés", + "CONFIGURATION_VITIS_CONFIGURATION_EXTRACTIONCONFIG_FORM_SCHEMA_EXTRACTION" : "", + "CONFIGURATION_VITIS_CONFIGURATION_EXTRACTIONCONFIG_FORM_COLOR_MUTUALIZED" : "", + "CONFIGURATION_VITIS_CONFIGURATION_EXTRACTIONCONFIG_FORM_COLOR_NO_MUTUALIZED" : "", + "TEXT_MODE_EXTRACTION_FORM" : "", + "TITLE_MODE_EXTRACTION_FORM" : "extraction_form", + "SIGN_UP_END_DATE" : "Date de fin de contrat", + "SIGN_UP_START_DATE" : "Date de début de contrat", + "SIGN_UP_STUDY_OBJECT" : "Objet de l'étude", + "SIGN_UP_PUBLIC_IP" : "IP publique fixe", + "SIGN_UP_PHONE" : "Téléphone", + "SIGN_UP_DEMANDEUR" : "Nom du demandeur", + "SIGN_UP_MAIL_DEMANDEUR" : "Adresse mail du demandeur", + "TEXT_MODE_EXTRACTION_DEPOT" : "", + "TITLE_MODE_EXTRACTION_DEPOT" : "extraction_depot", + "EXTRACTION_EXTRACTION_CP_TITLE_INSERT" : "Extraction", + "EXTRACTION_EXTRACTION_CP_FORM_TECHNIQUE" : "Générer précaunisations techniques", + "EXTRACTION_EXTRACTION_CP_FORM_CARTOGRAPHIQUE" : "Générer charte cartographique", + "EXTRACTION_EXTRACTION_CP_FORM_ISOGEO" : "Générer métadonnées isogéo", + "EXTRACTION_EXTRACTION_CP_FORM_COMPANY" : "Organisme", + "EXTRACTION_EXTRACTION_CP_FORM_EXTENT_METHOD" : "Méthode de saisie", + "EXTRACTION_EXTRACTION_CP_FORM_ID_COM" : "Commune", + "EXTRACTION_EXTRACTION_CP_FORM_ID_CONSEIL" : "Conseil de Territoire", + "EXTRACTION_EXTRACTION_CP_FORM_EXTENT" : "Etendue", + "EXTRACTION_EXTRACTION_CP_FORM_LAYERS" : "Couches", + "EXTRACTION_EXTRACTION_CP_FORM_STATISTIQUE" : "Données statistiques", + "EXTRACTION_EXTRACTION_CP_FORM_COORDSYS_ID" : "Système de coordonnées", + "EXTRACTION_EXTRACTION_CP_FORM_VECTOR_FORMAT_ID" : "Format Vecteurs", + "EXTRACTION_EXTRACTION_CP_FORM_RASTER_FORMAT_ID" : "Format Images", + "EXTRACTION_EXTRACTION_CP_FORM_STATUS" : "Etat", + "EXTRACTION_EXTRACTION_CP_FORM_HISTORY" : "Historique", + "EXTRACTION_EXTRACTION_CP_FORM_CREATION_DATE" : "Date de création", + "EXTRACTION_EXTRACTION_CP_FORM_REQUESTOR" : "Demandeur", + "EXTRACTION_EXTRACTION_CP_FORM_AE" : "Acte d'engagement", + "EXTRACTION_EXTRACTION_CP_FORM_NOTE" : "note", + "EXTRACTION_EXTRACTION_CP_FORM_NOTE_LINE" : "note_line", + "EXTRACTION_EXTRACTION_CP_FORM_SIGNED" : "Acte d'engagement signé", + "EXTRACTION_EXTRACTION_CP_FORM_ACCEPTED_BY_CPA" : "Validation de l'usage décrit pour les données", + "EXTRACTION_EXTRACTION_CP_FORM_IDENTIFICATION_COMPLETE" : "Cadre d'identification complet", + "EXTRACTION_EXTRACTION_CP_FORM_DEFINITION_COMPLETE" : "Définition des traitements non renseignée", + "EXTRACTION_EXTRACTION_CP_FORM_COMMENT" : "Commentaires", + "EXTRACTION_EXTRACTION_CP_FORM_PRIORITY_ID" : "Priorité", + "EXTRACTION_EXTRACTION_CP_TITLE" : "Extraction", + "EXTRACTION_EXTRACTION_CP_FORM_BO_ID" : "Id métier", + "EXTRACTION_DEPOT_EXTRACTION_EXTRACTION_DEPOT_TITLE" : "", + "EXTRACTION_DEPOT_EXTRACTION_EXTRACTION_DEPOT_TITLE_INSERT" : "", + "EXTRACTION_DEPORT_DELETE_NO_SELECTED": "Aucun fichier sélectionné", + "EXTRACTION_DEPOT_DELETE_SELECT_A_FILE": "Veuillez sélectionner un fichier à supprimer", + "EXTRACTION_DEPOT_TITLE": "Dépot de fichiers", + "EXTRACTION_DEPOT_FILE_UPLOAD": "Fichier à envoyer", + "EXTRACTION_DEPOT_FILE_UPDATE": "Mettre à jour", + "ERROR_FILE_SIZE_EXTRACTION_LOAD_DEPOSIT_DIRECTORY" : "La taille du fichier est supérieure à la taille maximale autorisée.", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_DEPOSIT" : "Déposer", + "EXTRACTION_EXTRACTION_EXTRACTION_FORM_INPUT_DEPOSIT" : "Fichier à déposer" +} \ No newline at end of file diff --git a/src/module_extraction/module/less/main.less b/src/module_extraction/module/less/main.less new file mode 100755 index 0000000000000000000000000000000000000000..6fc121e62751d3bec645ea2f90b4d2ae50b0a9a7 --- /dev/null +++ b/src/module_extraction/module/less/main.less @@ -0,0 +1,5 @@ +// LESS +@ui-grid-bg-image: "../images/ui-grid/wbg.gif"; +@font-color-purple: #6d1a67; +@test-color: black; +@import 'projectDirectory.less'; \ No newline at end of file diff --git a/src/module_extraction/web_service/conf/properties.inc b/src/module_extraction/web_service/conf/properties.inc new file mode 100755 index 0000000000000000000000000000000000000000..ccb5266aad9211923e07fe6716771150d0c400ae --- /dev/null +++ b/src/module_extraction/web_service/conf/properties.inc @@ -0,0 +1,5 @@ +<?php + $properties["schema_extraction"] = 's_extraction'; + $properties['color_mutualized'] = 'green'; + $properties['color_no_mutualized'] = 'red'; +?> \ No newline at end of file diff --git a/src/module_extraction/web_service/conf/version.inc b/src/module_extraction/web_service/conf/version.inc new file mode 100755 index 0000000000000000000000000000000000000000..a812e4b55b8646a3e4a148d5b36662ce06943c5a --- /dev/null +++ b/src/module_extraction/web_service/conf/version.inc @@ -0,0 +1,7 @@ +<?php +// Numéro de la version de [Module_name] +define ("VM_VERSION", "20XX.XX.XX"); +define ("VM_BUILD", "XXXXX"); +define ("VM_MONTH_YEAR", "XX_20XX"); +define ("VM_STATUS", "UNSTABLE"); +?> \ No newline at end of file diff --git a/src/module_extraction/web_service/sql/sqlQueries.xml b/src/module_extraction/web_service/sql/sqlQueries.xml new file mode 100755 index 0000000000000000000000000000000000000000..829255869f7ef6fa448b16739f5e7bf6b79f3c2a --- /dev/null +++ b/src/module_extraction/web_service/sql/sqlQueries.xml @@ -0,0 +1,329 @@ +<?xml version="1.0" encoding="utf-8"?> +<sqlQueries> + <title>Scripts d'installation et de mises à jour de la base du VAS</title> + <queriesCollection> + <query> + <type>init</type> + <version>2017-01-00</version> + <code> + <![CDATA[ + select s_vitis.create_role_if_not_exists('extraction_user', 'NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION'); + select s_vitis.create_role_if_not_exists('extraction_admin', 'NOSUPERUSER INHERIT NOCREATEDB NOCREATEROLE NOREPLICATION'); + INSERT INTO s_vitis.privileges(rolname, description) VALUES ('extraction_user', 'utilisateur extraction'); + INSERT INTO s_vitis.privileges(rolname, description) VALUES ('extraction_admin', 'administrateur extraction'); + --Partie pour le module extraction version 2017-01-01 généré par WAB le 18/07/2017 à 09:52:00 + CREATE SCHEMA s_extraction AUTHORIZATION u_vitis; + GRANT ALL ON SCHEMA s_extraction TO u_vitis; + + GRANT USAGE ON SCHEMA s_extraction TO extraction_admin; + GRANT USAGE ON SCHEMA s_extraction TO extraction_user; + + CREATE SEQUENCE s_extraction.bo_id_extraction_seq START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; + ALTER TABLE s_extraction.bo_id_extraction_seq OWNER TO u_vitis; + GRANT ALL ON SEQUENCE s_extraction.bo_id_extraction_seq TO u_vitis; + GRANT ALL ON SEQUENCE s_extraction.bo_id_extraction_seq TO extraction_admin; + GRANT ALL ON SEQUENCE s_extraction.bo_id_extraction_seq TO extraction_user; + + CREATE TABLE s_extraction.extraction (bo_id integer NOT NULL, status character varying(100), history text, creation_date date DEFAULT ('now'::text)::date, requestor character varying(50) DEFAULT "current_user"(), ae character varying(255), extent text, company character varying(50), layers text, vector_format_id character varying(100), coordsys_id character varying(50), note text, note_line text, raster_format_id character varying(100), extent_method character varying(50), signed boolean, accepted_by_cpa boolean, identification_complete boolean, definition_complete boolean, comment text, priority_id integer, id_com text, id_conseil text); + ALTER TABLE s_extraction.extraction OWNER TO u_vitis; + CREATE TABLE s_extraction.rt_coordsys (coordsys_id character varying(50) NOT NULL, coordsys character varying(100)); + ALTER TABLE s_extraction.rt_coordsys OWNER TO u_vitis; + CREATE TABLE s_extraction.rt_feature_model (feature_type character varying(200) NOT NULL, attribute_name character varying(200) NOT NULL, attribute_data_type character varying(200), geometry_type character varying(200), "order" integer); + ALTER TABLE s_extraction.rt_feature_model OWNER TO u_vitis; + CREATE TABLE s_extraction.rt_format (format_id character varying(100) NOT NULL, format character varying(255), use_for_raster boolean, use_for_vector boolean); + ALTER TABLE s_extraction.rt_format OWNER TO u_vitis; + CREATE TABLE s_extraction.rt_layer (layer_id character varying(100) NOT NULL, layer character varying(255), category character varying(50), restriction character varying(50), unused_attributes text); + ALTER TABLE s_extraction.rt_layer OWNER TO u_vitis; + INSERT INTO s_extraction. rt_coordsys (coordsys_id, coordsys) VALUES ('EPSG:27572', 'Lambert 2 étendu'); + INSERT INTO s_extraction. rt_coordsys (coordsys_id, coordsys) VALUES ('Lambert93', 'Lambert 93'); + INSERT INTO s_extraction. rt_coordsys (coordsys_id, coordsys) VALUES ('EPSG:3944', 'Lambert 93 CC44'); + INSERT INTO s_extraction. rt_coordsys (coordsys_id, coordsys) VALUES ('EPSG:4326', 'WGS 84'); + INSERT INTO s_extraction. rt_format (format_id, format, use_for_raster, use_for_vector) VALUES ('ECW', 'Er Mapper ECW', true, false); + INSERT INTO s_extraction. rt_format (format_id, format, use_for_raster, use_for_vector) VALUES ('ACAD', 'Autocad DWG', false, true); + INSERT INTO s_extraction. rt_format (format_id, format, use_for_raster, use_for_vector) VALUES ('SHAPE', 'Esri Shapefile', false, true); + INSERT INTO s_extraction. rt_format (format_id, format, use_for_raster, use_for_vector) VALUES ('MAPINFO', 'Mapinfo Tab', false, true); + INSERT INTO s_extraction. rt_format (format_id, format, use_for_raster, use_for_vector) VALUES ('MIF', 'Mapinfo MIF/MID', false, true); + INSERT INTO s_extraction. rt_format (format_id, format, use_for_raster, use_for_vector) VALUES ('GML', 'GML', false, true); + INSERT INTO s_extraction. rt_format (format_id, format, use_for_raster, use_for_vector) VALUES ('OGCKML', 'KML', false, true); + INSERT INTO s_extraction. rt_format (format_id, format, use_for_raster, use_for_vector) VALUES ('GEOJSON', 'GEOJSON', false, true); + INSERT INTO s_extraction. rt_format (format_id, format, use_for_raster, use_for_vector) VALUES ('TIFF', 'TIFF', true, false); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.arrondissement', 'id_geofla', 'fme_real64', 'fme_no_geom;fme_point;fme_line;fme_area;fme_surface;fme_collection', 1); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.arrondissement', 'code_arr', 'fme_varchar(1)', '', 2); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.arrondissement', 'code_chf', 'fme_varchar(3)', '', 3); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.arrondissement', 'nom_chf', 'fme_varchar(50)', '', 4); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.arrondissement', 'x_chf_lieu', 'fme_varchar(255)', '', 5); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.arrondissement', 'y_chf_lieu', 'fme_varchar(255)', '', 6); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.arrondissement', 'code_dept', 'fme_varchar(2)', '', 7); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.arrondissement', 'nom_dept', 'fme_varchar(30)', '', 8); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.arrondissement', 'code_reg', 'fme_varchar(2)', '', 9); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.arrondissement', 'nom_region', 'fme_varchar(30)', '', 10); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.canton', 'id_geofla', 'fme_real64', 'fme_no_geom;fme_point;fme_line;fme_area;fme_surface;fme_collection', 1); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.canton', 'code_cant', 'fme_varchar(2)', '', 2); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.canton', 'code_chf', 'fme_varchar(3)', '', 3); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.canton', 'nom_chf', 'fme_varchar(50)', '', 4); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.canton', 'x_chf_lieu', 'fme_varchar(255)', '', 5); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.canton', 'y_chf_lieu', 'fme_varchar(255)', '', 6); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.canton', 'code_arr', 'fme_varchar(1)', '', 7); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.canton', 'code_dept', 'fme_varchar(2)', '', 8); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.canton', 'nom_dept', 'fme_varchar(30)', '', 9); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.canton', 'code_reg', 'fme_varchar(2)', '', 10); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.canton', 'nom_region', 'fme_varchar(30)', '', 11); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.commune', 'id_geofla', 'fme_real64', 'fme_no_geom;fme_point;fme_line;fme_area;fme_surface;fme_collection', 1); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.commune', 'code_comm', 'fme_varchar(3)', '', 2); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.commune', 'insee_com', 'fme_varchar(5)', '', 3); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.commune', 'nom_comm', 'fme_varchar(50)', '', 4); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.commune', 'statut', 'fme_varchar(20)', '', 5); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.commune', 'x_chf_lieu', 'fme_varchar(255)', '', 6); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.commune', 'y_chf_lieu', 'fme_varchar(255)', '', 7); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.commune', 'z_moyen', 'fme_varchar(255)', '', 8); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.commune', 'superficie', 'fme_real64', '', 9); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.commune', 'population', 'fme_real64', '', 10); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.commune', 'code_cant', 'fme_varchar(2)', '', 11); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.commune', 'code_arr', 'fme_varchar(1)', '', 12); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.commune', 'code_dept', 'fme_varchar(2)', '', 13); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.commune', 'nom_dept', 'fme_varchar(30)', '', 14); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.commune', 'code_reg', 'fme_varchar(2)', '', 15); + INSERT INTO s_extraction.rt_feature_model (feature_type, attribute_name, attribute_data_type, geometry_type, "order") VALUES ('geofla.commune', 'nom_region', 'fme_varchar(30)', '', 16); + INSERT INTO s_extraction.rt_layer (layer_id, layer, category, restriction, unused_attributes) VALUES ('geofla.arrondissement', 'Arrondissement', 'Arrondissement', 'interne', 'x_centroid;y_centroid'); + INSERT INTO s_extraction.rt_layer (layer_id, layer, category, restriction, unused_attributes) VALUES ('geofla.canton', 'Canton', 'Arrondissement', 'restreinit', 'x_centroid;y_centroid'); + INSERT INTO s_extraction.rt_layer (layer_id, layer, category, restriction, unused_attributes) VALUES ('geofla.commune', 'Commune', 'Commune', 'public', 'x_centroid;y_centroid'); + + ALTER TABLE ONLY s_extraction.extraction ADD CONSTRAINT pk_plan_bo_id PRIMARY KEY (bo_id); + ALTER TABLE ONLY s_extraction.rt_layer ADD CONSTRAINT pk_projet_type PRIMARY KEY (layer_id); + ALTER TABLE ONLY s_extraction.rt_format ADD CONSTRAINT pk_reseau PRIMARY KEY (format_id); + ALTER TABLE ONLY s_extraction.rt_coordsys ADD CONSTRAINT pk_rt_coordsys PRIMARY KEY (coordsys_id); + ALTER TABLE ONLY s_extraction.rt_feature_model ADD CONSTRAINT pk_rt_feature_model PRIMARY KEY (feature_type, attribute_name); + ALTER TABLE ONLY s_extraction.extraction ADD CONSTRAINT fk_coordsys_id FOREIGN KEY (coordsys_id) REFERENCES s_extraction.rt_coordsys(coordsys_id); + ALTER TABLE ONLY s_extraction.extraction ADD CONSTRAINT fk_format_id FOREIGN KEY (vector_format_id) REFERENCES s_extraction.rt_format(format_id); + + GRANT ALL ON TABLE s_extraction.extraction TO u_vitis; + GRANT ALL ON TABLE s_extraction.extraction TO extraction_user; + GRANT ALL ON TABLE s_extraction.rt_coordsys TO u_vitis; + GRANT ALL ON TABLE s_extraction.rt_coordsys TO extraction_admin; + GRANT ALL ON TABLE s_extraction.rt_feature_model TO u_vitis; + GRANT ALL ON TABLE s_extraction.rt_feature_model TO extraction_admin; + GRANT ALL ON TABLE s_extraction.rt_format TO u_vitis; + GRANT ALL ON TABLE s_extraction.rt_format TO extraction_admin; + GRANT ALL ON TABLE s_extraction.rt_layer TO u_vitis; + GRANT ALL ON TABLE s_extraction.rt_layer TO extraction_admin; + + CREATE SEQUENCE s_extraction.seq_common START WITH 1 INCREMENT BY 1 NO MINVALUE NO MAXVALUE CACHE 1; + ALTER TABLE s_extraction.seq_common OWNER TO u_vitis; + GRANT ALL ON SEQUENCE s_extraction.seq_common TO u_vitis; + GRANT ALL ON SEQUENCE s_extraction.seq_common TO extraction_admin; + GRANT ALL ON SEQUENCE s_extraction.seq_common TO extraction_user; + + CREATE TABLE s_extraction.rt_extraction_status (status_id int4 NOT NULL DEFAULT nextval('s_extraction.seq_common'::regclass), name varchar(50) NOT NULL, progress int4 NOT NULL, PRIMARY KEY (status_id)); + GRANT ALL ON TABLE s_extraction.rt_extraction_status TO u_vitis; + GRANT ALL ON TABLE s_extraction.rt_extraction_status TO extraction_admin; + INSERT INTO s_extraction.rt_extraction_status(name, progress) VALUES('START', 0); + INSERT INTO s_extraction.rt_extraction_status(name, progress) VALUES('Nouveau', 10); + INSERT INTO s_extraction.rt_extraction_status(name, progress) VALUES('AE Demandé', 20); + INSERT INTO s_extraction.rt_extraction_status(name, progress) VALUES('AE Généré', 30); + INSERT INTO s_extraction.rt_extraction_status(name, progress) VALUES('AE Soumis', 40); + INSERT INTO s_extraction.rt_extraction_status(name, progress) VALUES('Autorisée', 70); + INSERT INTO s_extraction.rt_extraction_status(name, progress) VALUES('Refusée', 100); + INSERT INTO s_extraction.rt_extraction_status(name, progress) VALUES('Terminée', 100); + + --Partie s_vitis généré par WAB le 18/07/2017 à 09:52:00 + DELETE FROM s_vitis.vm_section WHERE label_id ~ '^extraction_([0-9]+)$'; + DELETE FROM s_vitis.vm_table_field WHERE label_id ~ '^extraction_([0-9]+)$'; + DELETE FROM s_vitis.vm_table_button WHERE label_id ~ '^extraction_([0-9]+)$'; + DELETE FROM s_vitis.vm_module WHERE module_id='extraction'; + DELETE FROM s_vitis.vm_string WHERE string_id ~ '^extraction_([0-9]+)$'; + INSERT INTO s_vitis.vm_module (module_id, description, version, label) VALUES ('extraction','Module Extraction',0.1,'extraction'); + INSERT INTO s_vitis.group (group_id, name) SELECT (SELECT nextval('s_vitis.seq_common'::regclass)), 'demandeur' WHERE NOT EXISTS (SELECT group_id FROM s_vitis.group WHERE name='demandeur'); + INSERT INTO s_vitis.group (group_id, name) SELECT (SELECT nextval('s_vitis.seq_common'::regclass)), 'controleur' WHERE NOT EXISTS (SELECT group_id FROM s_vitis.group WHERE name='controleur'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Section General', 'extraction_1'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field bo_id', 'extraction_4'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field status', 'extraction_6'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('objet extraction_extraction', 'extraction_0'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field progress_level', 'extraction_7'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Boutton Supprimer', 'extraction_2'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field company', 'extraction_8'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Boutton Ajout', 'extraction_3'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field requestor', 'extraction_5'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field layers', 'extraction_9'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('objet extraction_coordsys', 'extraction_10'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Section General', 'extraction_11'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Boutton Supprimer', 'extraction_12'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Boutton Ajout', 'extraction_13'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('objet extraction_format', 'extraction_14'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Section General', 'extraction_15'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Boutton Supprimer', 'extraction_16'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Boutton Ajout', 'extraction_17'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('objet extraction_layer', 'extraction_18'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Section General', 'extraction_19'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Boutton Supprimer', 'extraction_20'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('Boutton Ajout', 'extraction_21'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field coordsys_id', 'extraction_22'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field coordsys', 'extraction_23'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field format_id', 'extraction_24'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field format', 'extraction_25'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field use_for_raster', 'extraction_26'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field use_for_vector', 'extraction_27'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field layer_id', 'extraction_28'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field layer', 'extraction_29'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field category', 'extraction_30'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field restriction', 'extraction_31'); + INSERT INTO s_vitis.vm_string (string, string_id) VALUES ('field unused_attributes', 'extraction_32'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_1','en','General'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_1','fr','Informations générales'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_0','fr','Extraction'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_0','en','Extraction'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_2','fr','Supprimer les plans'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_2','en','Supprimer les plans'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_3','fr','Ajouter une extraction'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_3','en','Ajouter une extraction'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_4','en','ID'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_4','fr','ID'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_5','en','Demandeur'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_5','fr','Demandeur'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_6','fr','Etat'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_6','en','Status'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_7','fr','Avancement'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_7','en','Progress level'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_8','fr','Organisme'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_8','en','Company'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_9','fr','Couches'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_9','en','Layers'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_10','en','Coordinate systems'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_10','fr','Systèmes de coordonnées'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_11','en','General'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_11','fr','Informations générales'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_12','en','Delete coordinate systems'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_12','fr','Supprimer les systèmes de coordonnées'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_13','en','Add coordinate systems'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_13','fr','Ajouter un système de coordonnées'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_14','en','Formats'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_14','fr','Formats'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_15','en','General'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_15','fr','Informations générales'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_16','en','Delete formats'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_16','fr','Supprimer les formats'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_17','en','Add format'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_17','fr','Ajouter un format'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_18','en','Layers'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_18','fr','Couches'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_19','en','General'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_19','fr','Informations générales'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_20','en','Delete layers'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_20','fr','Supprimer les couches'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_21','en','Add layer'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_21','fr','Ajouter une couche'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_22','en','ID'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_22','fr','ID'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_23','en','Name'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_23','fr','Nom'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_24','en','ID'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_24','fr','ID'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_25','en','Name'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_25','fr','Nom'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_26','en','Raster'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_26','fr','Raster'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_27','en','Vector'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_27','fr','Vecteur'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_28','en','ID'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_28','fr','ID'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_29','en','Name'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_29','fr','Nom'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_30','en','Category'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_30','fr','Catégorie'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_31','en','Restriction'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_31','fr','Restriction'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_32','en','Unused attributes'); + INSERT INTO s_vitis.vm_translation (translation_id, lang, translation) VALUES ('extraction_32','fr','Attributs inutilisés'); + INSERT INTO s_vitis.vm_mode (mode_id, module_id) VALUES ('extraction','extraction'); + INSERT INTO s_vitis.vm_mode (mode_id, module_id) VALUES ('extraction_ref','extraction'); + INSERT INTO s_vitis.vm_mode_rolname(index, mode_id, rolname) VALUES (0, 'extraction', 'extraction_user'); + INSERT INTO s_vitis.vm_mode_rolname(index, mode_id, rolname) VALUES (45, 'extraction_ref', 'extraction_admin'); + INSERT INTO s_vitis.vm_tab (tab_id, event, index, mode_id, label_id, ressource_id, edit_column, show_column, sorted_by, sorted_dir, name) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)),'loadList()', 0, 'extraction', 'extraction_0', 'extraction/extractions', 'editSectionForm', 'showSectionForm', 'bo_id', 'ASC', 'extraction_extraction'); + INSERT INTO s_vitis.vm_tab (tab_id, event, index, mode_id, label_id, ressource_id, edit_column, show_column, sorted_by, sorted_dir, name) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)),'loadList()', 0, 'extraction_ref', 'extraction_10', 'extraction/coordsyss', 'editSectionForm', 'showSectionForm', 'coordsys_id', 'ASC', 'extraction_coordsys'); + INSERT INTO s_vitis.vm_tab (tab_id, event, index, mode_id, label_id, ressource_id, edit_column, show_column, sorted_by, sorted_dir, name) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)),'loadList()', 1, 'extraction_ref', 'extraction_14', 'extraction/formats', 'editSectionForm', 'showSectionForm', 'format_id', 'ASC', 'extraction_format'); + INSERT INTO s_vitis.vm_tab (tab_id, event, index, mode_id, label_id, ressource_id, edit_column, show_column, sorted_by, sorted_dir, name) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)),'loadList()', 2, 'extraction_ref', 'extraction_18', 'extraction/layers', 'editSectionForm', 'showSectionForm', 'layer_id', 'ASC', 'extraction_layer'); + INSERT INTO s_vitis.vm_table_button (button_class, table_button_id, event, label_id, ressource_id, tab_id) VALUES ('deleteFlexigrid',(SELECT nextval('s_vitis.seq_vm'::regclass)), 'DeleteSelection', 'extraction_2', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction'), (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction')); + INSERT INTO s_vitis.vm_table_button (button_class, table_button_id, event, label_id, ressource_id, tab_id) VALUES ('add_smallFlexigrid',(SELECT nextval('s_vitis.seq_vm'::regclass)), 'AddSectionForm', 'extraction_3', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction'), (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction')); + INSERT INTO s_vitis.vm_table_button (button_class, table_button_id, event, label_id, ressource_id, tab_id) VALUES ('deleteFlexigrid',(SELECT nextval('s_vitis.seq_vm'::regclass)), 'DeleteSelection', 'extraction_12', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_coordsys'), (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_coordsys')); + INSERT INTO s_vitis.vm_table_button (button_class, table_button_id, event, label_id, ressource_id, tab_id) VALUES ('add_smallFlexigrid',(SELECT nextval('s_vitis.seq_vm'::regclass)), 'AddSectionForm', 'extraction_13', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_coordsys'), (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_coordsys')); + INSERT INTO s_vitis.vm_table_button (button_class, table_button_id, event, label_id, ressource_id, tab_id) VALUES ('deleteFlexigrid',(SELECT nextval('s_vitis.seq_vm'::regclass)), 'DeleteSelection', 'extraction_16', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_format'), (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_format')); + INSERT INTO s_vitis.vm_table_button (button_class, table_button_id, event, label_id, ressource_id, tab_id) VALUES ('add_smallFlexigrid',(SELECT nextval('s_vitis.seq_vm'::regclass)), 'AddSectionForm', 'extraction_17', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_format'), (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_format')); + INSERT INTO s_vitis.vm_table_button (button_class, table_button_id, event, label_id, ressource_id, tab_id) VALUES ('deleteFlexigrid',(SELECT nextval('s_vitis.seq_vm'::regclass)), 'DeleteSelection', 'extraction_20', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer'), (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer')); + INSERT INTO s_vitis.vm_table_button (button_class, table_button_id, event, label_id, ressource_id, tab_id) VALUES ('add_smallFlexigrid',(SELECT nextval('s_vitis.seq_vm'::regclass)), 'AddSectionForm', 'extraction_21', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer'), (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'bo_id', '1', '1', 1, 50, 'right', 'extraction_4', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction'), NULL,(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'requestor', '1', '1', 2, 200, 'left', 'extraction_5', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction'), NULL,(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'status', '1', '1', 3, 150, 'left', 'extraction_6', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction'), NULL,(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'company', '1', '1', 5, 200, 'left', 'extraction_8', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction'), NULL,(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'layers', '1', '1', 6, 60, 'center', 'extraction_9', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction'), '<div data-app-extraction-layers-column="{{row.entity[col.field]}}"></div>',(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'progress_level', '1', '1', 4, 150, 'center', 'extraction_7', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction'), '<div data-app-navbar data-mode="info" data-hidevalue data-striped data-active></div>',(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'coordsys_id', '1', '1', 0, 200, 'left', 'extraction_22', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_coordsys'), NULL,(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_coordsys')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'coordsys', '1', '1', 1, 200, 'left', 'extraction_23', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_coordsys'), NULL,(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_coordsys')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'format_id', '1', '1', 0, 100, 'left', 'extraction_24', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_format'), NULL,(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_format')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'format', '1', '1', 1, 200, 'left', 'extraction_25', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_format'), NULL,(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_format')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'use_for_raster', '1', '1', 2, 100, 'left', 'extraction_26', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_format'), '<div data-app-set-boolean-icon-column="{{row.entity[col.field]}}"></div>', (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_format')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'use_for_vector', '1', '1', 3, 100, 'left', 'extraction_27', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_format'), '<div data-app-set-boolean-icon-column="{{row.entity[col.field]}}"></div>', (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_format')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'layer_id', '1', '1', 0, 150, 'left', 'extraction_28', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer'), NULL,(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'layer', '1', '1', 1, 150, 'left', 'extraction_29', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer'), NULL,(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'category', '1', '1', 2, 150, 'left', 'extraction_30', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer'), NULL,(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'restriction', '1', '1', 3, 100, 'left', 'extraction_31', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer'), NULL,(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer')); + INSERT INTO s_vitis.vm_table_field (table_field_id, name, sortable, resizeable, index, width, align, label_id, ressource_id, template, tab_id) VALUES ((SELECT nextval('s_vitis.seq_vm'::regclass)), 'unused_attributes', '1', '1', 4, 110, 'left', 'extraction_32', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer'), '<div data-app-extraction-ref-unused-attributes-column="{{row.entity[col.field]}}"></div>',(SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer')); + INSERT INTO s_vitis.vm_section (label_id, name, index, event, tab_id, template, ressource_id, module) VALUES ('extraction_1', 'general', 1, 'Javascript:loadSectionForm', (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction'), 'workspaceListTpl.html', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_extraction'), 'extraction'); + INSERT INTO s_vitis.vm_section (label_id, name, index, event, tab_id, template, ressource_id, module) VALUES ('extraction_11', 'general', 1, 'Javascript:loadSectionForm', (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_coordsys'), 'workspaceListTpl.html', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_coordsys'), 'extraction'); + INSERT INTO s_vitis.vm_section (label_id, name, index, event, tab_id, template, ressource_id, module) VALUES ('extraction_15', 'general', 1, 'Javascript:loadSectionForm', (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_format'), 'workspaceListTpl.html', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_format'), 'extraction'); + INSERT INTO s_vitis.vm_section (label_id, name, index, event, tab_id, template, ressource_id, module) VALUES ('extraction_19', 'general', 1, 'Javascript:loadSectionForm', (SELECT tab_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer'), 'workspaceListTpl.html', (SELECT ressource_id FROM s_vitis.vm_tab WHERE vm_tab.name = 'extraction_layer'), 'extraction'); + SELECT s_vitis.wabInsertState('s_extraction', 'rt_extraction_status','START', 0); + SELECT s_vitis.wabInsertState('s_extraction', 'rt_extraction_status','Nouveau', 10); + SELECT s_vitis.wabInsertState('s_extraction', 'rt_extraction_status','AE Demandé', 20); + SELECT s_vitis.wabInsertState('s_extraction', 'rt_extraction_status','AE Généré', 30); + SELECT s_vitis.wabInsertState('s_extraction', 'rt_extraction_status','AE Soumis', 40); + SELECT s_vitis.wabInsertState('s_extraction', 'rt_extraction_status','Autorisée', 70); + SELECT s_vitis.wabInsertState('s_extraction', 'rt_extraction_status','Refusée', 100); + SELECT s_vitis.wabInsertState('s_extraction', 'rt_extraction_status','Terminée', 100); + CREATE TABLE s_extraction.rt_extraction_status_group( status_id integer NOT NULL, group_id integer NOT NULL, extraction_status_group_id integer NOT NULL, CONSTRAINT pk_workspace_group PRIMARY KEY (extraction_status_group_id), CONSTRAINT fk_group_id_workspace FOREIGN KEY (group_id) REFERENCES s_vitis."group" (group_id) MATCH SIMPLE ON UPDATE RESTRICT ON DELETE CASCADE, CONSTRAINT fk_status_id FOREIGN KEY (status_id) REFERENCES s_extraction.rt_extraction_status (status_id) MATCH SIMPLE ON UPDATE RESTRICT ON DELETE CASCADE)WITH ( OIDS=FALSE); + ALTER TABLE s_extraction.rt_extraction_status_group OWNER TO u_vitis; + GRANT ALL ON TABLE s_extraction.rt_extraction_status_group TO u_vitis; + GRANT SELECT ON TABLE s_extraction.rt_extraction_status_group TO extraction_user; + GRANT SELECT ON TABLE s_extraction.rt_extraction_status_group TO extraction_admin; + CREATE OR REPLACE VIEW s_extraction.v_extraction AS SELECT extraction.bo_id,extraction.status,extraction.history,extraction.creation_date,extraction.requestor,extraction.ae,extraction.extent,extraction.company,extraction.layers,extraction.vector_format_id,extraction.vector_format_id AS format_id,extraction.coordsys_id,extraction.raster_format_id,extraction.extent_method,extraction.signed,extraction.accepted_by_cpa,extraction.identification_complete,extraction.definition_complete,extraction.priority_id,extraction.id_com,extraction.id_conseil,extraction.note,rt_extraction_status.progress AS progress_level,extraction.status AS status_name FROM s_extraction.extraction LEFT JOIN s_extraction.rt_extraction_status ON extraction.status::text = rt_extraction_status.name::text LEFT JOIN s_extraction.rt_extraction_status_group on rt_extraction_status.status_id = rt_extraction_status_group.status_id LEFT JOIN s_vitis.user_group ON "rt_extraction_status_group".group_id = user_group.group_id LEFT JOIN s_vitis."user" ON "user_group".user_id = "user".user_id WHERE "user".login::name = "current_user"(); + ALTER TABLE s_extraction.v_extraction OWNER TO u_vitis; + GRANT ALL ON TABLE s_extraction.v_extraction TO u_vitis; + GRANT ALL ON TABLE s_extraction.v_extraction TO extraction_admin; + GRANT ALL ON TABLE s_extraction.v_extraction TO extraction_user; + INSERT INTO s_extraction.rt_extraction_status_group(status_id, group_id, extraction_status_group_id) VALUES ((select status_id from s_extraction.rt_extraction_status where name ='START') , (select group_id from s_vitis.group where name ='demandeur'), (select nextval('s_extraction.seq_common'))); + INSERT INTO s_extraction.rt_extraction_status_group(status_id, group_id, extraction_status_group_id) VALUES ((select status_id from s_extraction.rt_extraction_status where name ='Nouveau') , (select group_id from s_vitis.group where name ='demandeur'), (select nextval('s_extraction.seq_common'))); + INSERT INTO s_extraction.rt_extraction_status_group(status_id, group_id, extraction_status_group_id) VALUES ((select status_id from s_extraction.rt_extraction_status where name ='AE Demandé') , (select group_id from s_vitis.group where name ='demandeur'), (select nextval('s_extraction.seq_common'))); + INSERT INTO s_extraction.rt_extraction_status_group(status_id, group_id, extraction_status_group_id) VALUES ((select status_id from s_extraction.rt_extraction_status where name ='AE Généré') , (select group_id from s_vitis.group where name ='demandeur'), (select nextval('s_extraction.seq_common'))); + INSERT INTO s_extraction.rt_extraction_status_group(status_id, group_id, extraction_status_group_id) VALUES ((select status_id from s_extraction.rt_extraction_status where name ='AE Soumis') , (select group_id from s_vitis.group where name ='demandeur'), (select nextval('s_extraction.seq_common'))); + INSERT INTO s_extraction.rt_extraction_status_group(status_id, group_id, extraction_status_group_id) VALUES ((select status_id from s_extraction.rt_extraction_status where name ='Autorisée') , (select group_id from s_vitis.group where name ='demandeur'), (select nextval('s_extraction.seq_common'))); + INSERT INTO s_extraction.rt_extraction_status_group(status_id, group_id, extraction_status_group_id) VALUES ((select status_id from s_extraction.rt_extraction_status where name ='Refusée') , (select group_id from s_vitis.group where name ='demandeur'), (select nextval('s_extraction.seq_common'))); + INSERT INTO s_extraction.rt_extraction_status_group(status_id, group_id, extraction_status_group_id) VALUES ((select status_id from s_extraction.rt_extraction_status where name ='Terminée') , (select group_id from s_vitis.group where name ='demandeur'), (select nextval('s_extraction.seq_common'))); + INSERT INTO s_extraction.rt_extraction_status_group(status_id, group_id, extraction_status_group_id) VALUES ((select status_id from s_extraction.rt_extraction_status where name ='AE Soumis') , (select group_id from s_vitis.group where name ='controleur'), (select nextval('s_extraction.seq_common'))); + INSERT INTO s_extraction.rt_extraction_status_group(status_id, group_id, extraction_status_group_id) VALUES ((select status_id from s_extraction.rt_extraction_status where name ='Autorisée') , (select group_id from s_vitis.group where name ='controleur'), (select nextval('s_extraction.seq_common'))); + INSERT INTO s_extraction.rt_extraction_status_group(status_id, group_id, extraction_status_group_id) VALUES ((select status_id from s_extraction.rt_extraction_status where name ='Refusée') , (select group_id from s_vitis.group where name ='controleur'), (select nextval('s_extraction.seq_common'))); + ALTER TABLE s_extraction."extraction" ADD COLUMN email character varying(100); + + -- Frédéric le 05/09/2017 à 16h30 + ALTER TABLE s_extraction.rt_extraction_status OWNER TO u_vitis; + REVOKE ALL ON TABLE s_extraction.rt_extraction_status FROM postgres; + + GRANT ALL ON TABLE s_extraction.extraction TO extraction_admin; + GRANT ALL ON TABLE s_extraction.extraction TO extraction_user; + + GRANT ALL ON TABLE s_extraction.rt_coordsys TO extraction_admin; + GRANT SELECT ON TABLE s_extraction.rt_coordsys TO extraction_user; + + GRANT ALL ON TABLE s_extraction.rt_extraction_status TO extraction_admin; + GRANT SELECT ON TABLE s_extraction.rt_extraction_status TO extraction_user; + + GRANT ALL ON TABLE s_extraction.rt_format TO extraction_admin; + GRANT SELECT ON TABLE s_extraction.rt_format TO extraction_user; + + GRANT ALL ON TABLE s_extraction.rt_layer TO extraction_admin; + GRANT SELECT ON TABLE s_extraction.rt_layer TO extraction_user; + + GRANT SELECT ON TABLE s_extraction.rt_feature_model TO extraction_admin; + GRANT SELECT ON TABLE s_extraction.rt_feature_model TO extraction_user; + ]]> + </code> + </query> + </queriesCollection> +</sqlQueries> \ No newline at end of file diff --git a/src/module_extraction/web_service/ws/Coordsys.class.inc b/src/module_extraction/web_service/ws/Coordsys.class.inc new file mode 100755 index 0000000000000000000000000000000000000000..9d472a5ff6057965f99e915189dd67f06d8f6f54 --- /dev/null +++ b/src/module_extraction/web_service/ws/Coordsys.class.inc @@ -0,0 +1,90 @@ +<?php + +require_once __DIR__ . '/ExtractionExtraction.class.inc'; +require_once dirname($_SERVER['SCRIPT_FILENAME']) . '/class/vitis_lib/Connection.class.inc'; + +/** + * \file Coordsys.class.inc + * \class Coordsys + * + * \author WAB <support.wab@veremes.com>. + * + * \brief This file contains the Coordsys php class + * + * This class defines operation for one Coordsys + * + */ +class Coordsys extends ExtractionExtraction { + + public $oError; + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + * @param type $oConnection connection object + */ + function __construct($aPath, $aValues, $properties, $bShortcut = false) { + parent::__construct($aPath, $aValues, $properties, $bShortcut); + } + + /** + * @SWG\Get(path="/coordsyss/{id_coordsys}", + * tags={"Coordsyss"}, + * summary="Get Coordsys", + * description="Request to get Coordsys by id", + * operationId="GET", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Parameter( + * name="id_coordsys", + * in="path", + * description="id_coordsys", + * required=true, + * type="integer", + * format="int32" + * ), + * @SWG\Parameter( + * name="attributs", + * in="query", + * description="list of attributs", + * required=false, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="Coordsys Response", + * @SWG\Schema(ref="#/definitions/coordsyss") + * ) + * ) + */ + + /** + * get informations about mode + */ + function GET() { + $this->aFields = $this->getFields($this->aProperties['schema_extraction'], "rt_coordsys", "coordsys_id"); + } + + /** + * delete a Point_situation + */ + function DELETE() { + $this->oConnection->oBd->delete($this->aProperties['schema_extraction'], 'rt_coordsys', 'coordsys_id', $this->aValues["my_vitis_id"], 'integer'); + if ($this->oConnection->oBd->enErreur()) { + $this->oError = new Error(1, $this->oConnection->oBd->getBDMessage()); + } else { + $this->aFields["coordsys_id"] = $this->aValues["my_vitis_id"]; + } + } + +} + +?> \ No newline at end of file diff --git a/src/module_extraction/web_service/ws/Coordsyss.class.inc b/src/module_extraction/web_service/ws/Coordsyss.class.inc new file mode 100755 index 0000000000000000000000000000000000000000..f3160591aa04261ca425e80edfcb37d60197da14 --- /dev/null +++ b/src/module_extraction/web_service/ws/Coordsyss.class.inc @@ -0,0 +1,266 @@ +<?php + +/** + * \file Coordsyss.class.inc + * \class Coordsyss + * + * \author WAB <support.wab@veremes.com>. + * + * \brief This file contains the Coordsyss php class + * + * This class defines Rest Api to Vitis Coordsyss + * + */ +require_once __DIR__ . '/ExtractionExtraction.class.inc'; +require_once 'Coordsys.class.inc'; + + +class Coordsyss extends ExtractionExtraction { + /** + * @SWG\Definition( + * definition="/coordsyss", + * allOf={ + * @SWG\Schema(ref="#/definitions/coordsyss") + * } + * ) + * * @SWG\Tag( + * name="Coordsyss", + * description="Operations about Coordsyss" + * ) + */ + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + */ + function __construct($aPath, $aValues, $properties, $bShortcut = false) { + parent::__construct($aPath, $aValues, $properties, $bShortcut); + } + + /** + * @SWG\Get(path="/coordsyss", + * tags={"Coordsyss"}, + * summary="Get Coordsyss", + * description="Request to get Coordsyss", + * operationId="GET", + * produces={"application/xml", "application/json", "application/x-vm-json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Parameter( + * name="order_by", + * in="query", + * description="list of ordering fields", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="sort_order", + * in="query", + * description="sort_order", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="limit", + * in="query", + * description="number of element", + * required=false, + * type="integer", + * format="int32" + * ), + * @SWG\Parameter( + * name="offset", + * in="query", + * description="index of first element", + * required=false, + * type="string", + * format="int32" + * ), + * @SWG\Parameter( + * name="attributs", + * in="query", + * description="list of attributs", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="filter", + * in="query", + * description="filter results", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="distinct", + * in="query", + * description="delete duplicates", + * required=false, + * type="boolean" + * ), + * @SWG\Response( + * response=200, + * description="coordsys Response", + * @SWG\Schema(ref="#/definitions/coordsyss") + * ) + * ) + */ + + /** + * get Coordsyss + * @return Coordsyss + */ + function GET() { + $aReturn = $this->genericGet($this->aProperties['schema_extraction'], "rt_coordsys", "coordsys_id"); + $sMessage = $aReturn['sMessage']; + return $sMessage; + } + + /** + * @SWG\Post(path="/coordsyss", + * tags={"Coordsyss"}, + * summary="Add coordsys", + * description="Request to add Coordsyss", + * operationId="POST", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="coordsys Response", + * @SWG\Schema(ref="#/definitions/coordsyss") + * ) + * ) + */ + + /** + * insert coordsys + * @return id of the coordsys created + */ + function POST() { + $aReturn = $this->genericPost($this->aProperties['schema_extraction'], 'rt_coordsys', '', 'coordsys_id'); + return $aReturn['sMessage']; + } + + /** + * @SWG\Put(path="/coordsyss/{id_coordsys}", + * tags={"Coordsyss"}, + * summary="update Coordsyss", + * description="Request to update Coordsyss", + * operationId="PUT", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="Coordsys token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_coordsys", + * in="path", + * description="id of the Coordsyss", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/coordsyss") + * ) + * ) + */ + + /** + * update coordsyss + * @return id of coordsyss updated or error object if a coordsyss is not updated + */ + function PUT() { + $aReturn = $this->genericPut($this->aProperties['schema_extraction'], 'rt_coordsys', 'coordsys_id'); + + return $aReturn['sMessage']; + } + + /** + * @SWG\Delete(path="/coordsyss", + * tags={"Coordsyss"}, + * summary="delete Coordsyss", + * description="Request to delete Coordsyss", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="idList", + * in="query", + * description="id of the coordsys", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="coordsys Response", + * @SWG\Schema(ref="#/definitions/coordsyss") + * ) + * ) + */ + /** + * @SWG\Delete(path="/coordsyss/{id_coordsys}", + * tags={"Coordsyss"}, + * summary="delete Coordsyss", + * description="Request to delete Coordsyss", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="Coordsys token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_coordsys", + * in="path", + * description="id of the Coordsyss", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/coordsyss") + * ) + * ) + */ + + /** + * delete coordsyss + * @return id of coordsyss deleted or error object if a coordsyss is not deleted + */ + function DELETE() { + $aReturn = $this->genericDelete($this->aProperties['schema_extraction'], 'rt_coordsys', 'coordsys_id'); + return $aReturn['sMessage']; + } + + +} + +?> \ No newline at end of file diff --git a/src/module_extraction/web_service/ws/Extraction.class.inc b/src/module_extraction/web_service/ws/Extraction.class.inc new file mode 100755 index 0000000000000000000000000000000000000000..162782d866f5bb1e9e93232475efae0fc060832f --- /dev/null +++ b/src/module_extraction/web_service/ws/Extraction.class.inc @@ -0,0 +1,125 @@ +<?php + +require_once __DIR__ . '/ExtractionExtraction.class.inc'; +require_once dirname($_SERVER['SCRIPT_FILENAME']) . '/class/vitis_lib/Connection.class.inc'; + +/** + * \file Extraction.class.inc + * \class Extraction + * + * \author WAB <support.wab@veremes.com>. + * + * \brief This file contains the Extraction php class + * + * This class defines operation for one Extraction + * + */ +class Extraction extends ExtractionExtraction { + + public $oError; + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + * @param type $oConnection connection object + */ + function __construct($aPath, $aValues, $properties, $bShortcut = false) { + parent::__construct($aPath, $aValues, $properties, $bShortcut); + } + + /** + * @SWG\Get(path="/extractions/{id_extraction}", + * tags={"Extractions"}, + * summary="Get Extraction", + * description="Request to get Extraction by id", + * operationId="GET", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Parameter( + * name="id_extraction", + * in="path", + * description="id_extraction", + * required=true, + * type="integer", + * format="int32" + * ), + * @SWG\Parameter( + * name="attributs", + * in="query", + * description="list of attributs", + * required=false, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="Extraction Response", + * @SWG\Schema(ref="#/definitions/extractions") + * ) + * ) + */ + + /** + * get informations about mode + */ + function GET() { + require $this->sRessourcesFile; + $this->aFields = $this->getFields($this->aProperties['schema_extraction'], "extraction", "bo_id"); + // Url vers l'acte d'engagement. + if (!empty($this->aFields['ae'])) + $this->aFields['ae'] = $this->aProperties['web_server_name'] . '/' . $this->aProperties['ws_data_alias'] . '/extraction/extraction_extraction_extraction/documents/' . $this->aValues["my_vitis_id"] . '/ae/' . $this->aFields['ae']; + + // Date au format Français. + if ($this->aProperties["language"] == 'fr') { + $oDate = new DateTime($this->aFields['creation_date']); + $this->aFields['creation_date'] = $oDate->format('d/m/Y'); + } + + // Libellés du champ "Commune". + if (!empty($this->aFields['id_com'])) { + $sSql = str_replace('[id_com]', str_replace('|', ',', $this->aFields['id_com']), $aSql['getCommuneLabel']); + $oPDOresult = $this->oConnection->oBd->executeWithParams($sSql, array()); + if (!$this->oConnection->oBd->enErreur()) { + while ($aLine = $this->oConnection->oBd->ligneSuivante($oPDOresult)) { + $aCommune[] = $aLine['nom_com']; + } + $this->aFields['id_com_label'] = implode(',', $aCommune); + } + } + + // Libellés du champ "Conseil de Territoire". + if (!empty($this->aFields['id_conseil'])) { + $sSql = str_replace('[id_conseil]', str_replace('|', ',', $this->aFields['id_conseil']), $aSql['getConseilLabel']); + $oPDOresult = $this->oConnection->oBd->executeWithParams($sSql, array()); + if (!$this->oConnection->oBd->enErreur()) { + while ($aLine = $this->oConnection->oBd->ligneSuivante($oPDOresult)) { + $aConseil[] = $aLine['nom_epci']; + } + $this->aFields['id_conseil_label'] = implode(',', $aConseil); + } + } + + // Nom de l'état de l'extraction. + $this->aFields['status_name'] = $this->aFields['status']; + } + + /** + * delete a Point_situation + */ + function DELETE() { + $this->oConnection->oBd->delete($this->aProperties['schema_extraction'], 'extraction', 'bo_id', $this->aValues["my_vitis_id"], 'integer'); + if ($this->oConnection->oBd->enErreur()) { + $this->oError = new Error(1, $this->oConnection->oBd->getBDMessage()); + } else { + $this->aFields["bo_id"] = $this->aValues["my_vitis_id"]; + } + } +} +?> \ No newline at end of file diff --git a/src/module_extraction/web_service/ws/ExtractionExtraction.class.inc b/src/module_extraction/web_service/ws/ExtractionExtraction.class.inc new file mode 100755 index 0000000000000000000000000000000000000000..b2cf23b422d168991986355482121ead3400e08e --- /dev/null +++ b/src/module_extraction/web_service/ws/ExtractionExtraction.class.inc @@ -0,0 +1,45 @@ +<?php + +require_once dirname($_SERVER['SCRIPT_FILENAME']) . "/class/vitis_lib/DbClass.class.inc"; +require_once dirname($_SERVER['SCRIPT_FILENAME']) . '/ws/vitis/Vitis.class.inc'; +require_once 'vmlib/logUtil.inc'; + +class ExtractionExtraction extends Vitis { + + //Chemin du fichier de ressources contenant les requêtes SQL + var $sRessourcesFile = 'ws/extraction/ExtractionExtraction.class.sql.inc'; + + function __construct($aPath, $aValues, $properties, $bShortcut) { + parent::__construct($aPath, $aValues, $properties, $bShortcut); + } + + /** + * Upload un document dans le ws_data du module Extraction. + * @param type $sIndex + * @param type $sFolder + */ + function uploadDocument($sIndex, $sFolder) { + // Crée le répertoire si inexistant. + $sDirPath = $this->aProperties['ws_data_dir'] . '/extraction/' . $sFolder . '/documents/' . $this->aValues["my_vitis_id"] . '/' . $sIndex . '/'; + if (!is_dir($sDirPath)) + mkdir($sDirPath, 0777, true); + // Ecrit le fichier. + if (!empty($_FILES[$sIndex])) { + $sErrorMessage = uploadFile($sIndex, "", $sDirPath . $_FILES[$sIndex]["name"], $_FILES[$sIndex]['size'] + 1); + if ($sErrorMessage != "") + writeToErrorLog($sErrorMessage); + } + else { + $sfileContentIndex = $sIndex . '_file'; + $sfileNameIndex = $sIndex . '_name'; + if (!empty($this->aValues[$sfileContentIndex])) { + + $this->aValues[$sIndex] = $this->aValues[$sfileNameIndex]; + $fp = fopen($sDirPath . $this->aValues[$sfileNameIndex], "w"); + fwrite($fp, $this->aValues[$sfileContentIndex]); + fclose($fp); + } + } + } +} +?> \ No newline at end of file diff --git a/src/module_extraction/web_service/ws/ExtractionExtraction.class.sql.inc b/src/module_extraction/web_service/ws/ExtractionExtraction.class.sql.inc new file mode 100755 index 0000000000000000000000000000000000000000..a1e819a34e1998baa7902ed09ba4e06d1a270b24 --- /dev/null +++ b/src/module_extraction/web_service/ws/ExtractionExtraction.class.sql.inc @@ -0,0 +1,17 @@ +<?php +//Définition des requêtes de l'api Vitis +$aSql['checkIP'] = "SELECT user_id, ip_constraint FROM [sSchemaFramework].user WHERE login ='[sLogin]'"; +$aSql['getGroups'] = "SELECT group_id FROM [sSchemaFramework].user_group WHERE user_id = [user_id]"; +$aSql['loginUnique'] = 'SELECT UPPER("login") FROM [sSchemaFramework]."user" WHERE UPPER("login")=UPPER(\'sLoginUser\')'; +$aSql['getLoginbyId'] = 'SELECT "login" FROM [sSchemaFramework]."user" WHERE user_id=[user_id]'; +$aSql['getTableColumn'] = 'SELECT column_name FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = \'[sSchemaFramework]\' and table_name= \'[sTable]\''; +$aSql['getUserPrivileges'] = 'SELECT groname FROM pg_user s LEFT OUTER JOIN pg_group g on (s.usesysid = any(g.grolist) )inner join [sSchemaFramework].user on "user".login = usename WHERE user_id = [user_id]'; +$aSql['listDomain'] = 'SELECT distinct domain, alias FROM [sSchemaFramework].domain WHERE "type" = \'AD\''; +$aSql['createRolname'] = 'CREATE ROLE "vitis_[sDomain]" NOSUPERUSER INHERIT NOCREATEDB CREATEROLE;'; +$aSql['getInfoRolname'] = 'SELECT * FROM pg_authid WHERE rolname = \'vitis_[sDomain]\''; +// Extraction +$aSql['getCommuneLabel'] = 'SELECT nom_com FROM public.ref_cpa_limadm_commune WHERE id_com IN([id_com])'; +$aSql['getConseilLabel'] = 'SELECT nom_epci FROM public.ref_amp_lim_ct WHERE objectid IN([id_conseil])'; +$aSql['getRtLayer'] = 'SELECT layer_id, layer, category FROM [schema_extraction].rt_layer [sql_params] ORDER BY category, layer'; +$aSql['getUserGroups'] = 'SELECT name FROM [schema_framework]."group",[schema_framework].user_group WHERE "group".group_id = user_group.group_id AND user_group.user_id = [user_id]'; +?> \ No newline at end of file diff --git a/src/module_extraction/web_service/ws/Extractions.class.inc b/src/module_extraction/web_service/ws/Extractions.class.inc new file mode 100755 index 0000000000000000000000000000000000000000..456c2aa73d065f0a3afeec6a6b03be3a2300704e --- /dev/null +++ b/src/module_extraction/web_service/ws/Extractions.class.inc @@ -0,0 +1,435 @@ +<?php + +/** + * \file Extractions.class.inc + * \class Extractions + * + * \author WAB <support.wab@veremes.com>. + * + * \brief This file contains the Extractions php class + * + * This class defines Rest Api to Vitis Extractions + * + */ +require_once __DIR__ . '/ExtractionExtraction.class.inc'; +require_once 'Extraction.class.inc'; +require_once(dirname($_SERVER['SCRIPT_FILENAME']) . '/class/wab_lib/BusinessObject.class.inc'); + +class Extractions extends ExtractionExtraction { + /** + * @SWG\Definition( + * definition="/extractions", + * allOf={ + * @SWG\Schema(ref="#/definitions/extractions") + * } + * ) + * * @SWG\Tag( + * name="Extractions", + * description="Operations about Extractions" + * ) + */ + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + */ + function __construct($aPath, $aValues, $properties, $bShortcut = false) { + parent::__construct($aPath, $aValues, $properties, $bShortcut); + } + + /** + * @SWG\Get(path="/extractions", + * tags={"Extractions"}, + * summary="Get Extractions", + * description="Request to get Extractions", + * operationId="GET", + * produces={"application/xml", "application/json", "application/x-vm-json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Parameter( + * name="order_by", + * in="query", + * description="list of ordering fields", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="sort_order", + * in="query", + * description="sort_order", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="limit", + * in="query", + * description="number of element", + * required=false, + * type="integer", + * format="int32" + * ), + * @SWG\Parameter( + * name="offset", + * in="query", + * description="index of first element", + * required=false, + * type="string", + * format="int32" + * ), + * @SWG\Parameter( + * name="attributs", + * in="query", + * description="list of attributs", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="filter", + * in="query", + * description="filter results", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="distinct", + * in="query", + * description="delete duplicates", + * required=false, + * type="boolean" + * ), + * @SWG\Response( + * response=200, + * description="extraction Response", + * @SWG\Schema(ref="#/definitions/extractions") + * ) + * ) + */ + /** + * @SWG\Get(path="/extractions/Layers", + * tags={"Extractions"}, + * summary="Get extraction layers", + * description="Request to get the layers of the extractions", + * operationId="GET", + * produces={"application/xml", "application/json", "application/x-vm-json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/extractions") + * ) + * ) + */ + + /** + * get Extractions + * @return Extractions + */ + function GET() { + if (!empty($this->aPath[2]) && $this->aPath[2] == "Layers") + $sMessage = $this->getLayers(); + else { + $aReturn = $this->genericGet($this->aProperties['schema_extraction'], "v_extraction", "bo_id"); + $sMessage = $aReturn['sMessage']; + } + return $sMessage; + } + + /** + * @SWG\Post(path="/extractions", + * tags={"Extractions"}, + * summary="Add extraction", + * description="Request to add Extractions", + * operationId="POST", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="extraction Response", + * @SWG\Schema(ref="#/definitions/extractions") + * ) + * ) + */ + + /** + * insert extraction + * @return id of the extraction created + */ + function POST() { + $aReturn = $this->genericPost($this->aProperties['schema_extraction'], 'extraction', $this->aProperties['schema_extraction'].'.bo_id_extraction_seq', 'bo_id'); + $this->aValues["bo_id"] = $this->aValues['my_vitis_id']; + eval('$this->' . $this->aValues['tr_status_method'] . '();'); + return $aReturn['sMessage']; + } + + /** + * @SWG\Put(path="/extractions/{id_extraction}", + * tags={"Extractions"}, + * summary="update Extractions", + * description="Request to update Extractions", + * operationId="PUT", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="Extraction token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_extraction", + * in="path", + * description="id of the Extractions", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/extractions") + * ) + * ) + */ + + /** + * update extractions + * @return id of extractions updated or error object if a extractions is not updated + */ + function PUT() { + // Upload l'acte d'engagement. + $this->uploadDocument('ae', 'extraction_extraction_extraction'); + // + $aReturn = $this->genericPut($this->aProperties['schema_extraction'], 'extraction', 'bo_id'); + $this->aValues["bo_id"] = $this->aValues['my_vitis_id']; + // Méthode de transition. + if (!empty($this->aValues['tr_status_method'])) + eval('$this->' . $this->aValues['tr_status_method'] . '();'); + return $aReturn['sMessage']; + } + + /** + * @SWG\Delete(path="/extractions", + * tags={"Extractions"}, + * summary="delete Extractions", + * description="Request to delete Extractions", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="idList", + * in="query", + * description="id of the extraction", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="extraction Response", + * @SWG\Schema(ref="#/definitions/extractions") + * ) + * ) + */ + /** + * @SWG\Delete(path="/extractions/{id_extraction}", + * tags={"Extractions"}, + * summary="delete Extractions", + * description="Request to delete Extractions", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="Extraction token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_extraction", + * in="path", + * description="id of the Extractions", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/extractions") + * ) + * ) + */ + + /** + * delete extractions + * @return id of extractions deleted or error object if a extractions is not deleted + */ + function DELETE() { + $aReturn = $this->genericDelete($this->aProperties['schema_extraction'], 'extraction', 'bo_id'); + return $aReturn['sMessage']; + } + + + /** + * Transition Method trGenerer + */ + function trGenerer() { + $this->oBO = new WabBusinessObject($this->oConnection->oBd, array(), $this->aValues, $this->aProperties, 'extraction', $this->aValues['bo_id']); + // Check si la table existe si oui change l'état + $this->oBO->wabSetStatus($this->aProperties["schema_extraction"], "extraction", "bo_id", $this->aValues["bo_id"], "AE Généré"); + + } + + /** + * Transition Method trNouveau + */ + function trNouveau() { + $this->oBO = new WabBusinessObject($this->oConnection->oBd, array(), $this->aValues, $this->aProperties, 'extraction', $this->aValues['bo_id']); + + // Check si la table existe si oui change l'état + $this->oBO->wabSetStatus($this->aProperties["schema_extraction"], "extraction", "bo_id", $this->aValues["bo_id"], "Nouveau"); + + } + + /** + * Transition Method trTerminer + */ + function trTerminer() { + $this->oBO = new WabBusinessObject($this->oConnection->oBd, array(), $this->aValues, $this->aProperties, 'extraction', $this->aValues['bo_id']); + + // Check si la table existe si oui change l'état + $this->oBO->wabSetStatus($this->aProperties["schema_extraction"], "extraction", "bo_id", $this->aValues["bo_id"], "Terminée"); + + } + + /** + * Transition Method trAutoriser + */ + function trAutoriser() { + $this->oBO = new WabBusinessObject($this->oConnection->oBd, array(), $this->aValues, $this->aProperties, 'extraction', $this->aValues['bo_id']); + $this->oBO->insertOrder('D16ECS75P', 'bo_id='.$this->aValues['bo_id'], $this->aValues['priority_id'], 2 ); + // Check si la table existe si oui change l'état + $this->oBO->wabSetStatus($this->aProperties["schema_extraction"], "extraction", "bo_id", $this->aValues["bo_id"], "Autorisée"); + + } + + /** + * Transition Method trDemander + */ + function trDemander() { + $this->oBO = new WabBusinessObject($this->oConnection->oBd, array(), $this->aValues, $this->aProperties, 'extraction', $this->aValues['bo_id']); + $this->oBO->insertOrder('D14RHVRJC', 'bo_id='.$this->aValues['bo_id'], 1, 2); + // Check si la table existe si oui change l'état + $this->oBO->wabSetStatus($this->aProperties["schema_extraction"], "extraction", "bo_id", $this->aValues["bo_id"], "AE Demandé"); + + } + + /** + * Transition Method trResoumettre + */ + function trResoumettre() { + $this->oBO = new WabBusinessObject($this->oConnection->oBd, array(), $this->aValues, $this->aProperties, 'extraction', $this->aValues['bo_id']); + + // Check si la table existe si oui change l'état + $this->oBO->wabSetStatus($this->aProperties["schema_extraction"], "extraction", "bo_id", $this->aValues["bo_id"], "AE Généré"); + //$this->sendmail(9904); + } + + /** + * Transition Method trSoumettre + */ + function trSoumettre() { + $this->oBO = new WabBusinessObject($this->oConnection->oBd, array(), $this->aValues, $this->aProperties, 'extraction', $this->aValues['bo_id']); + + // Check si la table existe si oui change l'état + $this->oBO->wabSetStatus($this->aProperties["schema_extraction"], "extraction", "bo_id", $this->aValues["bo_id"], "AE Soumis"); + $this->oBO->sendmail(39); + } + + /** + * Transition Method trRefuser + */ + function trRefuser() { + $this->oBO = new WabBusinessObject($this->oConnection->oBd, array(), $this->aValues, $this->aProperties, 'extraction', $this->aValues['bo_id']); + + // Check si la table existe si oui change l'état + $this->oBO->wabSetStatus($this->aProperties["schema_extraction"], "extraction", "bo_id", $this->aValues["bo_id"], "Refusée"); + //$this->sendmail(9902); + } + + /** + * Liste des couches. + */ + function getLayers() { + require $this->sRessourcesFile; + // Liste des groupes de l'utilisateur. + $sSql = str_replace('[schema_framework]', $this->aProperties['schema_framework'], $aSql['getUserGroups']); + $sSql = str_replace('[user_id]', $_SESSION['ses_user_id'], $sSql); + $oPDOresult = $this->oConnection->oBd->executeWithParams($sSql, array()); + if (!$this->oConnection->oBd->enErreur()) { + $aResult = $this->oConnection->oBd->getResultTableAssoc($oPDOresult); + foreach($aResult as $aUserGroup) { + $aUserGroups[] = $aUserGroup['name']; + } + // Restriction de l'utilisateur suivant ses groupes. + if (in_array('interne', $aUserGroups)) + $sSqlParams = ''; + else if (in_array('restreint', $aUserGroups)) + $sSqlParams = " WHERE restriction <> 'interne'"; + else + $sSqlParams = " WHERE restriction = 'public'"; + // Liste des cartes. + $this->aFields['treeview_layers'] = array(); + $sSql = str_replace('[schema_extraction]', $this->aProperties['schema_extraction'], $aSql['getRtLayer']); + $sSql = str_replace('[sql_params]', $sSqlParams, $sSql); + $oPDOresult = $this->oConnection->oBd->executeWithParams($sSql, array()); + if (!$this->oConnection->oBd->enErreur()) { + $aRtLayer = $this->oConnection->oBd->getResultTableAssoc($oPDOresult); + $aLayers = array(); + if (!empty($aRtLayer)) { + foreach($aRtLayer as $aLayer) + $aLayers[$aLayer['category']][] = array("text" => $aLayer['layer'], "value" => $aLayer['layer_id']); + } + $this->aFields['layers'] = $aLayers; + $aXmlRacineAttribute['status']=1; + $sMessage = $this->asDocument('','vitis',$this->aValues['sEncoding'],True,$aXmlRacineAttribute,$this->aValues['sSourceEncoding'],$this->aValues['output']); + } + else { + $aXmlRacineAttribute['status']=0; + $this->aFields['error'] = "Request error."; + $sMessage = $this->asDocument('','vitis',$this->aValues['sEncoding'],True,$aXmlRacineAttribute,$this->aValues['sSourceEncoding'],$this->aValues['output']); + } + } + else { + $aXmlRacineAttribute['status']=0; + $this->aFields['error'] = "Request error."; + $sMessage = $this->asDocument('','vitis',$this->aValues['sEncoding'],True,$aXmlRacineAttribute,$this->aValues['sSourceEncoding'],$this->aValues['output']); + } + return $sMessage; + } +} +?> \ No newline at end of file diff --git a/src/module_extraction/web_service/ws/Format.class.inc b/src/module_extraction/web_service/ws/Format.class.inc new file mode 100755 index 0000000000000000000000000000000000000000..005eb0b210ef5af675d7c588047aeba96d481e07 --- /dev/null +++ b/src/module_extraction/web_service/ws/Format.class.inc @@ -0,0 +1,90 @@ +<?php + +require_once __DIR__ . '/ExtractionExtraction.class.inc'; +require_once dirname($_SERVER['SCRIPT_FILENAME']) . '/class/vitis_lib/Connection.class.inc'; + +/** + * \file Format.class.inc + * \class Format + * + * \author WAB <support.wab@veremes.com>. + * + * \brief This file contains the Format php class + * + * This class defines operation for one Format + * + */ +class Format extends ExtractionExtraction { + + public $oError; + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + * @param type $oConnection connection object + */ + function __construct($aPath, $aValues, $properties, $bShortcut = false) { + parent::__construct($aPath, $aValues, $properties, $bShortcut); + } + + /** + * @SWG\Get(path="/formats/{id_format}", + * tags={"Formats"}, + * summary="Get Format", + * description="Request to get Format by id", + * operationId="GET", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Parameter( + * name="id_format", + * in="path", + * description="id_format", + * required=true, + * type="integer", + * format="int32" + * ), + * @SWG\Parameter( + * name="attributs", + * in="query", + * description="list of attributs", + * required=false, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="Format Response", + * @SWG\Schema(ref="#/definitions/formats") + * ) + * ) + */ + + /** + * get informations about mode + */ + function GET() { + $this->aFields = $this->getFields($this->aProperties['schema_extraction'], "rt_format", "format_id"); + } + + /** + * delete a Point_situation + */ + function DELETE() { + $this->oConnection->oBd->delete($this->aProperties['schema_extraction'], 'rt_format', 'format_id', $this->aValues["my_vitis_id"], 'integer'); + if ($this->oConnection->oBd->enErreur()) { + $this->oError = new Error(1, $this->oConnection->oBd->getBDMessage()); + } else { + $this->aFields["format_id"] = $this->aValues["my_vitis_id"]; + } + } + +} + +?> \ No newline at end of file diff --git a/src/module_extraction/web_service/ws/Formats.class.inc b/src/module_extraction/web_service/ws/Formats.class.inc new file mode 100755 index 0000000000000000000000000000000000000000..fb2e5ec5ab03aa214c0bc4b767deaf7d2fd1043e --- /dev/null +++ b/src/module_extraction/web_service/ws/Formats.class.inc @@ -0,0 +1,267 @@ +<?php + +/** + * \file Formats.class.inc + * \class Formats + * + * \author WAB <support.wab@veremes.com>. + * + * \brief This file contains the Formats php class + * + * This class defines Rest Api to Vitis Formats + * + */ +require_once __DIR__ . '/ExtractionExtraction.class.inc'; +require_once 'Format.class.inc'; + + +class Formats extends ExtractionExtraction { + /** + * @SWG\Definition( + * definition="/formats", + * allOf={ + * @SWG\Schema(ref="#/definitions/formats") + * } + * ) + * * @SWG\Tag( + * name="Formats", + * description="Operations about Formats" + * ) + */ + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + */ + function __construct($aPath, $aValues, $properties, $bShortcut = false) { + parent::__construct($aPath, $aValues, $properties, $bShortcut); + } + + /** + * @SWG\Get(path="/formats", + * tags={"Formats"}, + * summary="Get Formats", + * description="Request to get Formats", + * operationId="GET", + * produces={"application/xml", "application/json", "application/x-vm-json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Parameter( + * name="order_by", + * in="query", + * description="list of ordering fields", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="sort_order", + * in="query", + * description="sort_order", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="limit", + * in="query", + * description="number of element", + * required=false, + * type="integer", + * format="int32" + * ), + * @SWG\Parameter( + * name="offset", + * in="query", + * description="index of first element", + * required=false, + * type="string", + * format="int32" + * ), + * @SWG\Parameter( + * name="attributs", + * in="query", + * description="list of attributs", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="filter", + * in="query", + * description="filter results", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="distinct", + * in="query", + * description="delete duplicates", + * required=false, + * type="boolean" + * ), + * @SWG\Response( + * response=200, + * description="format Response", + * @SWG\Schema(ref="#/definitions/formats") + * ) + * ) + */ + + /** + * get Formats + * @return Formats + */ + function GET() { + $aReturn = $this->genericGet($this->aProperties['schema_extraction'], "rt_format", "format_id"); + $sMessage = $aReturn['sMessage']; + return $sMessage; + } + + /** + * @SWG\Post(path="/formats", + * tags={"Formats"}, + * summary="Add format", + * description="Request to add Formats", + * operationId="POST", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="format Response", + * @SWG\Schema(ref="#/definitions/formats") + * ) + * ) + */ + + /** + * insert format + * @return id of the format created + */ + function POST() { + $aReturn = $this->genericPost($this->aProperties['schema_extraction'], 'rt_format', '', 'format_id'); + + return $aReturn['sMessage']; + } + + /** + * @SWG\Put(path="/formats/{id_format}", + * tags={"Formats"}, + * summary="update Formats", + * description="Request to update Formats", + * operationId="PUT", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="Format token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_format", + * in="path", + * description="id of the Formats", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/formats") + * ) + * ) + */ + + /** + * update formats + * @return id of formats updated or error object if a formats is not updated + */ + function PUT() { + $aReturn = $this->genericPut($this->aProperties['schema_extraction'], 'rt_format', 'format_id'); + + return $aReturn['sMessage']; + } + + /** + * @SWG\Delete(path="/formats", + * tags={"Formats"}, + * summary="delete Formats", + * description="Request to delete Formats", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="idList", + * in="query", + * description="id of the format", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="format Response", + * @SWG\Schema(ref="#/definitions/formats") + * ) + * ) + */ + /** + * @SWG\Delete(path="/formats/{id_format}", + * tags={"Formats"}, + * summary="delete Formats", + * description="Request to delete Formats", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="Format token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_format", + * in="path", + * description="id of the Formats", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/formats") + * ) + * ) + */ + + /** + * delete formats + * @return id of formats deleted or error object if a formats is not deleted + */ + function DELETE() { + $aReturn = $this->genericDelete($this->aProperties['schema_extraction'], 'rt_format', 'format_id'); + return $aReturn['sMessage']; + } + + +} + +?> \ No newline at end of file diff --git a/src/module_extraction/web_service/ws/Layer.class.inc b/src/module_extraction/web_service/ws/Layer.class.inc new file mode 100755 index 0000000000000000000000000000000000000000..b9a17a3f9043317a8c5c93c4d5d8c0b04aec068b --- /dev/null +++ b/src/module_extraction/web_service/ws/Layer.class.inc @@ -0,0 +1,90 @@ +<?php + +require_once __DIR__ . '/ExtractionExtraction.class.inc'; +require_once dirname($_SERVER['SCRIPT_FILENAME']) . '/class/vitis_lib/Connection.class.inc'; + +/** + * \file Layer.class.inc + * \class Layer + * + * \author WAB <support.wab@veremes.com>. + * + * \brief This file contains the Layer php class + * + * This class defines operation for one Layer + * + */ +class Layer extends ExtractionExtraction { + + public $oError; + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + * @param type $oConnection connection object + */ + function __construct($aPath, $aValues, $properties, $bShortcut = false) { + parent::__construct($aPath, $aValues, $properties, $bShortcut); + } + + /** + * @SWG\Get(path="/layers/{id_layer}", + * tags={"Layers"}, + * summary="Get Layer", + * description="Request to get Layer by id", + * operationId="GET", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Parameter( + * name="id_layer", + * in="path", + * description="id_layer", + * required=true, + * type="integer", + * format="int32" + * ), + * @SWG\Parameter( + * name="attributs", + * in="query", + * description="list of attributs", + * required=false, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="Layer Response", + * @SWG\Schema(ref="#/definitions/layers") + * ) + * ) + */ + + /** + * get informations about mode + */ + function GET() { + $this->aFields = $this->getFields($this->aProperties['schema_extraction'], "rt_layer", "layer_id"); + } + + /** + * delete a Point_situation + */ + function DELETE() { + $this->oConnection->oBd->delete($this->aProperties['schema_extraction'], 'rt_layer', 'layer_id', $this->aValues["my_vitis_id"], 'integer'); + if ($this->oConnection->oBd->enErreur()) { + $this->oError = new Error(1, $this->oConnection->oBd->getBDMessage()); + } else { + $this->aFields["layer_id"] = $this->aValues["my_vitis_id"]; + } + } + +} + +?> \ No newline at end of file diff --git a/src/module_extraction/web_service/ws/Layers.class.inc b/src/module_extraction/web_service/ws/Layers.class.inc new file mode 100755 index 0000000000000000000000000000000000000000..f89ede1bd9d824b2a02c1b18e3471f9c37ffe6a0 --- /dev/null +++ b/src/module_extraction/web_service/ws/Layers.class.inc @@ -0,0 +1,267 @@ +<?php + +/** + * \file Layers.class.inc + * \class Layers + * + * \author WAB <support.wab@veremes.com>. + * + * \brief This file contains the Layers php class + * + * This class defines Rest Api to Vitis Layers + * + */ +require_once __DIR__ . '/ExtractionExtraction.class.inc'; +require_once 'Layer.class.inc'; + + +class Layers extends ExtractionExtraction { + /** + * @SWG\Definition( + * definition="/layers", + * allOf={ + * @SWG\Schema(ref="#/definitions/layers") + * } + * ) + * * @SWG\Tag( + * name="Layers", + * description="Operations about Layers" + * ) + */ + + /** + * construct + * @param type $aPath url of the request + * @param type $aValues parameters of the request + * @param type $properties properties + */ + function __construct($aPath, $aValues, $properties, $bShortcut = false) { + parent::__construct($aPath, $aValues, $properties, $bShortcut); + } + + /** + * @SWG\Get(path="/layers", + * tags={"Layers"}, + * summary="Get Layers", + * description="Request to get Layers", + * operationId="GET", + * produces={"application/xml", "application/json", "application/x-vm-json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Parameter( + * name="order_by", + * in="query", + * description="list of ordering fields", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="sort_order", + * in="query", + * description="sort_order", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="limit", + * in="query", + * description="number of element", + * required=false, + * type="integer", + * format="int32" + * ), + * @SWG\Parameter( + * name="offset", + * in="query", + * description="index of first element", + * required=false, + * type="string", + * format="int32" + * ), + * @SWG\Parameter( + * name="attributs", + * in="query", + * description="list of attributs", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="filter", + * in="query", + * description="filter results", + * required=false, + * type="string" + * ), + * @SWG\Parameter( + * name="distinct", + * in="query", + * description="delete duplicates", + * required=false, + * type="boolean" + * ), + * @SWG\Response( + * response=200, + * description="layer Response", + * @SWG\Schema(ref="#/definitions/layers") + * ) + * ) + */ + + /** + * get Layers + * @return Layers + */ + function GET() { + $aReturn = $this->genericGet($this->aProperties['schema_extraction'], "rt_layer", "layer_id"); + $sMessage = $aReturn['sMessage']; + return $sMessage; + } + + /** + * @SWG\Post(path="/layers", + * tags={"Layers"}, + * summary="Add layer", + * description="Request to add Layers", + * operationId="POST", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="user token", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="layer Response", + * @SWG\Schema(ref="#/definitions/layers") + * ) + * ) + */ + + /** + * insert layer + * @return id of the layer created + */ + function POST() { + $aReturn = $this->genericPost($this->aProperties['schema_extraction'], 'rt_layer', '', 'layer_id'); + + return $aReturn['sMessage']; + } + + /** + * @SWG\Put(path="/layers/{id_layer}", + * tags={"Layers"}, + * summary="update Layers", + * description="Request to update Layers", + * operationId="PUT", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="Layer token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_layer", + * in="path", + * description="id of the Layers", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/layers") + * ) + * ) + */ + + /** + * update layers + * @return id of layers updated or error object if a layers is not updated + */ + function PUT() { + $aReturn = $this->genericPut($this->aProperties['schema_extraction'], 'rt_layer', 'layer_id'); + + return $aReturn['sMessage']; + } + + /** + * @SWG\Delete(path="/layers", + * tags={"Layers"}, + * summary="delete Layers", + * description="Request to delete Layers", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="idList", + * in="query", + * description="id of the layer", + * required=true, + * type="string" + * ), + * @SWG\Response( + * response=200, + * description="layer Response", + * @SWG\Schema(ref="#/definitions/layers") + * ) + * ) + */ + /** + * @SWG\Delete(path="/layers/{id_layer}", + * tags={"Layers"}, + * summary="delete Layers", + * description="Request to delete Layers", + * operationId="DELETE", + * produces={"application/xml", "application/json"}, + * @SWG\Parameter( + * name="token", + * in="query", + * description="Layer token", + * required=true, + * type="string" + * ), + * * @SWG\Parameter( + * name="id_layer", + * in="path", + * description="id of the Layers", + * required=true, + * type="integer", + * format = "int32" + * ), + * @SWG\Response( + * response=200, + * description="Poprerties Response", + * @SWG\Schema(ref="#/definitions/layers") + * ) + * ) + */ + + /** + * delete layers + * @return id of layers deleted or error object if a layers is not deleted + */ + function DELETE() { + $aReturn = $this->genericDelete($this->aProperties['schema_extraction'], 'rt_layer', 'layer_id'); + return $aReturn['sMessage']; + } + + +} + +?> \ No newline at end of file diff --git a/src/module_extraction/web_service/ws/overview.phtml b/src/module_extraction/web_service/ws/overview.phtml new file mode 100755 index 0000000000000000000000000000000000000000..27e165d375458404f3a66e7ee8864f745b7ee923 --- /dev/null +++ b/src/module_extraction/web_service/ws/overview.phtml @@ -0,0 +1,24 @@ +<?php +/** + * @SWG\Swagger( + * basePath="/[service_alias]/extraction", + * host="[server]", + * schemes={"[protocol]"}, + * produces={ + * "application/json", + "application/xml", + "text/html" + * }, + * @SWG\Info( + * version="1.0.0", + * title="Extraction Test Rest", + * description="All fetaures to access server operation for extraction", + * ) + * ) + */ +?> + +<h1 class="titleOverview">Service Extraction</h1> +<p> + <a class="linkOverview" href="javascript:sService='extraction';LoadApi()">Extraction</a>: this is the most comprehensive service which should be used as a preference when developing applications communicating with Extraction. Those services allow you to administrate Extraction applications. +</p> \ No newline at end of file