Commit 3ce768b6aa1a0cf56c5a954da2199780501a791f

Authored by Edmar Moretti
1 parent cff21e15

--no commit message

Showing 92 changed files with 2602 additions and 1105 deletions   Show diff stats
admin/admin.db
No preview for this file type
admin/html/admin.css
  1 +.yui-navset {
  2 + background: url("../../pacotes/yui290/build/assets/skins/sam/sprite.png") repeat-x scroll 0 0 #D8D8D8;
  3 + z-index: 3000;
  4 +}
  5 +.yui-resizepanel .resizehandle {
  6 +position: absolute;
  7 +width: 10px;
  8 +height: 10px;
  9 +right: 0;
  10 +bottom: 0;
  11 +margin: 0;
  12 +padding: 0;
  13 +z-index: 3000;
  14 +background: url(../../pacotes/yui290/build/container/img/corner_resize.gif) left bottom no-repeat;
  15 +cursor: se-resize;
  16 +}
  17 +.ajuda_usuario
  18 +{
  19 +background-image:url(../../imagens/external.png);
  20 +background-position:0px 0px;
  21 +background-repeat:no-repeat;
  22 +margin-left:0;
  23 +text-decoration:none;
  24 +cursor:help;
  25 +}
1 26 P {
2 27 text-align: left;
3 28 font-size: 12px;
... ...
admin/html/estat_conexao.html 0 → 100755
... ... @@ -0,0 +1,94 @@
  1 +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  2 +<html>
  3 +<head>
  4 +<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  5 +<title>Conexao com banco de dados</title>
  6 +<style type="text/css">
  7 +/*margin and padding on body element
  8 + can introduce errors in determining
  9 + element position and are not recommended;
  10 + we turn them off as a foundation for YUI
  11 + CSS treatments. */
  12 +body {
  13 + margin: 0;
  14 + padding: 0;
  15 +}
  16 +</style>
  17 +<script type="text/javascript" src="../js/core.js"></script>
  18 +<script type="text/javascript" src="../js/estat_conexao.js"></script>
  19 +</head>
  20 +<body class=" yui-skin-sam">
  21 + <div style="margin: 20px">
  22 + <div id=cabecalhoPrincipal style="width: 80%; text-align: left;">
  23 + </div>
  24 + <div style="width: 80%; text-align: center;">
  25 + <h1>
  26 + Metadados estat&iacute;sticos - cadastro de conex&otilde;es com banco de dados <img
  27 + src="../imagens/04.png" style="cursor: pointer" id=botaoAjuda />
  28 + </h1>
  29 +
  30 + </div>
  31 + <div id="formulario" style="display: none">
  32 + <div id="ajuda" style="display: none">
  33 + <div class="hd">Ajuda</div>
  34 + <div class="bd" style="height: 144px; overflow: auto">
  35 + <p>Este formul&aacute;rio permite editar a lista de conex&otilde;es que s&atilde;o mostradas nos formul&aacute;rios do sistema de metadados estat&iacute;sticos
  36 + </div>
  37 + <div class="ft"></div>
  38 + </div>
  39 + <br>
  40 + <input type=button id=adicionaNovaLinha value="Adicionar um novo registro"
  41 + style="left: -5px;" />
  42 + <p>
  43 + <br>
  44 + <div id="tabela" style="left: -5px;"></div>
  45 + </div>
  46 + </div>
  47 + <div id=logajax style="display: block"></div>
  48 + <script>
  49 + /*
  50 + Title: Editor da lista de conexoes do sistema de metadados estat&iacute;sticos
  51 +
  52 + Licenca:
  53 +
  54 + GPL2
  55 +
  56 + i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet
  57 +
  58 + Direitos Autorais Reservados (c) 2006 Minist&eacute;rio do Meio Ambiente Brasil
  59 + Desenvolvedor: Edmar Moretti edmar.moretti@mma.gov.br
  60 +
  61 + Este programa &eacute; software livre; voc&ecirc; pode redistribu&iacute;-lo
  62 + e/ou modific&aacute;-lo sob os termos da Licen&ccedil;a P&uacute;blica Geral
  63 + GNU conforme publicada pela Free Software Foundation;
  64 +
  65 + Este programa &eacute; distribu&iacute;do na expectativa de que seja &uacute;til,
  66 + por&eacute;m, SEM NENHUMA GARANTIA; nem mesmo a garantia impl&iacute;cita
  67 + de COMERCIABILIDADE OU ADEQUA&Ccedil;&Atilde;O A UMA FINALIDADE ESPEC&Iacute;FICA.
  68 + Consulte a Licen&ccedil;a P&uacute;blica Geral do GNU para mais detalhes.
  69 + Voc&ecirc; deve ter recebido uma cópia da Licen&ccedil;a P&uacute;blica Geral do
  70 + GNU junto com este programa; se n&atilde;o, escreva para a
  71 + Free Software Foundation, Inc., no endere&ccedil;o
  72 + 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
  73 +
  74 + Arquivo:
  75 +
  76 + i3geo/admin/html/estat_conexao.html
  77 + */
  78 +
  79 + //necessario para a ferramenta login e outras
  80 + i3GEO.configura = {
  81 + locaplic : "../.."
  82 + };
  83 + cabecalhoMetaestat("cabecalhoPrincipal", "conexao");
  84 + document.getElementById("formulario").style.display = "block";
  85 + initEditor();
  86 + /*
  87 + temp = function() {
  88 + document.getElementById("formulario").style.display = "block";
  89 + initEditor();
  90 + };
  91 + i3GEO.login.verificaOperacao("admin/html/menus",i3GEO.configura.locaplic, temp, "sessao");
  92 + */
  93 + </script>
  94 +</body>
0 95 \ No newline at end of file
... ...
admin/html/estat_tipo_periodo.html 0 → 100755
... ... @@ -0,0 +1,94 @@
  1 +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  2 +<html>
  3 +<head>
  4 +<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  5 +<title>Tipo de periodo de tempo</title>
  6 +<style type="text/css">
  7 +/*margin and padding on body element
  8 + can introduce errors in determining
  9 + element position and are not recommended;
  10 + we turn them off as a foundation for YUI
  11 + CSS treatments. */
  12 +body {
  13 + margin: 0;
  14 + padding: 0;
  15 +}
  16 +</style>
  17 +<script type="text/javascript" src="../js/core.js"></script>
  18 +<script type="text/javascript" src="../js/estat_tipo_periodo.js"></script>
  19 +</head>
  20 +<body class=" yui-skin-sam">
  21 + <div style="margin: 20px">
  22 + <div id=cabecalhoPrincipal style="width: 80%; text-align: left;">
  23 + </div>
  24 + <div style="width: 80%; text-align: center;">
  25 + <h1>
  26 + Metadados estat&iacute;sticos - Unidades de medida <img
  27 + src="../imagens/04.png" style="cursor: pointer" id=botaoAjuda />
  28 + </h1>
  29 +
  30 + </div>
  31 + <div id="formulario" style="display: none">
  32 + <div id="ajuda" style="display: none">
  33 + <div class="hd">Ajuda</div>
  34 + <div class="bd" style="height: 144px; overflow: auto">
  35 + <p>Este formul&aacute;rio permite editar a lista de per&iacute;odos de tempo que s&atilde;o mostradas nos formul&aacute;rios do sistema de metadados estat&iacute;sticos
  36 + </div>
  37 + <div class="ft"></div>
  38 + </div>
  39 + <br>
  40 + <input type=button id=adicionaNovaLinha value="Adicionar um novo registro"
  41 + style="left: -5px;" />
  42 + <p>
  43 + <br>
  44 + <div id="tabela" style="left: -5px;"></div>
  45 + </div>
  46 + </div>
  47 + <div id=logajax style="display: block"></div>
  48 + <script>
  49 + /*
  50 + Title: Editor da lista de tipos de per&iacute;odos de tempo do sistema de metadados estat&iacute;sticos
  51 +
  52 + Licenca:
  53 +
  54 + GPL2
  55 +
  56 + i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet
  57 +
  58 + Direitos Autorais Reservados (c) 2006 Minist&eacute;rio do Meio Ambiente Brasil
  59 + Desenvolvedor: Edmar Moretti edmar.moretti@mma.gov.br
  60 +
  61 + Este programa &eacute; software livre; voc&ecirc; pode redistribu&iacute;-lo
  62 + e/ou modific&aacute;-lo sob os termos da Licen&ccedil;a P&uacute;blica Geral
  63 + GNU conforme publicada pela Free Software Foundation;
  64 +
  65 + Este programa &eacute; distribu&iacute;do na expectativa de que seja &uacute;til,
  66 + por&eacute;m, SEM NENHUMA GARANTIA; nem mesmo a garantia impl&iacute;cita
  67 + de COMERCIABILIDADE OU ADEQUA&Ccedil;&Atilde;O A UMA FINALIDADE ESPEC&Iacute;FICA.
  68 + Consulte a Licen&ccedil;a P&uacute;blica Geral do GNU para mais detalhes.
  69 + Voc&ecirc; deve ter recebido uma cópia da Licen&ccedil;a P&uacute;blica Geral do
  70 + GNU junto com este programa; se n&atilde;o, escreva para a
  71 + Free Software Foundation, Inc., no endere&ccedil;o
  72 + 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
  73 +
  74 + Arquivo:
  75 +
  76 + i3geo/admin/html/estat_tipo_periodo.html
  77 + */
  78 +
  79 + //necessario para a ferramenta login e outras
  80 + i3GEO.configura = {
  81 + locaplic : "../.."
  82 + };
  83 + cabecalhoMetaestat("cabecalhoPrincipal", "periodo_tempo");
  84 + document.getElementById("formulario").style.display = "block";
  85 + initEditor();
  86 + /*
  87 + temp = function() {
  88 + document.getElementById("formulario").style.display = "block";
  89 + initEditor();
  90 + };
  91 + i3GEO.login.verificaOperacao("admin/html/menus",i3GEO.configura.locaplic, temp, "sessao");
  92 + */
  93 + </script>
  94 +</body>
0 95 \ No newline at end of file
... ...
admin/html/estat_tipo_regiao.html 0 → 100755
... ... @@ -0,0 +1,94 @@
  1 +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  2 +<html>
  3 +<head>
  4 +<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  5 +<title>Tipo de regiao</title>
  6 +<style type="text/css">
  7 +/*margin and padding on body element
  8 + can introduce errors in determining
  9 + element position and are not recommended;
  10 + we turn them off as a foundation for YUI
  11 + CSS treatments. */
  12 +body {
  13 + margin: 0;
  14 + padding: 0;
  15 +}
  16 +</style>
  17 +<script type="text/javascript" src="../js/core.js"></script>
  18 +<script type="text/javascript" src="../js/estat_tipo_regiao.js"></script>
  19 +</head>
  20 +<body class=" yui-skin-sam">
  21 + <div style="margin: 20px">
  22 + <div id=cabecalhoPrincipal style="width: 80%; text-align: left;">
  23 + </div>
  24 + <div style="width: 80%; text-align: center;">
  25 + <h1>
  26 + Metadados estat&iacute;sticos - cadastro de tabelas de regi&otilde;es geogr&aacute;ficas <img
  27 + src="../imagens/04.png" style="cursor: pointer" id=botaoAjuda />
  28 + </h1>
  29 +
  30 + </div>
  31 + <div id="formulario" style="display: none">
  32 + <div id="ajuda" style="display: none">
  33 + <div class="hd">Ajuda</div>
  34 + <div class="bd" style="height: 144px; overflow: auto">
  35 + <p>Este formul&aacute;rio permite editar a lista de conex&otilde;es que s&atilde;o mostradas nos formul&aacute;rios do sistema de metadados estat&iacute;sticos
  36 + </div>
  37 + <div class="ft"></div>
  38 + </div>
  39 + <br>
  40 + <input type=button id=adicionaNovaLinha value="Adicionar um novo registro"
  41 + style="left: -5px;" />
  42 + <p>
  43 + <br>
  44 + <div id="tabela" style="left: -5px;"></div>
  45 + </div>
  46 + </div>
  47 + <div id=logajax style="display: block"></div>
  48 + <script>
  49 + /*
  50 + Title: Editor da lista de regi&otilde;es do sistema de metadados estat&iacute;sticos
  51 +
  52 + Licenca:
  53 +
  54 + GPL2
  55 +
  56 + i3Geo Interface Integrada de Ferramentas de Geoprocessamento para Internet
  57 +
  58 + Direitos Autorais Reservados (c) 2006 Minist&eacute;rio do Meio Ambiente Brasil
  59 + Desenvolvedor: Edmar Moretti edmar.moretti@mma.gov.br
  60 +
  61 + Este programa &eacute; software livre; voc&ecirc; pode redistribu&iacute;-lo
  62 + e/ou modific&aacute;-lo sob os termos da Licen&ccedil;a P&uacute;blica Geral
  63 + GNU conforme publicada pela Free Software Foundation;
  64 +
  65 + Este programa &eacute; distribu&iacute;do na expectativa de que seja &uacute;til,
  66 + por&eacute;m, SEM NENHUMA GARANTIA; nem mesmo a garantia impl&iacute;cita
  67 + de COMERCIABILIDADE OU ADEQUA&Ccedil;&Atilde;O A UMA FINALIDADE ESPEC&Iacute;FICA.
  68 + Consulte a Licen&ccedil;a P&uacute;blica Geral do GNU para mais detalhes.
  69 + Voc&ecirc; deve ter recebido uma cópia da Licen&ccedil;a P&uacute;blica Geral do
  70 + GNU junto com este programa; se n&atilde;o, escreva para a
  71 + Free Software Foundation, Inc., no endere&ccedil;o
  72 + 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
  73 +
  74 + Arquivo:
  75 +
  76 + i3geo/admin/html/estat_tipo_regiao.html
  77 + */
  78 +
  79 + //necessario para a ferramenta login e outras
  80 + i3GEO.configura = {
  81 + locaplic : "../.."
  82 + };
  83 + cabecalhoMetaestat("cabecalhoPrincipal", "tipo_regiao");
  84 + document.getElementById("formulario").style.display = "block";
  85 + initEditor();
  86 + /*
  87 + temp = function() {
  88 + document.getElementById("formulario").style.display = "block";
  89 + initEditor();
  90 + };
  91 + i3GEO.login.verificaOperacao("admin/html/menus",i3GEO.configura.locaplic, temp, "sessao");
  92 + */
  93 + </script>
  94 +</body>
0 95 \ No newline at end of file
... ...
admin/html/estat_variavel.html
... ... @@ -16,6 +16,7 @@ body {
16 16 </style>
17 17 <script type="text/javascript" src="../js/core.js"></script>
18 18 <script type="text/javascript" src="../js/estat_variavel.js"></script>
  19 +
19 20 <link rel="stylesheet" type="text/css" href="admin.css">
20 21 </head>
21 22 <body class=" yui-skin-sam fundoPonto">
... ...
admin/index.html
... ... @@ -163,6 +163,18 @@
163 163 <td><div class=aplicar></div></td>
164 164 <td>Cadastro de unidades de medida</td>
165 165 </tr>
  166 + <tr onclick="abre('html/estat_tipo_periodo.html')">
  167 + <td><div class=aplicar></div></td>
  168 + <td>Cadastro de tipos de per&iacute;odos de tempo</td>
  169 + </tr>
  170 + <tr onclick="abre('html/estat_conexao.html')">
  171 + <td><div class=aplicar></div></td>
  172 + <td>Cadastro de conex&otilde;es com banco de dados</td>
  173 + </tr>
  174 + <tr onclick="abre('html/estat_tipo_regiao.html')">
  175 + <td><div class=aplicar></div></td>
  176 + <td>Cadastro de tabelas com regi&otilde;es geogr&aacute;ficas</td>
  177 + </tr>
166 178 </table>
167 179 </div>
168 180 </fieldset>
... ...
admin/js/core.js
... ... @@ -73,6 +73,9 @@ function cabecalhoMetaestat(id,excluir){
73 73 {id:"principal",titulo:"In&iacute;cio",link:"../index.html"},
74 74 {id:"arvore",titulo:"&Aacute;rvore completa",link:"estat_variavel.html"},
75 75 {id:"unidade_medida",titulo:"Unidades de medida",link:"estat_unidade_medida.html"},
  76 + {id:"periodo_tempo",titulo:"Per&iacute;odos de tempo",link:"estat_tipo_periodo.html"},
  77 + {id:"conexao",titulo:"Conex&otilde;es",link:"estat_conexao.html"},
  78 + {id:"tipo_regiao",titulo:"Regi&otilde;es",link:"estat_tipo_regiao.html"},
76 79 {id:"login",titulo:"Login",js:"i3GEO.login.dialogo.abreLogin()"}
77 80 ];
78 81 n = botoes.length;
... ... @@ -1500,12 +1503,14 @@ function core_ativaforms(lista){
1500 1503 "../../classesjs/compactados/classe_janela_compacto.js",
1501 1504 "../../classesjs/compactados/dicionario_compacto.js",
1502 1505 "../../classesjs/compactados/classe_idioma_compacto.js",
  1506 + "../../classesjs/compactados/classe_guias_compacto.js",
1503 1507 "../../pacotes/cpaint/cpaint2.inc.compressed.js"
1504 1508 );
1505 1509 //
1506 1510 //arquivos css
1507 1511 //
1508 1512 var cssfiles =new Array(
  1513 + "../../pacotes/yui290/build/tabview/assets/skins/sam/tabview.css",
1509 1514 "../html/admin.css",
1510 1515 "../../pacotes/yui290/build/fonts/fonts-min.css",
1511 1516 "../../pacotes/yui290/build/datatable/assets/skins/sam/datatable.css",
... ...
admin/js/estat_conexao.js 0 → 100755
... ... @@ -0,0 +1,167 @@
  1 +function initEditor(){
  2 + YAHOO.namespace("example.container");
  3 + core_ativaBotaoAdicionaLinha("../php/metaestat.php?funcao=alterarConexao","adicionaNovaLinha","pegaDados");
  4 + pegaDados();
  5 +}
  6 +function pegaDados(){
  7 + core_carregando("ativa");
  8 + core_pegaDados("buscando dados...","../php/metaestat.php?funcao=listaConexao","montaTabela");
  9 +}
  10 +function montaTabela(dados){
  11 + YAHOO.example.InlineCellEditing = new function() {
  12 + // Custom formatter for "address" column to preserve line breaks
  13 + var formatTexto = function(elCell, oRecord, oColumn, oData){
  14 + if(oData === ""){
  15 + oData = "<span style='color:gray' ></span>";
  16 + }
  17 + elCell.innerHTML = "<pre ><p style=cursor:pointer title='clique para editar'>" + oData + "</pre>";
  18 + },
  19 + formatExclui = function(elCell, oRecord, oColumn){
  20 + elCell.innerHTML = "<div class=excluir title='exclui' style='text-align:center' ></div>";
  21 + },
  22 + formatMais = function(elCell, oRecord, oColumn){
  23 + elCell.innerHTML = "<div class=editar style='text-align:center' ></div>";
  24 + },
  25 + formatSenha = function(elCell, oRecord, oColumn){
  26 + elCell.innerHTML = "a senha deve ser editada<br>diretamente no banco de dados";
  27 + },
  28 + myColumnDefs = [
  29 + {key:"excluir",label:"excluir",formatter:formatExclui},
  30 + {key:"mais",label:"editar",formatter:formatMais},
  31 + {label:"c&oacute;digo",key:"codigo_estat_conexao", formatter:formatTexto},
  32 + {label:"Banco de dados",resizeable:true,key:"bancodedados", formatter:formatTexto},
  33 + {label:"Host",resizeable:true,key:"host", formatter:formatTexto},
  34 + {label:"Porta",key:"porta",formatter:formatTexto},
  35 + {label:"Usu&aacute;rio",key:"usuario",formatter:formatTexto},
  36 + {label:"Senha",key:"senha",formatter:formatSenha}
  37 + ];
  38 + myDataSource = new YAHOO.util.DataSource(dados);
  39 + myDataTable = new YAHOO.widget.DataTable("tabela", myColumnDefs, myDataSource);
  40 +
  41 + myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSARRAY;
  42 + myDataSource.responseSchema = {
  43 + fields: ["codigo_estat_conexao","bancodedados","host","porta","usuario","senha"]
  44 + };
  45 + myDataTable.subscribe(
  46 + 'cellClickEvent',
  47 + function(ev){
  48 + var record,$clicouId,$recordid,sUrl,callback,
  49 + target = YAHOO.util.Event.getTarget(ev),
  50 + column = this.getColumn(target);
  51 + if(YAHOO.example.container.panelCK){
  52 + YAHOO.example.container.panelCK.destroy();
  53 + YAHOO.example.container.panelCK = null;
  54 + }
  55 + if (column.key == 'excluir'){
  56 + record = this.getRecord(target);
  57 + excluiLinha(record.getData('codigo_estat_conexao'),target);
  58 + }
  59 + if (column.key == 'mais'){
  60 + record = this.getRecord(target);
  61 + core_carregando("ativa");
  62 + core_carregando("buscando dados...");
  63 + $clicouId = record.getData('codigo_estat_conexao');
  64 + $recordid = record.getId();
  65 + sUrl = "../php/metaestat.php?funcao=listaConexao&codigo_estat_conexao="+record.getData('codigo_estat_conexao');
  66 + callback = {
  67 + success:function(o){
  68 + try{
  69 + montaEditor(YAHOO.lang.JSON.parse(o.responseText),$clicouId,$recordid);
  70 + }
  71 + catch(e){core_handleFailure(e,o.responseText);}
  72 + },
  73 + failure:core_handleFailure,
  74 + argument: { foo:"foo", bar:"bar" }
  75 + };
  76 + core_makeRequest(sUrl,callback);
  77 + }
  78 + }
  79 + );
  80 + };
  81 + core_carregando("desativa");
  82 +}
  83 +function montaEditor(dados,id,recordid){
  84 + function on_editorCheckBoxChange(p_oEvent){
  85 + if(p_oEvent.newValue.get("value") == "OK"){
  86 + gravaDados(id,recordid);
  87 + }
  88 + YAHOO.example.container.panelEditor2.destroy();
  89 + YAHOO.example.container.panelEditor2 = null;
  90 + };
  91 + if(!$i("janela_editor2")){
  92 + var ins,editorBotoes,
  93 + novoel = document.createElement("div");
  94 +
  95 + novoel.id = "janela_editor2";
  96 + ins = '<div class="hd">Editor</div>';
  97 + ins += "<div class='bd' style='height:354px;overflow:auto'>";
  98 + ins += "<div id='okcancel_checkbox2'></div><div id='editor_bd2'></div>";
  99 + novoel.innerHTML = ins;
  100 + document.body.appendChild(novoel);
  101 + editorBotoes = new YAHOO.widget.ButtonGroup({id:"okcancel_checkbox_id2", name: "okcancel_checkbox_id2", container: "okcancel_checkbox2" });
  102 + editorBotoes.addButtons([
  103 + { label: "Salva", value: "OK", checked: false},
  104 + { label: "Cancela", value: "CANCEL", checked: false }
  105 + ]);
  106 + editorBotoes.on("checkedButtonChange", on_editorCheckBoxChange);
  107 + YAHOO.example.container.panelEditor2 = new YAHOO.widget.Panel("janela_editor2", { fixedcenter:true,close:false,width:"400px", height:"380px",overflow:"auto", visible:false,constraintoviewport:true } );
  108 + YAHOO.example.container.panelEditor2.render();
  109 + }
  110 + YAHOO.example.container.panelEditor2.show();
  111 + $i("editor_bd2").innerHTML = montaDiv(dados);
  112 + core_carregando("desativa");
  113 +}
  114 +function montaDiv(i){
  115 + var param = {
  116 + "linhas":[
  117 + {titulo:"Banco de dados:",id:"Ebancodedados",size:"50",value:i.bancodedados,tipo:"text",div:""},
  118 + {titulo:"Servidor:",id:"Ehost",size:"50",value:i.host,tipo:"text",div:""},
  119 + {titulo:"Porta:",id:"Eporta",size:"50",value:i.porta,tipo:"text",div:""},
  120 + {titulo:"Usu&aacute;rio:",id:"Eusuario",size:"50",value:i.usuario,tipo:"text",div:""}
  121 + ]
  122 + },
  123 + ins = "";
  124 +
  125 + ins += core_geraLinhas(param);
  126 + return(ins);
  127 +}
  128 +
  129 +function gravaDados(id,recordid){
  130 + var campos = new Array("bancodedados","host","porta","usuario"),
  131 + par = "",
  132 + i = 0,
  133 + sUrl,callback;
  134 +
  135 + for (i=0;i<campos.length;i++){
  136 + par += "&"+campos[i]+"="+($i("E"+campos[i]).value);
  137 + }
  138 + par += "&codigo_estat_conexao="+id;
  139 + core_carregando("ativa");
  140 + core_carregando(" gravando o registro do id= "+id);
  141 + sUrl = "../php/metaestat.php?funcao=alterarConexao"+par;
  142 + callback = {
  143 + success:function(o){
  144 + try {
  145 + if(YAHOO.lang.JSON.parse(o.responseText) == "erro") {
  146 + core_carregando("<span style=color:red >N&atilde;o foi poss&iacute;vel excluir. Verifique se n&atilde;o existem registros vinculados</span>");
  147 + setTimeout("core_carregando('desativa')",3000);
  148 + }
  149 + else{
  150 + var rec = myDataTable.getRecordSet().getRecord(recordid);
  151 + myDataTable.updateRow(rec,YAHOO.lang.JSON.parse(o.responseText));
  152 + core_carregando("desativa");
  153 + }
  154 + }
  155 + catch(e){core_handleFailure(e,o.responseText);}
  156 + },
  157 + failure:core_handleFailure,
  158 + argument: { foo:"foo", bar:"bar" }
  159 + };
  160 + core_makeRequest(sUrl,callback);
  161 +}
  162 +function excluiLinha(id,row){
  163 + var mensagem = " excluindo o registro do id= "+id,
  164 + sUrl = "../php/metaestat.php?funcao=excluirConexao&codigo_estat_conexao="+id;
  165 + core_excluiLinha(sUrl,row,mensagem);
  166 +}
  167 +//YAHOO.util.Event.addListener(window, "load", initMenu);
0 168 \ No newline at end of file
... ...
admin/js/estat_tipo_periodo.js 0 → 100755
... ... @@ -0,0 +1,160 @@
  1 +function initEditor(){
  2 + YAHOO.namespace("example.container");
  3 + core_ativaBotaoAdicionaLinha("../php/metaestat.php?funcao=alterarTipoPeriodo","adicionaNovaLinha","pegaDados");
  4 + pegaDados();
  5 +}
  6 +function pegaDados(){
  7 + core_carregando("ativa");
  8 + core_pegaDados("buscando dados...","../php/metaestat.php?funcao=listaTipoPeriodo","montaTabela");
  9 +}
  10 +function montaTabela(dados){
  11 + YAHOO.example.InlineCellEditing = new function() {
  12 + // Custom formatter for "address" column to preserve line breaks
  13 + var formatTexto = function(elCell, oRecord, oColumn, oData){
  14 + if(oData === ""){
  15 + oData = "<span style='color:gray' ></span>";
  16 + }
  17 + elCell.innerHTML = "<pre ><p style=cursor:pointer title='clique para editar'>" + oData + "</pre>";
  18 + },
  19 + formatExclui = function(elCell, oRecord, oColumn){
  20 + elCell.innerHTML = "<div class=excluir title='exclui' style='text-align:center' ></div>";
  21 + },
  22 + formatMais = function(elCell, oRecord, oColumn){
  23 + elCell.innerHTML = "<div class=editar style='text-align:center' ></div>";
  24 + },
  25 + myColumnDefs = [
  26 + {key:"excluir",label:"excluir",formatter:formatExclui},
  27 + {key:"mais",label:"editar",formatter:formatMais},
  28 + {label:"c&oacute;digo",key:"codigo_tipo_periodo", formatter:formatTexto},
  29 + {label:"Nome",resizeable:true,key:"nome", formatter:formatTexto,editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})},
  30 + {label:"Descricao",resizeable:true,key:"descricao", formatter:formatTexto,editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})}
  31 + ];
  32 + myDataSource = new YAHOO.util.DataSource(dados);
  33 + myDataTable = new YAHOO.widget.DataTable("tabela", myColumnDefs, myDataSource);
  34 +
  35 + myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSARRAY;
  36 + myDataSource.responseSchema = {
  37 + fields: ["codigo_tipo_periodo","nome","descricao"]
  38 + };
  39 + myDataTable.subscribe(
  40 + 'cellClickEvent',
  41 + function(ev){
  42 + var record,$clicouId,$recordid,sUrl,callback,
  43 + target = YAHOO.util.Event.getTarget(ev),
  44 + column = this.getColumn(target);
  45 + if(YAHOO.example.container.panelCK){
  46 + YAHOO.example.container.panelCK.destroy();
  47 + YAHOO.example.container.panelCK = null;
  48 + }
  49 + if (column.key == 'excluir'){
  50 + record = this.getRecord(target);
  51 + excluiLinha(record.getData('codigo_tipo_periodo'),target);
  52 + }
  53 + if (column.key == 'mais'){
  54 + record = this.getRecord(target);
  55 + core_carregando("ativa");
  56 + core_carregando("buscando dados...");
  57 + $clicouId = record.getData('codigo_tipo_periodo');
  58 + $recordid = record.getId();
  59 + sUrl = "../php/metaestat.php?funcao=listaTipoPeriodo&codigo_tipo_periodo="+record.getData('codigo_tipo_periodo');
  60 + callback = {
  61 + success:function(o){
  62 + try{
  63 + montaEditor(YAHOO.lang.JSON.parse(o.responseText),$clicouId,$recordid);
  64 + }
  65 + catch(e){core_handleFailure(e,o.responseText);}
  66 + },
  67 + failure:core_handleFailure,
  68 + argument: { foo:"foo", bar:"bar" }
  69 + };
  70 + core_makeRequest(sUrl,callback);
  71 + }
  72 + }
  73 + );
  74 + };
  75 + core_carregando("desativa");
  76 +}
  77 +function montaEditor(dados,id,recordid){
  78 + function on_editorCheckBoxChange(p_oEvent){
  79 + if(p_oEvent.newValue.get("value") == "OK"){
  80 + gravaDados(id,recordid);
  81 + }
  82 + YAHOO.example.container.panelEditor2.destroy();
  83 + YAHOO.example.container.panelEditor2 = null;
  84 + };
  85 + if(!$i("janela_editor2")){
  86 + var ins,editorBotoes,
  87 + novoel = document.createElement("div");
  88 +
  89 + novoel.id = "janela_editor2";
  90 + ins = '<div class="hd">Editor</div>';
  91 + ins += "<div class='bd' style='height:354px;overflow:auto'>";
  92 + ins += "<div id='okcancel_checkbox2'></div><div id='editor_bd2'></div>";
  93 + novoel.innerHTML = ins;
  94 + document.body.appendChild(novoel);
  95 + editorBotoes = new YAHOO.widget.ButtonGroup({id:"okcancel_checkbox_id2", name: "okcancel_checkbox_id2", container: "okcancel_checkbox2" });
  96 + editorBotoes.addButtons([
  97 + { label: "Salva", value: "OK", checked: false},
  98 + { label: "Cancela", value: "CANCEL", checked: false }
  99 + ]);
  100 + editorBotoes.on("checkedButtonChange", on_editorCheckBoxChange);
  101 + YAHOO.example.container.panelEditor2 = new YAHOO.widget.Panel("janela_editor2", { fixedcenter:true,close:false,width:"400px", height:"380px",overflow:"auto", visible:false,constraintoviewport:true } );
  102 + YAHOO.example.container.panelEditor2.render();
  103 + }
  104 + YAHOO.example.container.panelEditor2.show();
  105 + $i("editor_bd2").innerHTML = montaDiv(dados);
  106 + core_carregando("desativa");
  107 +}
  108 +function montaDiv(i){
  109 + var param = {
  110 + "linhas":[{
  111 + titulo:"Nome:",id:"Enome",size:"50",value:i.nome,tipo:"text",div:""
  112 + },{
  113 + titulo:"Descricao:",id:"Edescricao",size:"50",value:i.descricao,tipo:"text",div:""
  114 + }]
  115 + },
  116 + ins = "";
  117 +
  118 + ins += core_geraLinhas(param);
  119 + return(ins);
  120 +}
  121 +
  122 +function gravaDados(id,recordid){
  123 + var campos = new Array("nome","descricao"),
  124 + par = "",
  125 + i = 0,
  126 + sUrl,callback;
  127 +
  128 + for (i=0;i<campos.length;i++){
  129 + par += "&"+campos[i]+"="+($i("E"+campos[i]).value);
  130 + }
  131 + par += "&codigo_tipo_periodo="+id;
  132 + core_carregando("ativa");
  133 + core_carregando(" gravando o registro do id= "+id);
  134 + sUrl = "../php/metaestat.php?funcao=alterarTipoPeriodo"+par;
  135 + callback = {
  136 + success:function(o){
  137 + try {
  138 + if(YAHOO.lang.JSON.parse(o.responseText) == "erro") {
  139 + core_carregando("<span style=color:red >N&atilde;o foi poss&iacute;vel excluir. Verifique se n&atilde;o existem registros vinculados</span>");
  140 + setTimeout("core_carregando('desativa')",3000);
  141 + }
  142 + else{
  143 + var rec = myDataTable.getRecordSet().getRecord(recordid);
  144 + myDataTable.updateRow(rec,YAHOO.lang.JSON.parse(o.responseText));
  145 + core_carregando("desativa");
  146 + }
  147 + }
  148 + catch(e){core_handleFailure(e,o.responseText);}
  149 + },
  150 + failure:core_handleFailure,
  151 + argument: { foo:"foo", bar:"bar" }
  152 + };
  153 + core_makeRequest(sUrl,callback);
  154 +}
  155 +function excluiLinha(id,row){
  156 + var mensagem = " excluindo o registro do id= "+id,
  157 + sUrl = "../php/metaestat.php?funcao=excluirTipoPeriodo&codigo_tipo_periodo="+id;
  158 + core_excluiLinha(sUrl,row,mensagem);
  159 +}
  160 +//YAHOO.util.Event.addListener(window, "load", initMenu);
0 161 \ No newline at end of file
... ...
admin/js/estat_tipo_regiao.js 0 → 100755
... ... @@ -0,0 +1,173 @@
  1 +function initEditor(){
  2 + YAHOO.namespace("example.container");
  3 + core_ativaBotaoAdicionaLinha("../php/metaestat.php?funcao=alterarTipoRegiao","adicionaNovaLinha","pegaDados");
  4 + pegaDados();
  5 +}
  6 +function pegaDados(){
  7 + core_carregando("ativa");
  8 + core_pegaDados("buscando dados...","../php/metaestat.php?funcao=listaTipoRegiao","montaTabela");
  9 +}
  10 +function montaTabela(dados){
  11 + YAHOO.example.InlineCellEditing = new function() {
  12 + // Custom formatter for "address" column to preserve line breaks
  13 + var formatTexto = function(elCell, oRecord, oColumn, oData){
  14 + if(oData === ""){
  15 + oData = "<span style='color:gray' ></span>";
  16 + }
  17 + elCell.innerHTML = "<pre ><p style=cursor:pointer title='clique para editar'>" + oData + "</pre>";
  18 + },
  19 + formatExclui = function(elCell, oRecord, oColumn){
  20 + elCell.innerHTML = "<div class=excluir title='exclui' style='text-align:center' ></div>";
  21 + },
  22 + formatMais = function(elCell, oRecord, oColumn){
  23 + elCell.innerHTML = "<div class=editar style='text-align:center' ></div>";
  24 + },
  25 + myColumnDefs = [
  26 + {key:"excluir",label:"excluir",formatter:formatExclui},
  27 + {key:"mais",label:"editar",formatter:formatMais},
  28 + {label:"c&oacute;digo",key:"codigo_tipo_regiao", formatter:formatTexto},
  29 + {label:"Nome",resizeable:true,key:"nome_tipo_regiao", formatter:formatTexto},
  30 + {label:"Descri&ccedil;&atilde;o",resizeable:true,key:"descricao_tipo_regiao", formatter:formatTexto},
  31 + {label:"Esquema",key:"esquemadb",formatter:formatTexto},
  32 + {label:"Tabela",key:"tabela",formatter:formatTexto},
  33 + {label:"Coluna",key:"colunageo",formatter:formatTexto},
  34 + {label:"Data",key:"data",formatter:formatTexto},
  35 + {label:"C&oacute;digo",key:"identificador",formatter:formatTexto},
  36 + {label:"Coluna com os nomes de cada regi&atilde;o",key:"colunanomeregiao",formatter:formatTexto},
  37 + {label:"C&oacute;digo SRID da proje&ccedil;&atilde;o",key:"srid",formatter:formatTexto}
  38 + ];
  39 + myDataSource = new YAHOO.util.DataSource(dados);
  40 + myDataTable = new YAHOO.widget.DataTable("tabela", myColumnDefs, myDataSource);
  41 +
  42 + myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSARRAY;
  43 + myDataSource.responseSchema = {
  44 + fields: ["codigo_tipo_regiao","nome_tipo_regiao","descricao_tipo_regiao","esquemadb","tabela","colunageo","data","identificador","colunanomeregiao","srid"]
  45 + };
  46 + myDataTable.subscribe(
  47 + 'cellClickEvent',
  48 + function(ev){
  49 + var record,$clicouId,$recordid,sUrl,callback,
  50 + target = YAHOO.util.Event.getTarget(ev),
  51 + column = this.getColumn(target);
  52 + if(YAHOO.example.container.panelCK){
  53 + YAHOO.example.container.panelCK.destroy();
  54 + YAHOO.example.container.panelCK = null;
  55 + }
  56 + if (column.key == 'excluir'){
  57 + record = this.getRecord(target);
  58 + excluiLinha(record.getData('codigo_tipo_regiao'),target);
  59 + }
  60 + if (column.key == 'mais'){
  61 + record = this.getRecord(target);
  62 + core_carregando("ativa");
  63 + core_carregando("buscando dados...");
  64 + $clicouId = record.getData('codigo_tipo_regiao');
  65 + $recordid = record.getId();
  66 + sUrl = "../php/metaestat.php?funcao=listaTipoRegiao&codigo_tipo_regiao="+record.getData('codigo_tipo_regiao');
  67 + callback = {
  68 + success:function(o){
  69 + try{
  70 + montaEditor(YAHOO.lang.JSON.parse(o.responseText),$clicouId,$recordid);
  71 + }
  72 + catch(e){core_handleFailure(e,o.responseText);}
  73 + },
  74 + failure:core_handleFailure,
  75 + argument: { foo:"foo", bar:"bar" }
  76 + };
  77 + core_makeRequest(sUrl,callback);
  78 + }
  79 + }
  80 + );
  81 + };
  82 + core_carregando("desativa");
  83 +}
  84 +function montaEditor(dados,id,recordid){
  85 + function on_editorCheckBoxChange(p_oEvent){
  86 + if(p_oEvent.newValue.get("value") == "OK"){
  87 + gravaDados(id,recordid);
  88 + }
  89 + YAHOO.example.container.panelEditor2.destroy();
  90 + YAHOO.example.container.panelEditor2 = null;
  91 + };
  92 + if(!$i("janela_editor2")){
  93 + var ins,editorBotoes,
  94 + novoel = document.createElement("div");
  95 +
  96 + novoel.id = "janela_editor2";
  97 + ins = '<div class="hd">Editor</div>';
  98 + ins += "<div class='bd' style='height:354px;overflow:auto'>";
  99 + ins += "<div id='okcancel_checkbox2'></div><div id='editor_bd2'></div>";
  100 + novoel.innerHTML = ins;
  101 + document.body.appendChild(novoel);
  102 + editorBotoes = new YAHOO.widget.ButtonGroup({id:"okcancel_checkbox_id2", name: "okcancel_checkbox_id2", container: "okcancel_checkbox2" });
  103 + editorBotoes.addButtons([
  104 + { label: "Salva", value: "OK", checked: false},
  105 + { label: "Cancela", value: "CANCEL", checked: false }
  106 + ]);
  107 + editorBotoes.on("checkedButtonChange", on_editorCheckBoxChange);
  108 + YAHOO.example.container.panelEditor2 = new YAHOO.widget.Panel("janela_editor2", { fixedcenter:true,close:false,width:"400px", height:"380px",overflow:"auto", visible:false,constraintoviewport:true } );
  109 + YAHOO.example.container.panelEditor2.render();
  110 + }
  111 + YAHOO.example.container.panelEditor2.show();
  112 + $i("editor_bd2").innerHTML = montaDiv(dados);
  113 + core_carregando("desativa");
  114 +}
  115 +function montaDiv(i){
  116 + var param = {
  117 + "linhas":[
  118 + {titulo:"Nome:",id:"Enome_tipo_regiao",size:"50",value:i.nome_tipo_regiao,tipo:"text",div:""},
  119 + {titulo:"Descri&ccedil;&atilde;o:",id:"Edescricao_tipo_regiao",size:"50",value:i.descricao_tipo_regiao,tipo:"text",div:""},
  120 + {titulo:"Esquema no banco de dados:",id:"Eesquemadb",size:"50",value:i.esquemadb,tipo:"text",div:""},
  121 + {titulo:"Tabela:",id:"Etabela",size:"50",value:i.tabela,tipo:"text",div:""},
  122 + {titulo:"Coluna com a geometria:",id:"Ecolunageo",size:"50",value:i.colunageo,tipo:"text",div:""},
  123 + {titulo:"Data a qual se referem os dados:",id:"Edata",size:"50",value:i.data,tipo:"text",div:""},
  124 + {titulo:"Coluna com o c&oacute;digo de cada registro:",id:"Eidentificador",size:"50",value:i.identificador,tipo:"text",div:""},
  125 + {titulo:"Coluna com o nome da regi&atilde;o:",id:"Ecolunanomeregiao",size:"50",value:i.colunanomeregiao,tipo:"text",div:""},
  126 + {titulo:"C&oacute;digo SRID:",id:"Esrid",size:"50",value:i.srid,tipo:"text",div:""}
  127 + ]
  128 + },
  129 + ins = "";
  130 +
  131 + ins += core_geraLinhas(param);
  132 + return(ins);
  133 +}
  134 +
  135 +function gravaDados(id,recordid){
  136 + var campos = new Array("nome_tipo_regiao","descricao_tipo_regiao","esquemadb","tabela","colunageo","data","identificador","colunanomeregiao","srid"),
  137 + par = "",
  138 + i = 0,
  139 + sUrl,callback;
  140 +
  141 + for (i=0;i<campos.length;i++){
  142 + par += "&"+campos[i]+"="+($i("E"+campos[i]).value);
  143 + }
  144 + par += "&codigo_tipo_regiao="+id;
  145 + core_carregando("ativa");
  146 + core_carregando(" gravando o registro do id= "+id);
  147 + sUrl = "../php/metaestat.php?funcao=alterarTipoRegiao"+par;
  148 + callback = {
  149 + success:function(o){
  150 + try {
  151 + if(YAHOO.lang.JSON.parse(o.responseText) == "erro") {
  152 + core_carregando("<span style=color:red >N&atilde;o foi poss&iacute;vel excluir. Verifique se n&atilde;o existem registros vinculados</span>");
  153 + setTimeout("core_carregando('desativa')",3000);
  154 + }
  155 + else{
  156 + var rec = myDataTable.getRecordSet().getRecord(recordid);
  157 + myDataTable.updateRow(rec,YAHOO.lang.JSON.parse(o.responseText));
  158 + core_carregando("desativa");
  159 + }
  160 + }
  161 + catch(e){core_handleFailure(e,o.responseText);}
  162 + },
  163 + failure:core_handleFailure,
  164 + argument: { foo:"foo", bar:"bar" }
  165 + };
  166 + core_makeRequest(sUrl,callback);
  167 +}
  168 +function excluiLinha(id,row){
  169 + var mensagem = " excluindo o registro do id= "+id,
  170 + sUrl = "../php/metaestat.php?funcao=excluirTipoRegiao&codigo_tipo_regiao="+id;
  171 + core_excluiLinha(sUrl,row,mensagem);
  172 +}
  173 +//YAHOO.util.Event.addListener(window, "load", initMenu);
0 174 \ No newline at end of file
... ...
admin/js/estat_unidade_medida.js
1 1 function initEditor(){
2 2 YAHOO.namespace("example.container");
3   - core_ativaBotaoAdicionaLinha("../php/metaestat.php?funcao=alteraUnidadeMedida","adicionaNovaLinha","pegaDados");
  3 + core_ativaBotaoAdicionaLinha("../php/metaestat.php?funcao=alterarUnidadeMedida","adicionaNovaLinha","pegaDados");
4 4 pegaDados();
5 5 }
6 6 function pegaDados(){
... ... @@ -30,8 +30,8 @@ function montaTabela(dados){
30 30 {label:"Sigla",resizeable:true,key:"sigla", formatter:formatTexto,editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})},
31 31 {label:"Permite soma?",key:"permitesoma",editor:"radio" ,editorOptions:{radioOptions:["SIM","NAO"],disableBtns:false,LABEL_SAVE:"OK"}},
32 32 {label:"Permite m&eacute;dia?",key:"permitemedia",editor:"radio" ,editorOptions:{radioOptions:["SIM","NAO"],disableBtns:false,LABEL_SAVE:"OK"}}
33   - ],
34   - myDataSource = new YAHOO.util.DataSource(dados),
  33 + ];
  34 + myDataSource = new YAHOO.util.DataSource(dados);
35 35 myDataTable = new YAHOO.widget.DataTable("tabela", myColumnDefs, myDataSource);
36 36  
37 37 myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSARRAY;
... ... @@ -50,13 +50,13 @@ function montaTabela(dados){
50 50 }
51 51 if (column.key == 'excluir'){
52 52 record = this.getRecord(target);
53   - excluiLinha_M(record.getData('id_menu'),target);
  53 + excluiLinha(record.getData('codigo_unidade_medida'),target);
54 54 }
55 55 if (column.key == 'mais'){
56 56 record = this.getRecord(target);
57 57 core_carregando("ativa");
58 58 core_carregando("buscando dados...");
59   - $clicouId = record.getData('id_menu');
  59 + $clicouId = record.getData('codigo_unidade_medida');
60 60 $recordid = record.getId();
61 61 sUrl = "../php/metaestat.php?funcao=listaUnidadeMedida&codigo_unidade_medida="+record.getData('codigo_unidade_medida');
62 62 callback = {
... ... @@ -126,7 +126,7 @@ function montaDiv(i){
126 126 ins += "<option value='1' ";
127 127 if (i.permitesoma == 1){ins += "selected";}
128 128 ins += " >sim</option>";
129   - ins += "<option value='2' ";
  129 + ins += "<option value='0' ";
130 130 if (i.permitesoma == 0 ){ins += "selected";}
131 131 ins += " >n&atilde;o</option>";
132 132 ins += "</select></p>";
... ... @@ -139,7 +139,7 @@ function montaDiv(i){
139 139 ins += "<option value='1' ";
140 140 if (i.permitemedia == 1){ins += "selected";}
141 141 ins += " >sim</option>";
142   - ins += "<option value='2' ";
  142 + ins += "<option value='0' ";
143 143 if (i.permitemedia == 0 ){ins += "selected";}
144 144 ins += " >n&atilde;o</option>";
145 145 ins += "</select></p>";
... ... @@ -155,10 +155,10 @@ function gravaDados(id,recordid){
155 155 for (i=0;i<campos.length;i++){
156 156 par += "&"+campos[i]+"="+($i("E"+campos[i]).value);
157 157 }
158   - par += "&id_menu="+id;
  158 + par += "&codigo_unidade_medida="+id;
159 159 core_carregando("ativa");
160 160 core_carregando(" gravando o registro do id= "+id);
161   - sUrl = "../php/metaestat.php?funcao=alteraMenus"+par;
  161 + sUrl = "../php/metaestat.php?funcao=alterarUnidadeMedida"+par;
162 162 callback = {
163 163 success:function(o){
164 164 try {
... ... @@ -168,7 +168,7 @@ function gravaDados(id,recordid){
168 168 }
169 169 else{
170 170 var rec = myDataTable.getRecordSet().getRecord(recordid);
171   - myDataTable.updateRow(rec,YAHOO.lang.JSON.parse(o.responseText)[0]);
  171 + myDataTable.updateRow(rec,YAHOO.lang.JSON.parse(o.responseText));
172 172 core_carregando("desativa");
173 173 }
174 174 }
... ... @@ -181,7 +181,7 @@ function gravaDados(id,recordid){
181 181 }
182 182 function excluiLinha(id,row){
183 183 var mensagem = " excluindo o registro do id= "+id,
184   - sUrl = "../php/menutemas.php?funcao=excluirRegistro&id="+id+"&tabela=menus";
  184 + sUrl = "../php/metaestat.php?funcao=excluirUnidadeMedida&codigo_unidade_medida="+id;
185 185 core_excluiLinha(sUrl,row,mensagem);
186 186 }
187 187 //YAHOO.util.Event.addListener(window, "load", initMenu);
188 188 \ No newline at end of file
... ...
admin/js/estat_variavel.js
... ... @@ -45,16 +45,12 @@ function initMenu(){
45 45 pegaVariaveis();
46 46 }
47 47 function ativaBotaoAdicionaVariavel(sUrl,idBotao){
48   - var adiciona = function()
49   - {
  48 + var adiciona = function(){
50 49 core_carregando("ativa");
51 50 core_carregando(" adicionando um novo registro");
52   - var callback =
53   - {
54   - success:function(o)
55   - {
56   - try
57   - {
  51 + var callback = {
  52 + success:function(o){
  53 + try {
58 54 core_carregando("desativa");
59 55 var j = YAHOO.lang.JSON.parse(o.responseText);
60 56 adicionaNosVariaveis([j],true);
... ... @@ -88,37 +84,35 @@ Monta a &amp;aacute;rvore de edi&amp;ccedil;&amp;atilde;o
88 84 <PEGAPRANCHAS>
89 85 */
90 86 function montaArvore(dados){
91   - YAHOO.example.treeExample = new function()
92   - {
  87 + YAHOO.example.treeExample = new function() {
93 88 tree = "";
94   - function changeIconMode()
95   - {
  89 + function changeIconMode(){
96 90 buildTree();
97 91 }
98 92 function loadNodeData(node, fnLoadComplete){
99   - var sUrl = "../php/metaestat.php?funcao=listaMedidaVariavel&codigo_variavel="+node.data.codigo_variavel;
100   - var callback = {
101   - success: function(oResponse){
102   - var dados = YAHOO.lang.JSON.parse(oResponse.responseText);
103   - adicionaNosMedidas(node,dados,false);
104   - oResponse.argument.fnLoadComplete();
105   - },
106   - failure: function(oResponse){
107   - oResponse.argument.fnLoadComplete();
108   - },
109   - argument:{
110   - "node": node,
111   - "fnLoadComplete": fnLoadComplete
112   - },
113   - timeout: 25000
114   - };
  93 + var sUrl = "../php/metaestat.php?funcao=listaMedidaVariavel&codigo_variavel="+node.data.codigo_variavel,
  94 + callback = {
  95 + success: function(oResponse){
  96 + var dados = YAHOO.lang.JSON.parse(oResponse.responseText);
  97 + adicionaNosMedidas(node,dados,false);
  98 + oResponse.argument.fnLoadComplete();
  99 + },
  100 + failure: function(oResponse){
  101 + oResponse.argument.fnLoadComplete();
  102 + },
  103 + argument:{
  104 + "node": node,
  105 + "fnLoadComplete": fnLoadComplete
  106 + },
  107 + timeout: 25000
  108 + };
115 109 YAHOO.util.Connect.asyncRequest('GET', sUrl, callback);
116 110 }
117 111 function buildTree(){
118 112 tree = new YAHOO.widget.TreeView("tabela");
119 113 tree.setDynamicLoad(loadNodeData, 1);
120   - var root = tree.getRoot();
121   - var tempNode = new YAHOO.widget.TextNode('', root, false);
  114 + var root = tree.getRoot(),
  115 + tempNode = new YAHOO.widget.TextNode('', root, false);
122 116 tempNode.isLeaf = true;
123 117 core_carregando("desativa");
124 118 }
... ... @@ -136,41 +130,45 @@ Mostra os nós de uma medida
136 130 */
137 131 function adicionaNosMedidas(no,dados,redesenha)
138 132 {
139   - function temaIconMode()
140   - {
  133 + var tempNode,i,conteudo,d,j;
  134 + function temaIconMode(){
141 135 var newVal = parseInt(this.value);
142 136 if (newVal != currentIconMode)
143 137 {currentIconMode = newVal;}
144 138 }
145 139 function loadNodeData(node, fnLoadComplete){
146   - var sUrl = "../php/metaestat.php?funcao=listaDimensao&id_medida_variavel="+node.data.id_medida_variavel;
147   - var callback = {
148   - success: function(oResponse){
149   - var dados = YAHOO.lang.JSON.parse(oResponse.responseText);
150   - adicionaNosDimensao(node,dados,false);
151   - oResponse.argument.fnLoadComplete();
152   - },
153   - failure: function(oResponse){
154   - oResponse.argument.fnLoadComplete();
155   - },
156   - argument:{
157   - "node": node,
158   - "fnLoadComplete": fnLoadComplete
159   - },
160   - timeout: 25000
161   - };
  140 + var sUrl = "../php/metaestat.php?funcao=listaDimensao&id_medida_variavel="+node.data.id_medida_variavel,
  141 + callback = {
  142 + success: function(oResponse){
  143 + var dados = YAHOO.lang.JSON.parse(oResponse.responseText);
  144 + adicionaNosDimensao(node,dados,false);
  145 + oResponse.argument.fnLoadComplete();
  146 + },
  147 + failure: function(oResponse){
  148 + oResponse.argument.fnLoadComplete();
  149 + },
  150 + argument:{
  151 + "node": node,
  152 + "fnLoadComplete": fnLoadComplete
  153 + },
  154 + timeout: 25000
  155 + };
162 156 YAHOO.util.Connect.asyncRequest('GET', sUrl, callback);
163 157 }
164   - if(!redesenha)
165   - {
166   - var conteudo = "<span style=\"cursor:pointer;\" onclick=\"adicionarMedidaVariavel('"+no.data.codigo_variavel+"')\" ><img style=\"position:relative;top:2px\" src=\"../imagens/05.png\" /><i>Adicionar nova medida da vari&aacute;vel</i></span>";
167   - var d = {html:conteudo,codigo_variavel:no.data.codigo_variavel};
168   - var tempNode = new YAHOO.widget.HTMLNode(d, no, false,true);
  158 + if(!redesenha){
  159 + tempNode = new YAHOO.widget.HTMLNode(
  160 + {
  161 + html:"<span style=\"cursor:pointer;\" onclick=\"adicionarMedidaVariavel('"+no.data.codigo_variavel+"')\" ><img style=\"position:relative;top:2px\" src=\"../imagens/05.png\" /><i>Adicionar nova medida da vari&aacute;vel</i></span>",
  162 + codigo_variavel:no.data.codigo_variavel
  163 + },
  164 + no,
  165 + false,
  166 + true
  167 + );
169 168 tempNode.isLeaf = true;
170 169 }
171   - for (var i=0, j=dados.length; i<j; i++)
172   - {
173   - var conteudo = "&nbsp;<img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"excluir('medidaVariavel','"+dados[i].id_medida_variavel+"')\" title=excluir width='10px' heigth='10px' src=\"../imagens/01.png\" />";
  170 + for (i=0, j=dados.length; i<j; i++) {
  171 + conteudo = "&nbsp;<img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"excluir('medidaVariavel','"+dados[i].id_medida_variavel+"')\" title=excluir width='10px' heigth='10px' src=\"../imagens/01.png\" />";
174 172 conteudo += "&nbsp;<img style=\"position:relative;cursor:pointer;top:2px\" onclick=\"editar('medidaVariavel','"+dados[i].id_medida_variavel+"')\" title=editar src=\"../imagens/06.png\" /><b>";
175 173 conteudo += "&nbsp;<img style=\"position:relative;cursor:pointer;top:2px\" onclick=\"sql('medidaVariavel','"+dados[i].id_medida_variavel+"')\" title='ver sql' src=\"../imagens/database.png\" /><b>";
176 174  
... ... @@ -178,8 +176,8 @@ function adicionaNosMedidas(no,dados,redesenha)
178 176 {conteudo += "&nbsp;<span><b>"+dados[i].nomemedida+"</b> <span style='color:gray;'>"+dados[i].esquemadb+" - "+dados[i].tabela+" - "+dados[i].colunavalor+" id: "+dados[i].id_medida_variavel+"</span></span>";}
179 177 else
180 178 {conteudo += "&nbsp;<span style=color:red >Edite para definir a nova medida!!!</span>";}
181   - var d = {html:conteudo,id_medida_variavel:dados[i].id_medida_variavel,tipo:"medida"};
182   - var tempNode = new YAHOO.widget.HTMLNode(d, no, false,true);
  179 + d = {html:conteudo,id_medida_variavel:dados[i].id_medida_variavel,tipo:"medida"};
  180 + tempNode = new YAHOO.widget.HTMLNode(d, no, false,true);
183 181 tempNode.isLeaf = false;
184 182 tempNode.setDynamicLoad(loadNodeData, 1);
185 183 }
... ... @@ -192,77 +190,80 @@ Mostra os nós de uma dimensao
192 190  
193 191 <PEGATEMAS>
194 192 */
195   -function adicionaNosDimensao(no,dados,redesenha)
196   -{
197   - function temaIconMode()
198   - {
  193 +function adicionaNosDimensao(no,dados,redesenha){
  194 + var tempNode,i,j,conteudo,d;
  195 + function temaIconMode() {
199 196 var newVal = parseInt(this.value);
200 197 if (newVal != currentIconMode)
201 198 {currentIconMode = newVal;}
202 199 }
203   - if(!redesenha)
204   - {
205   - var conteudo = "<span style=\"cursor:pointer;\" onclick=\"adicionarDimensaoMedida('"+no.data.id_medida_variavel+"')\" ><img style=\"position:relative;top:2px\" src=\"../imagens/05.png\" /><i>Adicionar nova dimens&atilde;o</i></span>";
206   - var d = {html:conteudo};
207   - var tempNode = new YAHOO.widget.HTMLNode(d, no, false,true);
  200 + if(!redesenha) {
  201 + tempNode = new YAHOO.widget.HTMLNode(
  202 + {
  203 + html:"<span style=\"cursor:pointer;\" onclick=\"adicionarDimensaoMedida('"+no.data.id_medida_variavel+"')\" ><img style=\"position:relative;top:2px\" src=\"../imagens/05.png\" /><i>Adicionar nova dimens&atilde;o</i></span>"
  204 + },
  205 + no,
  206 + false,
  207 + true
  208 + );
208 209 tempNode.isLeaf = true;
209 210 }
210   - for (var i=0, j=dados.length; i<j; i++)
211   - {
212   - var conteudo = "&nbsp;<img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"excluir('dimensaoMedida','"+dados[i].id_dimensao_medida+"')\" title=excluir width='10px' heigth='10px' src=\"../imagens/01.png\" />";
  211 + for (i=0, j=dados.length; i<j; i++) {
  212 + conteudo = "&nbsp;<img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"excluir('dimensaoMedida','"+dados[i].id_dimensao_medida+"')\" title=excluir width='10px' heigth='10px' src=\"../imagens/01.png\" />";
213 213 conteudo += "&nbsp;<img style=\"position:relative;cursor:pointer;top:2px\" onclick=\"editar('dimensaoMedida','"+dados[i].id_dimensao_medida+"')\" title=editar src=\"../imagens/06.png\" /><b>";
214 214 if(dados[i].nomedimensao != "")
215 215 {conteudo += "&nbsp;<span><b>"+dados[i].nomedimensao+"</b><span style=color:gray > - "+dados[i].descricao+" id: "+dados[i].id_dimensao_medida+"</span></span>";}
216 216 else
217 217 {conteudo += "&nbsp;<span style=color:red >Edite para definir a nova medida!!!</span>";}
218   - var d = {html:conteudo,id_dimensao_medida:dados[i].id_dimensao_medida,tipo:"dimensao"};
219   - var tempNode = new YAHOO.widget.HTMLNode(d, no, false,true);
  218 + d = {html:conteudo,id_dimensao_medida:dados[i].id_dimensao_medida,tipo:"dimensao"};
  219 + tempNode = new YAHOO.widget.HTMLNode(d, no, false,true);
220 220 tempNode.isLeaf = true;
221 221 }
222 222 if(redesenha){tree.draw();}
223 223 }
224 224 function adicionaNosVariaveis(dados,redesenha){
225   - var root = tree.getRoot();
226   - for (var i=0, j=dados.length; i<j; i++){
227   - var conteudo = "&nbsp;<img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"excluir('variavel','"+dados[i].codigo_variavel+"')\" title=excluir width='10px' heigth='10px' src=\"../imagens/01.png\" />";
  225 + var i,j,d,conteudo,
  226 + root = tree.getRoot();
  227 + for (i=0, j=dados.length; i<j; i++){
  228 + conteudo = "&nbsp;<img style=\"position:relative;cursor:pointer;top:0px\" onclick=\"excluir('variavel','"+dados[i].codigo_variavel+"')\" title=excluir width='10px' heigth='10px' src=\"../imagens/01.png\" />";
228 229 conteudo += "&nbsp;<img style=\"position:relative;cursor:pointer;top:2px\" onclick=\"editar('variavel','"+dados[i].codigo_variavel+"')\" title=editar src=\"../imagens/06.png\" /><b>";
229 230 if(dados[i].nome && dados[i].nome != "")
230 231 {conteudo += "&nbsp;<span>"+dados[i].nome+" - <span style='color:gray;'>"+dados[i].descricao+" id: "+dados[i].codigo_variavel+"</span></span>";}
231 232 else
232 233 {conteudo += "&nbsp;<span style=color:red >Edite para definir a vari&aacute;vel!!!</span>";}
233   - var d = {html:conteudo,codigo_variavel:dados[i].codigo_variavel,tipo:"variavel"};
  234 + d = {html:conteudo,codigo_variavel:dados[i].codigo_variavel,tipo:"variavel"};
234 235 new YAHOO.widget.HTMLNode(d, root, false,true);
235 236 }
236 237 if(redesenha){tree.draw();}
237 238 }
238 239 function montaDivVariavel(i){
239   - var param = {
240   - "linhas":[
241   - {titulo:"Nome:",id:"Enome",size:"50",value:i.nome,tipo:"text",div:""},
242   - {titulo:"Descri&ccedil;&atilde;o:",id:"Edescricao",size:"50",value:i.descricao,tipo:"text",div:""}
243   - ]
244   - };
245   - var ins = "";
  240 + var ins = "",
  241 + param = {
  242 + "linhas":[
  243 + {titulo:"Nome:",id:"Enome",size:"50",value:i.nome,tipo:"text",div:""},
  244 + {titulo:"Descri&ccedil;&atilde;o:",id:"Edescricao",size:"50",value:i.descricao,tipo:"text",div:""}
  245 + ]
  246 + };
246 247 ins += core_geraLinhas(param);
247 248 ins += "<br><br><br>";
248 249 $i("editor_bd").innerHTML = ins;
249 250 }
250 251 function montaDivMedidaVariavel(i){
251   - var param = {
252   - "linhas":[
253   - {titulo:"Nome:",id:"Enomemedida",size:"50",value:i.nomemedida,tipo:"text",div:""},
254   - {titulo:"Unidade de medida:",id:"",size:"50",value:i.codigo_unidade_medida,tipo:"text",div:"<div id=Ccodigo_unidade_medida ></div>"},
255   - {titulo:"Tipo de período:",id:"",size:"50",value:i.codigo_tipo_periodo,tipo:"text",div:"<div id=Ccodigo_tipo_periodo ></div>"},
256   - {titulo:"Tipo de regi&atilde;o:",id:"",size:"50",value:i.codigo_tipo_regiao,tipo:"text",div:"<div id=Ccodigo_tipo_regiao ></div>"},
257   - {titulo:"Conex&atilde;o:",id:"",size:"50",value:i.codigo_estat_conexao,tipo:"text",div:"<div id=Ccodigo_estat_conexao ></div>"},
258   - {titulo:"Esquema do banco:",id:"Eesquemadb",size:"50",value:i.esquemadb,tipo:"text",div:""},
259   - {titulo:"Tabela do banco:",id:"Etabela",size:"50",value:i.tabela,tipo:"text",div:""},
260   - {titulo:"Coluna com os valores:",id:"Ecolunavalor",size:"50",value:i.colunavalor,tipo:"text",div:""},
261   - {titulo:"Coluna com os IDs da tabela GEO:",id:"Ecolunaidgeo",size:"50",value:i.colunaidgeo,tipo:"text",div:""},
262   - {titulo:"Filtro adicional:",id:"Efiltro",size:"50",value:i.filtro,tipo:"text",div:""}
263   - ]
264   - };
265   - var ins = "";
  252 + var temp,ins = "",
  253 + param = {
  254 + "linhas":[
  255 + {titulo:"Nome:",id:"Enomemedida",size:"50",value:i.nomemedida,tipo:"text",div:""},
  256 + {titulo:"Unidade de medida:",id:"",size:"50",value:i.codigo_unidade_medida,tipo:"text",div:"<div id=Ccodigo_unidade_medida ></div>"},
  257 + {titulo:"Tipo de período:",id:"",size:"50",value:i.codigo_tipo_periodo,tipo:"text",div:"<div id=Ccodigo_tipo_periodo ></div>"},
  258 + {titulo:"Tipo de regi&atilde;o:",id:"",size:"50",value:i.codigo_tipo_regiao,tipo:"text",div:"<div id=Ccodigo_tipo_regiao ></div>"},
  259 + {titulo:"Conex&atilde;o:",id:"",size:"50",value:i.codigo_estat_conexao,tipo:"text",div:"<div id=Ccodigo_estat_conexao ></div>"},
  260 + {titulo:"Esquema do banco:",id:"Eesquemadb",size:"50",value:i.esquemadb,tipo:"text",div:""},
  261 + {titulo:"Tabela do banco:",id:"Etabela",size:"50",value:i.tabela,tipo:"text",div:""},
  262 + {titulo:"Coluna com os valores:",id:"Ecolunavalor",size:"50",value:i.colunavalor,tipo:"text",div:""},
  263 + {titulo:"Coluna com os IDs da tabela GEO:",id:"Ecolunaidgeo",size:"50",value:i.colunaidgeo,tipo:"text",div:""},
  264 + {titulo:"Filtro adicional:",id:"Efiltro",size:"50",value:i.filtro,tipo:"text",div:""}
  265 + ]
  266 + };
266 267 ins += core_geraLinhas(param);
267 268 ins += "<br><br><br>";
268 269 $i("editor_bd").innerHTML = ins;
... ... @@ -292,15 +293,15 @@ function montaDivMedidaVariavel(i){
292 293 }
293 294 }
294 295 function montaDivDimensaoMedida(i){
295   - var param = {
296   - "linhas":[
297   - {titulo:"Nome:",id:"Enomedimensao",size:"50",value:i.nomedimensao,tipo:"text",div:""},
298   - {titulo:"Descri&ccedil;&atilde;o:",id:"Edescricao",size:"50",value:i.descricao,tipo:"text",div:""},
299   - {titulo:"Coluna:",id:"Ecoluna",size:"50",value:i.coluna,tipo:"text",div:""},
300   - {titulo:"Agrega valores:",id:"",size:"50",value:i.agregavalores,tipo:"text",div:"<div id=Cagregavalores ></div>"}
301   - ]
302   - };
303   - var ins = "";
  296 + var temp,ins = "",
  297 + param = {
  298 + "linhas":[
  299 + {titulo:"Nome:",id:"Enomedimensao",size:"50",value:i.nomedimensao,tipo:"text",div:""},
  300 + {titulo:"Descri&ccedil;&atilde;o:",id:"Edescricao",size:"50",value:i.descricao,tipo:"text",div:""},
  301 + {titulo:"Coluna:",id:"Ecoluna",size:"50",value:i.coluna,tipo:"text",div:""},
  302 + {titulo:"Agrega valores:",id:"",size:"50",value:i.agregavalores,tipo:"text",div:"<div id=Cagregavalores ></div>"}
  303 + ]
  304 + };
304 305 ins += core_geraLinhas(param);
305 306 ins += "<br><br><br>";
306 307 $i("editor_bd").innerHTML = ins;
... ... @@ -318,21 +319,19 @@ Adiciona uma nova medida em uma variavel
318 319  
319 320 <ALTERAMEDIDAVARIAVEL>
320 321 */
321   -function adicionarMedidaVariavel(codigo_variavel)
322   -{
323   - var no = tree.getNodeByProperty("codigo_variavel",codigo_variavel);
324   - var sUrl = "../php/metaestat.php?funcao=alteraMedidaVariavel&codigo_variavel="+codigo_variavel;
325   - var callback =
326   - {
327   - success: function(oResponse)
328   - {
329   - var dados = YAHOO.lang.JSON.parse(oResponse.responseText);
330   - adicionaNosMedidas(no,[dados],true);
331   - editar('medidaVariavel',dados.id_medida_variavel);
332   - },
333   - failure:core_handleFailure,
334   - argument: { foo:"foo", bar:"bar" }
335   - };
  322 +function adicionarMedidaVariavel(codigo_variavel){
  323 + var no = tree.getNodeByProperty("codigo_variavel",codigo_variavel),
  324 + sUrl = "../php/metaestat.php?funcao=alteraMedidaVariavel&codigo_variavel="+codigo_variavel,
  325 + callback = {
  326 + success: function(oResponse)
  327 + {
  328 + var dados = YAHOO.lang.JSON.parse(oResponse.responseText);
  329 + adicionaNosMedidas(no,[dados],true);
  330 + editar('medidaVariavel',dados.id_medida_variavel);
  331 + },
  332 + failure:core_handleFailure,
  333 + argument: { foo:"foo", bar:"bar" }
  334 + };
336 335 core_makeRequest(sUrl,callback);
337 336 }
338 337 /*
... ... @@ -342,21 +341,18 @@ Adiciona uma nova dimensao a uma medida de variavel
342 341  
343 342 <ADICIONARDIMENSAOMedida>
344 343 */
345   -function adicionarDimensaoMedida(id_medida_variavel)
346   -{
347   - var no = tree.getNodeByProperty("id_medida_variavel",id_medida_variavel);
348   - var sUrl = "../php/metaestat.php?funcao=alteraDimensaoMedida&id_medida_variavel="+id_medida_variavel;
349   - var callback =
350   - {
351   - success: function(oResponse)
352   - {
353   - var dados = YAHOO.lang.JSON.parse(oResponse.responseText);
354   - adicionaNosDimensao(no,[dados],true);
355   - editar('dimensaoMedida',dados.id_dimensao_medida);
356   - },
357   - failure:core_handleFailure,
358   - argument: { foo:"foo", bar:"bar" }
359   - };
  344 +function adicionarDimensaoMedida(id_medida_variavel){
  345 + var no = tree.getNodeByProperty("id_medida_variavel",id_medida_variavel),
  346 + sUrl = "../php/metaestat.php?funcao=alteraDimensaoMedida&id_medida_variavel="+id_medida_variavel,
  347 + callback = {
  348 + success: function(oResponse){
  349 + var dados = YAHOO.lang.JSON.parse(oResponse.responseText);
  350 + adicionaNosDimensao(no,[dados],true);
  351 + editar('dimensaoMedida',dados.id_dimensao_medida);
  352 + },
  353 + failure:core_handleFailure,
  354 + argument: { foo:"foo", bar:"bar" }
  355 + };
360 356 core_makeRequest(sUrl,callback);
361 357 }
362 358 /*
... ... @@ -367,35 +363,36 @@ Abre o editor de um nó
367 363 function editar(tipo,id) {
368 364 core_carregando("ativa");
369 365 core_carregando(" buscando dados");
370   - var sUrl = null;
371   - var callback = {
372   - success:function(o) {
373   - try {
374   - if(tipo == "variavel"){
375   - var dados = YAHOO.lang.JSON.parse(o.responseText);
376   - core_montaEditor("gravaDados('variavel','"+id+"')","450px","200px","","Editor de vari&aacute;vel");
377   - montaDivVariavel(dados);
378   - //document.getElementById("Eid_variavel").style.width = "200px";
379   - }
380   - if(tipo == "medidaVariavel"){
381   - var dados = YAHOO.lang.JSON.parse(o.responseText);
382   - core_montaEditor("gravaDados('medidaVariavel','"+id+"')","450px","200px","","Editor de medidas");
383   - montaDivMedidaVariavel(dados);
384   - //document.getElementById("Eid_variavel").style.width = "200px";
385   - }
386   - if(tipo == "dimensaoMedida"){
387   - var dados = YAHOO.lang.JSON.parse(o.responseText);
388   - core_montaEditor("gravaDados('dimensaoMedida','"+id+"')","450px","200px","","Editor de dimens&oatilde;es");
389   - montaDivDimensaoMedida(dados);
390   - //document.getElementById("Eid_variavel").style.width = "200px";
  366 + var sUrl = null,
  367 + callback = {
  368 + success:function(o) {
  369 + try {
  370 + var dados;
  371 + if(tipo == "variavel"){
  372 + dados = YAHOO.lang.JSON.parse(o.responseText);
  373 + core_montaEditor("gravaDados('variavel','"+id+"')","450px","200px","","Editor de vari&aacute;vel");
  374 + montaDivVariavel(dados);
  375 + //document.getElementById("Eid_variavel").style.width = "200px";
  376 + }
  377 + if(tipo == "medidaVariavel"){
  378 + dados = YAHOO.lang.JSON.parse(o.responseText);
  379 + core_montaEditor("gravaDados('medidaVariavel','"+id+"')","450px","200px","","Editor de medidas");
  380 + montaDivMedidaVariavel(dados);
  381 + //document.getElementById("Eid_variavel").style.width = "200px";
  382 + }
  383 + if(tipo == "dimensaoMedida"){
  384 + dados = YAHOO.lang.JSON.parse(o.responseText);
  385 + core_montaEditor("gravaDados('dimensaoMedida','"+id+"')","450px","200px","","Editor de dimens&oatilde;es");
  386 + montaDivDimensaoMedida(dados);
  387 + //document.getElementById("Eid_variavel").style.width = "200px";
  388 + }
  389 + core_carregando("desativa");
391 390 }
392   - core_carregando("desativa");
393   - }
394   - catch(e){core_handleFailure(e,o.responseText);}
395   - },
396   - failure:core_handleFailure,
397   - argument: { foo:"foo", bar:"bar" }
398   - };
  391 + catch(e){core_handleFailure(e,o.responseText);}
  392 + },
  393 + failure:core_handleFailure,
  394 + argument: { foo:"foo", bar:"bar" }
  395 + };
399 396 if(tipo == "variavel"){
400 397 sUrl = "../php/metaestat.php?funcao=listaVariavel&codigo_variavel="+id;
401 398 }
... ... @@ -417,45 +414,118 @@ Mostra o sql que acessa os dados
417 414 function sql(tipo,id) {
418 415 core_carregando("ativa");
419 416 core_carregando(" buscando dados");
420   - var sUrl = null;
421   - var callback = {
422   - success:function(o) {
423   - try {
424   - if(tipo == "medidaVariavel"){
425   - var ins = "",
426   - dados = YAHOO.lang.JSON.parse(o.responseText);
427   - core_montaEditor("","450px","200px","","SQL");
428   - ins = "<p><b>Select:</b><p>"+dados.sql;
429   - ins +="<p><input style='position:relative;top:2px' type='checkbox' id='incluirtodascolunas' />Incluir todas as colunas no resultado";
430   - ins +="<p>Filtro opcional (exemplo: valor = 1)<br>";
431   - ins += "<input type=text value='' id='filtrosql' />";
432   - ins += '<p><input type=button id="sqljson" value="JSON" />';
433   - //ins +="<p><a href='../php/metaestat.php?funcao=dadosMedidaVariavel&formato=json&id_medida_variavel="+id+"&filtro="+document.getElementById("filtrosql").value+"' target=_blank >JSON </a>";
434   -
435   - $i("editor_bd").innerHTML = ins;
436   - new YAHOO.widget.Button(sqljson);
437   - document.getElementById("sqljson-button").onclick = function(){
438   - var colunas = 0;
439   - if(document.getElementById("incluirtodascolunas").checked === true){
440   - colunas = 1;
441   - }
442   - window.open('../php/metaestat.php?funcao=dadosMedidaVariavel&formato=json&id_medida_variavel='+id+"&filtro="+document.getElementById("filtrosql").value+"&todasascolunas="+colunas);
443   - };
444   - //document.getElementById("Eid_variavel").style.width = "200px";
445   - }
446   - if(tipo == "dimensaoMedida"){
447   - var dados = YAHOO.lang.JSON.parse(o.responseText);
448   - core_montaEditor("gravaDados('dimensaoMedida','"+id+"')","450px","200px","","Editor de dimens&oatilde;es");
449   - montaDivDimensaoMedida(dados);
450   - //document.getElementById("Eid_variavel").style.width = "200px";
  417 + var sUrl = null,
  418 + callback = {
  419 + success:function(o) {
  420 + try {
  421 + if(tipo == "medidaVariavel"){
  422 + var ins = "",
  423 + dados = YAHOO.lang.JSON.parse(o.responseText);
  424 + core_montaEditor("","450px","200px","","SQL");
  425 + ins = "<p><b>Select:</b><p>"+dados.sql;
  426 + ins += "<p><b>Mapserver:</b><p>"+dados.sqlmapserver;
  427 + ins +="<p><input style='position:relative;top:2px' type='checkbox' id='incluirtodascolunas' />Incluir todas as colunas no resultado";
  428 + ins +="<p>Filtro opcional (exemplo: valor = 1)<br>";
  429 + ins += "<input type=text value='' id='filtrosql' />";
  430 + ins +="<p>Agrupar pela coluna<br>";
  431 + ins += "<input type=text value='' id='agruparsql' />";
  432 + ins += '<p><input type=button id="sqljson" value="JSON" />';
  433 + ins += ' <input type=button id="sumarioestat" value="Sum&aacute;rio" />';
  434 + ins += ' <input type=button id="graficoestat" value="Gr&aacute;fico" />';
  435 +
  436 + $i("editor_bd").innerHTML = ins;
  437 + new YAHOO.widget.Button("sqljson");
  438 + document.getElementById("sqljson-button").onclick = function(){
  439 + var colunas = 0;
  440 + if($i("incluirtodascolunas").checked === true){
  441 + colunas = 1;
  442 + }
  443 + window.open('../php/metaestat.php?funcao=dadosMedidaVariavel&formato=json&id_medida_variavel='+id+"&agruparpor="+$i("agruparsql").value+"&filtro="+$i("filtrosql").value+"&todasascolunas="+colunas);
  444 + };
  445 + new YAHOO.widget.Button("sumarioestat");
  446 + $i("sumarioestat-button").onclick = function(){
  447 + window.open('../php/metaestat.php?funcao=sumarioMedidaVariavel&formato=json&id_medida_variavel='+id+"&agruparpor="+$i("agruparsql").value+"&filtro="+$i("filtrosql").value);
  448 + };
  449 + new YAHOO.widget.Button("graficoestat");
  450 + $i("graficoestat-button").onclick = function(){
  451 + callback = {
  452 + success: function(oResponse){
  453 + var dados = YAHOO.lang.JSON.parse(oResponse.responseText);
  454 + dados = dados.histograma;
  455 + //converte os dados para o padrao usado no grafico
  456 + abreDados = function(){
  457 + i3GEOF.graficointerativo.dados = dados;
  458 + i3GEOF.graficointerativo.montaTabelaDados = function(dados){
  459 + var i=0,
  460 + v,
  461 + ins,
  462 + key = "",
  463 + id,
  464 + cor = "#C11515";
  465 + n = dados.lenght;
  466 + v = [];
  467 + ins = [];
  468 + ins.push("<p class=paragrafo >Tabela de dados para o gr&aacute;fico. Os valores podem ser editados</p><table class=lista4 id=i3GEOgraficointerativotabeladados ><tr><td></td>");
  469 + ins.push("<td style=background-color:yellow >&nbsp;<img style=cursor:pointer onclick='i3GEOF.graficointerativo.ordenaColuna(this,1)' src='"+i3GEO.configura.locaplic+"/imagens/ordena1.gif' title='ordena' /> nome</td>");
  470 + ins.push("<td style=background-color:yellow >&nbsp;<img style=cursor:pointer onclick='i3GEOF.graficointerativo.ordenaColuna(this,2)' src='"+i3GEO.configura.locaplic+"/imagens/ordena1.gif' title='ordena' /> valor</td>");
  471 + ins.push("<td style=background-color:yellow >cor</td><td></td></tr>");
  472 + for(key in dados){
  473 + v[0] = key;
  474 + v[1] = dados[key];
  475 + id = "i3GEOgraficointerativoDados"+i; //layer+indice da classe
  476 + ins.push("<tr><td>");
  477 + ins.push("<img style='cursor:pointer' title='clique para excluir' onclick='i3GEOF.graficointerativo.excluilinha(this)' src='"+i3GEO.configura.locaplic+"/imagens/x.gif' title='excluir' /></td>");
  478 + ins.push("</td><td>");
  479 + ins.push($inputText("","",id+"_nome","digite o novo nome",20,v[0],"nome"));
  480 + ins.push("</td><td>");
  481 + ins.push($inputText("","",id+"_valor","digite o novo valor",12,v[1],"valor"));
  482 + ins.push("</td><td>");
  483 + if($i("i3GEOgraficointerativoCoresA").checked){
  484 + cor = i3GEO.util.rgb2hex(i3GEO.util.randomRGB());
  485 + }
  486 + //verifica se no objeto com os dados existe um terceiro valor com as cores
  487 + if(v[2]){
  488 + cor = i3GEO.util.rgb2hex(v[2]);
  489 + }
  490 + ins.push($inputText("","",id+"_cor","",12,cor,"cor"));
  491 + ins.push("</td><td>");
  492 + ins.push("<img alt='aquarela.gif' style=cursor:pointer src='"+i3GEO.configura.locaplic+"/imagens/aquarela.gif' onclick='i3GEOF.graficointerativo.corj(\""+id+"_cor\")' />");
  493 + ins.push("</td></tr>");
  494 + i++;
  495 + }
  496 + ins.push("</table><br>");
  497 + $i("i3GEOgraficointerativoDados").innerHTML = ins.join("");
  498 + };
  499 + i3GEOF.graficointerativo.criaJanelaFlutuante();
  500 + core_carregando("desativa");
  501 + };
  502 + i3GEO.util.scriptTag(
  503 + "../../ferramentas/graficointerativo/index.js",
  504 + "abreDados()",
  505 + "i3GEOF.graficointerativo_script"
  506 + );
  507 + },
  508 + failure:core_handleFailure,
  509 + argument: { foo:"foo", bar:"bar" }
  510 + };
  511 + sUrl = '../php/metaestat.php?funcao=sumarioMedidaVariavel&formato=json&id_medida_variavel='+id+"&agruparpor="+$i("agruparsql").value+"&filtro="+document.getElementById("filtrosql").value;
  512 + core_carregando("ativa");
  513 + core_makeRequest(sUrl,callback);
  514 + };
  515 + }
  516 + if(tipo == "dimensaoMedida"){
  517 + var dados = YAHOO.lang.JSON.parse(o.responseText);
  518 + core_montaEditor("gravaDados('dimensaoMedida','"+id+"')","500px","300px","","Editor de dimens&oatilde;es");
  519 + montaDivDimensaoMedida(dados);
  520 + //document.getElementById("Eid_variavel").style.width = "200px";
  521 + }
  522 + core_carregando("desativa");
451 523 }
452   - core_carregando("desativa");
453   - }
454   - catch(e){core_handleFailure(e,o.responseText);}
455   - },
456   - failure:core_handleFailure,
457   - argument: { foo:"foo", bar:"bar" }
458   - };
  524 + catch(e){core_handleFailure(e,o.responseText);}
  525 + },
  526 + failure:core_handleFailure,
  527 + argument: { foo:"foo", bar:"bar" }
  528 + };
459 529 if(tipo == "medidaVariavel"){
460 530 sUrl = "../php/metaestat.php?funcao=sqlMedidaVariavel&id_medida_variavel="+id;
461 531 }
... ... @@ -472,11 +542,10 @@ Function: excluir
472 542  
473 543 Exclui um elemento
474 544 */
475   -function excluir(tipo,id)
476   -{
477   - var mensagem = " excluindo o registro = "+id;
478   - var no = null;
479   - var sUrl = null;
  545 +function excluir(tipo,id){
  546 + var mensagem = " excluindo o registro = "+id,
  547 + no = null,
  548 + sUrl = null;
480 549 if(tipo == "variavel") {
481 550 no = tree.getNodeByProperty("codigo_variavel",id);
482 551 sUrl = "../php/metaestat.php?funcao=excluirVariavel&codigo_variavel="+id;
... ... @@ -503,11 +572,10 @@ Altera dados de um elemento do Atlas
503 572  
504 573 <ALTERARTEMA>
505 574 */
506   -function gravaDados(tipo,id)
507   -{
508   - var campos = null;
509   - var par = null;
510   - var prog = null;
  575 +function gravaDados(tipo,id){
  576 + var sUrl,i,campos = null,
  577 + par = null,
  578 + prog = null;
511 579 if(tipo == "variavel"){
512 580 campos = new Array("nome","descricao");
513 581 par = "&codigo_variavel="+id;
... ... @@ -523,31 +591,32 @@ function gravaDados(tipo,id)
523 591 par = "&id_dimensao_medida="+id;
524 592 prog = "../php/metaestat.php?funcao=alteraDimensaoMedida";
525 593 }
526   - for (var i=0;i<campos.length;i++)
  594 + for (i=0;i<campos.length;i++)
527 595 {par += "&"+campos[i]+"="+($i("E"+campos[i]).value);}
528 596  
529 597 var callback = {
530 598 success:function(o){
531 599 try {
  600 + var no;
532 601 if(YAHOO.lang.JSON.parse(o.responseText) == "erro") {
533 602 core_carregando("<span style=color:red >N&atilde;o foi poss&iacute;vel excluir. Verifique se n&atilde;o existem menus vinculados a este tema</span>");
534 603 setTimeout("core_carregando('desativa')",3000);
535 604 }
536 605 else{
537 606 if(tipo == "variavel"){
538   - var no = tree.getNodeByProperty("codigo_variavel",id);
  607 + no = tree.getNodeByProperty("codigo_variavel",id);
539 608 no.getContentEl().getElementsByTagName("span")[0].innerHTML = "<b>"+document.getElementById("Enome").value+"</b> - <span style='color:gray;'>"+document.getElementById("Edescricao").value+" id: "+id+"</span>";
540 609 no.getContentEl().getElementsByTagName("span")[0].style.color = "";
541 610 no.html = no.getContentEl().innerHTML;
542 611 }
543 612 if(tipo == "medidaVariavel"){
544   - var no = tree.getNodeByProperty("id_medida_variavel",id);
  613 + no = tree.getNodeByProperty("id_medida_variavel",id);
545 614 no.getContentEl().getElementsByTagName("span")[0].innerHTML = "<b>"+document.getElementById("Enomemedida").value+"</b> - <span style='color:gray;'>"+document.getElementById("Eesquemadb").value+" - "+document.getElementById("Etabela").value+" - "+document.getElementById("Ecolunavalor").value+" id: "+id+"</span>";
546 615 no.getContentEl().getElementsByTagName("span")[0].style.color = "";
547 616 no.html = no.getContentEl().innerHTML;
548 617 }
549 618 if(tipo == "dimensaoMedida"){
550   - var no = tree.getNodeByProperty("id_dimensao_medida",id);
  619 + no = tree.getNodeByProperty("id_dimensao_medida",id);
551 620 no.getContentEl().getElementsByTagName("span")[0].innerHTML = "<b>"+document.getElementById("Enomedimensao").value+"</b><span style=color:gray > - "+document.getElementById("Edescricao").value+" id: "+id+"</span>";
552 621 no.getContentEl().getElementsByTagName("span")[0].style.color = "";
553 622 no.html = no.getContentEl().innerHTML;
... ... @@ -565,7 +634,7 @@ function gravaDados(tipo,id)
565 634 if(prog && par){
566 635 core_carregando("ativa");
567 636 core_carregando(" gravando o registro do id= "+id);
568   - var sUrl = prog+par;
  637 + sUrl = prog+par;
569 638 core_makeRequest(sUrl,callback,'GET');
570 639 }
571 640 }
... ...
admin/php/admin.php
... ... @@ -219,6 +219,24 @@ function verificaFilhos()
219 219 try
220 220 {
221 221 $res = false;
  222 + if($tabela == "i3geoestat_conexao")
  223 + {
  224 + $r = pegaDados("select * from ".$esquemaadmin."i3geoestat_medida_variavel where codigo_estat_conexao=$id");
  225 + if(count($r) > 0)
  226 + $res = true;
  227 + }
  228 + if($tabela == "i3geoestat_tipo_periodo")
  229 + {
  230 + $r = pegaDados("select * from ".$esquemaadmin."i3geoestat_medida_variavel where codigo_tipo_periodo=$id");
  231 + if(count($r) > 0)
  232 + $res = true;
  233 + }
  234 + if($tabela == "i3geoestat_unidade_medida")
  235 + {
  236 + $r = pegaDados("select * from ".$esquemaadmin."i3geoestat_medida_variavel where codigo_unidade_medida=$id");
  237 + if(count($r) > 0)
  238 + $res = true;
  239 + }
222 240 if($tabela == "i3geoestat_variavel")
223 241 {
224 242 $r = pegaDados("select * from ".$esquemaadmin."i3geoestat_medida_variavel where codigo_variavel=$id");
... ...
admin/php/classe_metaestat.php
... ... @@ -37,7 +37,7 @@ Classe: Metaestat
37 37 */
38 38 class Metaestat{
39 39 protected $esquemaadmin;
40   - protected $dbh;
  40 + public $dbh;
41 41 protected $dbhw;
42 42 protected $convUTF;
43 43 /*
... ... @@ -68,28 +68,36 @@ class Metaestat{
68 68 }
69 69 //aceita string ou array
70 70 function converteTextoArray($texto){
71   - if(empty($texto) || strtoupper($texto) == "NULL"){
72   - return "";
73   - }
74   - $chaves = array_keys($texto);
75   - if($chaves[0] != "0"){
76   - foreach($chaves as $chave){
77   - $texto[$chave] = $this->converteTexto($texto[$chave]);
  71 + try {
  72 + if(empty($texto) || strtoupper($texto) == "NULL"){
  73 + return "";
78 74 }
79   - }
80   - else{
81   - $n = count($texto);
82   - for($i=0;$i<$n;$i++){
83   - $chaves = array_keys($texto[$i]);
  75 + $chaves = array_keys($texto);
  76 + if($chaves[0] != "0"){
84 77 foreach($chaves as $chave){
85   - $texto[$i][$chave] = $this->converteTexto($texto[$i][$chave]);
  78 + $texto[$chave] = $this->converteTexto($texto[$chave]);
86 79 }
87 80 }
  81 + else{
  82 + $n = count($texto);
  83 + for($i=0;$i<$n;$i++){
  84 + $chaves = array_keys($texto[$i]);
  85 + foreach($chaves as $chave){
  86 + if(is_string($texto[$i][$chave])){
  87 + $t = $this->converteTexto($texto[$i][$chave]);
  88 + $texto[$i][$chave] = $t;
  89 + }
  90 + }
  91 + }
  92 + }
  93 + return $texto;
  94 + }
  95 + catch (Exception $e) {
  96 + return $texto;
88 97 }
89   - return $texto;
90 98 }
91 99 function converteTexto($texto){
92   - if(empty($texto) || strtoupper($texto) == "NULL"){
  100 + if(empty($texto)){
93 101 return "";
94 102 }
95 103 if($this->convUTF == true){
... ... @@ -167,49 +175,111 @@ class Metaestat{
167 175 }
168 176 }
169 177 /*
170   - Function: listaConexao
  178 + Function: sqlMedidaVariavel
171 179  
172   - Lista as conexoes cadastradas ou uma unica conexao
  180 + Monta o sql que permite acessar os dados de uma media de uma variavel
173 181  
174 182 Parametros:
175 183  
176   - $id {string} - opcional
  184 + $id_medida_variavel - opcional
177 185  
178   - $senha {boolean} - mostra ou nao a senha - opcional
  186 + $todasascolunas - opcional
179 187 */
180   - function listaConexao($id_conexao="",$senha=false){
181   - if($senha){
182   - $colunas = "codigo_estat_conexao, bancodedados, host, porta, usuario, senha";
  188 + function sqlMedidaVariavel($id_medida_variavel,$todasascolunas){
  189 + $filtro = false;
  190 + $dados = $this->listaMedidaVariavel("",$id_medida_variavel);
  191 + $dadosgeo = $this->listaTipoRegiao($dados["codigo_tipo_regiao"]);
  192 +
  193 + if($todasascolunas == 0){
  194 + $sql = " SELECT d.".$dados["colunavalor"].",d.".$dados["colunaidgeo"];
  195 + $sqlgeo = $sql.",g.".$dadosgeo["colunageo"];
183 196 }
184 197 else{
185   - $colunas = "codigo_estat_conexao, bancodedados, host, porta, usuario";
  198 + $sql = " SELECT d.* ";
  199 + $sqlgeo = " SELECT ".$dados["tabela"].".*,g.".$dados["colunaidgeo"];
186 200 }
187   - $sql = "select $colunas from ".$this->esquemaadmin."i3geoestat_conexao ";
188   - if($id != ""){
189   - $sql .= "WHERE codigo_estat_conexao = $id_conexao ";
  201 + $sql .= " FROM ".$dados["esquemadb"].".".$dados["tabela"]." as d ";
  202 + $sqlgeo .= " FROM ".$dados["esquemadb"].".".$dados["tabela"]." as d,".$dadosgeo["esquemadb"].".".$dadosgeo["tabela"]." as g ";
  203 + if(!empty($dados["filtro"])){
  204 + $sql .= " WHERE ".$dados["filtro"];
  205 + $sqlgeo .= " WHERE ".$dados["filtro"];
  206 + $filtro = true;
190 207 }
191   - $sql .= "ORDER BY bancodedados,host,usuario";
192   - return $this->execSQL($sql,$id_conexao);
  208 + //join com a tabela geo
  209 + $j = " d.".$dados["colunaidgeo"]." = g.".$dadosgeo["identificador"];
  210 + if($filtro){
  211 + $sqlgeo .= " AND ".$j;
  212 + }
  213 + else{
  214 + $sqlgeo .= " WHERE ".$j;
  215 + }
  216 + $sqlgeo = $dadosgeo["colunageo"]." from ($sqlgeo) as foo using unique ".$dados["colunaidgeo"]." using srid= ".$dadosgeo["srid"];
  217 + return array("sql"=>$sql,"sqlmapserver"=>$sqlgeo,"filtro"=>$filtro);
193 218 }
194   - /*
195   - Function: listaVariavel
196   -
197   - Lista as variaveis cadastradas ou uma unica variavel
198   -
199   - Parametros:
200   -
201   - $codigo_variavel - opcional
202   - */
203   - function listaVariavel($codigo_variavel=""){
204   - $sql = "select * from ".$this->esquemaadmin."i3geoestat_variavel ";
205   - if($codigo_variavel != ""){
206   - $sql .= "WHERE codigo_variavel = $codigo_variavel ";
  219 + function dadosMedidaVariavel($id_medida_variavel,$filtro="",$todasascolunas = 0,$agruparpor = ""){
  220 + $sql = $this->sqlMedidaVariavel($id_medida_variavel,$todasascolunas);
  221 + $sqlf = $sql["sql"];
  222 + if($sql["filtro"] == true){
  223 + if(!empty($filtro)){
  224 + $sqlf .= $sqlf." AND ".$filtro;
  225 + }
207 226 }
208   - $sql .= "ORDER BY nome";
209   - return $this->execSQL($sql,$codigo_variavel);
  227 + elseif(!empty($filtro)){
  228 + $sqlf .= " WHERE ".$filtro;
  229 + }
  230 + //echo $sqlf;exit;
  231 + $metaVariavel = $this->listaMedidaVariavel("",$id_medida_variavel);
  232 + if(!empty($metaVariavel["codigo_estat_conexao"])){
  233 + $c = $this->listaConexao($metaVariavel["codigo_estat_conexao"],true);
  234 + $dbhold = $this->dbh;
  235 + $dbh = new PDO('pgsql:dbname='.$c["bancodedados"].';user='.$c["usuario"].';password='.$c["senha"].';host='.$c["host"].';port='.$c["porta"]);
  236 + $this->dbh = $dbh;
  237 + $res = $this->execSQL($sqlf);
  238 + $this->dbh = $dbhold;
  239 + return $res;
  240 + }
  241 + return false;
  242 + }
  243 + function sumarioMedidaVariavel($id_medida_variavel,$filtro=""){
  244 + $dados = $this->dadosMedidaVariavel($id_medida_variavel,$filtro,0);
  245 + if($dados){
  246 + $metaVariavel = $this->listaMedidaVariavel("",$id_medida_variavel);
  247 + $un = $this->listaUnidadeMedida($metaVariavel["codigo_unidade_medida"]);
  248 + foreach($dados as $d){
  249 + $valores[] = $d[$metaVariavel["colunavalor"]];
  250 + }
  251 + $soma = "";
  252 + $media = "";
  253 + $min = "";
  254 + $max = "";
  255 + $quantidade = count($valores);
  256 +
  257 + if($un["permitesoma"] == "1"){
  258 + $soma = array_sum($valores);
  259 + }
  260 + if($un["permitemedia"] == "1"){
  261 + $media = $soma / $quantidade;
  262 + }
  263 + if($un["permitesoma"] == "1" || $un["permitemedia"] == "1"){
  264 + sort($valores);
  265 + $min = $valores[0];
  266 + $max = $valores[$quantidade - 1];
  267 + }
  268 + $histograma = array_count_values($valores);
  269 + return array(
  270 + "soma"=>$soma,
  271 + "media"=>$media,
  272 + "menor"=>$min,
  273 + "maior"=>$max,
  274 + "quantidade"=>$quantidade,
  275 + "histograma"=>$histograma,
  276 + "unidademedida"=>$un
  277 + );
  278 + }
  279 + return false;
210 280 }
211 281 /*
212   - Function: alteraVariavel
  282 + Function: alteraVariavel
213 283  
214 284 Altera uma variavel ou cria uma nova
215 285  
... ... @@ -237,103 +307,71 @@ class Metaestat{
237 307 }
238 308 }
239 309 /*
240   - Function: listaMedidaVariavel
241   -
242   - Lista as medidas das variaveis cadastradas para uma variavel ou uma unica medida
243   -
244   - Parametros:
245   -
246   - $codigo_variavel
  310 + Function: alteraMedidaVariavel
247 311  
248   - $id_medida_variavel - opcional
  312 + Altera uma medida de uma variavel ou cria uma nova
249 313 */
250   - function listaMedidaVariavel($codigo_variavel,$id_medida_variavel=""){
251   - $sql = "SELECT i3geoestat_medida_variavel.* ";
252   - $sql .= "FROM ".$this->esquemaadmin."i3geoestat_variavel ";
253   - //$sql .= "INNER JOIN ".$this->esquemaadmin."i3geoestat_unidade_medida ";
254   - //$sql .= "ON i3geoestat_medida_variavel.codigo_unidade_medida = i3geoestat_unidade_medida.codigo_unidade_medida ";
255   - $sql .= "INNER JOIN ".$this->esquemaadmin."i3geoestat_medida_variavel ";
256   - $sql .= "ON i3geoestat_variavel.codigo_variavel = i3geoestat_medida_variavel.codigo_variavel ";
257   - if($codigo_variavel != ""){
258   - $sql .= "WHERE i3geoestat_variavel.codigo_variavel = $codigo_variavel ";
  314 + function alteraMedidaVariavel($codigo_variavel,$id_medida_variavel="",$codigo_unidade_medida,$codigo_tipo_periodo,$codigo_tipo_regiao,$codigo_estat_conexao,$esquemadb,$tabela,$colunavalor,$colunaidgeo,$filtro,$nomemedida){
  315 + try {
259 316 if($id_medida_variavel != ""){
260   - $sql .= "AND i3geoestat_medida_variavel.id_medida_variavel = $id_medida_variavel ";
  317 + if($this->convUTF){
  318 + $nomemedida = utf8_encode($nomemedida);
  319 + }
  320 + $this->dbhw->query("UPDATE ".$this->esquemaadmin."i3geoestat_medida_variavel SET codigo_unidade_medida = '$codigo_unidade_medida',codigo_tipo_periodo = '$codigo_tipo_periodo',codigo_tipo_regiao = '$codigo_tipo_regiao',codigo_estat_conexao = '$codigo_estat_conexao',esquemadb = '$esquemadb',tabela = '$tabela',colunavalor = '$colunavalor',colunaidgeo = '$colunaidgeo',filtro = '$filtro',nomemedida = '$nomemedida' WHERE id_medida_variavel = $id_medida_variavel");
  321 + $retorna = $id_medida_variavel;
261 322 }
  323 + else{
  324 + $retorna = $this->insertId("i3geoestat_medida_variavel","nomemedida","id_medida_variavel");
  325 + if($retorna){
  326 + $this->dbhw->query("UPDATE ".$this->esquemaadmin."i3geoestat_medida_variavel SET codigo_variavel = $codigo_variavel WHERE id_medida_variavel = $retorna");
  327 + }
  328 + }
  329 + return $retorna;
262 330 }
263   - else{
264   - $sql .= "WHERE i3geoestat_medida_variavel.id_medida_variavel = $id_medida_variavel ";
  331 + catch (PDOException $e) {
  332 + return "Error!: " . $e->getMessage();
265 333 }
266   - return $this->execSQL($sql,$id_medida_variavel);
267 334 }
268 335 /*
269   - Function: sqlMedidaVariavel
270   -
271   - Monta o sql que permite acessar os dados de uma media de uma variavel
272   -
273   - Parametros:
274   -
275   - $id_medida_variavel - opcional
  336 + Function: alteraUnidadeMedida
276 337  
277   - $todasascolunas - opcional
  338 + Altera uma medida de uma variavel ou cria uma nova
278 339 */
279   - function sqlMedidaVariavel($id_medida_variavel,$todasascolunas){
280   - $filtro = false;
281   - $dados = $this->listaMedidaVariavel("",$id_medida_variavel);
282   - if($todasascolunas == 0){
283   - $sql = " SELECT ".$dados["colunavalor"].",".$dados["colunaidgeo"];
284   - }
285   - else{
286   - $sql = " SELECT * ";
287   - }
288   - $sql .= " FROM ".$dados["esquemadb"].".".$dados["tabela"];
289   - if(!empty($dados["filtro"])){
290   - $sql .= " WHERE ".$dados["filtro"];
291   - $filtro = true;
292   - }
293   - else{
294   - $dados["filtro"] = "";
295   - }
296   - return array("sql"=>$sql,"sqlmapserver"=>"","filtro"=>$filtro);
297   - }
298   - function dadosMedidaVariavel($id_medida_variavel,$filtro="",$todasascolunas = 0){
299   - $sql = $this->sqlMedidaVariavel($id_medida_variavel,$todasascolunas);
300   - $sqlf = $sql["sql"];
301   - if($sql["filtro"] == true){
302   - if(!empty($filtro)){
303   - $sqlf .= $sqlf." AND ".$filtro;
  340 + function alteraUnidadeMedida($codigo_unidade_medida,$nome,$sigla,$permitesoma,$permitemedia){
  341 + try {
  342 + if($codigo_unidade_medida != ""){
  343 + if($this->convUTF){
  344 + $nome = utf8_encode($nome);
  345 + }
  346 + $this->dbhw->query("UPDATE ".$this->esquemaadmin."i3geoestat_unidade_medida SET nome = '$nome', sigla = '$sigla', permitesoma = '$permitesoma', permitemedia = '$permitemedia' WHERE codigo_unidade_medida = $codigo_unidade_medida");
  347 + $retorna = $codigo_unidade_medida;
304 348 }
  349 + else{
  350 + $retorna = $this->insertId("i3geoestat_unidade_medida","nome","codigo_unidade_medida");
  351 + }
  352 + return $retorna;
305 353 }
306   - elseif(!empty($filtro)){
307   - $sqlf .= " WHERE ".$filtro;
308   - }
309   - $metaVariavel = $this->listaMedidaVariavel("",$id_medida_variavel);
310   - if(!empty($metaVariavel["codigo_estat_conexao"])){
311   - $c = $this->listaConexao($metaVariavel["codigo_estat_conexao"],true);
312   - $dbh = new PDO('pgsql:dbname='.$c["bancodedados"].';user='.$c["usuario"].';password='.$c["senha"].';host='.$c["host"].';port='.$c["porta"]);
313   - $this->dbh = $dbh;
314   - return $this->execSQL($sqlf);
  354 + catch (PDOException $e) {
  355 + return "Error!: " . $e->getMessage();
315 356 }
316   - return false;
317 357 }
318 358 /*
319   - Function: alteraMedidaVariavel
  359 + Function: alteraTipoPeriodo
320 360  
321   - Altera uma medida de uma variavel ou cria uma nova
  361 + Altera um tipo de periodo de tempo
322 362 */
323   - function alteraMedidaVariavel($codigo_variavel,$id_medida_variavel="",$codigo_unidade_medida,$codigo_tipo_periodo,$codigo_tipo_regiao,$codigo_estat_conexao,$esquemadb,$tabela,$colunavalor,$colunaidgeo,$filtro,$nomemedida){
  363 + function alteraTipoPeriodo($codigo_tipo_periodo,$nome,$descricao){
324 364 try {
325   - if($id_medida_variavel != ""){
  365 + if($codigo_tipo_periodo != ""){
326 366 if($this->convUTF){
327   - $nomemedida = utf8_encode($nomemedida);
  367 + $nome = utf8_encode($nome);
  368 + $descricao = utf8_encode($descricao);
328 369 }
329   - $this->dbhw->query("UPDATE ".$this->esquemaadmin."i3geoestat_medida_variavel SET codigo_unidade_medida = '$codigo_unidade_medida',codigo_tipo_periodo = '$codigo_tipo_periodo',codigo_tipo_regiao = '$codigo_tipo_regiao',codigo_estat_conexao = '$codigo_estat_conexao',esquemadb = '$esquemadb',tabela = '$tabela',colunavalor = '$colunavalor',colunaidgeo = '$colunaidgeo',filtro = '$filtro',nomemedida = '$nomemedida' WHERE id_medida_variavel = $id_medida_variavel");
330   - $retorna = $id_medida_variavel;
  370 + $this->dbhw->query("UPDATE ".$this->esquemaadmin."i3geoestat_tipo_periodo SET nome = '$nome', descricao = '$descricao' WHERE codigo_tipo_periodo = $codigo_tipo_periodo");
  371 + $retorna = $codigo_tipo_periodo;
331 372 }
332 373 else{
333   - $retorna = $this->insertId("i3geoestat_medida_variavel","nomemedida","id_medida_variavel");
334   - if($retorna){
335   - $this->dbhw->query("UPDATE ".$this->esquemaadmin."i3geoestat_medida_variavel SET codigo_variavel = $codigo_variavel WHERE id_medida_variavel = $retorna");
336   - }
  374 + $retorna = $this->insertId("i3geoestat_tipo_periodo","nome","codigo_tipo_periodo");
337 375 }
338 376 return $retorna;
339 377 }
... ... @@ -342,32 +380,48 @@ class Metaestat{
342 380 }
343 381 }
344 382 /*
345   - Function: listaDimensao
346   -
347   - Lista as variaveis cadastradas ou uma unica variavel
348   -
349   - Parametros:
  383 + Function: alteraConexao
350 384  
351   - $id_medida_variavel
  385 + Altera uma conexao
  386 + */
  387 + function alteraConexao($codigo_estat_conexao,$bancodedados,$host,$porta,$usuario){
  388 + try {
  389 + if($codigo_estat_conexao != ""){
  390 + $this->dbhw->query("UPDATE ".$this->esquemaadmin."i3geoestat_conexao SET usuario = '$usuario',porta = '$porta',host = '$host',bancodedados = '$bancodedados' WHERE codigo_estat_conexao = $codigo_estat_conexao");
  391 + $retorna = $codigo_estat_conexao;
  392 + }
  393 + else{
  394 + $retorna = $this->insertId("i3geoestat_conexao","bancodedados","codigo_estat_conexao");
  395 + }
  396 + return $retorna;
  397 + }
  398 + catch (PDOException $e) {
  399 + return "Error!: " . $e->getMessage();
  400 + }
  401 + }
  402 + /*
  403 + Function: alteraTipoRegiao
352 404  
353   - $id_dimensao_variavel - opcional
  405 + Altera uma regiao
354 406 */
355   - function listaDimensao($id_medida_variavel,$id_dimensao_medida=""){
356   - $sql = "SELECT i3geoestat_dimensao_medida.* ";
357   - $sql .= "FROM ".$this->esquemaadmin."i3geoestat_dimensao_medida ";
358   - $sql .= "INNER JOIN ".$this->esquemaadmin."i3geoestat_medida_variavel ";
359   - $sql .= "ON i3geoestat_dimensao_medida.id_medida_variavel = i3geoestat_medida_variavel.id_medida_variavel ";
360   - if($id_medida_variavel != ""){
361   - $sql .= "WHERE i3geoestat_dimensao_medida.id_medida_variavel = $id_medida_variavel ";
362   - if($id_dimensao_medida != ""){
363   - $sql .= "AND i3geoestat_dimensao_medida.id_dimensao_medida = $id_dimensao_medida ";
  407 + function alteraTipoRegiao($codigo_tipo_regiao,$nome_tipo_regiao,$descricao_tipo_regiao,$esquemadb,$tabela,$colunageo,$data,$identificador,$colunanomeregiao,$srid){
  408 + try {
  409 + if($codigo_tipo_regiao != ""){
  410 + if($this->convUTF){
  411 + $nome_tipo_regiao = utf8_encode($nome_tipo_regiao);
  412 + $descricao_tipo_regiao = utf8_encode($descricao_tipo_regiao);
  413 + }
  414 + $this->dbhw->query("UPDATE ".$this->esquemaadmin."i3geoestat_tipo_regiao SET nome_tipo_regiao = '$nome_tipo_regiao',descricao_tipo_regiao = '$descricao_tipo_regiao',esquemadb = '$esquemadb',tabela = '$tabela',colunageo = '$colunageo',data = '$data',identificador = '$identificador',colunanomeregiao = '$colunanomeregiao', srid = '$srid' WHERE codigo_tipo_regiao = $codigo_tipo_regiao");
  415 + $retorna = $codigo_tipo_regiao;
  416 + }
  417 + else{
  418 + $retorna = $this->insertId("i3geoestat_tipo_regiao","nome_tipo_regiao","codigo_tipo_regiao");
364 419 }
  420 + return $retorna;
365 421 }
366   - else{
367   - $sql .= "WHERE i3geoestat_dimensao_medida.id_dimensao_medida = $id_dimensao_medida ";
  422 + catch (PDOException $e) {
  423 + return "Error!: " . $e->getMessage();
368 424 }
369   - //echo $sql;exit;
370   - return $this->execSQL($sql,$id_dimensao_medida);
371 425 }
372 426 /*
373 427 Function: alteraDimensaoMedida
... ... @@ -409,13 +463,113 @@ class Metaestat{
409 463 */
410 464 function listaUnidadeMedida($codigo_unidade_medida=""){
411 465 $sql = "select * from ".$this->esquemaadmin."i3geoestat_unidade_medida ";
412   - if($id != ""){
  466 + if($codigo_unidade_medida != ""){
413 467 $sql .= "WHERE codigo_unidade_medida = $codigo_unidade_medida ";
414 468 }
415 469 $sql .= "ORDER BY nome";
416 470 return $this->execSQL($sql,$codigo_unidade_medida);
417 471 }
418 472 /*
  473 + Function: listaVariavel
  474 +
  475 + Lista as variaveis cadastradas ou uma unica variavel
  476 +
  477 + Parametros:
  478 +
  479 + $codigo_variavel - opcional
  480 + */
  481 + function listaVariavel($codigo_variavel=""){
  482 + $sql = "select * from ".$this->esquemaadmin."i3geoestat_variavel ";
  483 + if($codigo_variavel != ""){
  484 + $sql .= "WHERE codigo_variavel = $codigo_variavel ";
  485 + }
  486 + $sql .= "ORDER BY nome";
  487 + return $this->execSQL($sql,$codigo_variavel);
  488 + }
  489 + /*
  490 + Function: listaMedidaVariavel
  491 +
  492 + Lista as medidas das variaveis cadastradas para uma variavel ou uma unica medida
  493 +
  494 + Parametros:
  495 +
  496 + $codigo_variavel
  497 +
  498 + $id_medida_variavel - opcional
  499 + */
  500 + function listaMedidaVariavel($codigo_variavel,$id_medida_variavel=""){
  501 + $sql = "SELECT i3geoestat_medida_variavel.* ";
  502 + $sql .= "FROM ".$this->esquemaadmin."i3geoestat_variavel ";
  503 + //$sql .= "INNER JOIN ".$this->esquemaadmin."i3geoestat_unidade_medida ";
  504 + //$sql .= "ON i3geoestat_medida_variavel.codigo_unidade_medida = i3geoestat_unidade_medida.codigo_unidade_medida ";
  505 + $sql .= "INNER JOIN ".$this->esquemaadmin."i3geoestat_medida_variavel ";
  506 + $sql .= "ON i3geoestat_variavel.codigo_variavel = i3geoestat_medida_variavel.codigo_variavel ";
  507 + if($codigo_variavel != ""){
  508 + $sql .= "WHERE i3geoestat_variavel.codigo_variavel = $codigo_variavel ";
  509 + if($id_medida_variavel != ""){
  510 + $sql .= "AND i3geoestat_medida_variavel.id_medida_variavel = $id_medida_variavel ";
  511 + }
  512 + }
  513 + else{
  514 + $sql .= "WHERE i3geoestat_medida_variavel.id_medida_variavel = $id_medida_variavel ";
  515 + }
  516 + return $this->execSQL($sql,$id_medida_variavel);
  517 + }
  518 + /*
  519 + Function: listaConexao
  520 +
  521 + Lista as conexoes cadastradas ou uma unica conexao
  522 +
  523 + Parametros:
  524 +
  525 + $id {string} - opcional
  526 +
  527 + $senha {boolean} - mostra ou nao a senha - opcional
  528 + */
  529 + function listaConexao($codigo_estat_conexao="",$senha=false){
  530 + if($senha){
  531 + $colunas = "codigo_estat_conexao, bancodedados, host, porta, usuario, senha";
  532 + }
  533 + else{
  534 + $colunas = "codigo_estat_conexao, bancodedados, host, porta, usuario";
  535 + }
  536 + $sql = "select $colunas from ".$this->esquemaadmin."i3geoestat_conexao ";
  537 + if($codigo_estat_conexao != ""){
  538 + $sql .= "WHERE codigo_estat_conexao = $codigo_estat_conexao ";
  539 + }
  540 + $sql .= "ORDER BY bancodedados,host,usuario";
  541 + return $this->execSQL($sql,$codigo_estat_conexao);
  542 + }
  543 + /*
  544 + Function: listaDimensao
  545 +
  546 + Lista as variaveis cadastradas ou uma unica variavel
  547 +
  548 + Parametros:
  549 +
  550 + $id_medida_variavel
  551 +
  552 + $id_dimensao_variavel - opcional
  553 + */
  554 + function listaDimensao($id_medida_variavel,$id_dimensao_medida=""){
  555 + $sql = "SELECT i3geoestat_dimensao_medida.* ";
  556 + $sql .= "FROM ".$this->esquemaadmin."i3geoestat_dimensao_medida ";
  557 + $sql .= "INNER JOIN ".$this->esquemaadmin."i3geoestat_medida_variavel ";
  558 + $sql .= "ON i3geoestat_dimensao_medida.id_medida_variavel = i3geoestat_medida_variavel.id_medida_variavel ";
  559 + if($id_medida_variavel != ""){
  560 + $sql .= "WHERE i3geoestat_dimensao_medida.id_medida_variavel = $id_medida_variavel ";
  561 + if($id_dimensao_medida != ""){
  562 + $sql .= "AND i3geoestat_dimensao_medida.id_dimensao_medida = $id_dimensao_medida ";
  563 + }
  564 + }
  565 + else{
  566 + $sql .= "WHERE i3geoestat_dimensao_medida.id_dimensao_medida = $id_dimensao_medida ";
  567 + }
  568 + //echo $sql;exit;
  569 + return $this->execSQL($sql,$id_dimensao_medida);
  570 + }
  571 +
  572 + /*
419 573 Function: listaTipoPeriodo
420 574  
421 575 Lista os tipos de períodos de tempo cadastrados ou um único período
... ... @@ -426,7 +580,7 @@ class Metaestat{
426 580 */
427 581 function listaTipoPeriodo($codigo_tipo_periodo=""){
428 582 $sql = "select * from ".$this->esquemaadmin."i3geoestat_tipo_periodo ";
429   - if($id != ""){
  583 + if($codigo_tipo_periodo != ""){
430 584 $sql .= "WHERE codigo_tipo_periodo = $codigo_tipo_periodo ";
431 585 }
432 586 $sql .= "ORDER BY nome";
... ... @@ -443,11 +597,47 @@ class Metaestat{
443 597 */
444 598 function listaTipoRegiao($codigo_tipo_regiao=""){
445 599 $sql = "select * from ".$this->esquemaadmin."i3geoestat_tipo_regiao ";
446   - if($id != ""){
  600 + if($codigo_tipo_regiao != ""){
447 601 $sql .= "WHERE codigo_tipo_regiao = $codigo_tipo_regiao ";
448 602 }
449 603 $sql .= "ORDER BY nome_tipo_regiao";
450 604 return $this->execSQL($sql,$codigo_tipo_regiao);
451 605 }
  606 + function esquemasConexao($codigo_estat_conexao){
  607 + $c = $this->listaConexao($codigo_estat_conexao,true);
  608 + $dbhold = $this->dbh;
  609 + $dbh = new PDO('pgsql:dbname='.$c["bancodedados"].';user='.$c["usuario"].';password='.$c["senha"].';host='.$c["host"].';port='.$c["porta"]);
  610 + $this->dbh = $dbh;
  611 + $res = $this->execSQL("SELECT oid,nspname as esquema FROM pg_namespace group by table_schema");
  612 + $this->dbh = $dbhold;
  613 + return $res;
  614 + }
  615 + function tabelasEsquema($codigo_estat_conexao,$nome_esquema){
  616 + $c = $this->listaConexao($codigo_estat_conexao,true);
  617 + $dbhold = $this->dbh;
  618 + $dbh = new PDO('pgsql:dbname='.$c["bancodedados"].';user='.$c["usuario"].';password='.$c["senha"].';host='.$c["host"].';port='.$c["porta"]);
  619 + $this->dbh = $dbh;
  620 + $res = $this->execSQL("SELECT table_name as tabela FROM information_schema.tables where table_schema = '$nome_esquema'");
  621 + $this->dbh = $dbhold;
  622 + return $res;
  623 + }
  624 + function colunasTabela($codigo_estat_conexao,$nome_esquema,$nome_tabela){
  625 + $c = $this->listaConexao($codigo_estat_conexao,true);
  626 + $dbhold = $this->dbh;
  627 + $dbh = new PDO('pgsql:dbname='.$c["bancodedados"].';user='.$c["usuario"].';password='.$c["senha"].';host='.$c["host"].';port='.$c["porta"]);
  628 + $this->dbh = $dbh;
  629 + $res = $this->execSQL("SELECT column_name as coluna FROM information_schema.columns where table_schema = '$nome_esquema' and table_name = '$nome_tabela'");
  630 + $this->dbh = $dbhold;
  631 + return $res;
  632 + }
  633 + function descreveColunasTabela($codigo_estat_conexao,$nome_esquema,$nome_tabela){
  634 + $c = $this->listaConexao($codigo_estat_conexao,true);
  635 + $dbhold = $this->dbh;
  636 + $dbh = new PDO('pgsql:dbname='.$c["bancodedados"].';user='.$c["usuario"].';password='.$c["senha"].';host='.$c["host"].';port='.$c["porta"]);
  637 + $this->dbh = $dbh;
  638 + $res = $this->execSQL("SELECT a.attnum,a.attname AS field,t.typname AS type,a.attlen AS length,a.atttypmod AS lengthvar,a.attnotnull AS notnull,p.nspname as esquema FROM pg_class c,pg_attribute a,pg_type t,pg_namespace p WHERE c.relname = '$nome_tabela' and p.nspname = '$nome_esquema' and a.attnum > 0 and a.attrelid = c.oid and a.atttypid = t.oid and c.relnamespace = p.oid ORDER BY a.attname");
  639 + $this->dbh = $dbhold;
  640 + return $res;
  641 + }
452 642 }
453 643 ?>
454 644 \ No newline at end of file
... ...
admin/php/metaestat.php
... ... @@ -74,7 +74,7 @@ switch (strtoupper($funcao))
74 74 */
75 75 case "LISTACONEXAO":
76 76 $m = new Metaestat();
77   - retornaJSON($m->listaConexao($id_conexao));
  77 + retornaJSON($m->listaConexao($codigo_estat_conexao));
78 78 exit;
79 79 break;
80 80 /*
... ... @@ -220,7 +220,87 @@ switch (strtoupper($funcao))
220 220 }
221 221 retornaJSON($m->listaDimensao($id_medida_variavel,$id_dimensao_medida));
222 222 exit;
223   - break;
  223 + break;
  224 + /*
  225 + Valor: ALTERARUNIDADEMEDIDA
  226 +
  227 + Altera a tabela de unidades de medida
  228 +
  229 + Retorno:
  230 +
  231 + {JSON}
  232 + */
  233 + case "ALTERARUNIDADEMEDIDA":
  234 + $m = new Metaestat();
  235 + if(empty($codigo_unidade_medida)){
  236 + $codigo_unidade_medida = $m->alteraUnidadeMedida();
  237 + }
  238 + else{
  239 + $codigo_unidade_medida = $m->alteraUnidadeMedida($codigo_unidade_medida,$nome,$sigla,$permitesoma,$permitemedia);
  240 + }
  241 + retornaJSON($m->listaUnidadeMedida($codigo_unidade_medida));
  242 + exit;
  243 + break;
  244 + /*
  245 + Valor: ALTERARCONEXAO
  246 +
  247 + Altera a tabela de conexoes
  248 +
  249 + Retorno:
  250 +
  251 + {JSON}
  252 + */
  253 + case "ALTERARCONEXAO":
  254 + $m = new Metaestat();
  255 + if(empty($codigo_estat_conexao)){
  256 + $codigo_estat_conexao = $m->alteraConexao();
  257 + }
  258 + else{
  259 + $codigo_estat_conexao = $m->alteraConexao($codigo_estat_conexao,$bancodedados,$host,$porta,$usuario);
  260 + }
  261 + retornaJSON($m->listaConexao($codigo_estat_conexao));
  262 + exit;
  263 + break;
  264 + /*
  265 + Valor: ALTERARTIPOREGIAO
  266 +
  267 + Altera a tabela de regioes
  268 +
  269 + Retorno:
  270 +
  271 + {JSON}
  272 + */
  273 + case "ALTERARTIPOREGIAO":
  274 + $m = new Metaestat();
  275 + if(empty($codigo_tipo_regiao)){
  276 + $codigo_tipo_regiao = $m->alteraTipoRegiao();
  277 + }
  278 + else{
  279 + $codigo_tipo_regiao = $m->alteraTipoRegiao($codigo_tipo_regiao,$nome_tipo_regiao,$descricao_tipo_regiao,$esquemadb,$tabela,$colunageo,$data,$identificador,$colunanomeregiao,$srid);
  280 + }
  281 + retornaJSON($m->listaTipoRegiao($codigo_tipo_regiao));
  282 + exit;
  283 + break;
  284 + /*
  285 + Valor: ALTERARTIPOPERIODO
  286 +
  287 + Altera a tabela de tipos de periodo
  288 +
  289 + Retorno:
  290 +
  291 + {JSON}
  292 + */
  293 + case "ALTERARTIPOPERIODO":
  294 + $m = new Metaestat();
  295 + if(empty($codigo_tipo_periodo)){
  296 + $codigo_tipo_periodo = $m->alteraTipoPeriodo();
  297 + }
  298 + else{
  299 + $codigo_unidade_medida = $m->alteraTipoPeriodo($codigo_tipo_periodo,$nome,$descricao);
  300 + }
  301 + retornaJSON($m->listaTipoPeriodo($codigo_tipo_periodo));
  302 + exit;
  303 + break;
224 304 /*
225 305 Valor: EXCLUIRVARIAVEL
226 306  
... ... @@ -247,6 +327,95 @@ switch (strtoupper($funcao))
247 327 exit;
248 328 break;
249 329 /*
  330 + Valor: EXCLUIRTIPOPERIODO
  331 +
  332 + Exclui uma variavel
  333 +
  334 + Parametros:
  335 +
  336 + codigo_variavel
  337 +
  338 + Retorno:
  339 +
  340 + {JSON}
  341 + */
  342 + case "EXCLUIRTIPOPERIODO":
  343 + $tabela = "i3geoestat_tipo_periodo";
  344 + $id = $codigo_tipo_periodo;
  345 + $f = verificaFilhos();
  346 + if(!$f){
  347 + $m = new Metaestat();
  348 + retornaJSON($m->excluirRegistro("i3geoestat_tipo_periodo","codigo_tipo_periodo",$id));
  349 + }
  350 + else
  351 + retornaJSON("erro");
  352 + exit;
  353 + break;
  354 + /*
  355 + Valor: EXCLUIRUNIDADEMEDIDA
  356 +
  357 + Exclui uma unidade de medida
  358 +
  359 + Retorno:
  360 +
  361 + {JSON}
  362 + */
  363 + case "EXCLUIRUNIDADEMEDIDA":
  364 + $tabela = "i3geoestat_unidade_medida";
  365 + $id = $codigo_unidade_medida;
  366 + $f = verificaFilhos();
  367 +
  368 + if(!$f){
  369 + $m = new Metaestat();
  370 + retornaJSON($m->excluirRegistro("i3geoestat_unidade_medida","codigo_unidade_medida",$id));
  371 + }
  372 + else
  373 + retornaJSON("erro");
  374 + exit;
  375 + break;
  376 + /*
  377 + Valor: EXCLUIRCONEXAO
  378 +
  379 + Exclui uma conexao
  380 +
  381 + Retorno:
  382 +
  383 + {JSON}
  384 + */
  385 + case "EXCLUIRCONEXAO":
  386 + $tabela = "i3geoestat_conexao";
  387 + $id = $codigo_estat_conexao;
  388 + $f = verificaFilhos();
  389 + if(!$f){
  390 + $m = new Metaestat();
  391 + retornaJSON($m->excluirRegistro("i3geoestat_conexao","codigo_estat_conexao",$id));
  392 + }
  393 + else
  394 + retornaJSON("erro");
  395 + exit;
  396 + break;
  397 + /*
  398 + Valor: EXCLUIRTIPOREGIAO
  399 +
  400 + Exclui uma regiao
  401 +
  402 + Retorno:
  403 +
  404 + {JSON}
  405 + */
  406 + case "EXCLUIRTIPOREGIAO":
  407 + $tabela = "i3geoestat_tipo_regiao";
  408 + $id = $codigo_tipo_regiao;
  409 + $f = verificaFilhos();
  410 + if(!$f){
  411 + $m = new Metaestat();
  412 + retornaJSON($m->excluirRegistro("i3geoestat_tipo_regiao","codigo_tipo_regiao",$id));
  413 + }
  414 + else
  415 + retornaJSON("erro");
  416 + exit;
  417 + break;
  418 + /*
250 419 Valor: EXCLUIRMEDIDAVARIAVEL
251 420  
252 421 Exclui uma medida da variavel
... ... @@ -332,6 +501,8 @@ switch (strtoupper($funcao))
332 501  
333 502 filtro
334 503  
  504 + agruparpor
  505 +
335 506 todasascolunas - 0 ou 1
336 507  
337 508 Retorno:
... ... @@ -341,7 +512,127 @@ switch (strtoupper($funcao))
341 512 case "DADOSMEDIDAVARIAVEL":
342 513 $m = new Metaestat();
343 514 if($formato == "json"){
344   - retornaJSON($m->dadosMedidaVariavel($id_medida_variavel,$filtro,$todasascolunas));
  515 + retornaJSON($m->dadosMedidaVariavel($id_medida_variavel,$filtro,$todasascolunas,$agruparpor));
  516 + }
  517 + exit;
  518 + break;
  519 + /*
  520 + Valor: SUMARIOMEDIDAVARIAVEL
  521 +
  522 + Sumario estatistico media de uma variavel
  523 +
  524 + Parametros:
  525 +
  526 + formato
  527 +
  528 + filtro
  529 +
  530 + Retorno:
  531 +
  532 + {JSON}
  533 + */
  534 + case "SUMARIOMEDIDAVARIAVEL":
  535 + $m = new Metaestat();
  536 + if($formato == "json"){
  537 + retornaJSON($m->sumarioMedidaVariavel($id_medida_variavel,$filtro,$agruparpor));
  538 + }
  539 + exit;
  540 + break;
  541 + /*
  542 + Valor: ESQUEMASCONEXAO
  543 +
  544 + Lista os esquemas de uma conexao
  545 +
  546 + Parametros:
  547 +
  548 + formato
  549 +
  550 + codigo_estat_conexao
  551 +
  552 + Retorno:
  553 +
  554 + {JSON}
  555 + */
  556 + case "ESQUEMASCONEXAO":
  557 + $m = new Metaestat();
  558 + if($formato == "json"){
  559 + retornaJSON($m->esquemasConexao($codigo_estat_conexao));
  560 + }
  561 + exit;
  562 + break;
  563 + /*
  564 + Valor: TABELASESQUEMA
  565 +
  566 + Lista as tabelas de um esquema
  567 +
  568 + Parametros:
  569 +
  570 + formato
  571 +
  572 + codigo_estat_conexao
  573 +
  574 + nome_esquema
  575 +
  576 + Retorno:
  577 +
  578 + {JSON}
  579 + */
  580 + case "TABELASESQUEMA":
  581 + $m = new Metaestat();
  582 + if($formato == "json"){
  583 + retornaJSON($m->tabelasEsquema($codigo_estat_conexao,$nome_esquema));
  584 + }
  585 + exit;
  586 + break;
  587 + /*
  588 + Valor: COLUNASTABELA
  589 +
  590 + Lista as colunas de uma tabela
  591 +
  592 + Parametros:
  593 +
  594 + formato
  595 +
  596 + codigo_estat_conexao
  597 +
  598 + nome_esquema
  599 +
  600 + nome_tabela
  601 +
  602 + Retorno:
  603 +
  604 + {JSON}
  605 + */
  606 + case "COLUNASTABELA":
  607 + $m = new Metaestat();
  608 + if($formato == "json"){
  609 + retornaJSON($m->colunasTabela($codigo_estat_conexao,$nome_esquema,$nome_tabela));
  610 + }
  611 + exit;
  612 + break;
  613 + /*
  614 + Valor: DESCREVECOLUNASTABELA
  615 +
  616 + Lista as colunas de uma tabela
  617 +
  618 + Parametros:
  619 +
  620 + formato
  621 +
  622 + codigo_estat_conexao
  623 +
  624 + nome_esquema
  625 +
  626 + nome_tabela
  627 +
  628 + Retorno:
  629 +
  630 + {JSON}
  631 + */
  632 + case "DESCREVECOLUNASTABELA":
  633 + $m = new Metaestat();
  634 + if($formato == "json"){
  635 + retornaJSON($m->descreveColunasTabela($codigo_estat_conexao,$nome_esquema,$nome_tabela));
345 636 }
346 637 exit;
347 638 break;
... ...
admin/sql/metaestat.sql
... ... @@ -14,25 +14,50 @@ drop table i3geoestat_variavel;
14 14  
15 15 /* create tables */
16 16  
  17 +-- lista controlada dos parâmetros de conexão com o banco de dados onde residem dados
17 18 create table i3geoestat_conexao
18 19 (
19 20 codigo_estat_conexao integer not null unique primary key autoincrement,
  21 + -- nome do banco de dados
20 22 bancodedados text,
  23 + -- endereço do servidor
21 24 host text,
  25 + -- porta de comunicação
22 26 porta text,
  27 + -- nome do usuário que pode acessar o banco
23 28 usuario text,
  29 + -- senha do usuário que pode acessar o banco
24 30 senha text
25 31 );
26 32  
27 33  
28   -create table i3geoestat_variavel
  34 +-- identifica as tabelas que possuem colunas com geometrias de determinado local ou região
  35 +create table i3geoestat_tipo_regiao
29 36 (
30   - codigo_variavel integer not null unique primary key autoincrement,
31   - nome text,
32   - descricao text
  37 + codigo_tipo_regiao integer not null unique primary key autoincrement,
  38 + nome_tipo_regiao text,
  39 + descricao_tipo_regiao text,
  40 + codigo_estat_conexao integer,
  41 + -- esquema onde encontra-se a tabela com a geometria
  42 + esquemadb text,
  43 + -- tabela que contém a coluna com a geometria
  44 + tabela text,
  45 + -- coluna com a geometria da região
  46 + colunageo text,
  47 + -- data do mapeamento da região
  48 + data text,
  49 + -- id da tabela onde está a coluna com a geometria e que identifica a região de forma única
  50 + identificador integer,
  51 + -- coluna que contém o nome de cada região ou local
  52 + colunanomeregiao text,
  53 + -- código srid correspondente à projeção cartográfica da coluna com a geometria
  54 + srid text default '4326',
  55 + foreign key (codigo_estat_conexao)
  56 + references i3geoestat_conexao (codigo_estat_conexao)
33 57 );
34 58  
35 59  
  60 +-- lista controlada de tipos de período de tempo
36 61 create table i3geoestat_tipo_periodo
37 62 (
38 63 codigo_tipo_periodo integer not null unique primary key autoincrement,
... ... @@ -41,6 +66,15 @@ create table i3geoestat_tipo_periodo
41 66 );
42 67  
43 68  
  69 +-- tabela com o nome e descrição de uma variável variável
  70 +create table i3geoestat_variavel
  71 +(
  72 + codigo_variavel integer not null unique primary key autoincrement,
  73 + nome text,
  74 + descricao text
  75 +);
  76 +
  77 +
44 78 create table i3geoestat_unidade_medida
45 79 (
46 80 codigo_unidade_medida integer not null unique primary key autoincrement,
... ... @@ -53,30 +87,6 @@ create table i3geoestat_unidade_medida
53 87 );
54 88  
55 89  
56   --- identifica as tabelas que possuem colunas com geometrias de determinado local ou região
57   -create table i3geoestat_tipo_regiao
58   -(
59   - codigo_tipo_regiao integer not null unique primary key autoincrement,
60   - nome_tipo_regiao text not null unique,
61   - descricao_tipo_regiao text,
62   - codigo_estat_conexao integer not null unique,
63   - -- esquema onde encontra-se a tabela com a geometria
64   - esquemadb text,
65   - -- tabela que contém a coluna com a geometria
66   - tabela text,
67   - -- coluna com a geometria da região
68   - colunageo text,
69   - -- data do mapeamento da região
70   - data text,
71   - -- id da tabela onde está a coluna com a geometria e que identifica a região de forma única
72   - identificador integer,
73   - -- coluna que contém o nome de cada região ou local
74   - colunanomeregiao text,
75   - foreign key (codigo_estat_conexao)
76   - references i3geoestat_conexao (codigo_estat_conexao)
77   -);
78   -
79   -
80 90 -- descreve as colunas que contém valores de algum tipo de medida, por exemplo população residente
81 91 create table i3geoestat_medida_variavel
82 92 (
... ... @@ -98,16 +108,16 @@ create table i3geoestat_medida_variavel
98 108 filtro text,
99 109 -- titulo da medida
100 110 nomemedida text,
101   - foreign key (codigo_variavel)
102   - references i3geoestat_variavel (codigo_variavel),
103   - foreign key (codigo_estat_conexao)
104   - references i3geoestat_conexao (codigo_estat_conexao),
  111 + foreign key (codigo_tipo_regiao)
  112 + references i3geoestat_tipo_regiao (codigo_tipo_regiao),
105 113 foreign key (codigo_tipo_periodo)
106 114 references i3geoestat_tipo_periodo (codigo_tipo_periodo),
  115 + foreign key (codigo_estat_conexao)
  116 + references i3geoestat_conexao (codigo_estat_conexao),
  117 + foreign key (codigo_variavel)
  118 + references i3geoestat_variavel (codigo_variavel),
107 119 foreign key (codigo_unidade_medida)
108   - references i3geoestat_unidade_medida (codigo_unidade_medida),
109   - foreign key (codigo_tipo_regiao)
110   - references i3geoestat_tipo_regiao (codigo_tipo_regiao)
  120 + references i3geoestat_unidade_medida (codigo_unidade_medida)
111 121 );
112 122  
113 123  
... ...
admin/sql/metaestat_basededados.sql
... ... @@ -8,7 +8,7 @@ INSERT INTO i3geoestat_tipo_periodo (codigo_tipo_periodo, nome, descricao) VALUE
8 8  
9 9  
10 10 -- i3geoestat_tipo_regiao
11   -INSERT INTO i3geoestat_tipo_regiao (codigo_tipo_regiao, nome_tipo_regiao, descricao_tipo_regiao, codigo_estat_conexao, esquemadb, tabela, colunageo, data, identificador, colunanomeregiao) VALUES ('1', 'Município', 'Limites municipais', '1', 'public', '', '', '', '', '');
  11 +INSERT INTO i3geoestat_tipo_regiao (codigo_tipo_regiao, nome_tipo_regiao, descricao_tipo_regiao, codigo_estat_conexao, esquemadb, tabela, colunageo, data, identificador, colunanomeregiao, srid) VALUES ('1', 'Município', 'Limites municipais', '1', 'public', 'tb_ibge', 'the_geom', '', 'ibge', 'no_cidade', '4326');
12 12  
13 13  
14 14 -- i3geoestat_unidade_medida
... ... @@ -27,3 +27,4 @@ INSERT INTO i3geoestat_dimensao_medida (id_dimensao_medida, coluna, nomedimensao
27 27 -- i3geoestat_variavel
28 28 INSERT INTO i3geoestat_variavel (codigo_variavel, nome, descricao) VALUES ('1', 'Farmácias populares existentes', 'Quantidade de farmácias populares existentes');
29 29  
  30 +
... ...
documentacao/diagramas/metaestat.erm
... ... @@ -11,8 +11,8 @@
11 11 </page_setting>
12 12 <category_index>0</category_index>
13 13 <zoom>1.0</zoom>
14   - <x>0</x>
15   - <y>17</y>
  14 + <x>-362</x>
  15 + <y>-2</y>
16 16 <default_color>
17 17 <r>230</r>
18 18 <g>230</g>
... ... @@ -110,7 +110,7 @@
110 110 </connections>
111 111 <display>false</display>
112 112 <creation_date>2012-07-17 15:03:53</creation_date>
113   - <updated_date>2012-07-23 11:51:42</updated_date>
  113 + <updated_date>2012-07-27 00:16:43</updated_date>
114 114 <model_property>
115 115 <name>Project Name</name>
116 116 <value></value>
... ... @@ -164,7 +164,7 @@
164 164 <array_dimension>null</array_dimension>
165 165 <unsigned>false</unsigned>
166 166 <args></args>
167   - <description></description>
  167 + <description>Nome do banco de dados</description>
168 168 <logical_name>bancodedados</logical_name>
169 169 <physical_name>bancodedados</physical_name>
170 170 <type>text</type>
... ... @@ -411,7 +411,7 @@
411 411 <array_dimension>null</array_dimension>
412 412 <unsigned>false</unsigned>
413 413 <args></args>
414   - <description></description>
  414 + <description>Endereço do servidor</description>
415 415 <logical_name>host</logical_name>
416 416 <physical_name>host</physical_name>
417 417 <type>text</type>
... ... @@ -567,7 +567,7 @@
567 567 <array_dimension>null</array_dimension>
568 568 <unsigned>false</unsigned>
569 569 <args></args>
570   - <description></description>
  570 + <description>Porta de comunicação</description>
571 571 <logical_name>porta</logical_name>
572 572 <physical_name>porta</physical_name>
573 573 <type>text</type>
... ... @@ -580,7 +580,7 @@
580 580 <array_dimension>null</array_dimension>
581 581 <unsigned>false</unsigned>
582 582 <args></args>
583   - <description></description>
  583 + <description>Senha do usuário que pode acessar o banco</description>
584 584 <logical_name>senha</logical_name>
585 585 <physical_name>senha</physical_name>
586 586 <type>text</type>
... ... @@ -606,13 +606,26 @@
606 606 <array_dimension>null</array_dimension>
607 607 <unsigned>false</unsigned>
608 608 <args></args>
  609 + <description>Código SRID correspondente à projeção cartográfica da coluna com a geometria</description>
  610 + <logical_name>srid</logical_name>
  611 + <physical_name>srid</physical_name>
  612 + <type>text</type>
  613 + </word>
  614 + <word>
  615 + <id>36</id>
  616 + <length>null</length>
  617 + <decimal>null</decimal>
  618 + <array>false</array>
  619 + <array_dimension>null</array_dimension>
  620 + <unsigned>false</unsigned>
  621 + <args></args>
609 622 <description>Tabela no banco de dados que contém a coluna</description>
610 623 <logical_name>tabela</logical_name>
611 624 <physical_name>tabela</physical_name>
612 625 <type>text</type>
613 626 </word>
614 627 <word>
615   - <id>36</id>
  628 + <id>37</id>
616 629 <length>null</length>
617 630 <decimal>null</decimal>
618 631 <array>false</array>
... ... @@ -625,14 +638,14 @@
625 638 <type>text</type>
626 639 </word>
627 640 <word>
628   - <id>37</id>
  641 + <id>38</id>
629 642 <length>null</length>
630 643 <decimal>null</decimal>
631 644 <array>false</array>
632 645 <array_dimension>null</array_dimension>
633 646 <unsigned>false</unsigned>
634 647 <args></args>
635   - <description></description>
  648 + <description>Nome do usuário que pode acessar o banco</description>
636 649 <logical_name>usuario</logical_name>
637 650 <physical_name>usuario</physical_name>
638 651 <type>text</type>
... ... @@ -692,14 +705,31 @@
692 705 </connections>
693 706 <text>Os nomes de colunas podem &#x0A;receber funções, por exemplo, &#x0A;pode-se agregar as geometrias de &#x0A;COLUNAGEO ou somar valores de&#x0A;COLUNAVALOR</text>
694 707 </note>
695   - <table>
  708 + <note>
696 709 <id>3</id>
  710 + <height>111</height>
  711 + <width>188</width>
  712 + <font_name>Ubuntu</font_name>
  713 + <font_size>9</font_size>
  714 + <x>754</x>
  715 + <y>522</y>
  716 + <color>
  717 + <r>255</r>
  718 + <g>255</g>
  719 + <b>255</b>
  720 + </color>
  721 + <connections>
  722 + </connections>
  723 + <text>As colunas obtidas da junção de medida_variavel com tipo_regiao podem ser utilizadas para definir uma dimensão</text>
  724 + </note>
  725 + <table>
  726 + <id>4</id>
697 727 <height>107</height>
698   - <width>280</width>
  728 + <width>242</width>
699 729 <font_name>Ubuntu</font_name>
700 730 <font_size>9</font_size>
701   - <x>1</x>
702   - <y>188</y>
  731 + <x>33</x>
  732 + <y>5</y>
703 733 <color>
704 734 <r>255</r>
705 735 <g>165</g>
... ... @@ -707,15 +737,15 @@
707 737 </color>
708 738 <connections>
709 739 </connections>
710   - <physical_name>i3geoestat_tipo_periodo</physical_name>
711   - <logical_name>i3geoestat_tipo_periodo</logical_name>
  740 + <physical_name>i3geoestat_unidade_medida</physical_name>
  741 + <logical_name>i3geoestat_unidade_medida</logical_name>
712 742 <description></description>
713 743 <constraint></constraint>
714 744 <primary_key_name></primary_key_name>
715 745 <option></option>
716 746 <columns>
717 747 <normal_column>
718   - <word_id>3</word_id>
  748 + <word_id>5</word_id>
719 749 <id>0</id>
720 750 <description></description>
721 751 <unique_key_name></unique_key_name>
... ... @@ -747,7 +777,7 @@
747 777 </sequence>
748 778 </normal_column>
749 779 <normal_column>
750   - <word_id>26</word_id>
  780 + <word_id>25</word_id>
751 781 <id>1</id>
752 782 <description></description>
753 783 <unique_key_name></unique_key_name>
... ... @@ -779,7 +809,7 @@
779 809 </sequence>
780 810 </normal_column>
781 811 <normal_column>
782   - <word_id>13</word_id>
  812 + <word_id>34</word_id>
783 813 <id>2</id>
784 814 <description></description>
785 815 <unique_key_name></unique_key_name>
... ... @@ -810,6 +840,70 @@
810 840 <decimal_size>0</decimal_size>
811 841 </sequence>
812 842 </normal_column>
  843 + <normal_column>
  844 + <word_id>31</word_id>
  845 + <id>3</id>
  846 + <description></description>
  847 + <unique_key_name></unique_key_name>
  848 + <logical_name></logical_name>
  849 + <physical_name></physical_name>
  850 + <type>integer</type>
  851 + <constraint></constraint>
  852 + <default_value>0</default_value>
  853 + <auto_increment>false</auto_increment>
  854 + <foreign_key>false</foreign_key>
  855 + <not_null>false</not_null>
  856 + <primary_key>false</primary_key>
  857 + <unique_key>false</unique_key>
  858 + <character_set></character_set>
  859 + <collation></collation>
  860 + <sequence>
  861 + <name></name>
  862 + <schema></schema>
  863 + <increment></increment>
  864 + <min_value></min_value>
  865 + <max_value></max_value>
  866 + <start></start>
  867 + <cache></cache>
  868 + <cycle>false</cycle>
  869 + <order>false</order>
  870 + <description></description>
  871 + <data_type></data_type>
  872 + <decimal_size>0</decimal_size>
  873 + </sequence>
  874 + </normal_column>
  875 + <normal_column>
  876 + <word_id>30</word_id>
  877 + <id>4</id>
  878 + <description></description>
  879 + <unique_key_name></unique_key_name>
  880 + <logical_name></logical_name>
  881 + <physical_name></physical_name>
  882 + <type>integer</type>
  883 + <constraint></constraint>
  884 + <default_value>0</default_value>
  885 + <auto_increment>false</auto_increment>
  886 + <foreign_key>false</foreign_key>
  887 + <not_null>false</not_null>
  888 + <primary_key>false</primary_key>
  889 + <unique_key>false</unique_key>
  890 + <character_set></character_set>
  891 + <collation></collation>
  892 + <sequence>
  893 + <name></name>
  894 + <schema></schema>
  895 + <increment></increment>
  896 + <min_value></min_value>
  897 + <max_value></max_value>
  898 + <start></start>
  899 + <cache></cache>
  900 + <cycle>false</cycle>
  901 + <order>false</order>
  902 + <description></description>
  903 + <data_type></data_type>
  904 + <decimal_size>0</decimal_size>
  905 + </sequence>
  906 + </normal_column>
813 907 </columns>
814 908 <indexes>
815 909 </indexes>
... ... @@ -820,23 +914,23 @@
820 914 </table_properties>
821 915 </table>
822 916 <table>
823   - <id>4</id>
824   - <height>254</height>
  917 + <id>5</id>
  918 + <height>149</height>
825 919 <width>292</width>
826 920 <font_name>Ubuntu</font_name>
827 921 <font_size>9</font_size>
828   - <x>-349</x>
829   - <y>259</y>
  922 + <x>711</x>
  923 + <y>273</y>
830 924 <color>
831   - <r>255</r>
832   - <g>165</g>
833   - <b>0</b>
  925 + <r>160</r>
  926 + <g>32</g>
  927 + <b>240</b>
834 928 </color>
835 929 <connections>
836 930 <relation>
837 931 <id>0</id>
838   - <source>5</source>
839   - <target>4</target>
  932 + <source>10</source>
  933 + <target>5</target>
840 934 <child_cardinality>1..n</child_cardinality>
841 935 <parent_cardinality>1</parent_cardinality>
842 936 <reference_for_pk>true</reference_for_pk>
... ... @@ -852,20 +946,20 @@
852 946 </relation>
853 947 <comment_connection>
854 948 <id>1</id>
855   - <source>0</source>
856   - <target>4</target>
  949 + <source>3</source>
  950 + <target>5</target>
857 951 </comment_connection>
858 952 </connections>
859   - <physical_name>i3geoestat_tipo_regiao</physical_name>
860   - <logical_name>i3geoestat_tipo_regiao</logical_name>
861   - <description>Identifica as tabelas que possuem colunas com geometrias de determinado local ou região</description>
  953 + <physical_name>i3geoestat_dimensao_medida</physical_name>
  954 + <logical_name>i3geoestat_dimensao_medida</logical_name>
  955 + <description></description>
862 956 <constraint></constraint>
863 957 <primary_key_name></primary_key_name>
864 958 <option></option>
865 959 <columns>
866 960 <normal_column>
867   - <word_id>4</word_id>
868   - <id>3</id>
  961 + <word_id>22</word_id>
  962 + <id>5</id>
869 963 <description></description>
870 964 <unique_key_name></unique_key_name>
871 965 <logical_name></logical_name>
... ... @@ -896,8 +990,8 @@
896 990 </sequence>
897 991 </normal_column>
898 992 <normal_column>
899   - <word_id>29</word_id>
900   - <id>4</id>
  993 + <word_id>7</word_id>
  994 + <id>6</id>
901 995 <description></description>
902 996 <unique_key_name></unique_key_name>
903 997 <logical_name></logical_name>
... ... @@ -907,9 +1001,9 @@
907 1001 <default_value></default_value>
908 1002 <auto_increment>false</auto_increment>
909 1003 <foreign_key>false</foreign_key>
910   - <not_null>true</not_null>
  1004 + <not_null>false</not_null>
911 1005 <primary_key>false</primary_key>
912   - <unique_key>true</unique_key>
  1006 + <unique_key>false</unique_key>
913 1007 <character_set></character_set>
914 1008 <collation></collation>
915 1009 <sequence>
... ... @@ -928,8 +1022,8 @@
928 1022 </sequence>
929 1023 </normal_column>
930 1024 <normal_column>
931   - <word_id>16</word_id>
932   - <id>5</id>
  1025 + <word_id>27</word_id>
  1026 + <id>7</id>
933 1027 <description></description>
934 1028 <unique_key_name></unique_key_name>
935 1029 <logical_name></logical_name>
... ... @@ -960,21 +1054,20 @@
960 1054 </sequence>
961 1055 </normal_column>
962 1056 <normal_column>
963   - <id>6</id>
964   - <referenced_column>13</referenced_column>
965   - <relation>0</relation>
  1057 + <word_id>14</word_id>
  1058 + <id>8</id>
966 1059 <description></description>
967 1060 <unique_key_name></unique_key_name>
968 1061 <logical_name></logical_name>
969 1062 <physical_name></physical_name>
970   - <type>integer</type>
  1063 + <type>text</type>
971 1064 <constraint></constraint>
972 1065 <default_value></default_value>
973 1066 <auto_increment>false</auto_increment>
974   - <foreign_key>true</foreign_key>
975   - <not_null>true</not_null>
  1067 + <foreign_key>false</foreign_key>
  1068 + <not_null>false</not_null>
976 1069 <primary_key>false</primary_key>
977   - <unique_key>true</unique_key>
  1070 + <unique_key>false</unique_key>
978 1071 <character_set></character_set>
979 1072 <collation></collation>
980 1073 <sequence>
... ... @@ -993,15 +1086,15 @@
993 1086 </sequence>
994 1087 </normal_column>
995 1088 <normal_column>
996   - <word_id>18</word_id>
997   - <id>7</id>
  1089 + <word_id>0</word_id>
  1090 + <id>9</id>
998 1091 <description></description>
999 1092 <unique_key_name></unique_key_name>
1000 1093 <logical_name></logical_name>
1001 1094 <physical_name></physical_name>
1002   - <type>text</type>
  1095 + <type>integer</type>
1003 1096 <constraint></constraint>
1004   - <default_value></default_value>
  1097 + <default_value>0</default_value>
1005 1098 <auto_increment>false</auto_increment>
1006 1099 <foreign_key>false</foreign_key>
1007 1100 <not_null>false</not_null>
... ... @@ -1025,17 +1118,18 @@
1025 1118 </sequence>
1026 1119 </normal_column>
1027 1120 <normal_column>
1028   - <word_id>36</word_id>
1029   - <id>8</id>
  1121 + <id>10</id>
  1122 + <referenced_column>34</referenced_column>
  1123 + <relation>0</relation>
1030 1124 <description></description>
1031 1125 <unique_key_name></unique_key_name>
1032 1126 <logical_name></logical_name>
1033 1127 <physical_name></physical_name>
1034   - <type>text</type>
  1128 + <type>integer</type>
1035 1129 <constraint></constraint>
1036 1130 <default_value></default_value>
1037 1131 <auto_increment>false</auto_increment>
1038   - <foreign_key>false</foreign_key>
  1132 + <foreign_key>true</foreign_key>
1039 1133 <not_null>false</not_null>
1040 1134 <primary_key>false</primary_key>
1041 1135 <unique_key>false</unique_key>
... ... @@ -1056,21 +1150,74 @@
1056 1150 <decimal_size>0</decimal_size>
1057 1151 </sequence>
1058 1152 </normal_column>
  1153 + </columns>
  1154 + <indexes>
  1155 + </indexes>
  1156 + <complex_unique_key_list>
  1157 + </complex_unique_key_list>
  1158 + <table_properties>
  1159 + <schema></schema>
  1160 + </table_properties>
  1161 + </table>
  1162 + <table>
  1163 + <id>6</id>
  1164 + <height>275</height>
  1165 + <width>292</width>
  1166 + <font_name>Ubuntu</font_name>
  1167 + <font_size>9</font_size>
  1168 + <x>-336</x>
  1169 + <y>236</y>
  1170 + <color>
  1171 + <r>255</r>
  1172 + <g>165</g>
  1173 + <b>0</b>
  1174 + </color>
  1175 + <connections>
  1176 + <comment_connection>
  1177 + <id>2</id>
  1178 + <source>0</source>
  1179 + <target>6</target>
  1180 + </comment_connection>
  1181 + <relation>
  1182 + <id>3</id>
  1183 + <source>8</source>
  1184 + <target>6</target>
  1185 + <child_cardinality>1..n</child_cardinality>
  1186 + <parent_cardinality>1</parent_cardinality>
  1187 + <reference_for_pk>true</reference_for_pk>
  1188 + <name></name>
  1189 + <on_delete_action>RESTRICT</on_delete_action>
  1190 + <on_update_action>RESTRICT</on_update_action>
  1191 + <source_xp>-1</source_xp>
  1192 + <source_yp>-1</source_yp>
  1193 + <target_xp>-1</target_xp>
  1194 + <target_yp>-1</target_yp>
  1195 + <referenced_column>null</referenced_column>
  1196 + <referenced_complex_unique_key>null</referenced_complex_unique_key>
  1197 + </relation>
  1198 + </connections>
  1199 + <physical_name>i3geoestat_tipo_regiao</physical_name>
  1200 + <logical_name>i3geoestat_tipo_regiao</logical_name>
  1201 + <description>Identifica as tabelas que possuem colunas com geometrias de determinado local ou região</description>
  1202 + <constraint></constraint>
  1203 + <primary_key_name></primary_key_name>
  1204 + <option></option>
  1205 + <columns>
1059 1206 <normal_column>
1060   - <word_id>8</word_id>
1061   - <id>9</id>
  1207 + <word_id>4</word_id>
  1208 + <id>11</id>
1062 1209 <description></description>
1063 1210 <unique_key_name></unique_key_name>
1064 1211 <logical_name></logical_name>
1065 1212 <physical_name></physical_name>
1066   - <type>text</type>
  1213 + <type>integer</type>
1067 1214 <constraint></constraint>
1068 1215 <default_value></default_value>
1069   - <auto_increment>false</auto_increment>
  1216 + <auto_increment>true</auto_increment>
1070 1217 <foreign_key>false</foreign_key>
1071   - <not_null>false</not_null>
1072   - <primary_key>false</primary_key>
1073   - <unique_key>false</unique_key>
  1218 + <not_null>true</not_null>
  1219 + <primary_key>true</primary_key>
  1220 + <unique_key>true</unique_key>
1074 1221 <character_set></character_set>
1075 1222 <collation></collation>
1076 1223 <sequence>
... ... @@ -1089,8 +1236,8 @@
1089 1236 </sequence>
1090 1237 </normal_column>
1091 1238 <normal_column>
1092   - <word_id>12</word_id>
1093   - <id>10</id>
  1239 + <word_id>29</word_id>
  1240 + <id>12</id>
1094 1241 <description></description>
1095 1242 <unique_key_name></unique_key_name>
1096 1243 <logical_name></logical_name>
... ... @@ -1121,13 +1268,13 @@
1121 1268 </sequence>
1122 1269 </normal_column>
1123 1270 <normal_column>
1124   - <word_id>21</word_id>
1125   - <id>11</id>
  1271 + <word_id>16</word_id>
  1272 + <id>13</id>
1126 1273 <description></description>
1127 1274 <unique_key_name></unique_key_name>
1128 1275 <logical_name></logical_name>
1129 1276 <physical_name></physical_name>
1130   - <type>integer</type>
  1277 + <type>text</type>
1131 1278 <constraint></constraint>
1132 1279 <default_value></default_value>
1133 1280 <auto_increment>false</auto_increment>
... ... @@ -1153,8 +1300,41 @@
1153 1300 </sequence>
1154 1301 </normal_column>
1155 1302 <normal_column>
1156   - <word_id>10</word_id>
1157   - <id>12</id>
  1303 + <id>14</id>
  1304 + <referenced_column>25</referenced_column>
  1305 + <relation>3</relation>
  1306 + <description></description>
  1307 + <unique_key_name></unique_key_name>
  1308 + <logical_name></logical_name>
  1309 + <physical_name></physical_name>
  1310 + <type>integer</type>
  1311 + <constraint></constraint>
  1312 + <default_value></default_value>
  1313 + <auto_increment>false</auto_increment>
  1314 + <foreign_key>true</foreign_key>
  1315 + <not_null>false</not_null>
  1316 + <primary_key>false</primary_key>
  1317 + <unique_key>false</unique_key>
  1318 + <character_set></character_set>
  1319 + <collation></collation>
  1320 + <sequence>
  1321 + <name></name>
  1322 + <schema></schema>
  1323 + <increment></increment>
  1324 + <min_value></min_value>
  1325 + <max_value></max_value>
  1326 + <start></start>
  1327 + <cache></cache>
  1328 + <cycle>false</cycle>
  1329 + <order>false</order>
  1330 + <description></description>
  1331 + <data_type></data_type>
  1332 + <decimal_size>0</decimal_size>
  1333 + </sequence>
  1334 + </normal_column>
  1335 + <normal_column>
  1336 + <word_id>18</word_id>
  1337 + <id>15</id>
1158 1338 <description></description>
1159 1339 <unique_key_name></unique_key_name>
1160 1340 <logical_name></logical_name>
... ... @@ -1184,52 +1364,21 @@
1184 1364 <decimal_size>0</decimal_size>
1185 1365 </sequence>
1186 1366 </normal_column>
1187   - </columns>
1188   - <indexes>
1189   - </indexes>
1190   - <complex_unique_key_list>
1191   - </complex_unique_key_list>
1192   - <table_properties>
1193   - <schema></schema>
1194   - </table_properties>
1195   - </table>
1196   - <table>
1197   - <id>5</id>
1198   - <height>170</height>
1199   - <width>292</width>
1200   - <font_name>Ubuntu</font_name>
1201   - <font_size>9</font_size>
1202   - <x>7</x>
1203   - <y>453</y>
1204   - <color>
1205   - <r>255</r>
1206   - <g>165</g>
1207   - <b>0</b>
1208   - </color>
1209   - <connections>
1210   - </connections>
1211   - <physical_name>i3geoestat_conexao</physical_name>
1212   - <logical_name>i3geoestat_conexao</logical_name>
1213   - <description></description>
1214   - <constraint></constraint>
1215   - <primary_key_name></primary_key_name>
1216   - <option></option>
1217   - <columns>
1218 1367 <normal_column>
1219   - <word_id>2</word_id>
1220   - <id>13</id>
  1368 + <word_id>37</word_id>
  1369 + <id>16</id>
1221 1370 <description></description>
1222 1371 <unique_key_name></unique_key_name>
1223 1372 <logical_name></logical_name>
1224 1373 <physical_name></physical_name>
1225   - <type>integer</type>
  1374 + <type>text</type>
1226 1375 <constraint></constraint>
1227 1376 <default_value></default_value>
1228   - <auto_increment>true</auto_increment>
  1377 + <auto_increment>false</auto_increment>
1229 1378 <foreign_key>false</foreign_key>
1230   - <not_null>true</not_null>
1231   - <primary_key>true</primary_key>
1232   - <unique_key>true</unique_key>
  1379 + <not_null>false</not_null>
  1380 + <primary_key>false</primary_key>
  1381 + <unique_key>false</unique_key>
1233 1382 <character_set></character_set>
1234 1383 <collation></collation>
1235 1384 <sequence>
... ... @@ -1248,8 +1397,8 @@
1248 1397 </sequence>
1249 1398 </normal_column>
1250 1399 <normal_column>
1251   - <word_id>1</word_id>
1252   - <id>14</id>
  1400 + <word_id>8</word_id>
  1401 + <id>17</id>
1253 1402 <description></description>
1254 1403 <unique_key_name></unique_key_name>
1255 1404 <logical_name></logical_name>
... ... @@ -1280,8 +1429,8 @@
1280 1429 </sequence>
1281 1430 </normal_column>
1282 1431 <normal_column>
1283   - <word_id>20</word_id>
1284   - <id>15</id>
  1432 + <word_id>12</word_id>
  1433 + <id>18</id>
1285 1434 <description></description>
1286 1435 <unique_key_name></unique_key_name>
1287 1436 <logical_name></logical_name>
... ... @@ -1312,13 +1461,13 @@
1312 1461 </sequence>
1313 1462 </normal_column>
1314 1463 <normal_column>
1315   - <word_id>32</word_id>
1316   - <id>16</id>
  1464 + <word_id>21</word_id>
  1465 + <id>19</id>
1317 1466 <description></description>
1318 1467 <unique_key_name></unique_key_name>
1319 1468 <logical_name></logical_name>
1320 1469 <physical_name></physical_name>
1321   - <type>text</type>
  1470 + <type>integer</type>
1322 1471 <constraint></constraint>
1323 1472 <default_value></default_value>
1324 1473 <auto_increment>false</auto_increment>
... ... @@ -1344,8 +1493,8 @@
1344 1493 </sequence>
1345 1494 </normal_column>
1346 1495 <normal_column>
1347   - <word_id>37</word_id>
1348   - <id>17</id>
  1496 + <word_id>10</word_id>
  1497 + <id>20</id>
1349 1498 <description></description>
1350 1499 <unique_key_name></unique_key_name>
1351 1500 <logical_name></logical_name>
... ... @@ -1376,15 +1525,15 @@
1376 1525 </sequence>
1377 1526 </normal_column>
1378 1527 <normal_column>
1379   - <word_id>33</word_id>
1380   - <id>18</id>
  1528 + <word_id>35</word_id>
  1529 + <id>21</id>
1381 1530 <description></description>
1382 1531 <unique_key_name></unique_key_name>
1383 1532 <logical_name></logical_name>
1384 1533 <physical_name></physical_name>
1385 1534 <type>text</type>
1386 1535 <constraint></constraint>
1387   - <default_value></default_value>
  1536 + <default_value>4326</default_value>
1388 1537 <auto_increment>false</auto_increment>
1389 1538 <foreign_key>false</foreign_key>
1390 1539 <not_null>false</not_null>
... ... @@ -1417,30 +1566,30 @@
1417 1566 </table_properties>
1418 1567 </table>
1419 1568 <table>
1420   - <id>6</id>
  1569 + <id>7</id>
1421 1570 <height>107</height>
1422   - <width>250</width>
  1571 + <width>280</width>
1423 1572 <font_name>Ubuntu</font_name>
1424 1573 <font_size>9</font_size>
1425   - <x>373</x>
1426   - <y>-2</y>
  1574 + <x>1</x>
  1575 + <y>188</y>
1427 1576 <color>
1428   - <r>160</r>
1429   - <g>32</g>
1430   - <b>240</b>
  1577 + <r>255</r>
  1578 + <g>165</g>
  1579 + <b>0</b>
1431 1580 </color>
1432 1581 <connections>
1433 1582 </connections>
1434   - <physical_name>i3geoestat_variavel</physical_name>
1435   - <logical_name>i3geoestat_variavel</logical_name>
1436   - <description></description>
  1583 + <physical_name>i3geoestat_tipo_periodo</physical_name>
  1584 + <logical_name>i3geoestat_tipo_periodo</logical_name>
  1585 + <description>Lista controlada de tipos de período de tempo</description>
1437 1586 <constraint></constraint>
1438 1587 <primary_key_name></primary_key_name>
1439 1588 <option></option>
1440 1589 <columns>
1441 1590 <normal_column>
1442   - <word_id>6</word_id>
1443   - <id>19</id>
  1591 + <word_id>3</word_id>
  1592 + <id>22</id>
1444 1593 <description></description>
1445 1594 <unique_key_name></unique_key_name>
1446 1595 <logical_name></logical_name>
... ... @@ -1472,7 +1621,7 @@
1472 1621 </normal_column>
1473 1622 <normal_column>
1474 1623 <word_id>24</word_id>
1475   - <id>20</id>
  1624 + <id>23</id>
1476 1625 <description></description>
1477 1626 <unique_key_name></unique_key_name>
1478 1627 <logical_name></logical_name>
... ... @@ -1503,8 +1652,8 @@
1503 1652 </sequence>
1504 1653 </normal_column>
1505 1654 <normal_column>
1506   - <word_id>15</word_id>
1507   - <id>21</id>
  1655 + <word_id>13</word_id>
  1656 + <id>24</id>
1508 1657 <description></description>
1509 1658 <unique_key_name></unique_key_name>
1510 1659 <logical_name></logical_name>
... ... @@ -1543,31 +1692,14 @@
1543 1692 <schema></schema>
1544 1693 </table_properties>
1545 1694 </table>
1546   - <note>
1547   - <id>7</id>
1548   - <height>111</height>
1549   - <width>188</width>
1550   - <font_name>Ubuntu</font_name>
1551   - <font_size>9</font_size>
1552   - <x>754</x>
1553   - <y>522</y>
1554   - <color>
1555   - <r>255</r>
1556   - <g>255</g>
1557   - <b>255</b>
1558   - </color>
1559   - <connections>
1560   - </connections>
1561   - <text>As colunas obtidas da junção de medida_variavel com tipo_regiao podem ser utilizadas para definir uma dimensão</text>
1562   - </note>
1563 1695 <table>
1564 1696 <id>8</id>
1565   - <height>107</height>
1566   - <width>242</width>
  1697 + <height>170</height>
  1698 + <width>292</width>
1567 1699 <font_name>Ubuntu</font_name>
1568 1700 <font_size>9</font_size>
1569   - <x>33</x>
1570   - <y>5</y>
  1701 + <x>7</x>
  1702 + <y>453</y>
1571 1703 <color>
1572 1704 <r>255</r>
1573 1705 <g>165</g>
... ... @@ -1575,16 +1707,16 @@
1575 1707 </color>
1576 1708 <connections>
1577 1709 </connections>
1578   - <physical_name>i3geoestat_unidade_medida</physical_name>
1579   - <logical_name>i3geoestat_unidade_medida</logical_name>
1580   - <description></description>
  1710 + <physical_name>i3geoestat_conexao</physical_name>
  1711 + <logical_name>i3geoestat_conexao</logical_name>
  1712 + <description>Lista controlada dos parâmetros de conexão com o banco de dados onde residem dados</description>
1581 1713 <constraint></constraint>
1582 1714 <primary_key_name></primary_key_name>
1583 1715 <option></option>
1584 1716 <columns>
1585 1717 <normal_column>
1586   - <word_id>5</word_id>
1587   - <id>22</id>
  1718 + <word_id>2</word_id>
  1719 + <id>25</id>
1588 1720 <description></description>
1589 1721 <unique_key_name></unique_key_name>
1590 1722 <logical_name></logical_name>
... ... @@ -1615,8 +1747,8 @@
1615 1747 </sequence>
1616 1748 </normal_column>
1617 1749 <normal_column>
1618   - <word_id>25</word_id>
1619   - <id>23</id>
  1750 + <word_id>1</word_id>
  1751 + <id>26</id>
1620 1752 <description></description>
1621 1753 <unique_key_name></unique_key_name>
1622 1754 <logical_name></logical_name>
... ... @@ -1647,8 +1779,8 @@
1647 1779 </sequence>
1648 1780 </normal_column>
1649 1781 <normal_column>
1650   - <word_id>34</word_id>
1651   - <id>24</id>
  1782 + <word_id>20</word_id>
  1783 + <id>27</id>
1652 1784 <description></description>
1653 1785 <unique_key_name></unique_key_name>
1654 1786 <logical_name></logical_name>
... ... @@ -1679,15 +1811,15 @@
1679 1811 </sequence>
1680 1812 </normal_column>
1681 1813 <normal_column>
1682   - <word_id>31</word_id>
1683   - <id>25</id>
  1814 + <word_id>32</word_id>
  1815 + <id>28</id>
1684 1816 <description></description>
1685 1817 <unique_key_name></unique_key_name>
1686 1818 <logical_name></logical_name>
1687 1819 <physical_name></physical_name>
1688   - <type>integer</type>
  1820 + <type>text</type>
1689 1821 <constraint></constraint>
1690   - <default_value>0</default_value>
  1822 + <default_value></default_value>
1691 1823 <auto_increment>false</auto_increment>
1692 1824 <foreign_key>false</foreign_key>
1693 1825 <not_null>false</not_null>
... ... @@ -1711,15 +1843,47 @@
1711 1843 </sequence>
1712 1844 </normal_column>
1713 1845 <normal_column>
1714   - <word_id>30</word_id>
1715   - <id>26</id>
  1846 + <word_id>38</word_id>
  1847 + <id>29</id>
1716 1848 <description></description>
1717 1849 <unique_key_name></unique_key_name>
1718 1850 <logical_name></logical_name>
1719 1851 <physical_name></physical_name>
1720   - <type>integer</type>
  1852 + <type>text</type>
1721 1853 <constraint></constraint>
1722   - <default_value>0</default_value>
  1854 + <default_value></default_value>
  1855 + <auto_increment>false</auto_increment>
  1856 + <foreign_key>false</foreign_key>
  1857 + <not_null>false</not_null>
  1858 + <primary_key>false</primary_key>
  1859 + <unique_key>false</unique_key>
  1860 + <character_set></character_set>
  1861 + <collation></collation>
  1862 + <sequence>
  1863 + <name></name>
  1864 + <schema></schema>
  1865 + <increment></increment>
  1866 + <min_value></min_value>
  1867 + <max_value></max_value>
  1868 + <start></start>
  1869 + <cache></cache>
  1870 + <cycle>false</cycle>
  1871 + <order>false</order>
  1872 + <description></description>
  1873 + <data_type></data_type>
  1874 + <decimal_size>0</decimal_size>
  1875 + </sequence>
  1876 + </normal_column>
  1877 + <normal_column>
  1878 + <word_id>33</word_id>
  1879 + <id>30</id>
  1880 + <description></description>
  1881 + <unique_key_name></unique_key_name>
  1882 + <logical_name></logical_name>
  1883 + <physical_name></physical_name>
  1884 + <type>text</type>
  1885 + <constraint></constraint>
  1886 + <default_value></default_value>
1723 1887 <auto_increment>false</auto_increment>
1724 1888 <foreign_key>false</foreign_key>
1725 1889 <not_null>false</not_null>
... ... @@ -1753,114 +1917,29 @@
1753 1917 </table>
1754 1918 <table>
1755 1919 <id>9</id>
1756   - <height>339</height>
1757   - <width>292</width>
  1920 + <height>107</height>
  1921 + <width>250</width>
1758 1922 <font_name>Ubuntu</font_name>
1759 1923 <font_size>9</font_size>
1760   - <x>353</x>
1761   - <y>155</y>
  1924 + <x>373</x>
  1925 + <y>-2</y>
1762 1926 <color>
1763 1927 <r>160</r>
1764 1928 <g>32</g>
1765 1929 <b>240</b>
1766 1930 </color>
1767 1931 <connections>
1768   - <relation>
1769   - <id>2</id>
1770   - <source>6</source>
1771   - <target>9</target>
1772   - <child_cardinality>1..n</child_cardinality>
1773   - <parent_cardinality>1</parent_cardinality>
1774   - <reference_for_pk>true</reference_for_pk>
1775   - <name></name>
1776   - <on_delete_action>RESTRICT</on_delete_action>
1777   - <on_update_action>RESTRICT</on_update_action>
1778   - <source_xp>-1</source_xp>
1779   - <source_yp>-1</source_yp>
1780   - <target_xp>-1</target_xp>
1781   - <target_yp>-1</target_yp>
1782   - <referenced_column>null</referenced_column>
1783   - <referenced_complex_unique_key>null</referenced_complex_unique_key>
1784   - </relation>
1785   - <relation>
1786   - <id>3</id>
1787   - <source>5</source>
1788   - <target>9</target>
1789   - <child_cardinality>1..n</child_cardinality>
1790   - <parent_cardinality>1</parent_cardinality>
1791   - <reference_for_pk>true</reference_for_pk>
1792   - <name></name>
1793   - <on_delete_action>RESTRICT</on_delete_action>
1794   - <on_update_action>RESTRICT</on_update_action>
1795   - <source_xp>-1</source_xp>
1796   - <source_yp>-1</source_yp>
1797   - <target_xp>-1</target_xp>
1798   - <target_yp>-1</target_yp>
1799   - <referenced_column>null</referenced_column>
1800   - <referenced_complex_unique_key>null</referenced_complex_unique_key>
1801   - </relation>
1802   - <relation>
1803   - <id>4</id>
1804   - <source>3</source>
1805   - <target>9</target>
1806   - <child_cardinality>1..n</child_cardinality>
1807   - <parent_cardinality>1</parent_cardinality>
1808   - <reference_for_pk>true</reference_for_pk>
1809   - <name></name>
1810   - <on_delete_action>RESTRICT</on_delete_action>
1811   - <on_update_action>RESTRICT</on_update_action>
1812   - <source_xp>-1</source_xp>
1813   - <source_yp>-1</source_yp>
1814   - <target_xp>-1</target_xp>
1815   - <target_yp>-1</target_yp>
1816   - <referenced_column>null</referenced_column>
1817   - <referenced_complex_unique_key>null</referenced_complex_unique_key>
1818   - </relation>
1819   - <relation>
1820   - <id>5</id>
1821   - <source>8</source>
1822   - <target>9</target>
1823   - <child_cardinality>1..n</child_cardinality>
1824   - <parent_cardinality>1</parent_cardinality>
1825   - <reference_for_pk>true</reference_for_pk>
1826   - <name></name>
1827   - <on_delete_action>RESTRICT</on_delete_action>
1828   - <on_update_action>RESTRICT</on_update_action>
1829   - <source_xp>-1</source_xp>
1830   - <source_yp>-1</source_yp>
1831   - <target_xp>-1</target_xp>
1832   - <target_yp>-1</target_yp>
1833   - <referenced_column>null</referenced_column>
1834   - <referenced_complex_unique_key>null</referenced_complex_unique_key>
1835   - </relation>
1836   - <relation>
1837   - <id>6</id>
1838   - <source>4</source>
1839   - <target>9</target>
1840   - <child_cardinality>1..n</child_cardinality>
1841   - <parent_cardinality>1</parent_cardinality>
1842   - <reference_for_pk>true</reference_for_pk>
1843   - <name></name>
1844   - <on_delete_action>RESTRICT</on_delete_action>
1845   - <on_update_action>RESTRICT</on_update_action>
1846   - <source_xp>-1</source_xp>
1847   - <source_yp>-1</source_yp>
1848   - <target_xp>-1</target_xp>
1849   - <target_yp>-1</target_yp>
1850   - <referenced_column>null</referenced_column>
1851   - <referenced_complex_unique_key>null</referenced_complex_unique_key>
1852   - </relation>
1853 1932 </connections>
1854   - <physical_name>i3geoestat_medida_variavel</physical_name>
1855   - <logical_name>i3geoestat_medida_variavel</logical_name>
1856   - <description>Descreve as colunas que contém valores de algum tipo de medida, por exemplo população residente</description>
  1933 + <physical_name>i3geoestat_variavel</physical_name>
  1934 + <logical_name>i3geoestat_variavel</logical_name>
  1935 + <description>Tabela com o nome e descrição de uma variável variável</description>
1857 1936 <constraint></constraint>
1858 1937 <primary_key_name></primary_key_name>
1859 1938 <option></option>
1860 1939 <columns>
1861 1940 <normal_column>
1862   - <word_id>23</word_id>
1863   - <id>27</id>
  1941 + <word_id>6</word_id>
  1942 + <id>31</id>
1864 1943 <description></description>
1865 1944 <unique_key_name></unique_key_name>
1866 1945 <logical_name></logical_name>
... ... @@ -1891,18 +1970,17 @@
1891 1970 </sequence>
1892 1971 </normal_column>
1893 1972 <normal_column>
1894   - <id>28</id>
1895   - <referenced_column>22</referenced_column>
1896   - <relation>5</relation>
  1973 + <word_id>26</word_id>
  1974 + <id>32</id>
1897 1975 <description></description>
1898 1976 <unique_key_name></unique_key_name>
1899 1977 <logical_name></logical_name>
1900 1978 <physical_name></physical_name>
1901   - <type>integer</type>
  1979 + <type>text</type>
1902 1980 <constraint></constraint>
1903 1981 <default_value></default_value>
1904 1982 <auto_increment>false</auto_increment>
1905   - <foreign_key>true</foreign_key>
  1983 + <foreign_key>false</foreign_key>
1906 1984 <not_null>false</not_null>
1907 1985 <primary_key>false</primary_key>
1908 1986 <unique_key>false</unique_key>
... ... @@ -1924,18 +2002,17 @@
1924 2002 </sequence>
1925 2003 </normal_column>
1926 2004 <normal_column>
1927   - <id>29</id>
1928   - <referenced_column>0</referenced_column>
1929   - <relation>4</relation>
  2005 + <word_id>15</word_id>
  2006 + <id>33</id>
1930 2007 <description></description>
1931 2008 <unique_key_name></unique_key_name>
1932 2009 <logical_name></logical_name>
1933 2010 <physical_name></physical_name>
1934   - <type>integer</type>
  2011 + <type>text</type>
1935 2012 <constraint></constraint>
1936 2013 <default_value></default_value>
1937 2014 <auto_increment>false</auto_increment>
1938   - <foreign_key>true</foreign_key>
  2015 + <foreign_key>false</foreign_key>
1939 2016 <not_null>false</not_null>
1940 2017 <primary_key>false</primary_key>
1941 2018 <unique_key>false</unique_key>
... ... @@ -1956,10 +2033,125 @@
1956 2033 <decimal_size>0</decimal_size>
1957 2034 </sequence>
1958 2035 </normal_column>
  2036 + </columns>
  2037 + <indexes>
  2038 + </indexes>
  2039 + <complex_unique_key_list>
  2040 + </complex_unique_key_list>
  2041 + <table_properties>
  2042 + <schema></schema>
  2043 + </table_properties>
  2044 + </table>
  2045 + <table>
  2046 + <id>10</id>
  2047 + <height>339</height>
  2048 + <width>292</width>
  2049 + <font_name>Ubuntu</font_name>
  2050 + <font_size>9</font_size>
  2051 + <x>353</x>
  2052 + <y>155</y>
  2053 + <color>
  2054 + <r>160</r>
  2055 + <g>32</g>
  2056 + <b>240</b>
  2057 + </color>
  2058 + <connections>
  2059 + <relation>
  2060 + <id>4</id>
  2061 + <source>6</source>
  2062 + <target>10</target>
  2063 + <child_cardinality>1..n</child_cardinality>
  2064 + <parent_cardinality>1</parent_cardinality>
  2065 + <reference_for_pk>true</reference_for_pk>
  2066 + <name></name>
  2067 + <on_delete_action>RESTRICT</on_delete_action>
  2068 + <on_update_action>RESTRICT</on_update_action>
  2069 + <source_xp>-1</source_xp>
  2070 + <source_yp>-1</source_yp>
  2071 + <target_xp>-1</target_xp>
  2072 + <target_yp>-1</target_yp>
  2073 + <referenced_column>null</referenced_column>
  2074 + <referenced_complex_unique_key>null</referenced_complex_unique_key>
  2075 + </relation>
  2076 + <relation>
  2077 + <id>5</id>
  2078 + <source>7</source>
  2079 + <target>10</target>
  2080 + <child_cardinality>1..n</child_cardinality>
  2081 + <parent_cardinality>1</parent_cardinality>
  2082 + <reference_for_pk>true</reference_for_pk>
  2083 + <name></name>
  2084 + <on_delete_action>RESTRICT</on_delete_action>
  2085 + <on_update_action>RESTRICT</on_update_action>
  2086 + <source_xp>-1</source_xp>
  2087 + <source_yp>-1</source_yp>
  2088 + <target_xp>-1</target_xp>
  2089 + <target_yp>-1</target_yp>
  2090 + <referenced_column>null</referenced_column>
  2091 + <referenced_complex_unique_key>null</referenced_complex_unique_key>
  2092 + </relation>
  2093 + <relation>
  2094 + <id>6</id>
  2095 + <source>8</source>
  2096 + <target>10</target>
  2097 + <child_cardinality>1..n</child_cardinality>
  2098 + <parent_cardinality>1</parent_cardinality>
  2099 + <reference_for_pk>true</reference_for_pk>
  2100 + <name></name>
  2101 + <on_delete_action>RESTRICT</on_delete_action>
  2102 + <on_update_action>RESTRICT</on_update_action>
  2103 + <source_xp>-1</source_xp>
  2104 + <source_yp>-1</source_yp>
  2105 + <target_xp>-1</target_xp>
  2106 + <target_yp>-1</target_yp>
  2107 + <referenced_column>null</referenced_column>
  2108 + <referenced_complex_unique_key>null</referenced_complex_unique_key>
  2109 + </relation>
  2110 + <relation>
  2111 + <id>7</id>
  2112 + <source>9</source>
  2113 + <target>10</target>
  2114 + <child_cardinality>1..n</child_cardinality>
  2115 + <parent_cardinality>1</parent_cardinality>
  2116 + <reference_for_pk>true</reference_for_pk>
  2117 + <name></name>
  2118 + <on_delete_action>RESTRICT</on_delete_action>
  2119 + <on_update_action>RESTRICT</on_update_action>
  2120 + <source_xp>-1</source_xp>
  2121 + <source_yp>-1</source_yp>
  2122 + <target_xp>-1</target_xp>
  2123 + <target_yp>-1</target_yp>
  2124 + <referenced_column>null</referenced_column>
  2125 + <referenced_complex_unique_key>null</referenced_complex_unique_key>
  2126 + </relation>
  2127 + <relation>
  2128 + <id>8</id>
  2129 + <source>4</source>
  2130 + <target>10</target>
  2131 + <child_cardinality>1..n</child_cardinality>
  2132 + <parent_cardinality>1</parent_cardinality>
  2133 + <reference_for_pk>true</reference_for_pk>
  2134 + <name></name>
  2135 + <on_delete_action>RESTRICT</on_delete_action>
  2136 + <on_update_action>RESTRICT</on_update_action>
  2137 + <source_xp>-1</source_xp>
  2138 + <source_yp>-1</source_yp>
  2139 + <target_xp>-1</target_xp>
  2140 + <target_yp>-1</target_yp>
  2141 + <referenced_column>null</referenced_column>
  2142 + <referenced_complex_unique_key>null</referenced_complex_unique_key>
  2143 + </relation>
  2144 + </connections>
  2145 + <physical_name>i3geoestat_medida_variavel</physical_name>
  2146 + <logical_name>i3geoestat_medida_variavel</logical_name>
  2147 + <description>Descreve as colunas que contém valores de algum tipo de medida, por exemplo população residente</description>
  2148 + <constraint></constraint>
  2149 + <primary_key_name></primary_key_name>
  2150 + <option></option>
  2151 + <columns>
1959 2152 <normal_column>
1960   - <id>30</id>
1961   - <referenced_column>19</referenced_column>
1962   - <relation>2</relation>
  2153 + <word_id>23</word_id>
  2154 + <id>34</id>
1963 2155 <description></description>
1964 2156 <unique_key_name></unique_key_name>
1965 2157 <logical_name></logical_name>
... ... @@ -1967,11 +2159,11 @@
1967 2159 <type>integer</type>
1968 2160 <constraint></constraint>
1969 2161 <default_value></default_value>
1970   - <auto_increment>false</auto_increment>
1971   - <foreign_key>true</foreign_key>
1972   - <not_null>false</not_null>
1973   - <primary_key>false</primary_key>
1974   - <unique_key>false</unique_key>
  2162 + <auto_increment>true</auto_increment>
  2163 + <foreign_key>false</foreign_key>
  2164 + <not_null>true</not_null>
  2165 + <primary_key>true</primary_key>
  2166 + <unique_key>true</unique_key>
1975 2167 <character_set></character_set>
1976 2168 <collation></collation>
1977 2169 <sequence>
... ... @@ -1990,9 +2182,9 @@
1990 2182 </sequence>
1991 2183 </normal_column>
1992 2184 <normal_column>
1993   - <id>31</id>
1994   - <referenced_column>3</referenced_column>
1995   - <relation>6</relation>
  2185 + <id>35</id>
  2186 + <referenced_column>0</referenced_column>
  2187 + <relation>8</relation>
1996 2188 <description></description>
1997 2189 <unique_key_name></unique_key_name>
1998 2190 <logical_name></logical_name>
... ... @@ -2023,9 +2215,9 @@
2023 2215 </sequence>
2024 2216 </normal_column>
2025 2217 <normal_column>
2026   - <id>32</id>
2027   - <referenced_column>13</referenced_column>
2028   - <relation>3</relation>
  2218 + <id>36</id>
  2219 + <referenced_column>22</referenced_column>
  2220 + <relation>5</relation>
2029 2221 <description></description>
2030 2222 <unique_key_name></unique_key_name>
2031 2223 <logical_name></logical_name>
... ... @@ -2056,81 +2248,18 @@
2056 2248 </sequence>
2057 2249 </normal_column>
2058 2250 <normal_column>
2059   - <word_id>17</word_id>
2060   - <id>33</id>
2061   - <description></description>
2062   - <unique_key_name></unique_key_name>
2063   - <logical_name></logical_name>
2064   - <physical_name></physical_name>
2065   - <type>text</type>
2066   - <constraint></constraint>
2067   - <default_value></default_value>
2068   - <auto_increment>false</auto_increment>
2069   - <foreign_key>false</foreign_key>
2070   - <not_null>false</not_null>
2071   - <primary_key>false</primary_key>
2072   - <unique_key>false</unique_key>
2073   - <character_set></character_set>
2074   - <collation></collation>
2075   - <sequence>
2076   - <name></name>
2077   - <schema></schema>
2078   - <increment></increment>
2079   - <min_value></min_value>
2080   - <max_value></max_value>
2081   - <start></start>
2082   - <cache></cache>
2083   - <cycle>false</cycle>
2084   - <order>false</order>
2085   - <description></description>
2086   - <data_type></data_type>
2087   - <decimal_size>0</decimal_size>
2088   - </sequence>
2089   - </normal_column>
2090   - <normal_column>
2091   - <word_id>35</word_id>
2092   - <id>34</id>
2093   - <description></description>
2094   - <unique_key_name></unique_key_name>
2095   - <logical_name></logical_name>
2096   - <physical_name></physical_name>
2097   - <type>text</type>
2098   - <constraint></constraint>
2099   - <default_value></default_value>
2100   - <auto_increment>false</auto_increment>
2101   - <foreign_key>false</foreign_key>
2102   - <not_null>false</not_null>
2103   - <primary_key>false</primary_key>
2104   - <unique_key>false</unique_key>
2105   - <character_set></character_set>
2106   - <collation></collation>
2107   - <sequence>
2108   - <name></name>
2109   - <schema></schema>
2110   - <increment></increment>
2111   - <min_value></min_value>
2112   - <max_value></max_value>
2113   - <start></start>
2114   - <cache></cache>
2115   - <cycle>false</cycle>
2116   - <order>false</order>
2117   - <description></description>
2118   - <data_type></data_type>
2119   - <decimal_size>0</decimal_size>
2120   - </sequence>
2121   - </normal_column>
2122   - <normal_column>
2123   - <word_id>11</word_id>
2124   - <id>35</id>
  2251 + <id>37</id>
  2252 + <referenced_column>31</referenced_column>
  2253 + <relation>7</relation>
2125 2254 <description></description>
2126 2255 <unique_key_name></unique_key_name>
2127 2256 <logical_name></logical_name>
2128 2257 <physical_name></physical_name>
2129   - <type>text</type>
  2258 + <type>integer</type>
2130 2259 <constraint></constraint>
2131 2260 <default_value></default_value>
2132 2261 <auto_increment>false</auto_increment>
2133   - <foreign_key>false</foreign_key>
  2262 + <foreign_key>true</foreign_key>
2134 2263 <not_null>false</not_null>
2135 2264 <primary_key>false</primary_key>
2136 2265 <unique_key>false</unique_key>
... ... @@ -2152,17 +2281,18 @@
2152 2281 </sequence>
2153 2282 </normal_column>
2154 2283 <normal_column>
2155   - <word_id>9</word_id>
2156   - <id>36</id>
  2284 + <id>38</id>
  2285 + <referenced_column>11</referenced_column>
  2286 + <relation>4</relation>
2157 2287 <description></description>
2158 2288 <unique_key_name></unique_key_name>
2159 2289 <logical_name></logical_name>
2160 2290 <physical_name></physical_name>
2161   - <type>text</type>
  2291 + <type>integer</type>
2162 2292 <constraint></constraint>
2163 2293 <default_value></default_value>
2164 2294 <auto_increment>false</auto_increment>
2165   - <foreign_key>false</foreign_key>
  2295 + <foreign_key>true</foreign_key>
2166 2296 <not_null>false</not_null>
2167 2297 <primary_key>false</primary_key>
2168 2298 <unique_key>false</unique_key>
... ... @@ -2184,17 +2314,18 @@
2184 2314 </sequence>
2185 2315 </normal_column>
2186 2316 <normal_column>
2187   - <word_id>19</word_id>
2188   - <id>37</id>
  2317 + <id>39</id>
  2318 + <referenced_column>25</referenced_column>
  2319 + <relation>6</relation>
2189 2320 <description></description>
2190 2321 <unique_key_name></unique_key_name>
2191 2322 <logical_name></logical_name>
2192 2323 <physical_name></physical_name>
2193   - <type>text</type>
  2324 + <type>integer</type>
2194 2325 <constraint></constraint>
2195 2326 <default_value></default_value>
2196 2327 <auto_increment>false</auto_increment>
2197   - <foreign_key>false</foreign_key>
  2328 + <foreign_key>true</foreign_key>
2198 2329 <not_null>false</not_null>
2199 2330 <primary_key>false</primary_key>
2200 2331 <unique_key>false</unique_key>
... ... @@ -2216,8 +2347,8 @@
2216 2347 </sequence>
2217 2348 </normal_column>
2218 2349 <normal_column>
2219   - <word_id>28</word_id>
2220   - <id>38</id>
  2350 + <word_id>17</word_id>
  2351 + <id>40</id>
2221 2352 <description></description>
2222 2353 <unique_key_name></unique_key_name>
2223 2354 <logical_name></logical_name>
... ... @@ -2226,95 +2357,10 @@
2226 2357 <constraint></constraint>
2227 2358 <default_value></default_value>
2228 2359 <auto_increment>false</auto_increment>
2229   - <foreign_key>false</foreign_key>
2230   - <not_null>false</not_null>
2231   - <primary_key>false</primary_key>
2232   - <unique_key>false</unique_key>
2233   - <character_set></character_set>
2234   - <collation></collation>
2235   - <sequence>
2236   - <name></name>
2237   - <schema></schema>
2238   - <increment></increment>
2239   - <min_value></min_value>
2240   - <max_value></max_value>
2241   - <start></start>
2242   - <cache></cache>
2243   - <cycle>false</cycle>
2244   - <order>false</order>
2245   - <description></description>
2246   - <data_type></data_type>
2247   - <decimal_size>0</decimal_size>
2248   - </sequence>
2249   - </normal_column>
2250   - </columns>
2251   - <indexes>
2252   - </indexes>
2253   - <complex_unique_key_list>
2254   - </complex_unique_key_list>
2255   - <table_properties>
2256   - <schema></schema>
2257   - </table_properties>
2258   - </table>
2259   - <table>
2260   - <id>10</id>
2261   - <height>149</height>
2262   - <width>292</width>
2263   - <font_name>Ubuntu</font_name>
2264   - <font_size>9</font_size>
2265   - <x>711</x>
2266   - <y>273</y>
2267   - <color>
2268   - <r>160</r>
2269   - <g>32</g>
2270   - <b>240</b>
2271   - </color>
2272   - <connections>
2273   - <relation>
2274   - <id>7</id>
2275   - <source>9</source>
2276   - <target>10</target>
2277   - <child_cardinality>1..n</child_cardinality>
2278   - <parent_cardinality>1</parent_cardinality>
2279   - <reference_for_pk>true</reference_for_pk>
2280   - <name></name>
2281   - <on_delete_action>RESTRICT</on_delete_action>
2282   - <on_update_action>RESTRICT</on_update_action>
2283   - <source_xp>-1</source_xp>
2284   - <source_yp>-1</source_yp>
2285   - <target_xp>-1</target_xp>
2286   - <target_yp>-1</target_yp>
2287   - <referenced_column>null</referenced_column>
2288   - <referenced_complex_unique_key>null</referenced_complex_unique_key>
2289   - </relation>
2290   - <comment_connection>
2291   - <id>8</id>
2292   - <source>7</source>
2293   - <target>10</target>
2294   - </comment_connection>
2295   - </connections>
2296   - <physical_name>i3geoestat_dimensao_medida</physical_name>
2297   - <logical_name>i3geoestat_dimensao_medida</logical_name>
2298   - <description></description>
2299   - <constraint></constraint>
2300   - <primary_key_name></primary_key_name>
2301   - <option></option>
2302   - <columns>
2303   - <normal_column>
2304   - <word_id>22</word_id>
2305   - <id>39</id>
2306   - <description></description>
2307   - <unique_key_name></unique_key_name>
2308   - <logical_name></logical_name>
2309   - <physical_name></physical_name>
2310   - <type>integer</type>
2311   - <constraint></constraint>
2312   - <default_value></default_value>
2313   - <auto_increment>true</auto_increment>
2314   - <foreign_key>false</foreign_key>
2315   - <not_null>true</not_null>
2316   - <primary_key>true</primary_key>
2317   - <unique_key>true</unique_key>
  2360 + <foreign_key>false</foreign_key>
  2361 + <not_null>false</not_null>
  2362 + <primary_key>false</primary_key>
  2363 + <unique_key>false</unique_key>
2318 2364 <character_set></character_set>
2319 2365 <collation></collation>
2320 2366 <sequence>
... ... @@ -2333,8 +2379,8 @@
2333 2379 </sequence>
2334 2380 </normal_column>
2335 2381 <normal_column>
2336   - <word_id>7</word_id>
2337   - <id>40</id>
  2382 + <word_id>36</word_id>
  2383 + <id>41</id>
2338 2384 <description></description>
2339 2385 <unique_key_name></unique_key_name>
2340 2386 <logical_name></logical_name>
... ... @@ -2365,8 +2411,8 @@
2365 2411 </sequence>
2366 2412 </normal_column>
2367 2413 <normal_column>
2368   - <word_id>27</word_id>
2369   - <id>41</id>
  2414 + <word_id>11</word_id>
  2415 + <id>42</id>
2370 2416 <description></description>
2371 2417 <unique_key_name></unique_key_name>
2372 2418 <logical_name></logical_name>
... ... @@ -2397,8 +2443,8 @@
2397 2443 </sequence>
2398 2444 </normal_column>
2399 2445 <normal_column>
2400   - <word_id>14</word_id>
2401   - <id>42</id>
  2446 + <word_id>9</word_id>
  2447 + <id>43</id>
2402 2448 <description></description>
2403 2449 <unique_key_name></unique_key_name>
2404 2450 <logical_name></logical_name>
... ... @@ -2429,15 +2475,15 @@
2429 2475 </sequence>
2430 2476 </normal_column>
2431 2477 <normal_column>
2432   - <word_id>0</word_id>
2433   - <id>43</id>
  2478 + <word_id>19</word_id>
  2479 + <id>44</id>
2434 2480 <description></description>
2435 2481 <unique_key_name></unique_key_name>
2436 2482 <logical_name></logical_name>
2437 2483 <physical_name></physical_name>
2438   - <type>integer</type>
  2484 + <type>text</type>
2439 2485 <constraint></constraint>
2440   - <default_value>0</default_value>
  2486 + <default_value></default_value>
2441 2487 <auto_increment>false</auto_increment>
2442 2488 <foreign_key>false</foreign_key>
2443 2489 <not_null>false</not_null>
... ... @@ -2461,18 +2507,17 @@
2461 2507 </sequence>
2462 2508 </normal_column>
2463 2509 <normal_column>
2464   - <id>44</id>
2465   - <referenced_column>27</referenced_column>
2466   - <relation>7</relation>
  2510 + <word_id>28</word_id>
  2511 + <id>45</id>
2467 2512 <description></description>
2468 2513 <unique_key_name></unique_key_name>
2469 2514 <logical_name></logical_name>
2470 2515 <physical_name></physical_name>
2471   - <type>integer</type>
  2516 + <type>text</type>
2472 2517 <constraint></constraint>
2473 2518 <default_value></default_value>
2474 2519 <auto_increment>false</auto_increment>
2475   - <foreign_key>true</foreign_key>
  2520 + <foreign_key>false</foreign_key>
2476 2521 <not_null>false</not_null>
2477 2522 <primary_key>false</primary_key>
2478 2523 <unique_key>false</unique_key>
... ... @@ -2510,31 +2555,31 @@
2510 2555 <name>metaestat_basededados</name>
2511 2556 <export_order>0</export_order>
2512 2557 <table_test_data>
2513   - <table_id>5</table_id>
  2558 + <table_id>8</table_id>
2514 2559 <direct_test_data>
2515 2560 <data>
2516 2561 <column_data>
2517   - <column_id>13</column_id>
  2562 + <column_id>25</column_id>
2518 2563 <value>1</value>
2519 2564 </column_data>
2520 2565 <column_data>
2521   - <column_id>14</column_id>
  2566 + <column_id>26</column_id>
2522 2567 <value>dbspo</value>
2523 2568 </column_data>
2524 2569 <column_data>
2525   - <column_id>15</column_id>
  2570 + <column_id>27</column_id>
2526 2571 <value>localhost</value>
2527 2572 </column_data>
2528 2573 <column_data>
2529   - <column_id>16</column_id>
  2574 + <column_id>28</column_id>
2530 2575 <value>5432</value>
2531 2576 </column_data>
2532 2577 <column_data>
2533   - <column_id>17</column_id>
  2578 + <column_id>29</column_id>
2534 2579 <value>postgres</value>
2535 2580 </column_data>
2536 2581 <column_data>
2537   - <column_id>18</column_id>
  2582 + <column_id>30</column_id>
2538 2583 <value>postgres</value>
2539 2584 </column_data>
2540 2585 </data>
... ... @@ -2543,7 +2588,7 @@
2543 2588 <test_data_num>0</test_data_num>
2544 2589 <data_def_list>
2545 2590 <data_def>
2546   - <column_id>13</column_id>
  2591 + <column_id>25</column_id>
2547 2592 <type>Format</type>
2548 2593 <repeat_num>1</repeat_num>
2549 2594 <template>%</template>
... ... @@ -2558,7 +2603,7 @@
2558 2603 </modified_values>
2559 2604 </data_def>
2560 2605 <data_def>
2561   - <column_id>14</column_id>
  2606 + <column_id>26</column_id>
2562 2607 <type>Format</type>
2563 2608 <repeat_num>1</repeat_num>
2564 2609 <template>database%</template>
... ... @@ -2573,7 +2618,7 @@
2573 2618 </modified_values>
2574 2619 </data_def>
2575 2620 <data_def>
2576   - <column_id>15</column_id>
  2621 + <column_id>27</column_id>
2577 2622 <type>Format</type>
2578 2623 <repeat_num>1</repeat_num>
2579 2624 <template>host%</template>
... ... @@ -2588,7 +2633,7 @@
2588 2633 </modified_values>
2589 2634 </data_def>
2590 2635 <data_def>
2591   - <column_id>16</column_id>
  2636 + <column_id>28</column_id>
2592 2637 <type>Format</type>
2593 2638 <repeat_num>1</repeat_num>
2594 2639 <template>porta%</template>
... ... @@ -2603,7 +2648,7 @@
2603 2648 </modified_values>
2604 2649 </data_def>
2605 2650 <data_def>
2606   - <column_id>17</column_id>
  2651 + <column_id>29</column_id>
2607 2652 <type>Format</type>
2608 2653 <repeat_num>1</repeat_num>
2609 2654 <template>usuario%</template>
... ... @@ -2618,7 +2663,7 @@
2618 2663 </modified_values>
2619 2664 </data_def>
2620 2665 <data_def>
2621   - <column_id>18</column_id>
  2666 + <column_id>30</column_id>
2622 2667 <type>Format</type>
2623 2668 <repeat_num>1</repeat_num>
2624 2669 <template>senha%</template>
... ... @@ -2636,33 +2681,33 @@
2636 2681 </repeat_test_data>
2637 2682 </table_test_data>
2638 2683 <table_test_data>
2639   - <table_id>3</table_id>
  2684 + <table_id>7</table_id>
2640 2685 <direct_test_data>
2641 2686 <data>
2642 2687 <column_data>
2643   - <column_id>0</column_id>
  2688 + <column_id>22</column_id>
2644 2689 <value>1</value>
2645 2690 </column_data>
2646 2691 <column_data>
2647   - <column_id>1</column_id>
  2692 + <column_id>23</column_id>
2648 2693 <value>Anual</value>
2649 2694 </column_data>
2650 2695 <column_data>
2651   - <column_id>2</column_id>
  2696 + <column_id>24</column_id>
2652 2697 <value></value>
2653 2698 </column_data>
2654 2699 </data>
2655 2700 <data>
2656 2701 <column_data>
2657   - <column_id>0</column_id>
  2702 + <column_id>22</column_id>
2658 2703 <value>2</value>
2659 2704 </column_data>
2660 2705 <column_data>
2661   - <column_id>1</column_id>
  2706 + <column_id>23</column_id>
2662 2707 <value>Mensal</value>
2663 2708 </column_data>
2664 2709 <column_data>
2665   - <column_id>2</column_id>
  2710 + <column_id>24</column_id>
2666 2711 <value></value>
2667 2712 </column_data>
2668 2713 </data>
... ... @@ -2671,7 +2716,7 @@
2671 2716 <test_data_num>0</test_data_num>
2672 2717 <data_def_list>
2673 2718 <data_def>
2674   - <column_id>0</column_id>
  2719 + <column_id>22</column_id>
2675 2720 <type>Format</type>
2676 2721 <repeat_num>1</repeat_num>
2677 2722 <template>%</template>
... ... @@ -2686,7 +2731,7 @@
2686 2731 </modified_values>
2687 2732 </data_def>
2688 2733 <data_def>
2689   - <column_id>1</column_id>
  2734 + <column_id>23</column_id>
2690 2735 <type>Format</type>
2691 2736 <repeat_num>1</repeat_num>
2692 2737 <template>nome%</template>
... ... @@ -2701,7 +2746,7 @@
2701 2746 </modified_values>
2702 2747 </data_def>
2703 2748 <data_def>
2704   - <column_id>2</column_id>
  2749 + <column_id>24</column_id>
2705 2750 <type>Format</type>
2706 2751 <repeat_num>1</repeat_num>
2707 2752 <template>descricao%</template>
... ... @@ -2719,48 +2764,52 @@
2719 2764 </repeat_test_data>
2720 2765 </table_test_data>
2721 2766 <table_test_data>
2722   - <table_id>4</table_id>
  2767 + <table_id>6</table_id>
2723 2768 <direct_test_data>
2724 2769 <data>
2725 2770 <column_data>
2726   - <column_id>3</column_id>
  2771 + <column_id>11</column_id>
2727 2772 <value>1</value>
2728 2773 </column_data>
2729 2774 <column_data>
2730   - <column_id>4</column_id>
  2775 + <column_id>12</column_id>
2731 2776 <value>Município</value>
2732 2777 </column_data>
2733 2778 <column_data>
2734   - <column_id>5</column_id>
  2779 + <column_id>13</column_id>
2735 2780 <value>Limites municipais</value>
2736 2781 </column_data>
2737 2782 <column_data>
2738   - <column_id>6</column_id>
  2783 + <column_id>14</column_id>
2739 2784 <value>1</value>
2740 2785 </column_data>
2741 2786 <column_data>
2742   - <column_id>7</column_id>
  2787 + <column_id>15</column_id>
2743 2788 <value>public</value>
2744 2789 </column_data>
2745 2790 <column_data>
2746   - <column_id>8</column_id>
2747   - <value></value>
  2791 + <column_id>16</column_id>
  2792 + <value>tb_ibge</value>
2748 2793 </column_data>
2749 2794 <column_data>
2750   - <column_id>9</column_id>
2751   - <value></value>
  2795 + <column_id>17</column_id>
  2796 + <value>the_geom</value>
2752 2797 </column_data>
2753 2798 <column_data>
2754   - <column_id>10</column_id>
  2799 + <column_id>18</column_id>
2755 2800 <value></value>
2756 2801 </column_data>
2757 2802 <column_data>
2758   - <column_id>11</column_id>
2759   - <value></value>
  2803 + <column_id>19</column_id>
  2804 + <value>ibge</value>
2760 2805 </column_data>
2761 2806 <column_data>
2762   - <column_id>12</column_id>
2763   - <value></value>
  2807 + <column_id>20</column_id>
  2808 + <value>no_cidade</value>
  2809 + </column_data>
  2810 + <column_data>
  2811 + <column_id>21</column_id>
  2812 + <value>4326</value>
2764 2813 </column_data>
2765 2814 </data>
2766 2815 </direct_test_data>
... ... @@ -2768,7 +2817,7 @@
2768 2817 <test_data_num>0</test_data_num>
2769 2818 <data_def_list>
2770 2819 <data_def>
2771   - <column_id>3</column_id>
  2820 + <column_id>11</column_id>
2772 2821 <type>Format</type>
2773 2822 <repeat_num>1</repeat_num>
2774 2823 <template>%</template>
... ... @@ -2783,7 +2832,7 @@
2783 2832 </modified_values>
2784 2833 </data_def>
2785 2834 <data_def>
2786   - <column_id>4</column_id>
  2835 + <column_id>12</column_id>
2787 2836 <type>Format</type>
2788 2837 <repeat_num>1</repeat_num>
2789 2838 <template>nome_tipo_regiao%</template>
... ... @@ -2798,7 +2847,7 @@
2798 2847 </modified_values>
2799 2848 </data_def>
2800 2849 <data_def>
2801   - <column_id>5</column_id>
  2850 + <column_id>13</column_id>
2802 2851 <type>Format</type>
2803 2852 <repeat_num>1</repeat_num>
2804 2853 <template>descricao_tipo_regiao%</template>
... ... @@ -2813,7 +2862,7 @@
2813 2862 </modified_values>
2814 2863 </data_def>
2815 2864 <data_def>
2816   - <column_id>6</column_id>
  2865 + <column_id>14</column_id>
2817 2866 <type>Foreign Key</type>
2818 2867 <repeat_num>1</repeat_num>
2819 2868 <template>%</template>
... ... @@ -2828,7 +2877,7 @@
2828 2877 </modified_values>
2829 2878 </data_def>
2830 2879 <data_def>
2831   - <column_id>7</column_id>
  2880 + <column_id>15</column_id>
2832 2881 <type>Format</type>
2833 2882 <repeat_num>1</repeat_num>
2834 2883 <template>esquemadb%</template>
... ... @@ -2843,7 +2892,7 @@
2843 2892 </modified_values>
2844 2893 </data_def>
2845 2894 <data_def>
2846   - <column_id>8</column_id>
  2895 + <column_id>16</column_id>
2847 2896 <type>Format</type>
2848 2897 <repeat_num>1</repeat_num>
2849 2898 <template>tabela%</template>
... ... @@ -2858,7 +2907,7 @@
2858 2907 </modified_values>
2859 2908 </data_def>
2860 2909 <data_def>
2861   - <column_id>9</column_id>
  2910 + <column_id>17</column_id>
2862 2911 <type>Format</type>
2863 2912 <repeat_num>1</repeat_num>
2864 2913 <template>colunageo%</template>
... ... @@ -2873,7 +2922,7 @@
2873 2922 </modified_values>
2874 2923 </data_def>
2875 2924 <data_def>
2876   - <column_id>10</column_id>
  2925 + <column_id>18</column_id>
2877 2926 <type>Format</type>
2878 2927 <repeat_num>1</repeat_num>
2879 2928 <template>data%</template>
... ... @@ -2888,7 +2937,7 @@
2888 2937 </modified_values>
2889 2938 </data_def>
2890 2939 <data_def>
2891   - <column_id>11</column_id>
  2940 + <column_id>19</column_id>
2892 2941 <type>Format</type>
2893 2942 <repeat_num>1</repeat_num>
2894 2943 <template>%</template>
... ... @@ -2903,7 +2952,7 @@
2903 2952 </modified_values>
2904 2953 </data_def>
2905 2954 <data_def>
2906   - <column_id>12</column_id>
  2955 + <column_id>20</column_id>
2907 2956 <type>Format</type>
2908 2957 <repeat_num>1</repeat_num>
2909 2958 <template>colunanomeregiao%</template>
... ... @@ -2917,31 +2966,46 @@
2917 2966 <modified_values>
2918 2967 </modified_values>
2919 2968 </data_def>
  2969 + <data_def>
  2970 + <column_id>21</column_id>
  2971 + <type>Format</type>
  2972 + <repeat_num>1</repeat_num>
  2973 + <template>srid%</template>
  2974 + <from>1</from>
  2975 + <to>100</to>
  2976 + <increment>1</increment>
  2977 + <select>srid1</select>
  2978 + <select>srid2</select>
  2979 + <select>srid3</select>
  2980 + <select>srid4</select>
  2981 + <modified_values>
  2982 + </modified_values>
  2983 + </data_def>
2920 2984 </data_def_list>
2921 2985 </repeat_test_data>
2922 2986 </table_test_data>
2923 2987 <table_test_data>
2924   - <table_id>8</table_id>
  2988 + <table_id>4</table_id>
2925 2989 <direct_test_data>
2926 2990 <data>
2927 2991 <column_data>
2928   - <column_id>22</column_id>
  2992 + <column_id>0</column_id>
2929 2993 <value>1</value>
2930 2994 </column_data>
2931 2995 <column_data>
2932   - <column_id>23</column_id>
  2996 + <column_id>1</column_id>
2933 2997 <value>Unidade</value>
2934 2998 </column_data>
2935 2999 <column_data>
2936   - <column_id>24</column_id>
  3000 + <column_id>2</column_id>
2937 3001 <value>Un</value>
2938 3002 </column_data>
2939 3003 <column_data>
2940   - <column_id>25</column_id>
  3004 + <column_id>3</column_id>
2941 3005 <value></value>
2942 3006 </column_data>
2943 3007 <column_data>
2944   - <column_id>26</column_id>
  3008 + <column_id>4</column_id>
2945 3009 <value></value>
2946 3010 </column_data>
2947 3011 </data>
... ... @@ -2950,7 +3014,7 @@
2950 3014 <test_data_num>0</test_data_num>
2951 3015 <data_def_list>
2952 3016 <data_def>
2953   - <column_id>22</column_id>
  3017 + <column_id>0</column_id>
2954 3018 <type>Format</type>
2955 3019 <repeat_num>1</repeat_num>
2956 3020 <template>%</template>
... ... @@ -2965,7 +3029,7 @@
2965 3029 </modified_values>
2966 3030 </data_def>
2967 3031 <data_def>
2968   - <column_id>23</column_id>
  3032 + <column_id>1</column_id>
2969 3033 <type>Format</type>
2970 3034 <repeat_num>1</repeat_num>
2971 3035 <template>nome%</template>
... ... @@ -2980,7 +3044,7 @@
2980 3044 </modified_values>
2981 3045 </data_def>
2982 3046 <data_def>
2983   - <column_id>24</column_id>
  3047 + <column_id>2</column_id>
2984 3048 <type>Format</type>
2985 3049 <repeat_num>1</repeat_num>
2986 3050 <template>sigla%</template>
... ... @@ -2995,7 +3059,7 @@
2995 3059 </modified_values>
2996 3060 </data_def>
2997 3061 <data_def>
2998   - <column_id>25</column_id>
  3062 + <column_id>3</column_id>
2999 3063 <type>Format</type>
3000 3064 <repeat_num>1</repeat_num>
3001 3065 <template>%</template>
... ... @@ -3010,7 +3074,7 @@
3010 3074 </modified_values>
3011 3075 </data_def>
3012 3076 <data_def>
3013   - <column_id>26</column_id>
  3077 + <column_id>4</column_id>
3014 3078 <type>Format</type>
3015 3079 <repeat_num>1</repeat_num>
3016 3080 <template>%</template>
... ... @@ -3028,55 +3092,55 @@
3028 3092 </repeat_test_data>
3029 3093 </table_test_data>
3030 3094 <table_test_data>
3031   - <table_id>9</table_id>
  3095 + <table_id>10</table_id>
3032 3096 <direct_test_data>
3033 3097 <data>
3034 3098 <column_data>
3035   - <column_id>27</column_id>
  3099 + <column_id>34</column_id>
3036 3100 <value>1</value>
3037 3101 </column_data>
3038 3102 <column_data>
3039   - <column_id>28</column_id>
  3103 + <column_id>35</column_id>
3040 3104 <value>1</value>
3041 3105 </column_data>
3042 3106 <column_data>
3043   - <column_id>29</column_id>
  3107 + <column_id>36</column_id>
3044 3108 <value>2</value>
3045 3109 </column_data>
3046 3110 <column_data>
3047   - <column_id>30</column_id>
  3111 + <column_id>37</column_id>
3048 3112 <value>1</value>
3049 3113 </column_data>
3050 3114 <column_data>
3051   - <column_id>31</column_id>
  3115 + <column_id>38</column_id>
3052 3116 <value>1</value>
3053 3117 </column_data>
3054 3118 <column_data>
3055   - <column_id>32</column_id>
  3119 + <column_id>39</column_id>
3056 3120 <value>1</value>
3057 3121 </column_data>
3058 3122 <column_data>
3059   - <column_id>33</column_id>
  3123 + <column_id>40</column_id>
3060 3124 <value>dbacoes_saude</value>
3061 3125 </column_data>
3062 3126 <column_data>
3063   - <column_id>34</column_id>
  3127 + <column_id>41</column_id>
3064 3128 <value>tb_farmacia_pop</value>
3065 3129 </column_data>
3066 3130 <column_data>
3067   - <column_id>35</column_id>
  3131 + <column_id>42</column_id>
3068 3132 <value>nu_farm_funcionando</value>
3069 3133 </column_data>
3070 3134 <column_data>
3071   - <column_id>36</column_id>
  3135 + <column_id>43</column_id>
3072 3136 <value>co_ibge</value>
3073 3137 </column_data>
3074 3138 <column_data>
3075   - <column_id>37</column_id>
  3139 + <column_id>44</column_id>
3076 3140 <value></value>
3077 3141 </column_data>
3078 3142 <column_data>
3079   - <column_id>38</column_id>
  3143 + <column_id>45</column_id>
3080 3144 <value>Número de farmácias em funcionamento por mês e ano</value>
3081 3145 </column_data>
3082 3146 </data>
... ... @@ -3085,7 +3149,7 @@
3085 3149 <test_data_num>0</test_data_num>
3086 3150 <data_def_list>
3087 3151 <data_def>
3088   - <column_id>27</column_id>
  3152 + <column_id>34</column_id>
3089 3153 <type>Format</type>
3090 3154 <repeat_num>1</repeat_num>
3091 3155 <template>%</template>
... ... @@ -3100,7 +3164,7 @@
3100 3164 </modified_values>
3101 3165 </data_def>
3102 3166 <data_def>
3103   - <column_id>28</column_id>
  3167 + <column_id>35</column_id>
3104 3168 <type>Foreign Key</type>
3105 3169 <repeat_num>1</repeat_num>
3106 3170 <template>%</template>
... ... @@ -3115,7 +3179,7 @@
3115 3179 </modified_values>
3116 3180 </data_def>
3117 3181 <data_def>
3118   - <column_id>29</column_id>
  3182 + <column_id>36</column_id>
3119 3183 <type>Foreign Key</type>
3120 3184 <repeat_num>1</repeat_num>
3121 3185 <template>%</template>
... ... @@ -3130,7 +3194,7 @@
3130 3194 </modified_values>
3131 3195 </data_def>
3132 3196 <data_def>
3133   - <column_id>30</column_id>
  3197 + <column_id>37</column_id>
3134 3198 <type>Foreign Key</type>
3135 3199 <repeat_num>1</repeat_num>
3136 3200 <template>%</template>
... ... @@ -3145,7 +3209,7 @@
3145 3209 </modified_values>
3146 3210 </data_def>
3147 3211 <data_def>
3148   - <column_id>31</column_id>
  3212 + <column_id>38</column_id>
3149 3213 <type>Foreign Key</type>
3150 3214 <repeat_num>1</repeat_num>
3151 3215 <template>%</template>
... ... @@ -3160,7 +3224,7 @@
3160 3224 </modified_values>
3161 3225 </data_def>
3162 3226 <data_def>
3163   - <column_id>32</column_id>
  3227 + <column_id>39</column_id>
3164 3228 <type>Foreign Key</type>
3165 3229 <repeat_num>1</repeat_num>
3166 3230 <template>%</template>
... ... @@ -3175,7 +3239,7 @@
3175 3239 </modified_values>
3176 3240 </data_def>
3177 3241 <data_def>
3178   - <column_id>33</column_id>
  3242 + <column_id>40</column_id>
3179 3243 <type>Format</type>
3180 3244 <repeat_num>1</repeat_num>
3181 3245 <template>esquemadb%</template>
... ... @@ -3190,7 +3254,7 @@
3190 3254 </modified_values>
3191 3255 </data_def>
3192 3256 <data_def>
3193   - <column_id>34</column_id>
  3257 + <column_id>41</column_id>
3194 3258 <type>Format</type>
3195 3259 <repeat_num>1</repeat_num>
3196 3260 <template>tabela%</template>
... ... @@ -3205,7 +3269,7 @@
3205 3269 </modified_values>
3206 3270 </data_def>
3207 3271 <data_def>
3208   - <column_id>35</column_id>
  3272 + <column_id>42</column_id>
3209 3273 <type>Format</type>
3210 3274 <repeat_num>1</repeat_num>
3211 3275 <template>colunavalor%</template>
... ... @@ -3220,7 +3284,7 @@
3220 3284 </modified_values>
3221 3285 </data_def>
3222 3286 <data_def>
3223   - <column_id>36</column_id>
  3287 + <column_id>43</column_id>
3224 3288 <type>Format</type>
3225 3289 <repeat_num>1</repeat_num>
3226 3290 <template>colunaidgeo_%</template>
... ... @@ -3235,7 +3299,7 @@
3235 3299 </modified_values>
3236 3300 </data_def>
3237 3301 <data_def>
3238   - <column_id>37</column_id>
  3302 + <column_id>44</column_id>
3239 3303 <type>Format</type>
3240 3304 <repeat_num>1</repeat_num>
3241 3305 <template>filtro%</template>
... ... @@ -3250,7 +3314,7 @@
3250 3314 </modified_values>
3251 3315 </data_def>
3252 3316 <data_def>
3253   - <column_id>38</column_id>
  3317 + <column_id>45</column_id>
3254 3318 <type>Format</type>
3255 3319 <repeat_num>1</repeat_num>
3256 3320 <template>nomemedida_%</template>
... ... @@ -3268,57 +3332,57 @@
3268 3332 </repeat_test_data>
3269 3333 </table_test_data>
3270 3334 <table_test_data>
3271   - <table_id>10</table_id>
  3335 + <table_id>5</table_id>
3272 3336 <direct_test_data>
3273 3337 <data>
3274 3338 <column_data>
3275   - <column_id>39</column_id>
  3339 + <column_id>5</column_id>
3276 3340 <value>1</value>
3277 3341 </column_data>
3278 3342 <column_data>
3279   - <column_id>40</column_id>
  3343 + <column_id>6</column_id>
3280 3344 <value>to_date(mes_farm_pop||&apos; &apos;||ano_farm,&apos;MM YYYY&apos;) as mes</value>
3281 3345 </column_data>
3282 3346 <column_data>
3283   - <column_id>41</column_id>
  3347 + <column_id>7</column_id>
3284 3348 <value>mês e ano</value>
3285 3349 </column_data>
3286 3350 <column_data>
3287   - <column_id>42</column_id>
  3351 + <column_id>8</column_id>
3288 3352 <value></value>
3289 3353 </column_data>
3290 3354 <column_data>
3291   - <column_id>43</column_id>
  3355 + <column_id>9</column_id>
3292 3356 <value>0</value>
3293 3357 </column_data>
3294 3358 <column_data>
3295   - <column_id>44</column_id>
  3359 + <column_id>10</column_id>
3296 3360 <value>1</value>
3297 3361 </column_data>
3298 3362 </data>
3299 3363 <data>
3300 3364 <column_data>
3301   - <column_id>39</column_id>
  3365 + <column_id>5</column_id>
3302 3366 <value>2</value>
3303 3367 </column_data>
3304 3368 <column_data>
3305   - <column_id>40</column_id>
  3369 + <column_id>6</column_id>
3306 3370 <value>ano_farm</value>
3307 3371 </column_data>
3308 3372 <column_data>
3309   - <column_id>41</column_id>
  3373 + <column_id>7</column_id>
3310 3374 <value>ano</value>
3311 3375 </column_data>
3312 3376 <column_data>
3313   - <column_id>42</column_id>
  3377 + <column_id>8</column_id>
3314 3378 <value></value>
3315 3379 </column_data>
3316 3380 <column_data>
3317   - <column_id>43</column_id>
  3381 + <column_id>9</column_id>
3318 3382 <value>1</value>
3319 3383 </column_data>
3320 3384 <column_data>
3321   - <column_id>44</column_id>
  3385 + <column_id>10</column_id>
3322 3386 <value>1</value>
3323 3387 </column_data>
3324 3388 </data>
... ... @@ -3327,7 +3391,7 @@
3327 3391 <test_data_num>0</test_data_num>
3328 3392 <data_def_list>
3329 3393 <data_def>
3330   - <column_id>39</column_id>
  3394 + <column_id>5</column_id>
3331 3395 <type>Format</type>
3332 3396 <repeat_num>1</repeat_num>
3333 3397 <template>%</template>
... ... @@ -3342,7 +3406,7 @@
3342 3406 </modified_values>
3343 3407 </data_def>
3344 3408 <data_def>
3345   - <column_id>40</column_id>
  3409 + <column_id>6</column_id>
3346 3410 <type>Format</type>
3347 3411 <repeat_num>1</repeat_num>
3348 3412 <template>coluna%</template>
... ... @@ -3357,7 +3421,7 @@
3357 3421 </modified_values>
3358 3422 </data_def>
3359 3423 <data_def>
3360   - <column_id>41</column_id>
  3424 + <column_id>7</column_id>
3361 3425 <type>Format</type>
3362 3426 <repeat_num>1</repeat_num>
3363 3427 <template>nomedimensao%</template>
... ... @@ -3372,7 +3436,7 @@
3372 3436 </modified_values>
3373 3437 </data_def>
3374 3438 <data_def>
3375   - <column_id>42</column_id>
  3439 + <column_id>8</column_id>
3376 3440 <type>Format</type>
3377 3441 <repeat_num>1</repeat_num>
3378 3442 <template>descricao%</template>
... ... @@ -3387,7 +3451,7 @@
3387 3451 </modified_values>
3388 3452 </data_def>
3389 3453 <data_def>
3390   - <column_id>43</column_id>
  3454 + <column_id>9</column_id>
3391 3455 <type>Format</type>
3392 3456 <repeat_num>1</repeat_num>
3393 3457 <template>%</template>
... ... @@ -3402,7 +3466,7 @@
3402 3466 </modified_values>
3403 3467 </data_def>
3404 3468 <data_def>
3405   - <column_id>44</column_id>
  3469 + <column_id>10</column_id>
3406 3470 <type>Foreign Key</type>
3407 3471 <repeat_num>1</repeat_num>
3408 3472 <template>%</template>
... ... @@ -3420,19 +3484,19 @@
3420 3484 </repeat_test_data>
3421 3485 </table_test_data>
3422 3486 <table_test_data>
3423   - <table_id>6</table_id>
  3487 + <table_id>9</table_id>
3424 3488 <direct_test_data>
3425 3489 <data>
3426 3490 <column_data>
3427   - <column_id>19</column_id>
  3491 + <column_id>31</column_id>
3428 3492 <value>1</value>
3429 3493 </column_data>
3430 3494 <column_data>
3431   - <column_id>20</column_id>
  3495 + <column_id>32</column_id>
3432 3496 <value>Farmácias populares existentes</value>
3433 3497 </column_data>
3434 3498 <column_data>
3435   - <column_id>21</column_id>
  3499 + <column_id>33</column_id>
3436 3500 <value>Quantidade de farmácias populares existentes</value>
3437 3501 </column_data>
3438 3502 </data>
... ... @@ -3441,7 +3505,7 @@
3441 3505 <test_data_num>0</test_data_num>
3442 3506 <data_def_list>
3443 3507 <data_def>
3444   - <column_id>19</column_id>
  3508 + <column_id>31</column_id>
3445 3509 <type>Format</type>
3446 3510 <repeat_num>1</repeat_num>
3447 3511 <template>%</template>
... ... @@ -3456,7 +3520,7 @@
3456 3520 </modified_values>
3457 3521 </data_def>
3458 3522 <data_def>
3459   - <column_id>20</column_id>
  3523 + <column_id>32</column_id>
3460 3524 <type>Format</type>
3461 3525 <repeat_num>1</repeat_num>
3462 3526 <template>nome%</template>
... ... @@ -3471,7 +3535,7 @@
3471 3535 </modified_values>
3472 3536 </data_def>
3473 3537 <data_def>
3474   - <column_id>21</column_id>
  3538 + <column_id>33</column_id>
3475 3539 <type>Format</type>
3476 3540 <repeat_num>1</repeat_num>
3477 3541 <template>descricao%</template>
... ...
ferramentas/3d/index.js
... ... @@ -41,7 +41,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
41 41 */
42 42  
43 43 if(typeof(i3GEOF) === 'undefined'){
44   - i3GEOF = [];
  44 + var i3GEOF = {};
45 45 }
46 46 /*
47 47 Classe: i3GEOF.t3d
... ...
ferramentas/agrupaelementos/index.js
... ... @@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
37 37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
38 38 */
39 39 if(typeof(i3GEOF) === 'undefined'){
40   - i3GEOF = [];
  40 + var i3GEOF = {};
41 41 }
42 42 /*
43 43 Classe: i3GEOF.agrupaElementos
... ...
ferramentas/analisageometrias/index.js
... ... @@ -40,7 +40,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
40 40 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
41 41 */
42 42 if(typeof(i3GEOF) === 'undefined'){
43   - i3GEOF = [];
  43 + var i3GEOF = {};
44 44 }
45 45 /*
46 46 Classe: i3GEOF.analisaGeometrias
... ...
ferramentas/animacao/index.js
... ... @@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
37 37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
38 38 */
39 39 if(typeof(i3GEOF) === 'undefined'){
40   - i3GEOF = [];
  40 + var i3GEOF = {};
41 41 }
42 42 /*
43 43 Classe: i3GEOF.animacao
... ...
ferramentas/aplicarsld/index.js
... ... @@ -38,7 +38,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
38 38  
39 39  
40 40 if(typeof(i3GEOF) === 'undefined'){
41   - i3GEOF = [];
  41 + var i3GEOF = {};
42 42 }
43 43 /*
44 44 Classe: i3GEOF.aplicarsld
... ...
ferramentas/buffer/index.js
... ... @@ -39,7 +39,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
39 39 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
40 40 */
41 41 if(typeof(i3GEOF) === 'undefined'){
42   - i3GEOF = [];
  42 + var i3GEOF = {};
43 43 }
44 44 /*
45 45 Class: i3GEOF.buffer
... ...
ferramentas/bufferpt/index.js
... ... @@ -30,7 +30,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
30 30 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
31 31 */
32 32 if(typeof(i3GEOF) === 'undefined'){
33   - i3GEOF = [];
  33 + var i3GEOF = {};
34 34 }
35 35 /*
36 36 Classe: i3GEOF.bufferpt
... ...
ferramentas/busca/index.js
... ... @@ -34,7 +34,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
34 34 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
35 35 */
36 36 if(typeof(i3GEOF) === 'undefined'){
37   - i3GEOF = [];
  37 + var i3GEOF = {};
38 38 }
39 39 /*
40 40 Class: i3GEOF.busca
... ...
ferramentas/buscafotos/index.js
... ... @@ -38,7 +38,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
38 38 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
39 39 */
40 40 if(typeof(i3GEOF) === 'undefined'){
41   - i3GEOF = [];
  41 + var i3GEOF = {};
42 42 }
43 43 /*
44 44 Class: i3GEOF.buscaFotos
... ...
ferramentas/buscainde/index.js
... ... @@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
37 37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
38 38 */
39 39 if(typeof(i3GEOF) === 'undefined'){
40   - i3GEOF = [];
  40 + var i3GEOF = {};
41 41 }
42 42 /*
43 43 Classe: i3GEOF.buscainde
... ...
ferramentas/carouseltemas/index.js
... ... @@ -39,7 +39,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
39 39 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
40 40 */
41 41 if(typeof(i3GEOF) === 'undefined'){
42   - i3GEOF = [];
  42 + var i3GEOF = {};
43 43 }
44 44 /*
45 45 Class: i3GEOF.carouseltemas
... ...
ferramentas/carregakml/index.js
... ... @@ -36,7 +36,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
36 36 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
37 37 */
38 38 if(typeof(i3GEOF) === 'undefined'){
39   - i3GEOF = [];
  39 + var i3GEOF = {};
40 40 }
41 41  
42 42 /*
... ...
ferramentas/carregamapa/index.js
... ... @@ -35,7 +35,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
35 35 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
36 36 */
37 37 if(typeof(i3GEOF) === 'undefined'){
38   - i3GEOF = [];
  38 + var i3GEOF = {};
39 39 }
40 40 /*
41 41 Classe: i3GEOF.carregaMapa
... ...
ferramentas/centroide/index.js
... ... @@ -36,7 +36,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
36 36 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
37 37 */
38 38 if(typeof(i3GEOF) === 'undefined'){
39   - i3GEOF = [];
  39 + var i3GEOF = {};
40 40 }
41 41 /*
42 42 Class: i3GEOF.centroide
... ...
ferramentas/centromassa/index.js
... ... @@ -36,7 +36,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
36 36 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
37 37 */
38 38 if(typeof(i3GEOF) === 'undefined'){
39   - i3GEOF = [];
  39 + var i3GEOF = {};
40 40 }
41 41 /*
42 42 Classe: i3GEOF.centromassa
... ...
ferramentas/conectargeojson/index.js
... ... @@ -36,7 +36,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
36 36 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
37 37 */
38 38 if(typeof(i3GEOF) === 'undefined'){
39   - i3GEOF = [];
  39 + var i3GEOF = {};
40 40 }
41 41  
42 42 /*
... ...
ferramentas/confluence/index.js
... ... @@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
37 37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
38 38 */
39 39 if(typeof(i3GEOF) === 'undefined'){
40   - i3GEOF = [];
  40 + var i3GEOF = {};
41 41 }
42 42 /*
43 43 Classe: i3GEOF.confluence
... ...
ferramentas/convertekml/index.js
... ... @@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
37 37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
38 38 */
39 39 if(typeof(i3GEOF) === 'undefined'){
40   - i3GEOF = [];
  40 + var i3GEOF = {};
41 41 }
42 42 /*
43 43 Classe: i3GEOF.converteKml
... ...
ferramentas/convertemapakml/index.js
... ... @@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
37 37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
38 38 */
39 39 if(typeof(i3GEOF) === 'undefined'){
40   - i3GEOF = [];
  40 + var i3GEOF = {};
41 41 }
42 42 /*
43 43 Classe: i3GEOF.converteMapaKml
... ...
ferramentas/convertews/index.js
... ... @@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
37 37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
38 38 */
39 39 if(typeof(i3GEOF) === 'undefined'){
40   - i3GEOF = [];
  40 + var i3GEOF = {};
41 41 }
42 42 /*
43 43 Classe: i3GEOF.converteMapaWS
... ...
ferramentas/cortina/index.js
... ... @@ -39,7 +39,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
39 39 */
40 40  
41 41 if(typeof(i3GEOF) === 'undefined'){
42   - i3GEOF = [];
  42 + var i3GEOF = {};
43 43 }
44 44 /*
45 45 Classe: i3GEOF.cortina
... ...
ferramentas/dissolve/index.js
... ... @@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
37 37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
38 38 */
39 39 if(typeof(i3GEOF) === 'undefined'){
40   - i3GEOF = [];
  40 + var i3GEOF = {};
41 41 }
42 42 /*
43 43 Classe: i3GEOF.dissolve
... ...
ferramentas/distanciaptpt/index.js
... ... @@ -38,7 +38,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
38 38 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
39 39 */
40 40 if(typeof(i3GEOF) === 'undefined'){
41   - i3GEOF = [];
  41 + var i3GEOF = {};
42 42 }
43 43 /*
44 44 Classe: i3GEOF.distanciaptpt
... ...
ferramentas/download/index.js
... ... @@ -36,7 +36,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
36 36 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
37 37 */
38 38 if(typeof(i3GEOF) === 'undefined'){
39   - i3GEOF = [];
  39 + var i3GEOF = {};
40 40 }
41 41 /*
42 42 Classe: i3GEOF.download
... ...
ferramentas/editorsql/index.js
... ... @@ -39,7 +39,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
39 39 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
40 40 */
41 41 if(typeof(i3GEOF) === 'undefined'){
42   - i3GEOF = [];
  42 + var i3GEOF = {};
43 43 }
44 44 /*
45 45 Classe: i3GEOF.editorsql
... ...
ferramentas/etiqueta/index.js
... ... @@ -35,7 +35,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
35 35 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
36 36 */
37 37 if(typeof(i3GEOF) === 'undefined'){
38   - i3GEOF = [];
  38 + var i3GEOF = {};
39 39 }
40 40  
41 41 /*
... ...
ferramentas/excluirarvore/index.js
... ... @@ -34,7 +34,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
34 34 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
35 35 */
36 36 if(typeof(i3GEOF) === 'undefined'){
37   - i3GEOF = [];
  37 + var i3GEOF = {};
38 38 }
39 39 /*
40 40 Classe: i3GEOF.excluirarvore
... ...
ferramentas/filtro/index.js
... ... @@ -39,7 +39,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
39 39 */
40 40  
41 41 if(typeof(i3GEOF) === 'undefined'){
42   - i3GEOF = [];
  42 + var i3GEOF = {};
43 43 }
44 44  
45 45 /*
... ...
ferramentas/filtroarvore/index.js
... ... @@ -34,7 +34,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
34 34 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
35 35 */
36 36 if(typeof(i3GEOF) === 'undefined'){
37   - i3GEOF = [];
  37 + var i3GEOF = {};
38 38 }
39 39 /*
40 40 Classe: i3GEOF.filtroarvore
... ...
ferramentas/gradecoord/index.js
... ... @@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
37 37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
38 38 */
39 39 if(typeof(i3GEOF) === 'undefined'){
40   - i3GEOF = [];
  40 + var i3GEOF = {};
41 41 }
42 42 /*
43 43 Classe: i3GEOF.gradeCoord
... ...
ferramentas/gradehex/index.js
... ... @@ -38,7 +38,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
38 38 */
39 39  
40 40 if(typeof(i3GEOF) === 'undefined'){
41   - i3GEOF = [];
  41 + var i3GEOF = {};
42 42 }
43 43 /*
44 44 Classe: i3GEOF.gradeDeHex
... ...
ferramentas/gradepol/index.js
... ... @@ -38,7 +38,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
38 38 */
39 39  
40 40 if(typeof(i3GEOF) === 'undefined'){
41   - i3GEOF = [];
  41 + var i3GEOF = {};
42 42 }
43 43 /*
44 44 Classe: i3GEOF.gradeDePoligonos
... ...
ferramentas/gradepontos/index.js
... ... @@ -38,7 +38,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
38 38 */
39 39  
40 40 if(typeof(i3GEOF) === 'undefined'){
41   - i3GEOF = [];
  41 + var i3GEOF = {};
42 42 }
43 43 /*
44 44 Classe: i3GEOF.gradeDePontos
... ...
ferramentas/graficointerativo/index.js
... ... @@ -39,9 +39,8 @@ GNU junto com este programa; se não, escreva para a
39 39 Free Software Foundation, Inc., no endere&ccedil;o
40 40 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
41 41 */
42   -
43 42 if(typeof(i3GEOF) === 'undefined'){
44   - i3GEOF = [];
  43 + var i3GEOF = {};
45 44 }
46 45 /*
47 46 Classe: i3GEOF.graficointerativo
... ... @@ -55,6 +54,15 @@ i3GEOF.graficointerativo = {
55 54 */
56 55 aguarde: "",
57 56 /*
  57 + Propriedade: dados
  58 +
  59 + Dados que serao utilizados. Pode ser passado como parametro.
  60 +
  61 + Default:
  62 + {false}
  63 + */
  64 + dados:false,
  65 + /*
58 66 Propriedade: titulo
59 67  
60 68 T&iacute;tulo do gr&aacute;fico. Se for vazio, ser&aacute; obtido do nome do tema selecionado
... ... @@ -119,7 +127,10 @@ i3GEOF.graficointerativo = {
119 127 Para efeitos de compatibilidade antes da vers&atilde;o 4.7 que não tinha dicion&aacute;rio
120 128 */
121 129 criaJanelaFlutuante: function(dados){
122   - i3GEOF.graficointerativo.iniciaDicionario(dados);
  130 + if(dados){
  131 + i3GEOF.graficointerativo.dados = dados;
  132 + }
  133 + i3GEOF.graficointerativo.iniciaDicionario();
123 134 },
124 135 /*
125 136 Function: iniciaDicionario
... ... @@ -129,10 +140,13 @@ i3GEOF.graficointerativo = {
129 140 O Javascript &eacute; carregado com o id i3GEOF.nomedaferramenta.dicionario_script
130 141 */
131 142 iniciaDicionario: function(dados){
  143 + if(dados){
  144 + i3GEOF.graficointerativo.dados = dados;
  145 + }
132 146 if(typeof(i3GEOF.graficointerativo.dicionario) === 'undefined'){
133 147 i3GEO.util.scriptTag(
134 148 i3GEO.configura.locaplic+"/ferramentas/graficointerativo/dicionario.js",
135   - "i3GEOF.graficointerativo.iniciaJanelaFlutuante('"+dados+"')",
  149 + "i3GEOF.graficointerativo.iniciaJanelaFlutuante()",
136 150 "i3GEOF.graficointerativo.dicionario_script"
137 151 );
138 152 }
... ... @@ -151,7 +165,7 @@ i3GEOF.graficointerativo = {
151 165  
152 166 dados {JSON} - dados para o gr&aacute;fico (opcional) exemplo ["n;x","'Argentina';33796870","'Paraguay';4773464","'Brazil';151525400","'Chile';13772710"]
153 167 */
154   - inicia: function(iddiv,dados){
  168 + inicia: function(iddiv){
155 169 //try{
156 170 $i(iddiv).innerHTML += i3GEOF.graficointerativo.html();
157 171 $i("i3GEOgraficointerativoAcumula").checked = i3GEOF.graficointerativo.acumula;
... ... @@ -159,7 +173,6 @@ i3GEOF.graficointerativo = {
159 173 $i("i3GEOgraficointerativoDadosPuros").checked = i3GEOF.graficointerativo.dadospuros;
160 174 if(i3GEOF.graficointerativo.navegacao === true)
161 175 {i3GEOF.graficointerativo.ativaNavegacao(true);}
162   - i3GEO.guias.mostraGuiaFerramenta("i3GEOgraficointerativoguia1","i3GEOgraficointerativoguia");
163 176 //eventos das guias
164 177 $i("i3GEOgraficointerativoguia1").onclick = function(){
165 178 i3GEO.guias.mostraGuiaFerramenta("i3GEOgraficointerativoguia1","i3GEOgraficointerativoguia");
... ... @@ -207,12 +220,13 @@ i3GEOF.graficointerativo = {
207 220 "i3GEOgraficointerativobotao1",
208 221 {onclick:{fn: i3GEOF.graficointerativo.obterDados}}
209 222 );
210   - if(arguments.length === 2){
  223 + if(i3GEOF.graficointerativo.dados && i3GEOF.graficointerativo.dados != "undefined"){
211 224 //i3GEOF.graficointerativo.tipo = "pizza2d";
212 225 //var retorno = {"attributes":{"id":""},"data":{"dados":["n;x","'4';3839572","'8';81710320","'7';24631314","'2';10967753","'1';24496400","'3';18752482","'5';13574480","'6';216507515"]}};
213   - i3GEOF.graficointerativo.montaTabelaDados(dados);
  226 + i3GEOF.graficointerativo.montaTabelaDados(i3GEOF.graficointerativo.dados);
214 227 $i("i3GEOgraficointerativoguia4").onclick.call();
215 228 }
  229 + i3GEO.guias.mostraGuiaFerramenta("i3GEOgraficointerativoguia1","i3GEOgraficointerativoguia");
216 230 //}
217 231 //catch(erro){alert(erro);}
218 232 },
... ... @@ -312,6 +326,9 @@ i3GEOF.graficointerativo = {
312 326 dados {JSON} - dados para o gr&aacute;fico
313 327 */
314 328 iniciaJanelaFlutuante: function(dados){
  329 + if(dados){
  330 + i3GEOF.graficointerativo.dados = dados;
  331 + }
315 332 var minimiza,cabecalho,janela,divid,temp,titulo;
316 333 //cria a janela flutuante
317 334 cabecalho = function(){
... ... @@ -320,10 +337,10 @@ i3GEOF.graficointerativo = {
320 337 minimiza = function(){
321 338 i3GEO.janela.minimiza("i3GEOF.graficointerativo");
322 339 };
323   - titulo = "Gr&aacute;ficos interativos <a class=ajuda_usuario target=_blank href='" + i3GEO.configura.locaplic + "/ajuda_usuario.php?idcategoria=3&idajuda=84' >&nbsp;&nbsp;&nbsp;</a>";
  340 + titulo = "&nbsp;&nbsp;&nbsp;Gr&aacute;ficos interativos <a class=ajuda_usuario target=_blank href='" + i3GEO.configura.locaplic + "/ajuda_usuario.php?idcategoria=3&idajuda=84' >&nbsp;&nbsp;&nbsp;</a>";
324 341 janela = i3GEO.janela.cria(
325 342 "380px",
326   - "280px",
  343 + "300px",
327 344 "",
328 345 "",
329 346 "",
... ... @@ -337,27 +354,27 @@ i3GEOF.graficointerativo = {
337 354 divid = janela[2].id;
338 355 i3GEOF.graficointerativo.aguarde = $i("i3GEOF.graficointerativo_imagemCabecalho").style;
339 356 $i("i3GEOF.graficointerativo_corpo").style.backgroundColor = "white";
340   - if(arguments.length === 0)
341   - {i3GEOF.graficointerativo.inicia(divid);}
342   - else
343   - {i3GEOF.graficointerativo.inicia(divid,dados);}
344   - temp = function(){
345   - if(i3GEO.Interface.ATUAL !== "googlemaps" && i3GEO.Interface.ATUAL !== "googleearth"){
346   - i3GEO.eventos.NAVEGAMAPA.remove("i3GEOF.graficointerativo.obterDados()");
347   - }
348   - if(i3GEO.Interface.ATUAL == "googlemaps"){
349   - google.maps.event.removeListener(graficointerativoDragend);
350   - google.maps.event.removeListener(graficointerativoZoomend);
351   - }
352   - if(i3GEO.Interface.ATUAL === "googleearth"){
353   - google.earth.removeEventListener(graficointerativoDragend);
354   - }
355   - if(i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search("i3GEOF.graficointerativo.comboTemas()") > 0)
356   - {i3GEO.eventos.ATUALIZAARVORECAMADAS.remove("i3GEOF.graficointerativo.comboTemas()");}
357   - };
358   - YAHOO.util.Event.addListener(janela[0].close, "click", temp);
359   - if(i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search("i3GEOF.graficointerativo.comboTemas()") < 0)
360   - {i3GEO.eventos.ATUALIZAARVORECAMADAS.push("i3GEOF.graficointerativo.comboTemas()");}
  357 + $i("i3GEOF.graficointerativo_corpo").style.overflow = "auto";
  358 + i3GEOF.graficointerativo.inicia(divid);
  359 + if(i3GEO.Interface){
  360 + temp = function(){
  361 + if(i3GEO.Interface.ATUAL !== "googlemaps" && i3GEO.Interface.ATUAL !== "googleearth"){
  362 + i3GEO.eventos.NAVEGAMAPA.remove("i3GEOF.graficointerativo.obterDados()");
  363 + }
  364 + if(i3GEO.Interface.ATUAL == "googlemaps"){
  365 + google.maps.event.removeListener(graficointerativoDragend);
  366 + google.maps.event.removeListener(graficointerativoZoomend);
  367 + }
  368 + if(i3GEO.Interface.ATUAL === "googleearth"){
  369 + google.earth.removeEventListener(graficointerativoDragend);
  370 + }
  371 + if(i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search("i3GEOF.graficointerativo.comboTemas()") > 0)
  372 + {i3GEO.eventos.ATUALIZAARVORECAMADAS.remove("i3GEOF.graficointerativo.comboTemas()");}
  373 + };
  374 + YAHOO.util.Event.addListener(janela[0].close, "click", temp);
  375 + if(i3GEO.eventos.ATUALIZAARVORECAMADAS.toString().search("i3GEOF.graficointerativo.comboTemas()") < 0)
  376 + {i3GEO.eventos.ATUALIZAARVORECAMADAS.push("i3GEOF.graficointerativo.comboTemas()");}
  377 + }
361 378 },
362 379 /*
363 380 Function: ativaFoco
... ... @@ -365,7 +382,9 @@ i3GEOF.graficointerativo = {
365 382 Refaz a interface da ferramenta quando a janela flutuante tem seu foco ativado
366 383 */
367 384 ativaFoco: function(){
368   - i3GEO.barraDeBotoes.ativaIcone("graficointerativo");
  385 + if(i3GEO.Interface){
  386 + i3GEO.barraDeBotoes.ativaIcone("graficointerativo");
  387 + }
369 388 var i = $i("i3GEOF.graficointerativo_c").style;
370 389 i3GEO.janela.ULTIMOZINDEX++;
371 390 i.zIndex = i3GEO.janela.ULTIMOZINDEX;
... ... @@ -376,6 +395,7 @@ i3GEOF.graficointerativo = {
376 395 Monta o combo para escolha do tema que ser&aacute; utilizado no gr&aacute;fico
377 396 */
378 397 comboTemas: function(){
  398 + if(!i3GEO.Interface){return;}
379 399 i3GEO.util.comboTemas(
380 400 "i3GEOgraficointerativoComboTemasId",
381 401 function(retorno){
... ... @@ -405,7 +425,7 @@ i3GEOF.graficointerativo = {
405 425 */
406 426 ativaTipo: function(obj){
407 427 i3GEOF.graficointerativo.tipo = obj.value;
408   - if($i("i3GEOgraficointerativoGrafico").innerHTML === "")
  428 + if($i("i3GEOgraficointerativoGrafico").innerHTML === "" || $i("i3GEOgraficointerativotabeladados").innerHTML == "")
409 429 {$i("i3GEOgraficointerativoguia2").onclick.call();}
410 430 else
411 431 {$i("i3GEOgraficointerativoguia4").onclick.call();}
... ... @@ -416,8 +436,7 @@ i3GEOF.graficointerativo = {
416 436 Configura o formul&aacute;rio para obten&ccedil;ão dos dados para cada tipo de gr&aacute;fico
417 437 */
418 438 configuraDados: function(){
419   - var radios = $i("i3GEOgraficointerativoguia1obj").getElementsByTagName("input"),
420   - ativa = function(comboxlinha,comboylinha,ajudapizza){
  439 + var ativa = function(comboxlinha,comboylinha,ajudapizza){
421 440 try{
422 441 $i("i3GEOgraficointerativoComboXlinha").style.display = comboxlinha;
423 442 $i("i3GEOgraficointerativoComboYlinha").style.display = comboylinha;
... ... @@ -472,6 +491,9 @@ i3GEOF.graficointerativo = {
472 491 <GRAFICOSELECAO>
473 492 */
474 493 obterDados: function(){
  494 + if(!i3GEO.Interface){
  495 + return;
  496 + }
475 497 if(i3GEOF.graficointerativo.aguarde.visibility === "visible")
476 498 {return;}
477 499 var tema = $i("i3GEOgraficointerativoComboTemasId").value,
... ... @@ -581,8 +603,8 @@ i3GEOF.graficointerativo = {
581 603 acum,
582 604 nomes = [],
583 605 cores = [],
584   - indice = $i("i3GEOgraficointerativoComboTemasId").options.selectedIndex,
585   - titulo = $i("i3GEOgraficointerativoComboTemasId").options[indice].text,
  606 + indice = "",
  607 + titulo = "",
586 608 par = [],
587 609 parcor = [],
588 610 soma = 0,
... ... @@ -606,6 +628,10 @@ i3GEOF.graficointerativo = {
606 628 legendaY = "",
607 629 fill = "#C4B86A",
608 630 pointSize = 4;
  631 + if($i("i3GEOgraficointerativoComboTemasId")){
  632 + indice = $i("i3GEOgraficointerativoComboTemasId").options.selectedIndex;
  633 + titulo = $i("i3GEOgraficointerativoComboTemasId").options[indice].text;
  634 + }
609 635 if(i3GEOF.graficointerativo.titulo != "")
610 636 {titulo = i3GEOF.graficointerativo.titulo;}
611 637 if($i("i3GEOgraficointerativoComboXid"))
... ... @@ -650,8 +676,8 @@ i3GEOF.graficointerativo = {
650 676 }
651 677 if(legendaX == legendaY){
652 678 menor = 0;
653   - legendaX += " (ocorr&ecirc;ncias)";
654   - legendaY += " (n. de ocorr&ecirc;ncias)";
  679 + legendaX += " (casos)";
  680 + legendaY += " (n. de casos)";
655 681 }
656 682 if($i("i3GEOgraficointerativoRelativa").checked){
657 683 n = valores.length;
... ... @@ -897,6 +923,9 @@ i3GEOF.graficointerativo = {
897 923 Ativa ou desativa a atualiza&ccedil;ão autom&aacute;tica ao navegar no mapa
898 924 */
899 925 ativaNavegacao: function(obj){
  926 + if(!i3GEO.Interface){
  927 + return;
  928 + }
900 929 if(obj === true){
901 930 if(i3GEO.Interface.ATUAL !== "googlemaps" && i3GEO.Interface.ATUAL !== "googleearth"){
902 931 i3GEO.eventos.NAVEGAMAPA.push("i3GEOF.graficointerativo.obterDados()");
... ...
ferramentas/graficotema/index.js
... ... @@ -35,7 +35,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
35 35 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
36 36 */
37 37 if(typeof(i3GEOF) === 'undefined'){
38   - i3GEOF = [];
  38 + var i3GEOF = {};
39 39 }
40 40  
41 41 /*
... ...
ferramentas/identifica/index.js
... ... @@ -33,7 +33,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
33 33 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
34 34 */
35 35 if(typeof(i3GEOF) === 'undefined'){
36   - i3GEOF = [];
  36 + var i3GEOF = {};
37 37 }
38 38 /*
39 39 Classe: i3GEOF.identifica
... ...
ferramentas/importarwmc/index.js
... ... @@ -38,7 +38,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
38 38  
39 39  
40 40 if(typeof(i3GEOF) === 'undefined'){
41   - i3GEOF = [];
  41 + var i3GEOF = {};
42 42 }
43 43 /*
44 44 Classe: i3GEOF.importarwmc
... ...
ferramentas/imprimir/index.js
... ... @@ -26,7 +26,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
26 26 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
27 27 */
28 28 if(typeof(i3GEOF) === 'undefined'){
29   - i3GEOF = [];
  29 + var i3GEOF = {};
30 30 }
31 31 /*
32 32 Classe: i3GEOF.imprimir
... ...
ferramentas/inseregrafico/index.js
... ... @@ -34,7 +34,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
34 34 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
35 35 */
36 36 if(typeof(i3GEOF) === 'undefined'){
37   - i3GEOF = [];
  37 + var i3GEOF = {};
38 38 }
39 39 /*
40 40 Classe: i3GEOF.insereGrafico
... ...
ferramentas/inseretxt/index.js
... ... @@ -36,7 +36,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
36 36 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
37 37 */
38 38 if(typeof(i3GEOF) === 'undefined'){
39   - i3GEOF = [];
  39 + var i3GEOF = {};
40 40 }
41 41  
42 42 /*
... ...
ferramentas/inserexy2/index.js
... ... @@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
37 37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
38 38 */
39 39 if(typeof(i3GEOF) === 'undefined'){
40   - i3GEOF = [];
  40 + var i3GEOF = {};
41 41 }
42 42  
43 43 /*
... ...
ferramentas/legenda/index.js
... ... @@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
37 37 */
38 38  
39 39 if(typeof(i3GEOF) === 'undefined'){
40   - i3GEOF = [];
  40 + var i3GEOF = {};
41 41 }
42 42  
43 43 /*
... ...
ferramentas/loginusuario/index.js
... ... @@ -31,7 +31,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
31 31 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
32 32 */
33 33 if(typeof(i3GEOF) === 'undefined'){
34   - i3GEOF = [];
  34 + var i3GEOF = {};
35 35 }
36 36 /*
37 37 Classe: i3GEOF.loginusuario
... ...
ferramentas/metar/index.js
... ... @@ -41,7 +41,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
41 41 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
42 42 */
43 43 if(typeof(i3GEOF) === 'undefined'){
44   - i3GEOF = [];
  44 + var i3GEOF = {};
45 45 }
46 46 /*
47 47 Classe: i3GEOF.metar
... ...
ferramentas/mostraexten/index.js
... ... @@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
37 37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
38 38 */
39 39 if(typeof(i3GEOF) === 'undefined'){
40   - i3GEOF = [];
  40 + var i3GEOF = {};
41 41 }
42 42 /*
43 43 Classe: i3GEOF.mostraExten
... ...
ferramentas/nptpol/index.js
... ... @@ -36,7 +36,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
36 36 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
37 37 */
38 38 if(typeof(i3GEOF) === 'undefined'){
39   - i3GEOF = [];
  39 + var i3GEOF = {};
40 40 }
41 41 /*
42 42 Classe: i3GEOF.nptpol
... ...
ferramentas/nuvemtags/index.js
... ... @@ -41,7 +41,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
41 41 */
42 42  
43 43 if(typeof(i3GEOF) === 'undefined'){
44   - i3GEOF = [];
  44 + var i3GEOF = {};
45 45 }
46 46 /*
47 47 Classe: i3GEOF.nuvemtags
... ...
ferramentas/opacidademapa/index.js
... ... @@ -40,7 +40,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
40 40 */
41 41  
42 42 if(typeof(i3GEOF) === 'undefined'){
43   - i3GEOF = [];
  43 + var i3GEOF = {};
44 44 }
45 45 /*
46 46 Classe: i3GEOF.opacidademapa
... ...
ferramentas/opcoes_autoredesenha/index.js
... ... @@ -38,7 +38,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
38 38 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
39 39 */
40 40 if(typeof(i3GEOF) === 'undefined'){
41   - i3GEOF = [];
  41 + var i3GEOF = {};
42 42 }
43 43 /*
44 44 Classe: i3GEOF.opcoesTempo
... ...
ferramentas/opcoes_escala/index.js
... ... @@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
37 37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
38 38 */
39 39 if(typeof(i3GEOF) === 'undefined'){
40   - i3GEOF = [];
  40 + var i3GEOF = {};
41 41 }
42 42 /*
43 43 Classe: i3GEOF.opcoesEscala
... ...
ferramentas/opcoes_fundo/index.js
... ... @@ -35,7 +35,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
35 35 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
36 36 */
37 37 if(typeof(i3GEOF) === 'undefined'){
38   - i3GEOF = [];
  38 + var i3GEOF = {};
39 39 }
40 40 /*
41 41 Classe: i3GEOF.opcoesFundo
... ...
ferramentas/opcoes_label/index.js
... ... @@ -30,7 +30,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
30 30 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
31 31 */
32 32 if(typeof(i3GEOF) === 'undefined'){
33   - i3GEOF = [];
  33 + var i3GEOF = {};
34 34 }
35 35  
36 36 /*
... ...
ferramentas/opcoes_legenda/index.js
... ... @@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
37 37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
38 38 */
39 39 if(typeof(i3GEOF) === 'undefined'){
40   - i3GEOF = [];
  40 + var i3GEOF = {};
41 41 }
42 42 /*
43 43 Classe: i3GEOF.opcoesLegenda
... ...
ferramentas/opcoes_quadros/index.js
... ... @@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
37 37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
38 38 */
39 39 if(typeof(i3GEOF) === 'undefined'){
40   - i3GEOF = [];
  40 + var i3GEOF = {};
41 41 }
42 42 /*
43 43 Classe: i3GEOF.opcoesQuadros
... ...
ferramentas/opcoes_querymap/index.js
... ... @@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
37 37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
38 38 */
39 39 if(typeof(i3GEOF) === 'undefined'){
40   - i3GEOF = [];
  40 + var i3GEOF = {};
41 41 }
42 42 /*
43 43 Classe: i3GEOF.opcoesQuery
... ...
ferramentas/opcoes_tamanho/index.js
... ... @@ -34,7 +34,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
34 34 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
35 35 */
36 36 if(typeof(i3GEOF) === 'undefined'){
37   - i3GEOF = [];
  37 + var i3GEOF = {};
38 38 }
39 39 /*
40 40 Classe: i3GEOF.opcoesTamanho
... ...
ferramentas/outputformat/index.js
... ... @@ -36,7 +36,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
36 36 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
37 37 */
38 38 if(typeof(i3GEOF) === 'undefined'){
39   - i3GEOF = [];
  39 + var i3GEOF = {};
40 40 }
41 41 /*
42 42 Classe: i3GEOF.outputformat
... ...
ferramentas/perfil/index.js
... ... @@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
37 37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
38 38 */
39 39 if(typeof(i3GEOF) === 'undefined'){
40   - i3GEOF = [];
  40 + var i3GEOF = {};
41 41 }
42 42 /*
43 43 Class: i3GEOF.perfil
... ...
ferramentas/pontoempoligono/index.js
... ... @@ -38,7 +38,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
38 38 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
39 39 */
40 40 if(typeof(i3GEOF) === 'undefined'){
41   - i3GEOF = [];
  41 + var i3GEOF = {};
42 42 }
43 43 /*
44 44 Classe: i3GEOF.pontoEmPoligono
... ...
ferramentas/pontosdistri/index.js
... ... @@ -33,7 +33,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
33 33 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
34 34 */
35 35 if(typeof(i3GEOF) === 'undefined'){
36   - i3GEOF = [];
  36 + var i3GEOF = {};
37 37 }
38 38 /*
39 39 Classe: i3GEOF.pontosDistri
... ...
ferramentas/salvamapa/index.js
... ... @@ -32,7 +32,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
32 32 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
33 33 */
34 34 if(typeof(i3GEOF) === 'undefined'){
35   - i3GEOF = [];
  35 + var i3GEOF = {};
36 36 }
37 37 /*
38 38 Classe: i3GEOF.salvaMapa
... ...
ferramentas/salvamapfile/index.js
... ... @@ -35,7 +35,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
35 35 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
36 36 */
37 37 if(typeof(i3GEOF) === 'undefined'){
38   - i3GEOF = [];
  38 + var i3GEOF = {};
39 39 }
40 40 /*
41 41 Classe: i3GEOF.salvamapfile
... ...
ferramentas/selecao/index.js
... ... @@ -38,7 +38,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
38 38 */
39 39  
40 40 if(typeof(i3GEOF) === 'undefined'){
41   - i3GEOF = [];
  41 + var i3GEOF = {};
42 42 }
43 43 /*
44 44 Classe: i3GEOF.selecao
... ...
ferramentas/tabela/index.js
... ... @@ -39,7 +39,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
39 39 */
40 40  
41 41 if(typeof(i3GEOF) === 'undefined'){
42   - i3GEOF = [];
  42 + var i3GEOF = {};
43 43 }
44 44  
45 45 /*
... ...
ferramentas/telaremota/index.js
... ... @@ -36,7 +36,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
36 36 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
37 37 */
38 38 if(typeof(i3GEOF) === 'undefined'){
39   - i3GEOF = [];
  39 + var i3GEOF = {};
40 40 }
41 41 /*
42 42 Classe: i3GEOF.telaremota
... ...
ferramentas/tipoimagem/index.js
... ... @@ -36,7 +36,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
36 36 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
37 37 */
38 38 if(typeof(i3GEOF) === 'undefined'){
39   - i3GEOF = [];
  39 + var i3GEOF = {};
40 40 }
41 41 /*
42 42 Classe: i3GEOF.tipoimagem
... ...
ferramentas/tme/index.js
... ... @@ -35,7 +35,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
35 35 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
36 36 */
37 37 if(typeof(i3GEOF) === 'undefined'){
38   - i3GEOF = [];
  38 + var i3GEOF = {};
39 39 }
40 40  
41 41 /*
... ...
ferramentas/toponimia/index.js
... ... @@ -38,7 +38,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
38 38 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
39 39 */
40 40 if(typeof(i3GEOF) === 'undefined'){
41   - i3GEOF = [];
  41 + var i3GEOF = {};
42 42 }
43 43  
44 44 /*
... ...
ferramentas/upload/index.js
... ... @@ -32,7 +32,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
32 32 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
33 33 */
34 34 if(typeof(i3GEOF) === 'undefined'){
35   - i3GEOF = [];
  35 + var i3GEOF = {};
36 36 }
37 37 /*
38 38 Classe: i3GEOF.upload
... ...
ferramentas/uploaddbf/index.js
... ... @@ -32,7 +32,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
32 32 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
33 33 */
34 34 if(typeof(i3GEOF) === 'undefined'){
35   - i3GEOF = [];
  35 + var i3GEOF = {};
36 36 }
37 37 /*
38 38 Classe: i3GEOF.uploaddbf
... ...
ferramentas/uploadgpx/index.js
... ... @@ -38,7 +38,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
38 38  
39 39  
40 40 if(typeof(i3GEOF) === 'undefined'){
41   - i3GEOF = [];
  41 + var i3GEOF = {};
42 42 }
43 43 /*
44 44 Classe: i3GEOF.uploadgpx
... ...
ferramentas/uploadkml/index.js
... ... @@ -38,7 +38,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
38 38  
39 39  
40 40 if(typeof(i3GEOF) === 'undefined'){
41   - i3GEOF = [];
  41 + var i3GEOF = {};
42 42 }
43 43 /*
44 44 Classe: i3GEOF.uploadkml
... ...
ferramentas/wiki/index.js
... ... @@ -41,7 +41,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
41 41 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
42 42 */
43 43 if(typeof(i3GEOF) === 'undefined'){
44   - i3GEOF = [];
  44 + var i3GEOF = {};
45 45 }
46 46 /*
47 47 Classe: i3GEOF.wiki
... ...