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 P { 26 P {
2 text-align: left; 27 text-align: left;
3 font-size: 12px; 28 font-size: 12px;
admin/html/estat_conexao.html 0 → 100755
@@ -0,0 +1,94 @@ @@ -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 \ No newline at end of file 95 \ No newline at end of file
admin/html/estat_tipo_periodo.html 0 → 100755
@@ -0,0 +1,94 @@ @@ -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 \ No newline at end of file 95 \ No newline at end of file
admin/html/estat_tipo_regiao.html 0 → 100755
@@ -0,0 +1,94 @@ @@ -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 \ No newline at end of file 95 \ No newline at end of file
admin/html/estat_variavel.html
@@ -16,6 +16,7 @@ body { @@ -16,6 +16,7 @@ body {
16 </style> 16 </style>
17 <script type="text/javascript" src="../js/core.js"></script> 17 <script type="text/javascript" src="../js/core.js"></script>
18 <script type="text/javascript" src="../js/estat_variavel.js"></script> 18 <script type="text/javascript" src="../js/estat_variavel.js"></script>
  19 +
19 <link rel="stylesheet" type="text/css" href="admin.css"> 20 <link rel="stylesheet" type="text/css" href="admin.css">
20 </head> 21 </head>
21 <body class=" yui-skin-sam fundoPonto"> 22 <body class=" yui-skin-sam fundoPonto">
admin/index.html
@@ -163,6 +163,18 @@ @@ -163,6 +163,18 @@
163 <td><div class=aplicar></div></td> 163 <td><div class=aplicar></div></td>
164 <td>Cadastro de unidades de medida</td> 164 <td>Cadastro de unidades de medida</td>
165 </tr> 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 </table> 178 </table>
167 </div> 179 </div>
168 </fieldset> 180 </fieldset>
admin/js/core.js
@@ -73,6 +73,9 @@ function cabecalhoMetaestat(id,excluir){ @@ -73,6 +73,9 @@ function cabecalhoMetaestat(id,excluir){
73 {id:"principal",titulo:"In&iacute;cio",link:"../index.html"}, 73 {id:"principal",titulo:"In&iacute;cio",link:"../index.html"},
74 {id:"arvore",titulo:"&Aacute;rvore completa",link:"estat_variavel.html"}, 74 {id:"arvore",titulo:"&Aacute;rvore completa",link:"estat_variavel.html"},
75 {id:"unidade_medida",titulo:"Unidades de medida",link:"estat_unidade_medida.html"}, 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 {id:"login",titulo:"Login",js:"i3GEO.login.dialogo.abreLogin()"} 79 {id:"login",titulo:"Login",js:"i3GEO.login.dialogo.abreLogin()"}
77 ]; 80 ];
78 n = botoes.length; 81 n = botoes.length;
@@ -1500,12 +1503,14 @@ function core_ativaforms(lista){ @@ -1500,12 +1503,14 @@ function core_ativaforms(lista){
1500 "../../classesjs/compactados/classe_janela_compacto.js", 1503 "../../classesjs/compactados/classe_janela_compacto.js",
1501 "../../classesjs/compactados/dicionario_compacto.js", 1504 "../../classesjs/compactados/dicionario_compacto.js",
1502 "../../classesjs/compactados/classe_idioma_compacto.js", 1505 "../../classesjs/compactados/classe_idioma_compacto.js",
  1506 + "../../classesjs/compactados/classe_guias_compacto.js",
1503 "../../pacotes/cpaint/cpaint2.inc.compressed.js" 1507 "../../pacotes/cpaint/cpaint2.inc.compressed.js"
1504 ); 1508 );
1505 // 1509 //
1506 //arquivos css 1510 //arquivos css
1507 // 1511 //
1508 var cssfiles =new Array( 1512 var cssfiles =new Array(
  1513 + "../../pacotes/yui290/build/tabview/assets/skins/sam/tabview.css",
1509 "../html/admin.css", 1514 "../html/admin.css",
1510 "../../pacotes/yui290/build/fonts/fonts-min.css", 1515 "../../pacotes/yui290/build/fonts/fonts-min.css",
1511 "../../pacotes/yui290/build/datatable/assets/skins/sam/datatable.css", 1516 "../../pacotes/yui290/build/datatable/assets/skins/sam/datatable.css",
admin/js/estat_conexao.js 0 → 100755
@@ -0,0 +1,167 @@ @@ -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 \ No newline at end of file 168 \ No newline at end of file
admin/js/estat_tipo_periodo.js 0 → 100755
@@ -0,0 +1,160 @@ @@ -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 \ No newline at end of file 161 \ No newline at end of file
admin/js/estat_tipo_regiao.js 0 → 100755
@@ -0,0 +1,173 @@ @@ -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 \ No newline at end of file 174 \ No newline at end of file
admin/js/estat_unidade_medida.js
1 function initEditor(){ 1 function initEditor(){
2 YAHOO.namespace("example.container"); 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 pegaDados(); 4 pegaDados();
5 } 5 }
6 function pegaDados(){ 6 function pegaDados(){
@@ -30,8 +30,8 @@ function montaTabela(dados){ @@ -30,8 +30,8 @@ function montaTabela(dados){
30 {label:"Sigla",resizeable:true,key:"sigla", formatter:formatTexto,editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})}, 30 {label:"Sigla",resizeable:true,key:"sigla", formatter:formatTexto,editor:new YAHOO.widget.TextboxCellEditor({disableBtns:true})},
31 {label:"Permite soma?",key:"permitesoma",editor:"radio" ,editorOptions:{radioOptions:["SIM","NAO"],disableBtns:false,LABEL_SAVE:"OK"}}, 31 {label:"Permite soma?",key:"permitesoma",editor:"radio" ,editorOptions:{radioOptions:["SIM","NAO"],disableBtns:false,LABEL_SAVE:"OK"}},
32 {label:"Permite m&eacute;dia?",key:"permitemedia",editor:"radio" ,editorOptions:{radioOptions:["SIM","NAO"],disableBtns:false,LABEL_SAVE:"OK"}} 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 myDataTable = new YAHOO.widget.DataTable("tabela", myColumnDefs, myDataSource); 35 myDataTable = new YAHOO.widget.DataTable("tabela", myColumnDefs, myDataSource);
36 36
37 myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSARRAY; 37 myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSARRAY;
@@ -50,13 +50,13 @@ function montaTabela(dados){ @@ -50,13 +50,13 @@ function montaTabela(dados){
50 } 50 }
51 if (column.key == 'excluir'){ 51 if (column.key == 'excluir'){
52 record = this.getRecord(target); 52 record = this.getRecord(target);
53 - excluiLinha_M(record.getData('id_menu'),target); 53 + excluiLinha(record.getData('codigo_unidade_medida'),target);
54 } 54 }
55 if (column.key == 'mais'){ 55 if (column.key == 'mais'){
56 record = this.getRecord(target); 56 record = this.getRecord(target);
57 core_carregando("ativa"); 57 core_carregando("ativa");
58 core_carregando("buscando dados..."); 58 core_carregando("buscando dados...");
59 - $clicouId = record.getData('id_menu'); 59 + $clicouId = record.getData('codigo_unidade_medida');
60 $recordid = record.getId(); 60 $recordid = record.getId();
61 sUrl = "../php/metaestat.php?funcao=listaUnidadeMedida&codigo_unidade_medida="+record.getData('codigo_unidade_medida'); 61 sUrl = "../php/metaestat.php?funcao=listaUnidadeMedida&codigo_unidade_medida="+record.getData('codigo_unidade_medida');
62 callback = { 62 callback = {
@@ -126,7 +126,7 @@ function montaDiv(i){ @@ -126,7 +126,7 @@ function montaDiv(i){
126 ins += "<option value='1' "; 126 ins += "<option value='1' ";
127 if (i.permitesoma == 1){ins += "selected";} 127 if (i.permitesoma == 1){ins += "selected";}
128 ins += " >sim</option>"; 128 ins += " >sim</option>";
129 - ins += "<option value='2' "; 129 + ins += "<option value='0' ";
130 if (i.permitesoma == 0 ){ins += "selected";} 130 if (i.permitesoma == 0 ){ins += "selected";}
131 ins += " >n&atilde;o</option>"; 131 ins += " >n&atilde;o</option>";
132 ins += "</select></p>"; 132 ins += "</select></p>";
@@ -139,7 +139,7 @@ function montaDiv(i){ @@ -139,7 +139,7 @@ function montaDiv(i){
139 ins += "<option value='1' "; 139 ins += "<option value='1' ";
140 if (i.permitemedia == 1){ins += "selected";} 140 if (i.permitemedia == 1){ins += "selected";}
141 ins += " >sim</option>"; 141 ins += " >sim</option>";
142 - ins += "<option value='2' "; 142 + ins += "<option value='0' ";
143 if (i.permitemedia == 0 ){ins += "selected";} 143 if (i.permitemedia == 0 ){ins += "selected";}
144 ins += " >n&atilde;o</option>"; 144 ins += " >n&atilde;o</option>";
145 ins += "</select></p>"; 145 ins += "</select></p>";
@@ -155,10 +155,10 @@ function gravaDados(id,recordid){ @@ -155,10 +155,10 @@ function gravaDados(id,recordid){
155 for (i=0;i<campos.length;i++){ 155 for (i=0;i<campos.length;i++){
156 par += "&"+campos[i]+"="+($i("E"+campos[i]).value); 156 par += "&"+campos[i]+"="+($i("E"+campos[i]).value);
157 } 157 }
158 - par += "&id_menu="+id; 158 + par += "&codigo_unidade_medida="+id;
159 core_carregando("ativa"); 159 core_carregando("ativa");
160 core_carregando(" gravando o registro do id= "+id); 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 callback = { 162 callback = {
163 success:function(o){ 163 success:function(o){
164 try { 164 try {
@@ -168,7 +168,7 @@ function gravaDados(id,recordid){ @@ -168,7 +168,7 @@ function gravaDados(id,recordid){
168 } 168 }
169 else{ 169 else{
170 var rec = myDataTable.getRecordSet().getRecord(recordid); 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 core_carregando("desativa"); 172 core_carregando("desativa");
173 } 173 }
174 } 174 }
@@ -181,7 +181,7 @@ function gravaDados(id,recordid){ @@ -181,7 +181,7 @@ function gravaDados(id,recordid){
181 } 181 }
182 function excluiLinha(id,row){ 182 function excluiLinha(id,row){
183 var mensagem = " excluindo o registro do id= "+id, 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 core_excluiLinha(sUrl,row,mensagem); 185 core_excluiLinha(sUrl,row,mensagem);
186 } 186 }
187 //YAHOO.util.Event.addListener(window, "load", initMenu); 187 //YAHOO.util.Event.addListener(window, "load", initMenu);
188 \ No newline at end of file 188 \ No newline at end of file
admin/js/estat_variavel.js
@@ -45,16 +45,12 @@ function initMenu(){ @@ -45,16 +45,12 @@ function initMenu(){
45 pegaVariaveis(); 45 pegaVariaveis();
46 } 46 }
47 function ativaBotaoAdicionaVariavel(sUrl,idBotao){ 47 function ativaBotaoAdicionaVariavel(sUrl,idBotao){
48 - var adiciona = function()  
49 - { 48 + var adiciona = function(){
50 core_carregando("ativa"); 49 core_carregando("ativa");
51 core_carregando(" adicionando um novo registro"); 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 core_carregando("desativa"); 54 core_carregando("desativa");
59 var j = YAHOO.lang.JSON.parse(o.responseText); 55 var j = YAHOO.lang.JSON.parse(o.responseText);
60 adicionaNosVariaveis([j],true); 56 adicionaNosVariaveis([j],true);
@@ -88,37 +84,35 @@ Monta a &amp;aacute;rvore de edi&amp;ccedil;&amp;atilde;o @@ -88,37 +84,35 @@ Monta a &amp;aacute;rvore de edi&amp;ccedil;&amp;atilde;o
88 <PEGAPRANCHAS> 84 <PEGAPRANCHAS>
89 */ 85 */
90 function montaArvore(dados){ 86 function montaArvore(dados){
91 - YAHOO.example.treeExample = new function()  
92 - { 87 + YAHOO.example.treeExample = new function() {
93 tree = ""; 88 tree = "";
94 - function changeIconMode()  
95 - { 89 + function changeIconMode(){
96 buildTree(); 90 buildTree();
97 } 91 }
98 function loadNodeData(node, fnLoadComplete){ 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 YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); 109 YAHOO.util.Connect.asyncRequest('GET', sUrl, callback);
116 } 110 }
117 function buildTree(){ 111 function buildTree(){
118 tree = new YAHOO.widget.TreeView("tabela"); 112 tree = new YAHOO.widget.TreeView("tabela");
119 tree.setDynamicLoad(loadNodeData, 1); 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 tempNode.isLeaf = true; 116 tempNode.isLeaf = true;
123 core_carregando("desativa"); 117 core_carregando("desativa");
124 } 118 }
@@ -136,41 +130,45 @@ Mostra os nós de uma medida @@ -136,41 +130,45 @@ Mostra os nós de uma medida
136 */ 130 */
137 function adicionaNosMedidas(no,dados,redesenha) 131 function adicionaNosMedidas(no,dados,redesenha)
138 { 132 {
139 - function temaIconMode()  
140 - { 133 + var tempNode,i,conteudo,d,j;
  134 + function temaIconMode(){
141 var newVal = parseInt(this.value); 135 var newVal = parseInt(this.value);
142 if (newVal != currentIconMode) 136 if (newVal != currentIconMode)
143 {currentIconMode = newVal;} 137 {currentIconMode = newVal;}
144 } 138 }
145 function loadNodeData(node, fnLoadComplete){ 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 YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); 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 tempNode.isLeaf = true; 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 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>"; 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 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>"; 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,8 +176,8 @@ function adicionaNosMedidas(no,dados,redesenha)
178 {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>";} 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 else 177 else
180 {conteudo += "&nbsp;<span style=color:red >Edite para definir a nova medida!!!</span>";} 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 tempNode.isLeaf = false; 181 tempNode.isLeaf = false;
184 tempNode.setDynamicLoad(loadNodeData, 1); 182 tempNode.setDynamicLoad(loadNodeData, 1);
185 } 183 }
@@ -192,77 +190,80 @@ Mostra os nós de uma dimensao @@ -192,77 +190,80 @@ Mostra os nós de uma dimensao
192 190
193 <PEGATEMAS> 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 var newVal = parseInt(this.value); 196 var newVal = parseInt(this.value);
200 if (newVal != currentIconMode) 197 if (newVal != currentIconMode)
201 {currentIconMode = newVal;} 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 tempNode.isLeaf = true; 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 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>"; 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 if(dados[i].nomedimensao != "") 214 if(dados[i].nomedimensao != "")
215 {conteudo += "&nbsp;<span><b>"+dados[i].nomedimensao+"</b><span style=color:gray > - "+dados[i].descricao+" id: "+dados[i].id_dimensao_medida+"</span></span>";} 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 else 216 else
217 {conteudo += "&nbsp;<span style=color:red >Edite para definir a nova medida!!!</span>";} 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 tempNode.isLeaf = true; 220 tempNode.isLeaf = true;
221 } 221 }
222 if(redesenha){tree.draw();} 222 if(redesenha){tree.draw();}
223 } 223 }
224 function adicionaNosVariaveis(dados,redesenha){ 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 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 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 if(dados[i].nome && dados[i].nome != "") 230 if(dados[i].nome && dados[i].nome != "")
230 {conteudo += "&nbsp;<span>"+dados[i].nome+" - <span style='color:gray;'>"+dados[i].descricao+" id: "+dados[i].codigo_variavel+"</span></span>";} 231 {conteudo += "&nbsp;<span>"+dados[i].nome+" - <span style='color:gray;'>"+dados[i].descricao+" id: "+dados[i].codigo_variavel+"</span></span>";}
231 else 232 else
232 {conteudo += "&nbsp;<span style=color:red >Edite para definir a vari&aacute;vel!!!</span>";} 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 new YAHOO.widget.HTMLNode(d, root, false,true); 235 new YAHOO.widget.HTMLNode(d, root, false,true);
235 } 236 }
236 if(redesenha){tree.draw();} 237 if(redesenha){tree.draw();}
237 } 238 }
238 function montaDivVariavel(i){ 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 ins += core_geraLinhas(param); 247 ins += core_geraLinhas(param);
247 ins += "<br><br><br>"; 248 ins += "<br><br><br>";
248 $i("editor_bd").innerHTML = ins; 249 $i("editor_bd").innerHTML = ins;
249 } 250 }
250 function montaDivMedidaVariavel(i){ 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 ins += core_geraLinhas(param); 267 ins += core_geraLinhas(param);
267 ins += "<br><br><br>"; 268 ins += "<br><br><br>";
268 $i("editor_bd").innerHTML = ins; 269 $i("editor_bd").innerHTML = ins;
@@ -292,15 +293,15 @@ function montaDivMedidaVariavel(i){ @@ -292,15 +293,15 @@ function montaDivMedidaVariavel(i){
292 } 293 }
293 } 294 }
294 function montaDivDimensaoMedida(i){ 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 ins += core_geraLinhas(param); 305 ins += core_geraLinhas(param);
305 ins += "<br><br><br>"; 306 ins += "<br><br><br>";
306 $i("editor_bd").innerHTML = ins; 307 $i("editor_bd").innerHTML = ins;
@@ -318,21 +319,19 @@ Adiciona uma nova medida em uma variavel @@ -318,21 +319,19 @@ Adiciona uma nova medida em uma variavel
318 319
319 <ALTERAMEDIDAVARIAVEL> 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 core_makeRequest(sUrl,callback); 335 core_makeRequest(sUrl,callback);
337 } 336 }
338 /* 337 /*
@@ -342,21 +341,18 @@ Adiciona uma nova dimensao a uma medida de variavel @@ -342,21 +341,18 @@ Adiciona uma nova dimensao a uma medida de variavel
342 341
343 <ADICIONARDIMENSAOMedida> 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 core_makeRequest(sUrl,callback); 356 core_makeRequest(sUrl,callback);
361 } 357 }
362 /* 358 /*
@@ -367,35 +363,36 @@ Abre o editor de um nó @@ -367,35 +363,36 @@ Abre o editor de um nó
367 function editar(tipo,id) { 363 function editar(tipo,id) {
368 core_carregando("ativa"); 364 core_carregando("ativa");
369 core_carregando(" buscando dados"); 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 if(tipo == "variavel"){ 396 if(tipo == "variavel"){
400 sUrl = "../php/metaestat.php?funcao=listaVariavel&codigo_variavel="+id; 397 sUrl = "../php/metaestat.php?funcao=listaVariavel&codigo_variavel="+id;
401 } 398 }
@@ -417,45 +414,118 @@ Mostra o sql que acessa os dados @@ -417,45 +414,118 @@ Mostra o sql que acessa os dados
417 function sql(tipo,id) { 414 function sql(tipo,id) {
418 core_carregando("ativa"); 415 core_carregando("ativa");
419 core_carregando(" buscando dados"); 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 if(tipo == "medidaVariavel"){ 529 if(tipo == "medidaVariavel"){
460 sUrl = "../php/metaestat.php?funcao=sqlMedidaVariavel&id_medida_variavel="+id; 530 sUrl = "../php/metaestat.php?funcao=sqlMedidaVariavel&id_medida_variavel="+id;
461 } 531 }
@@ -472,11 +542,10 @@ Function: excluir @@ -472,11 +542,10 @@ Function: excluir
472 542
473 Exclui um elemento 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 if(tipo == "variavel") { 549 if(tipo == "variavel") {
481 no = tree.getNodeByProperty("codigo_variavel",id); 550 no = tree.getNodeByProperty("codigo_variavel",id);
482 sUrl = "../php/metaestat.php?funcao=excluirVariavel&codigo_variavel="+id; 551 sUrl = "../php/metaestat.php?funcao=excluirVariavel&codigo_variavel="+id;
@@ -503,11 +572,10 @@ Altera dados de um elemento do Atlas @@ -503,11 +572,10 @@ Altera dados de um elemento do Atlas
503 572
504 <ALTERARTEMA> 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 if(tipo == "variavel"){ 579 if(tipo == "variavel"){
512 campos = new Array("nome","descricao"); 580 campos = new Array("nome","descricao");
513 par = "&codigo_variavel="+id; 581 par = "&codigo_variavel="+id;
@@ -523,31 +591,32 @@ function gravaDados(tipo,id) @@ -523,31 +591,32 @@ function gravaDados(tipo,id)
523 par = "&id_dimensao_medida="+id; 591 par = "&id_dimensao_medida="+id;
524 prog = "../php/metaestat.php?funcao=alteraDimensaoMedida"; 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 {par += "&"+campos[i]+"="+($i("E"+campos[i]).value);} 595 {par += "&"+campos[i]+"="+($i("E"+campos[i]).value);}
528 596
529 var callback = { 597 var callback = {
530 success:function(o){ 598 success:function(o){
531 try { 599 try {
  600 + var no;
532 if(YAHOO.lang.JSON.parse(o.responseText) == "erro") { 601 if(YAHOO.lang.JSON.parse(o.responseText) == "erro") {
533 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>"); 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 setTimeout("core_carregando('desativa')",3000); 603 setTimeout("core_carregando('desativa')",3000);
535 } 604 }
536 else{ 605 else{
537 if(tipo == "variavel"){ 606 if(tipo == "variavel"){
538 - var no = tree.getNodeByProperty("codigo_variavel",id); 607 + no = tree.getNodeByProperty("codigo_variavel",id);
539 no.getContentEl().getElementsByTagName("span")[0].innerHTML = "<b>"+document.getElementById("Enome").value+"</b> - <span style='color:gray;'>"+document.getElementById("Edescricao").value+" id: "+id+"</span>"; 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 no.getContentEl().getElementsByTagName("span")[0].style.color = ""; 609 no.getContentEl().getElementsByTagName("span")[0].style.color = "";
541 no.html = no.getContentEl().innerHTML; 610 no.html = no.getContentEl().innerHTML;
542 } 611 }
543 if(tipo == "medidaVariavel"){ 612 if(tipo == "medidaVariavel"){
544 - var no = tree.getNodeByProperty("id_medida_variavel",id); 613 + no = tree.getNodeByProperty("id_medida_variavel",id);
545 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>"; 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 no.getContentEl().getElementsByTagName("span")[0].style.color = ""; 615 no.getContentEl().getElementsByTagName("span")[0].style.color = "";
547 no.html = no.getContentEl().innerHTML; 616 no.html = no.getContentEl().innerHTML;
548 } 617 }
549 if(tipo == "dimensaoMedida"){ 618 if(tipo == "dimensaoMedida"){
550 - var no = tree.getNodeByProperty("id_dimensao_medida",id); 619 + no = tree.getNodeByProperty("id_dimensao_medida",id);
551 no.getContentEl().getElementsByTagName("span")[0].innerHTML = "<b>"+document.getElementById("Enomedimensao").value+"</b><span style=color:gray > - "+document.getElementById("Edescricao").value+" id: "+id+"</span>"; 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 no.getContentEl().getElementsByTagName("span")[0].style.color = ""; 621 no.getContentEl().getElementsByTagName("span")[0].style.color = "";
553 no.html = no.getContentEl().innerHTML; 622 no.html = no.getContentEl().innerHTML;
@@ -565,7 +634,7 @@ function gravaDados(tipo,id) @@ -565,7 +634,7 @@ function gravaDados(tipo,id)
565 if(prog && par){ 634 if(prog && par){
566 core_carregando("ativa"); 635 core_carregando("ativa");
567 core_carregando(" gravando o registro do id= "+id); 636 core_carregando(" gravando o registro do id= "+id);
568 - var sUrl = prog+par; 637 + sUrl = prog+par;
569 core_makeRequest(sUrl,callback,'GET'); 638 core_makeRequest(sUrl,callback,'GET');
570 } 639 }
571 } 640 }
admin/php/admin.php
@@ -219,6 +219,24 @@ function verificaFilhos() @@ -219,6 +219,24 @@ function verificaFilhos()
219 try 219 try
220 { 220 {
221 $res = false; 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 if($tabela == "i3geoestat_variavel") 240 if($tabela == "i3geoestat_variavel")
223 { 241 {
224 $r = pegaDados("select * from ".$esquemaadmin."i3geoestat_medida_variavel where codigo_variavel=$id"); 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,7 +37,7 @@ Classe: Metaestat
37 */ 37 */
38 class Metaestat{ 38 class Metaestat{
39 protected $esquemaadmin; 39 protected $esquemaadmin;
40 - protected $dbh; 40 + public $dbh;
41 protected $dbhw; 41 protected $dbhw;
42 protected $convUTF; 42 protected $convUTF;
43 /* 43 /*
@@ -68,28 +68,36 @@ class Metaestat{ @@ -68,28 +68,36 @@ class Metaestat{
68 } 68 }
69 //aceita string ou array 69 //aceita string ou array
70 function converteTextoArray($texto){ 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 foreach($chaves as $chave){ 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 function converteTexto($texto){ 99 function converteTexto($texto){
92 - if(empty($texto) || strtoupper($texto) == "NULL"){ 100 + if(empty($texto)){
93 return ""; 101 return "";
94 } 102 }
95 if($this->convUTF == true){ 103 if($this->convUTF == true){
@@ -167,49 +175,111 @@ class Metaestat{ @@ -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 Parametros: 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 else{ 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 Altera uma variavel ou cria uma nova 284 Altera uma variavel ou cria uma nova
215 285
@@ -237,103 +307,71 @@ class Metaestat{ @@ -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 if($id_medida_variavel != ""){ 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 try { 364 try {
325 - if($id_medida_variavel != ""){ 365 + if($codigo_tipo_periodo != ""){
326 if($this->convUTF){ 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 else{ 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 return $retorna; 376 return $retorna;
339 } 377 }
@@ -342,32 +380,48 @@ class Metaestat{ @@ -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 Function: alteraDimensaoMedida 427 Function: alteraDimensaoMedida
@@ -409,13 +463,113 @@ class Metaestat{ @@ -409,13 +463,113 @@ class Metaestat{
409 */ 463 */
410 function listaUnidadeMedida($codigo_unidade_medida=""){ 464 function listaUnidadeMedida($codigo_unidade_medida=""){
411 $sql = "select * from ".$this->esquemaadmin."i3geoestat_unidade_medida "; 465 $sql = "select * from ".$this->esquemaadmin."i3geoestat_unidade_medida ";
412 - if($id != ""){ 466 + if($codigo_unidade_medida != ""){
413 $sql .= "WHERE codigo_unidade_medida = $codigo_unidade_medida "; 467 $sql .= "WHERE codigo_unidade_medida = $codigo_unidade_medida ";
414 } 468 }
415 $sql .= "ORDER BY nome"; 469 $sql .= "ORDER BY nome";
416 return $this->execSQL($sql,$codigo_unidade_medida); 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 Function: listaTipoPeriodo 573 Function: listaTipoPeriodo
420 574
421 Lista os tipos de períodos de tempo cadastrados ou um único período 575 Lista os tipos de períodos de tempo cadastrados ou um único período
@@ -426,7 +580,7 @@ class Metaestat{ @@ -426,7 +580,7 @@ class Metaestat{
426 */ 580 */
427 function listaTipoPeriodo($codigo_tipo_periodo=""){ 581 function listaTipoPeriodo($codigo_tipo_periodo=""){
428 $sql = "select * from ".$this->esquemaadmin."i3geoestat_tipo_periodo "; 582 $sql = "select * from ".$this->esquemaadmin."i3geoestat_tipo_periodo ";
429 - if($id != ""){ 583 + if($codigo_tipo_periodo != ""){
430 $sql .= "WHERE codigo_tipo_periodo = $codigo_tipo_periodo "; 584 $sql .= "WHERE codigo_tipo_periodo = $codigo_tipo_periodo ";
431 } 585 }
432 $sql .= "ORDER BY nome"; 586 $sql .= "ORDER BY nome";
@@ -443,11 +597,47 @@ class Metaestat{ @@ -443,11 +597,47 @@ class Metaestat{
443 */ 597 */
444 function listaTipoRegiao($codigo_tipo_regiao=""){ 598 function listaTipoRegiao($codigo_tipo_regiao=""){
445 $sql = "select * from ".$this->esquemaadmin."i3geoestat_tipo_regiao "; 599 $sql = "select * from ".$this->esquemaadmin."i3geoestat_tipo_regiao ";
446 - if($id != ""){ 600 + if($codigo_tipo_regiao != ""){
447 $sql .= "WHERE codigo_tipo_regiao = $codigo_tipo_regiao "; 601 $sql .= "WHERE codigo_tipo_regiao = $codigo_tipo_regiao ";
448 } 602 }
449 $sql .= "ORDER BY nome_tipo_regiao"; 603 $sql .= "ORDER BY nome_tipo_regiao";
450 return $this->execSQL($sql,$codigo_tipo_regiao); 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 \ No newline at end of file 644 \ No newline at end of file
admin/php/metaestat.php
@@ -74,7 +74,7 @@ switch (strtoupper($funcao)) @@ -74,7 +74,7 @@ switch (strtoupper($funcao))
74 */ 74 */
75 case "LISTACONEXAO": 75 case "LISTACONEXAO":
76 $m = new Metaestat(); 76 $m = new Metaestat();
77 - retornaJSON($m->listaConexao($id_conexao)); 77 + retornaJSON($m->listaConexao($codigo_estat_conexao));
78 exit; 78 exit;
79 break; 79 break;
80 /* 80 /*
@@ -220,7 +220,87 @@ switch (strtoupper($funcao)) @@ -220,7 +220,87 @@ switch (strtoupper($funcao))
220 } 220 }
221 retornaJSON($m->listaDimensao($id_medida_variavel,$id_dimensao_medida)); 221 retornaJSON($m->listaDimensao($id_medida_variavel,$id_dimensao_medida));
222 exit; 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 Valor: EXCLUIRVARIAVEL 305 Valor: EXCLUIRVARIAVEL
226 306
@@ -247,6 +327,95 @@ switch (strtoupper($funcao)) @@ -247,6 +327,95 @@ switch (strtoupper($funcao))
247 exit; 327 exit;
248 break; 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 Valor: EXCLUIRMEDIDAVARIAVEL 419 Valor: EXCLUIRMEDIDAVARIAVEL
251 420
252 Exclui uma medida da variavel 421 Exclui uma medida da variavel
@@ -332,6 +501,8 @@ switch (strtoupper($funcao)) @@ -332,6 +501,8 @@ switch (strtoupper($funcao))
332 501
333 filtro 502 filtro
334 503
  504 + agruparpor
  505 +
335 todasascolunas - 0 ou 1 506 todasascolunas - 0 ou 1
336 507
337 Retorno: 508 Retorno:
@@ -341,7 +512,127 @@ switch (strtoupper($funcao)) @@ -341,7 +512,127 @@ switch (strtoupper($funcao))
341 case "DADOSMEDIDAVARIAVEL": 512 case "DADOSMEDIDAVARIAVEL":
342 $m = new Metaestat(); 513 $m = new Metaestat();
343 if($formato == "json"){ 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 exit; 637 exit;
347 break; 638 break;
admin/sql/metaestat.sql
@@ -14,25 +14,50 @@ drop table i3geoestat_variavel; @@ -14,25 +14,50 @@ drop table i3geoestat_variavel;
14 14
15 /* create tables */ 15 /* create tables */
16 16
  17 +-- lista controlada dos parâmetros de conexão com o banco de dados onde residem dados
17 create table i3geoestat_conexao 18 create table i3geoestat_conexao
18 ( 19 (
19 codigo_estat_conexao integer not null unique primary key autoincrement, 20 codigo_estat_conexao integer not null unique primary key autoincrement,
  21 + -- nome do banco de dados
20 bancodedados text, 22 bancodedados text,
  23 + -- endereço do servidor
21 host text, 24 host text,
  25 + -- porta de comunicação
22 porta text, 26 porta text,
  27 + -- nome do usuário que pode acessar o banco
23 usuario text, 28 usuario text,
  29 + -- senha do usuário que pode acessar o banco
24 senha text 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 create table i3geoestat_tipo_periodo 61 create table i3geoestat_tipo_periodo
37 ( 62 (
38 codigo_tipo_periodo integer not null unique primary key autoincrement, 63 codigo_tipo_periodo integer not null unique primary key autoincrement,
@@ -41,6 +66,15 @@ create table i3geoestat_tipo_periodo @@ -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 create table i3geoestat_unidade_medida 78 create table i3geoestat_unidade_medida
45 ( 79 (
46 codigo_unidade_medida integer not null unique primary key autoincrement, 80 codigo_unidade_medida integer not null unique primary key autoincrement,
@@ -53,30 +87,6 @@ create table i3geoestat_unidade_medida @@ -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 -- descreve as colunas que contém valores de algum tipo de medida, por exemplo população residente 90 -- descreve as colunas que contém valores de algum tipo de medida, por exemplo população residente
81 create table i3geoestat_medida_variavel 91 create table i3geoestat_medida_variavel
82 ( 92 (
@@ -98,16 +108,16 @@ create table i3geoestat_medida_variavel @@ -98,16 +108,16 @@ create table i3geoestat_medida_variavel
98 filtro text, 108 filtro text,
99 -- titulo da medida 109 -- titulo da medida
100 nomemedida text, 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 foreign key (codigo_tipo_periodo) 113 foreign key (codigo_tipo_periodo)
106 references i3geoestat_tipo_periodo (codigo_tipo_periodo), 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 foreign key (codigo_unidade_medida) 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,7 +8,7 @@ INSERT INTO i3geoestat_tipo_periodo (codigo_tipo_periodo, nome, descricao) VALUE
8 8
9 9
10 -- i3geoestat_tipo_regiao 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 -- i3geoestat_unidade_medida 14 -- i3geoestat_unidade_medida
@@ -27,3 +27,4 @@ INSERT INTO i3geoestat_dimensao_medida (id_dimensao_medida, coluna, nomedimensao @@ -27,3 +27,4 @@ INSERT INTO i3geoestat_dimensao_medida (id_dimensao_medida, coluna, nomedimensao
27 -- i3geoestat_variavel 27 -- i3geoestat_variavel
28 INSERT INTO i3geoestat_variavel (codigo_variavel, nome, descricao) VALUES ('1', 'Farmácias populares existentes', 'Quantidade de farmácias populares existentes'); 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,8 +11,8 @@
11 </page_setting> 11 </page_setting>
12 <category_index>0</category_index> 12 <category_index>0</category_index>
13 <zoom>1.0</zoom> 13 <zoom>1.0</zoom>
14 - <x>0</x>  
15 - <y>17</y> 14 + <x>-362</x>
  15 + <y>-2</y>
16 <default_color> 16 <default_color>
17 <r>230</r> 17 <r>230</r>
18 <g>230</g> 18 <g>230</g>
@@ -110,7 +110,7 @@ @@ -110,7 +110,7 @@
110 </connections> 110 </connections>
111 <display>false</display> 111 <display>false</display>
112 <creation_date>2012-07-17 15:03:53</creation_date> 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 <model_property> 114 <model_property>
115 <name>Project Name</name> 115 <name>Project Name</name>
116 <value></value> 116 <value></value>
@@ -164,7 +164,7 @@ @@ -164,7 +164,7 @@
164 <array_dimension>null</array_dimension> 164 <array_dimension>null</array_dimension>
165 <unsigned>false</unsigned> 165 <unsigned>false</unsigned>
166 <args></args> 166 <args></args>
167 - <description></description> 167 + <description>Nome do banco de dados</description>
168 <logical_name>bancodedados</logical_name> 168 <logical_name>bancodedados</logical_name>
169 <physical_name>bancodedados</physical_name> 169 <physical_name>bancodedados</physical_name>
170 <type>text</type> 170 <type>text</type>
@@ -411,7 +411,7 @@ @@ -411,7 +411,7 @@
411 <array_dimension>null</array_dimension> 411 <array_dimension>null</array_dimension>
412 <unsigned>false</unsigned> 412 <unsigned>false</unsigned>
413 <args></args> 413 <args></args>
414 - <description></description> 414 + <description>Endereço do servidor</description>
415 <logical_name>host</logical_name> 415 <logical_name>host</logical_name>
416 <physical_name>host</physical_name> 416 <physical_name>host</physical_name>
417 <type>text</type> 417 <type>text</type>
@@ -567,7 +567,7 @@ @@ -567,7 +567,7 @@
567 <array_dimension>null</array_dimension> 567 <array_dimension>null</array_dimension>
568 <unsigned>false</unsigned> 568 <unsigned>false</unsigned>
569 <args></args> 569 <args></args>
570 - <description></description> 570 + <description>Porta de comunicação</description>
571 <logical_name>porta</logical_name> 571 <logical_name>porta</logical_name>
572 <physical_name>porta</physical_name> 572 <physical_name>porta</physical_name>
573 <type>text</type> 573 <type>text</type>
@@ -580,7 +580,7 @@ @@ -580,7 +580,7 @@
580 <array_dimension>null</array_dimension> 580 <array_dimension>null</array_dimension>
581 <unsigned>false</unsigned> 581 <unsigned>false</unsigned>
582 <args></args> 582 <args></args>
583 - <description></description> 583 + <description>Senha do usuário que pode acessar o banco</description>
584 <logical_name>senha</logical_name> 584 <logical_name>senha</logical_name>
585 <physical_name>senha</physical_name> 585 <physical_name>senha</physical_name>
586 <type>text</type> 586 <type>text</type>
@@ -606,13 +606,26 @@ @@ -606,13 +606,26 @@
606 <array_dimension>null</array_dimension> 606 <array_dimension>null</array_dimension>
607 <unsigned>false</unsigned> 607 <unsigned>false</unsigned>
608 <args></args> 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 <description>Tabela no banco de dados que contém a coluna</description> 622 <description>Tabela no banco de dados que contém a coluna</description>
610 <logical_name>tabela</logical_name> 623 <logical_name>tabela</logical_name>
611 <physical_name>tabela</physical_name> 624 <physical_name>tabela</physical_name>
612 <type>text</type> 625 <type>text</type>
613 </word> 626 </word>
614 <word> 627 <word>
615 - <id>36</id> 628 + <id>37</id>
616 <length>null</length> 629 <length>null</length>
617 <decimal>null</decimal> 630 <decimal>null</decimal>
618 <array>false</array> 631 <array>false</array>
@@ -625,14 +638,14 @@ @@ -625,14 +638,14 @@
625 <type>text</type> 638 <type>text</type>
626 </word> 639 </word>
627 <word> 640 <word>
628 - <id>37</id> 641 + <id>38</id>
629 <length>null</length> 642 <length>null</length>
630 <decimal>null</decimal> 643 <decimal>null</decimal>
631 <array>false</array> 644 <array>false</array>
632 <array_dimension>null</array_dimension> 645 <array_dimension>null</array_dimension>
633 <unsigned>false</unsigned> 646 <unsigned>false</unsigned>
634 <args></args> 647 <args></args>
635 - <description></description> 648 + <description>Nome do usuário que pode acessar o banco</description>
636 <logical_name>usuario</logical_name> 649 <logical_name>usuario</logical_name>
637 <physical_name>usuario</physical_name> 650 <physical_name>usuario</physical_name>
638 <type>text</type> 651 <type>text</type>
@@ -692,14 +705,31 @@ @@ -692,14 +705,31 @@
692 </connections> 705 </connections>
693 <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> 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 </note> 707 </note>
695 - <table> 708 + <note>
696 <id>3</id> 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 <height>107</height> 727 <height>107</height>
698 - <width>280</width> 728 + <width>242</width>
699 <font_name>Ubuntu</font_name> 729 <font_name>Ubuntu</font_name>
700 <font_size>9</font_size> 730 <font_size>9</font_size>
701 - <x>1</x>  
702 - <y>188</y> 731 + <x>33</x>
  732 + <y>5</y>
703 <color> 733 <color>
704 <r>255</r> 734 <r>255</r>
705 <g>165</g> 735 <g>165</g>
@@ -707,15 +737,15 @@ @@ -707,15 +737,15 @@
707 </color> 737 </color>
708 <connections> 738 <connections>
709 </connections> 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 <description></description> 742 <description></description>
713 <constraint></constraint> 743 <constraint></constraint>
714 <primary_key_name></primary_key_name> 744 <primary_key_name></primary_key_name>
715 <option></option> 745 <option></option>
716 <columns> 746 <columns>
717 <normal_column> 747 <normal_column>
718 - <word_id>3</word_id> 748 + <word_id>5</word_id>
719 <id>0</id> 749 <id>0</id>
720 <description></description> 750 <description></description>
721 <unique_key_name></unique_key_name> 751 <unique_key_name></unique_key_name>
@@ -747,7 +777,7 @@ @@ -747,7 +777,7 @@
747 </sequence> 777 </sequence>
748 </normal_column> 778 </normal_column>
749 <normal_column> 779 <normal_column>
750 - <word_id>26</word_id> 780 + <word_id>25</word_id>
751 <id>1</id> 781 <id>1</id>
752 <description></description> 782 <description></description>
753 <unique_key_name></unique_key_name> 783 <unique_key_name></unique_key_name>
@@ -779,7 +809,7 @@ @@ -779,7 +809,7 @@
779 </sequence> 809 </sequence>
780 </normal_column> 810 </normal_column>
781 <normal_column> 811 <normal_column>
782 - <word_id>13</word_id> 812 + <word_id>34</word_id>
783 <id>2</id> 813 <id>2</id>
784 <description></description> 814 <description></description>
785 <unique_key_name></unique_key_name> 815 <unique_key_name></unique_key_name>
@@ -810,6 +840,70 @@ @@ -810,6 +840,70 @@
810 <decimal_size>0</decimal_size> 840 <decimal_size>0</decimal_size>
811 </sequence> 841 </sequence>
812 </normal_column> 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 </columns> 907 </columns>
814 <indexes> 908 <indexes>
815 </indexes> 909 </indexes>
@@ -820,23 +914,23 @@ @@ -820,23 +914,23 @@
820 </table_properties> 914 </table_properties>
821 </table> 915 </table>
822 <table> 916 <table>
823 - <id>4</id>  
824 - <height>254</height> 917 + <id>5</id>
  918 + <height>149</height>
825 <width>292</width> 919 <width>292</width>
826 <font_name>Ubuntu</font_name> 920 <font_name>Ubuntu</font_name>
827 <font_size>9</font_size> 921 <font_size>9</font_size>
828 - <x>-349</x>  
829 - <y>259</y> 922 + <x>711</x>
  923 + <y>273</y>
830 <color> 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 </color> 928 </color>
835 <connections> 929 <connections>
836 <relation> 930 <relation>
837 <id>0</id> 931 <id>0</id>
838 - <source>5</source>  
839 - <target>4</target> 932 + <source>10</source>
  933 + <target>5</target>
840 <child_cardinality>1..n</child_cardinality> 934 <child_cardinality>1..n</child_cardinality>
841 <parent_cardinality>1</parent_cardinality> 935 <parent_cardinality>1</parent_cardinality>
842 <reference_for_pk>true</reference_for_pk> 936 <reference_for_pk>true</reference_for_pk>
@@ -852,20 +946,20 @@ @@ -852,20 +946,20 @@
852 </relation> 946 </relation>
853 <comment_connection> 947 <comment_connection>
854 <id>1</id> 948 <id>1</id>
855 - <source>0</source>  
856 - <target>4</target> 949 + <source>3</source>
  950 + <target>5</target>
857 </comment_connection> 951 </comment_connection>
858 </connections> 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 <constraint></constraint> 956 <constraint></constraint>
863 <primary_key_name></primary_key_name> 957 <primary_key_name></primary_key_name>
864 <option></option> 958 <option></option>
865 <columns> 959 <columns>
866 <normal_column> 960 <normal_column>
867 - <word_id>4</word_id>  
868 - <id>3</id> 961 + <word_id>22</word_id>
  962 + <id>5</id>
869 <description></description> 963 <description></description>
870 <unique_key_name></unique_key_name> 964 <unique_key_name></unique_key_name>
871 <logical_name></logical_name> 965 <logical_name></logical_name>
@@ -896,8 +990,8 @@ @@ -896,8 +990,8 @@
896 </sequence> 990 </sequence>
897 </normal_column> 991 </normal_column>
898 <normal_column> 992 <normal_column>
899 - <word_id>29</word_id>  
900 - <id>4</id> 993 + <word_id>7</word_id>
  994 + <id>6</id>
901 <description></description> 995 <description></description>
902 <unique_key_name></unique_key_name> 996 <unique_key_name></unique_key_name>
903 <logical_name></logical_name> 997 <logical_name></logical_name>
@@ -907,9 +1001,9 @@ @@ -907,9 +1001,9 @@
907 <default_value></default_value> 1001 <default_value></default_value>
908 <auto_increment>false</auto_increment> 1002 <auto_increment>false</auto_increment>
909 <foreign_key>false</foreign_key> 1003 <foreign_key>false</foreign_key>
910 - <not_null>true</not_null> 1004 + <not_null>false</not_null>
911 <primary_key>false</primary_key> 1005 <primary_key>false</primary_key>
912 - <unique_key>true</unique_key> 1006 + <unique_key>false</unique_key>
913 <character_set></character_set> 1007 <character_set></character_set>
914 <collation></collation> 1008 <collation></collation>
915 <sequence> 1009 <sequence>
@@ -928,8 +1022,8 @@ @@ -928,8 +1022,8 @@
928 </sequence> 1022 </sequence>
929 </normal_column> 1023 </normal_column>
930 <normal_column> 1024 <normal_column>
931 - <word_id>16</word_id>  
932 - <id>5</id> 1025 + <word_id>27</word_id>
  1026 + <id>7</id>
933 <description></description> 1027 <description></description>
934 <unique_key_name></unique_key_name> 1028 <unique_key_name></unique_key_name>
935 <logical_name></logical_name> 1029 <logical_name></logical_name>
@@ -960,21 +1054,20 @@ @@ -960,21 +1054,20 @@
960 </sequence> 1054 </sequence>
961 </normal_column> 1055 </normal_column>
962 <normal_column> 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 <description></description> 1059 <description></description>
967 <unique_key_name></unique_key_name> 1060 <unique_key_name></unique_key_name>
968 <logical_name></logical_name> 1061 <logical_name></logical_name>
969 <physical_name></physical_name> 1062 <physical_name></physical_name>
970 - <type>integer</type> 1063 + <type>text</type>
971 <constraint></constraint> 1064 <constraint></constraint>
972 <default_value></default_value> 1065 <default_value></default_value>
973 <auto_increment>false</auto_increment> 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 <primary_key>false</primary_key> 1069 <primary_key>false</primary_key>
977 - <unique_key>true</unique_key> 1070 + <unique_key>false</unique_key>
978 <character_set></character_set> 1071 <character_set></character_set>
979 <collation></collation> 1072 <collation></collation>
980 <sequence> 1073 <sequence>
@@ -993,15 +1086,15 @@ @@ -993,15 +1086,15 @@
993 </sequence> 1086 </sequence>
994 </normal_column> 1087 </normal_column>
995 <normal_column> 1088 <normal_column>
996 - <word_id>18</word_id>  
997 - <id>7</id> 1089 + <word_id>0</word_id>
  1090 + <id>9</id>
998 <description></description> 1091 <description></description>
999 <unique_key_name></unique_key_name> 1092 <unique_key_name></unique_key_name>
1000 <logical_name></logical_name> 1093 <logical_name></logical_name>
1001 <physical_name></physical_name> 1094 <physical_name></physical_name>
1002 - <type>text</type> 1095 + <type>integer</type>
1003 <constraint></constraint> 1096 <constraint></constraint>
1004 - <default_value></default_value> 1097 + <default_value>0</default_value>
1005 <auto_increment>false</auto_increment> 1098 <auto_increment>false</auto_increment>
1006 <foreign_key>false</foreign_key> 1099 <foreign_key>false</foreign_key>
1007 <not_null>false</not_null> 1100 <not_null>false</not_null>
@@ -1025,17 +1118,18 @@ @@ -1025,17 +1118,18 @@
1025 </sequence> 1118 </sequence>
1026 </normal_column> 1119 </normal_column>
1027 <normal_column> 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 <description></description> 1124 <description></description>
1031 <unique_key_name></unique_key_name> 1125 <unique_key_name></unique_key_name>
1032 <logical_name></logical_name> 1126 <logical_name></logical_name>
1033 <physical_name></physical_name> 1127 <physical_name></physical_name>
1034 - <type>text</type> 1128 + <type>integer</type>
1035 <constraint></constraint> 1129 <constraint></constraint>
1036 <default_value></default_value> 1130 <default_value></default_value>
1037 <auto_increment>false</auto_increment> 1131 <auto_increment>false</auto_increment>
1038 - <foreign_key>false</foreign_key> 1132 + <foreign_key>true</foreign_key>
1039 <not_null>false</not_null> 1133 <not_null>false</not_null>
1040 <primary_key>false</primary_key> 1134 <primary_key>false</primary_key>
1041 <unique_key>false</unique_key> 1135 <unique_key>false</unique_key>
@@ -1056,21 +1150,74 @@ @@ -1056,21 +1150,74 @@
1056 <decimal_size>0</decimal_size> 1150 <decimal_size>0</decimal_size>
1057 </sequence> 1151 </sequence>
1058 </normal_column> 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 <normal_column> 1206 <normal_column>
1060 - <word_id>8</word_id>  
1061 - <id>9</id> 1207 + <word_id>4</word_id>
  1208 + <id>11</id>
1062 <description></description> 1209 <description></description>
1063 <unique_key_name></unique_key_name> 1210 <unique_key_name></unique_key_name>
1064 <logical_name></logical_name> 1211 <logical_name></logical_name>
1065 <physical_name></physical_name> 1212 <physical_name></physical_name>
1066 - <type>text</type> 1213 + <type>integer</type>
1067 <constraint></constraint> 1214 <constraint></constraint>
1068 <default_value></default_value> 1215 <default_value></default_value>
1069 - <auto_increment>false</auto_increment> 1216 + <auto_increment>true</auto_increment>
1070 <foreign_key>false</foreign_key> 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 <character_set></character_set> 1221 <character_set></character_set>
1075 <collation></collation> 1222 <collation></collation>
1076 <sequence> 1223 <sequence>
@@ -1089,8 +1236,8 @@ @@ -1089,8 +1236,8 @@
1089 </sequence> 1236 </sequence>
1090 </normal_column> 1237 </normal_column>
1091 <normal_column> 1238 <normal_column>
1092 - <word_id>12</word_id>  
1093 - <id>10</id> 1239 + <word_id>29</word_id>
  1240 + <id>12</id>
1094 <description></description> 1241 <description></description>
1095 <unique_key_name></unique_key_name> 1242 <unique_key_name></unique_key_name>
1096 <logical_name></logical_name> 1243 <logical_name></logical_name>
@@ -1121,13 +1268,13 @@ @@ -1121,13 +1268,13 @@
1121 </sequence> 1268 </sequence>
1122 </normal_column> 1269 </normal_column>
1123 <normal_column> 1270 <normal_column>
1124 - <word_id>21</word_id>  
1125 - <id>11</id> 1271 + <word_id>16</word_id>
  1272 + <id>13</id>
1126 <description></description> 1273 <description></description>
1127 <unique_key_name></unique_key_name> 1274 <unique_key_name></unique_key_name>
1128 <logical_name></logical_name> 1275 <logical_name></logical_name>
1129 <physical_name></physical_name> 1276 <physical_name></physical_name>
1130 - <type>integer</type> 1277 + <type>text</type>
1131 <constraint></constraint> 1278 <constraint></constraint>
1132 <default_value></default_value> 1279 <default_value></default_value>
1133 <auto_increment>false</auto_increment> 1280 <auto_increment>false</auto_increment>
@@ -1153,8 +1300,41 @@ @@ -1153,8 +1300,41 @@
1153 </sequence> 1300 </sequence>
1154 </normal_column> 1301 </normal_column>
1155 <normal_column> 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 <description></description> 1338 <description></description>
1159 <unique_key_name></unique_key_name> 1339 <unique_key_name></unique_key_name>
1160 <logical_name></logical_name> 1340 <logical_name></logical_name>
@@ -1184,52 +1364,21 @@ @@ -1184,52 +1364,21 @@
1184 <decimal_size>0</decimal_size> 1364 <decimal_size>0</decimal_size>
1185 </sequence> 1365 </sequence>
1186 </normal_column> 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 <normal_column> 1367 <normal_column>
1219 - <word_id>2</word_id>  
1220 - <id>13</id> 1368 + <word_id>37</word_id>
  1369 + <id>16</id>
1221 <description></description> 1370 <description></description>
1222 <unique_key_name></unique_key_name> 1371 <unique_key_name></unique_key_name>
1223 <logical_name></logical_name> 1372 <logical_name></logical_name>
1224 <physical_name></physical_name> 1373 <physical_name></physical_name>
1225 - <type>integer</type> 1374 + <type>text</type>
1226 <constraint></constraint> 1375 <constraint></constraint>
1227 <default_value></default_value> 1376 <default_value></default_value>
1228 - <auto_increment>true</auto_increment> 1377 + <auto_increment>false</auto_increment>
1229 <foreign_key>false</foreign_key> 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 <character_set></character_set> 1382 <character_set></character_set>
1234 <collation></collation> 1383 <collation></collation>
1235 <sequence> 1384 <sequence>
@@ -1248,8 +1397,8 @@ @@ -1248,8 +1397,8 @@
1248 </sequence> 1397 </sequence>
1249 </normal_column> 1398 </normal_column>
1250 <normal_column> 1399 <normal_column>
1251 - <word_id>1</word_id>  
1252 - <id>14</id> 1400 + <word_id>8</word_id>
  1401 + <id>17</id>
1253 <description></description> 1402 <description></description>
1254 <unique_key_name></unique_key_name> 1403 <unique_key_name></unique_key_name>
1255 <logical_name></logical_name> 1404 <logical_name></logical_name>
@@ -1280,8 +1429,8 @@ @@ -1280,8 +1429,8 @@
1280 </sequence> 1429 </sequence>
1281 </normal_column> 1430 </normal_column>
1282 <normal_column> 1431 <normal_column>
1283 - <word_id>20</word_id>  
1284 - <id>15</id> 1432 + <word_id>12</word_id>
  1433 + <id>18</id>
1285 <description></description> 1434 <description></description>
1286 <unique_key_name></unique_key_name> 1435 <unique_key_name></unique_key_name>
1287 <logical_name></logical_name> 1436 <logical_name></logical_name>
@@ -1312,13 +1461,13 @@ @@ -1312,13 +1461,13 @@
1312 </sequence> 1461 </sequence>
1313 </normal_column> 1462 </normal_column>
1314 <normal_column> 1463 <normal_column>
1315 - <word_id>32</word_id>  
1316 - <id>16</id> 1464 + <word_id>21</word_id>
  1465 + <id>19</id>
1317 <description></description> 1466 <description></description>
1318 <unique_key_name></unique_key_name> 1467 <unique_key_name></unique_key_name>
1319 <logical_name></logical_name> 1468 <logical_name></logical_name>
1320 <physical_name></physical_name> 1469 <physical_name></physical_name>
1321 - <type>text</type> 1470 + <type>integer</type>
1322 <constraint></constraint> 1471 <constraint></constraint>
1323 <default_value></default_value> 1472 <default_value></default_value>
1324 <auto_increment>false</auto_increment> 1473 <auto_increment>false</auto_increment>
@@ -1344,8 +1493,8 @@ @@ -1344,8 +1493,8 @@
1344 </sequence> 1493 </sequence>
1345 </normal_column> 1494 </normal_column>
1346 <normal_column> 1495 <normal_column>
1347 - <word_id>37</word_id>  
1348 - <id>17</id> 1496 + <word_id>10</word_id>
  1497 + <id>20</id>
1349 <description></description> 1498 <description></description>
1350 <unique_key_name></unique_key_name> 1499 <unique_key_name></unique_key_name>
1351 <logical_name></logical_name> 1500 <logical_name></logical_name>
@@ -1376,15 +1525,15 @@ @@ -1376,15 +1525,15 @@
1376 </sequence> 1525 </sequence>
1377 </normal_column> 1526 </normal_column>
1378 <normal_column> 1527 <normal_column>
1379 - <word_id>33</word_id>  
1380 - <id>18</id> 1528 + <word_id>35</word_id>
  1529 + <id>21</id>
1381 <description></description> 1530 <description></description>
1382 <unique_key_name></unique_key_name> 1531 <unique_key_name></unique_key_name>
1383 <logical_name></logical_name> 1532 <logical_name></logical_name>
1384 <physical_name></physical_name> 1533 <physical_name></physical_name>
1385 <type>text</type> 1534 <type>text</type>
1386 <constraint></constraint> 1535 <constraint></constraint>
1387 - <default_value></default_value> 1536 + <default_value>4326</default_value>
1388 <auto_increment>false</auto_increment> 1537 <auto_increment>false</auto_increment>
1389 <foreign_key>false</foreign_key> 1538 <foreign_key>false</foreign_key>
1390 <not_null>false</not_null> 1539 <not_null>false</not_null>
@@ -1417,30 +1566,30 @@ @@ -1417,30 +1566,30 @@
1417 </table_properties> 1566 </table_properties>
1418 </table> 1567 </table>
1419 <table> 1568 <table>
1420 - <id>6</id> 1569 + <id>7</id>
1421 <height>107</height> 1570 <height>107</height>
1422 - <width>250</width> 1571 + <width>280</width>
1423 <font_name>Ubuntu</font_name> 1572 <font_name>Ubuntu</font_name>
1424 <font_size>9</font_size> 1573 <font_size>9</font_size>
1425 - <x>373</x>  
1426 - <y>-2</y> 1574 + <x>1</x>
  1575 + <y>188</y>
1427 <color> 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 </color> 1580 </color>
1432 <connections> 1581 <connections>
1433 </connections> 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 <constraint></constraint> 1586 <constraint></constraint>
1438 <primary_key_name></primary_key_name> 1587 <primary_key_name></primary_key_name>
1439 <option></option> 1588 <option></option>
1440 <columns> 1589 <columns>
1441 <normal_column> 1590 <normal_column>
1442 - <word_id>6</word_id>  
1443 - <id>19</id> 1591 + <word_id>3</word_id>
  1592 + <id>22</id>
1444 <description></description> 1593 <description></description>
1445 <unique_key_name></unique_key_name> 1594 <unique_key_name></unique_key_name>
1446 <logical_name></logical_name> 1595 <logical_name></logical_name>
@@ -1472,7 +1621,7 @@ @@ -1472,7 +1621,7 @@
1472 </normal_column> 1621 </normal_column>
1473 <normal_column> 1622 <normal_column>
1474 <word_id>24</word_id> 1623 <word_id>24</word_id>
1475 - <id>20</id> 1624 + <id>23</id>
1476 <description></description> 1625 <description></description>
1477 <unique_key_name></unique_key_name> 1626 <unique_key_name></unique_key_name>
1478 <logical_name></logical_name> 1627 <logical_name></logical_name>
@@ -1503,8 +1652,8 @@ @@ -1503,8 +1652,8 @@
1503 </sequence> 1652 </sequence>
1504 </normal_column> 1653 </normal_column>
1505 <normal_column> 1654 <normal_column>
1506 - <word_id>15</word_id>  
1507 - <id>21</id> 1655 + <word_id>13</word_id>
  1656 + <id>24</id>
1508 <description></description> 1657 <description></description>
1509 <unique_key_name></unique_key_name> 1658 <unique_key_name></unique_key_name>
1510 <logical_name></logical_name> 1659 <logical_name></logical_name>
@@ -1543,31 +1692,14 @@ @@ -1543,31 +1692,14 @@
1543 <schema></schema> 1692 <schema></schema>
1544 </table_properties> 1693 </table_properties>
1545 </table> 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 <table> 1695 <table>
1564 <id>8</id> 1696 <id>8</id>
1565 - <height>107</height>  
1566 - <width>242</width> 1697 + <height>170</height>
  1698 + <width>292</width>
1567 <font_name>Ubuntu</font_name> 1699 <font_name>Ubuntu</font_name>
1568 <font_size>9</font_size> 1700 <font_size>9</font_size>
1569 - <x>33</x>  
1570 - <y>5</y> 1701 + <x>7</x>
  1702 + <y>453</y>
1571 <color> 1703 <color>
1572 <r>255</r> 1704 <r>255</r>
1573 <g>165</g> 1705 <g>165</g>
@@ -1575,16 +1707,16 @@ @@ -1575,16 +1707,16 @@
1575 </color> 1707 </color>
1576 <connections> 1708 <connections>
1577 </connections> 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 <constraint></constraint> 1713 <constraint></constraint>
1582 <primary_key_name></primary_key_name> 1714 <primary_key_name></primary_key_name>
1583 <option></option> 1715 <option></option>
1584 <columns> 1716 <columns>
1585 <normal_column> 1717 <normal_column>
1586 - <word_id>5</word_id>  
1587 - <id>22</id> 1718 + <word_id>2</word_id>
  1719 + <id>25</id>
1588 <description></description> 1720 <description></description>
1589 <unique_key_name></unique_key_name> 1721 <unique_key_name></unique_key_name>
1590 <logical_name></logical_name> 1722 <logical_name></logical_name>
@@ -1615,8 +1747,8 @@ @@ -1615,8 +1747,8 @@
1615 </sequence> 1747 </sequence>
1616 </normal_column> 1748 </normal_column>
1617 <normal_column> 1749 <normal_column>
1618 - <word_id>25</word_id>  
1619 - <id>23</id> 1750 + <word_id>1</word_id>
  1751 + <id>26</id>
1620 <description></description> 1752 <description></description>
1621 <unique_key_name></unique_key_name> 1753 <unique_key_name></unique_key_name>
1622 <logical_name></logical_name> 1754 <logical_name></logical_name>
@@ -1647,8 +1779,8 @@ @@ -1647,8 +1779,8 @@
1647 </sequence> 1779 </sequence>
1648 </normal_column> 1780 </normal_column>
1649 <normal_column> 1781 <normal_column>
1650 - <word_id>34</word_id>  
1651 - <id>24</id> 1782 + <word_id>20</word_id>
  1783 + <id>27</id>
1652 <description></description> 1784 <description></description>
1653 <unique_key_name></unique_key_name> 1785 <unique_key_name></unique_key_name>
1654 <logical_name></logical_name> 1786 <logical_name></logical_name>
@@ -1679,15 +1811,15 @@ @@ -1679,15 +1811,15 @@
1679 </sequence> 1811 </sequence>
1680 </normal_column> 1812 </normal_column>
1681 <normal_column> 1813 <normal_column>
1682 - <word_id>31</word_id>  
1683 - <id>25</id> 1814 + <word_id>32</word_id>
  1815 + <id>28</id>
1684 <description></description> 1816 <description></description>
1685 <unique_key_name></unique_key_name> 1817 <unique_key_name></unique_key_name>
1686 <logical_name></logical_name> 1818 <logical_name></logical_name>
1687 <physical_name></physical_name> 1819 <physical_name></physical_name>
1688 - <type>integer</type> 1820 + <type>text</type>
1689 <constraint></constraint> 1821 <constraint></constraint>
1690 - <default_value>0</default_value> 1822 + <default_value></default_value>
1691 <auto_increment>false</auto_increment> 1823 <auto_increment>false</auto_increment>
1692 <foreign_key>false</foreign_key> 1824 <foreign_key>false</foreign_key>
1693 <not_null>false</not_null> 1825 <not_null>false</not_null>
@@ -1711,15 +1843,47 @@ @@ -1711,15 +1843,47 @@
1711 </sequence> 1843 </sequence>
1712 </normal_column> 1844 </normal_column>
1713 <normal_column> 1845 <normal_column>
1714 - <word_id>30</word_id>  
1715 - <id>26</id> 1846 + <word_id>38</word_id>
  1847 + <id>29</id>
1716 <description></description> 1848 <description></description>
1717 <unique_key_name></unique_key_name> 1849 <unique_key_name></unique_key_name>
1718 <logical_name></logical_name> 1850 <logical_name></logical_name>
1719 <physical_name></physical_name> 1851 <physical_name></physical_name>
1720 - <type>integer</type> 1852 + <type>text</type>
1721 <constraint></constraint> 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 <auto_increment>false</auto_increment> 1887 <auto_increment>false</auto_increment>
1724 <foreign_key>false</foreign_key> 1888 <foreign_key>false</foreign_key>
1725 <not_null>false</not_null> 1889 <not_null>false</not_null>
@@ -1753,114 +1917,29 @@ @@ -1753,114 +1917,29 @@
1753 </table> 1917 </table>
1754 <table> 1918 <table>
1755 <id>9</id> 1919 <id>9</id>
1756 - <height>339</height>  
1757 - <width>292</width> 1920 + <height>107</height>
  1921 + <width>250</width>
1758 <font_name>Ubuntu</font_name> 1922 <font_name>Ubuntu</font_name>
1759 <font_size>9</font_size> 1923 <font_size>9</font_size>
1760 - <x>353</x>  
1761 - <y>155</y> 1924 + <x>373</x>
  1925 + <y>-2</y>
1762 <color> 1926 <color>
1763 <r>160</r> 1927 <r>160</r>
1764 <g>32</g> 1928 <g>32</g>
1765 <b>240</b> 1929 <b>240</b>
1766 </color> 1930 </color>
1767 <connections> 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 </connections> 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 <constraint></constraint> 1936 <constraint></constraint>
1858 <primary_key_name></primary_key_name> 1937 <primary_key_name></primary_key_name>
1859 <option></option> 1938 <option></option>
1860 <columns> 1939 <columns>
1861 <normal_column> 1940 <normal_column>
1862 - <word_id>23</word_id>  
1863 - <id>27</id> 1941 + <word_id>6</word_id>
  1942 + <id>31</id>
1864 <description></description> 1943 <description></description>
1865 <unique_key_name></unique_key_name> 1944 <unique_key_name></unique_key_name>
1866 <logical_name></logical_name> 1945 <logical_name></logical_name>
@@ -1891,18 +1970,17 @@ @@ -1891,18 +1970,17 @@
1891 </sequence> 1970 </sequence>
1892 </normal_column> 1971 </normal_column>
1893 <normal_column> 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 <description></description> 1975 <description></description>
1898 <unique_key_name></unique_key_name> 1976 <unique_key_name></unique_key_name>
1899 <logical_name></logical_name> 1977 <logical_name></logical_name>
1900 <physical_name></physical_name> 1978 <physical_name></physical_name>
1901 - <type>integer</type> 1979 + <type>text</type>
1902 <constraint></constraint> 1980 <constraint></constraint>
1903 <default_value></default_value> 1981 <default_value></default_value>
1904 <auto_increment>false</auto_increment> 1982 <auto_increment>false</auto_increment>
1905 - <foreign_key>true</foreign_key> 1983 + <foreign_key>false</foreign_key>
1906 <not_null>false</not_null> 1984 <not_null>false</not_null>
1907 <primary_key>false</primary_key> 1985 <primary_key>false</primary_key>
1908 <unique_key>false</unique_key> 1986 <unique_key>false</unique_key>
@@ -1924,18 +2002,17 @@ @@ -1924,18 +2002,17 @@
1924 </sequence> 2002 </sequence>
1925 </normal_column> 2003 </normal_column>
1926 <normal_column> 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 <description></description> 2007 <description></description>
1931 <unique_key_name></unique_key_name> 2008 <unique_key_name></unique_key_name>
1932 <logical_name></logical_name> 2009 <logical_name></logical_name>
1933 <physical_name></physical_name> 2010 <physical_name></physical_name>
1934 - <type>integer</type> 2011 + <type>text</type>
1935 <constraint></constraint> 2012 <constraint></constraint>
1936 <default_value></default_value> 2013 <default_value></default_value>
1937 <auto_increment>false</auto_increment> 2014 <auto_increment>false</auto_increment>
1938 - <foreign_key>true</foreign_key> 2015 + <foreign_key>false</foreign_key>
1939 <not_null>false</not_null> 2016 <not_null>false</not_null>
1940 <primary_key>false</primary_key> 2017 <primary_key>false</primary_key>
1941 <unique_key>false</unique_key> 2018 <unique_key>false</unique_key>
@@ -1956,10 +2033,125 @@ @@ -1956,10 +2033,125 @@
1956 <decimal_size>0</decimal_size> 2033 <decimal_size>0</decimal_size>
1957 </sequence> 2034 </sequence>
1958 </normal_column> 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 <normal_column> 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 <description></description> 2155 <description></description>
1964 <unique_key_name></unique_key_name> 2156 <unique_key_name></unique_key_name>
1965 <logical_name></logical_name> 2157 <logical_name></logical_name>
@@ -1967,11 +2159,11 @@ @@ -1967,11 +2159,11 @@
1967 <type>integer</type> 2159 <type>integer</type>
1968 <constraint></constraint> 2160 <constraint></constraint>
1969 <default_value></default_value> 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 <character_set></character_set> 2167 <character_set></character_set>
1976 <collation></collation> 2168 <collation></collation>
1977 <sequence> 2169 <sequence>
@@ -1990,9 +2182,9 @@ @@ -1990,9 +2182,9 @@
1990 </sequence> 2182 </sequence>
1991 </normal_column> 2183 </normal_column>
1992 <normal_column> 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 <description></description> 2188 <description></description>
1997 <unique_key_name></unique_key_name> 2189 <unique_key_name></unique_key_name>
1998 <logical_name></logical_name> 2190 <logical_name></logical_name>
@@ -2023,9 +2215,9 @@ @@ -2023,9 +2215,9 @@
2023 </sequence> 2215 </sequence>
2024 </normal_column> 2216 </normal_column>
2025 <normal_column> 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 <description></description> 2221 <description></description>
2030 <unique_key_name></unique_key_name> 2222 <unique_key_name></unique_key_name>
2031 <logical_name></logical_name> 2223 <logical_name></logical_name>
@@ -2056,81 +2248,18 @@ @@ -2056,81 +2248,18 @@
2056 </sequence> 2248 </sequence>
2057 </normal_column> 2249 </normal_column>
2058 <normal_column> 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 <description></description> 2254 <description></description>
2126 <unique_key_name></unique_key_name> 2255 <unique_key_name></unique_key_name>
2127 <logical_name></logical_name> 2256 <logical_name></logical_name>
2128 <physical_name></physical_name> 2257 <physical_name></physical_name>
2129 - <type>text</type> 2258 + <type>integer</type>
2130 <constraint></constraint> 2259 <constraint></constraint>
2131 <default_value></default_value> 2260 <default_value></default_value>
2132 <auto_increment>false</auto_increment> 2261 <auto_increment>false</auto_increment>
2133 - <foreign_key>false</foreign_key> 2262 + <foreign_key>true</foreign_key>
2134 <not_null>false</not_null> 2263 <not_null>false</not_null>
2135 <primary_key>false</primary_key> 2264 <primary_key>false</primary_key>
2136 <unique_key>false</unique_key> 2265 <unique_key>false</unique_key>
@@ -2152,17 +2281,18 @@ @@ -2152,17 +2281,18 @@
2152 </sequence> 2281 </sequence>
2153 </normal_column> 2282 </normal_column>
2154 <normal_column> 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 <description></description> 2287 <description></description>
2158 <unique_key_name></unique_key_name> 2288 <unique_key_name></unique_key_name>
2159 <logical_name></logical_name> 2289 <logical_name></logical_name>
2160 <physical_name></physical_name> 2290 <physical_name></physical_name>
2161 - <type>text</type> 2291 + <type>integer</type>
2162 <constraint></constraint> 2292 <constraint></constraint>
2163 <default_value></default_value> 2293 <default_value></default_value>
2164 <auto_increment>false</auto_increment> 2294 <auto_increment>false</auto_increment>
2165 - <foreign_key>false</foreign_key> 2295 + <foreign_key>true</foreign_key>
2166 <not_null>false</not_null> 2296 <not_null>false</not_null>
2167 <primary_key>false</primary_key> 2297 <primary_key>false</primary_key>
2168 <unique_key>false</unique_key> 2298 <unique_key>false</unique_key>
@@ -2184,17 +2314,18 @@ @@ -2184,17 +2314,18 @@
2184 </sequence> 2314 </sequence>
2185 </normal_column> 2315 </normal_column>
2186 <normal_column> 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 <description></description> 2320 <description></description>
2190 <unique_key_name></unique_key_name> 2321 <unique_key_name></unique_key_name>
2191 <logical_name></logical_name> 2322 <logical_name></logical_name>
2192 <physical_name></physical_name> 2323 <physical_name></physical_name>
2193 - <type>text</type> 2324 + <type>integer</type>
2194 <constraint></constraint> 2325 <constraint></constraint>
2195 <default_value></default_value> 2326 <default_value></default_value>
2196 <auto_increment>false</auto_increment> 2327 <auto_increment>false</auto_increment>
2197 - <foreign_key>false</foreign_key> 2328 + <foreign_key>true</foreign_key>
2198 <not_null>false</not_null> 2329 <not_null>false</not_null>
2199 <primary_key>false</primary_key> 2330 <primary_key>false</primary_key>
2200 <unique_key>false</unique_key> 2331 <unique_key>false</unique_key>
@@ -2216,8 +2347,8 @@ @@ -2216,8 +2347,8 @@
2216 </sequence> 2347 </sequence>
2217 </normal_column> 2348 </normal_column>
2218 <normal_column> 2349 <normal_column>
2219 - <word_id>28</word_id>  
2220 - <id>38</id> 2350 + <word_id>17</word_id>
  2351 + <id>40</id>
2221 <description></description> 2352 <description></description>
2222 <unique_key_name></unique_key_name> 2353 <unique_key_name></unique_key_name>
2223 <logical_name></logical_name> 2354 <logical_name></logical_name>
@@ -2226,95 +2357,10 @@ @@ -2226,95 +2357,10 @@
2226 <constraint></constraint> 2357 <constraint></constraint>
2227 <default_value></default_value> 2358 <default_value></default_value>
2228 <auto_increment>false</auto_increment> 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 <character_set></character_set> 2364 <character_set></character_set>
2319 <collation></collation> 2365 <collation></collation>
2320 <sequence> 2366 <sequence>
@@ -2333,8 +2379,8 @@ @@ -2333,8 +2379,8 @@
2333 </sequence> 2379 </sequence>
2334 </normal_column> 2380 </normal_column>
2335 <normal_column> 2381 <normal_column>
2336 - <word_id>7</word_id>  
2337 - <id>40</id> 2382 + <word_id>36</word_id>
  2383 + <id>41</id>
2338 <description></description> 2384 <description></description>
2339 <unique_key_name></unique_key_name> 2385 <unique_key_name></unique_key_name>
2340 <logical_name></logical_name> 2386 <logical_name></logical_name>
@@ -2365,8 +2411,8 @@ @@ -2365,8 +2411,8 @@
2365 </sequence> 2411 </sequence>
2366 </normal_column> 2412 </normal_column>
2367 <normal_column> 2413 <normal_column>
2368 - <word_id>27</word_id>  
2369 - <id>41</id> 2414 + <word_id>11</word_id>
  2415 + <id>42</id>
2370 <description></description> 2416 <description></description>
2371 <unique_key_name></unique_key_name> 2417 <unique_key_name></unique_key_name>
2372 <logical_name></logical_name> 2418 <logical_name></logical_name>
@@ -2397,8 +2443,8 @@ @@ -2397,8 +2443,8 @@
2397 </sequence> 2443 </sequence>
2398 </normal_column> 2444 </normal_column>
2399 <normal_column> 2445 <normal_column>
2400 - <word_id>14</word_id>  
2401 - <id>42</id> 2446 + <word_id>9</word_id>
  2447 + <id>43</id>
2402 <description></description> 2448 <description></description>
2403 <unique_key_name></unique_key_name> 2449 <unique_key_name></unique_key_name>
2404 <logical_name></logical_name> 2450 <logical_name></logical_name>
@@ -2429,15 +2475,15 @@ @@ -2429,15 +2475,15 @@
2429 </sequence> 2475 </sequence>
2430 </normal_column> 2476 </normal_column>
2431 <normal_column> 2477 <normal_column>
2432 - <word_id>0</word_id>  
2433 - <id>43</id> 2478 + <word_id>19</word_id>
  2479 + <id>44</id>
2434 <description></description> 2480 <description></description>
2435 <unique_key_name></unique_key_name> 2481 <unique_key_name></unique_key_name>
2436 <logical_name></logical_name> 2482 <logical_name></logical_name>
2437 <physical_name></physical_name> 2483 <physical_name></physical_name>
2438 - <type>integer</type> 2484 + <type>text</type>
2439 <constraint></constraint> 2485 <constraint></constraint>
2440 - <default_value>0</default_value> 2486 + <default_value></default_value>
2441 <auto_increment>false</auto_increment> 2487 <auto_increment>false</auto_increment>
2442 <foreign_key>false</foreign_key> 2488 <foreign_key>false</foreign_key>
2443 <not_null>false</not_null> 2489 <not_null>false</not_null>
@@ -2461,18 +2507,17 @@ @@ -2461,18 +2507,17 @@
2461 </sequence> 2507 </sequence>
2462 </normal_column> 2508 </normal_column>
2463 <normal_column> 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 <description></description> 2512 <description></description>
2468 <unique_key_name></unique_key_name> 2513 <unique_key_name></unique_key_name>
2469 <logical_name></logical_name> 2514 <logical_name></logical_name>
2470 <physical_name></physical_name> 2515 <physical_name></physical_name>
2471 - <type>integer</type> 2516 + <type>text</type>
2472 <constraint></constraint> 2517 <constraint></constraint>
2473 <default_value></default_value> 2518 <default_value></default_value>
2474 <auto_increment>false</auto_increment> 2519 <auto_increment>false</auto_increment>
2475 - <foreign_key>true</foreign_key> 2520 + <foreign_key>false</foreign_key>
2476 <not_null>false</not_null> 2521 <not_null>false</not_null>
2477 <primary_key>false</primary_key> 2522 <primary_key>false</primary_key>
2478 <unique_key>false</unique_key> 2523 <unique_key>false</unique_key>
@@ -2510,31 +2555,31 @@ @@ -2510,31 +2555,31 @@
2510 <name>metaestat_basededados</name> 2555 <name>metaestat_basededados</name>
2511 <export_order>0</export_order> 2556 <export_order>0</export_order>
2512 <table_test_data> 2557 <table_test_data>
2513 - <table_id>5</table_id> 2558 + <table_id>8</table_id>
2514 <direct_test_data> 2559 <direct_test_data>
2515 <data> 2560 <data>
2516 <column_data> 2561 <column_data>
2517 - <column_id>13</column_id> 2562 + <column_id>25</column_id>
2518 <value>1</value> 2563 <value>1</value>
2519 </column_data> 2564 </column_data>
2520 <column_data> 2565 <column_data>
2521 - <column_id>14</column_id> 2566 + <column_id>26</column_id>
2522 <value>dbspo</value> 2567 <value>dbspo</value>
2523 </column_data> 2568 </column_data>
2524 <column_data> 2569 <column_data>
2525 - <column_id>15</column_id> 2570 + <column_id>27</column_id>
2526 <value>localhost</value> 2571 <value>localhost</value>
2527 </column_data> 2572 </column_data>
2528 <column_data> 2573 <column_data>
2529 - <column_id>16</column_id> 2574 + <column_id>28</column_id>
2530 <value>5432</value> 2575 <value>5432</value>
2531 </column_data> 2576 </column_data>
2532 <column_data> 2577 <column_data>
2533 - <column_id>17</column_id> 2578 + <column_id>29</column_id>
2534 <value>postgres</value> 2579 <value>postgres</value>
2535 </column_data> 2580 </column_data>
2536 <column_data> 2581 <column_data>
2537 - <column_id>18</column_id> 2582 + <column_id>30</column_id>
2538 <value>postgres</value> 2583 <value>postgres</value>
2539 </column_data> 2584 </column_data>
2540 </data> 2585 </data>
@@ -2543,7 +2588,7 @@ @@ -2543,7 +2588,7 @@
2543 <test_data_num>0</test_data_num> 2588 <test_data_num>0</test_data_num>
2544 <data_def_list> 2589 <data_def_list>
2545 <data_def> 2590 <data_def>
2546 - <column_id>13</column_id> 2591 + <column_id>25</column_id>
2547 <type>Format</type> 2592 <type>Format</type>
2548 <repeat_num>1</repeat_num> 2593 <repeat_num>1</repeat_num>
2549 <template>%</template> 2594 <template>%</template>
@@ -2558,7 +2603,7 @@ @@ -2558,7 +2603,7 @@
2558 </modified_values> 2603 </modified_values>
2559 </data_def> 2604 </data_def>
2560 <data_def> 2605 <data_def>
2561 - <column_id>14</column_id> 2606 + <column_id>26</column_id>
2562 <type>Format</type> 2607 <type>Format</type>
2563 <repeat_num>1</repeat_num> 2608 <repeat_num>1</repeat_num>
2564 <template>database%</template> 2609 <template>database%</template>
@@ -2573,7 +2618,7 @@ @@ -2573,7 +2618,7 @@
2573 </modified_values> 2618 </modified_values>
2574 </data_def> 2619 </data_def>
2575 <data_def> 2620 <data_def>
2576 - <column_id>15</column_id> 2621 + <column_id>27</column_id>
2577 <type>Format</type> 2622 <type>Format</type>
2578 <repeat_num>1</repeat_num> 2623 <repeat_num>1</repeat_num>
2579 <template>host%</template> 2624 <template>host%</template>
@@ -2588,7 +2633,7 @@ @@ -2588,7 +2633,7 @@
2588 </modified_values> 2633 </modified_values>
2589 </data_def> 2634 </data_def>
2590 <data_def> 2635 <data_def>
2591 - <column_id>16</column_id> 2636 + <column_id>28</column_id>
2592 <type>Format</type> 2637 <type>Format</type>
2593 <repeat_num>1</repeat_num> 2638 <repeat_num>1</repeat_num>
2594 <template>porta%</template> 2639 <template>porta%</template>
@@ -2603,7 +2648,7 @@ @@ -2603,7 +2648,7 @@
2603 </modified_values> 2648 </modified_values>
2604 </data_def> 2649 </data_def>
2605 <data_def> 2650 <data_def>
2606 - <column_id>17</column_id> 2651 + <column_id>29</column_id>
2607 <type>Format</type> 2652 <type>Format</type>
2608 <repeat_num>1</repeat_num> 2653 <repeat_num>1</repeat_num>
2609 <template>usuario%</template> 2654 <template>usuario%</template>
@@ -2618,7 +2663,7 @@ @@ -2618,7 +2663,7 @@
2618 </modified_values> 2663 </modified_values>
2619 </data_def> 2664 </data_def>
2620 <data_def> 2665 <data_def>
2621 - <column_id>18</column_id> 2666 + <column_id>30</column_id>
2622 <type>Format</type> 2667 <type>Format</type>
2623 <repeat_num>1</repeat_num> 2668 <repeat_num>1</repeat_num>
2624 <template>senha%</template> 2669 <template>senha%</template>
@@ -2636,33 +2681,33 @@ @@ -2636,33 +2681,33 @@
2636 </repeat_test_data> 2681 </repeat_test_data>
2637 </table_test_data> 2682 </table_test_data>
2638 <table_test_data> 2683 <table_test_data>
2639 - <table_id>3</table_id> 2684 + <table_id>7</table_id>
2640 <direct_test_data> 2685 <direct_test_data>
2641 <data> 2686 <data>
2642 <column_data> 2687 <column_data>
2643 - <column_id>0</column_id> 2688 + <column_id>22</column_id>
2644 <value>1</value> 2689 <value>1</value>
2645 </column_data> 2690 </column_data>
2646 <column_data> 2691 <column_data>
2647 - <column_id>1</column_id> 2692 + <column_id>23</column_id>
2648 <value>Anual</value> 2693 <value>Anual</value>
2649 </column_data> 2694 </column_data>
2650 <column_data> 2695 <column_data>
2651 - <column_id>2</column_id> 2696 + <column_id>24</column_id>
2652 <value></value> 2697 <value></value>
2653 </column_data> 2698 </column_data>
2654 </data> 2699 </data>
2655 <data> 2700 <data>
2656 <column_data> 2701 <column_data>
2657 - <column_id>0</column_id> 2702 + <column_id>22</column_id>
2658 <value>2</value> 2703 <value>2</value>
2659 </column_data> 2704 </column_data>
2660 <column_data> 2705 <column_data>
2661 - <column_id>1</column_id> 2706 + <column_id>23</column_id>
2662 <value>Mensal</value> 2707 <value>Mensal</value>
2663 </column_data> 2708 </column_data>
2664 <column_data> 2709 <column_data>
2665 - <column_id>2</column_id> 2710 + <column_id>24</column_id>
2666 <value></value> 2711 <value></value>
2667 </column_data> 2712 </column_data>
2668 </data> 2713 </data>
@@ -2671,7 +2716,7 @@ @@ -2671,7 +2716,7 @@
2671 <test_data_num>0</test_data_num> 2716 <test_data_num>0</test_data_num>
2672 <data_def_list> 2717 <data_def_list>
2673 <data_def> 2718 <data_def>
2674 - <column_id>0</column_id> 2719 + <column_id>22</column_id>
2675 <type>Format</type> 2720 <type>Format</type>
2676 <repeat_num>1</repeat_num> 2721 <repeat_num>1</repeat_num>
2677 <template>%</template> 2722 <template>%</template>
@@ -2686,7 +2731,7 @@ @@ -2686,7 +2731,7 @@
2686 </modified_values> 2731 </modified_values>
2687 </data_def> 2732 </data_def>
2688 <data_def> 2733 <data_def>
2689 - <column_id>1</column_id> 2734 + <column_id>23</column_id>
2690 <type>Format</type> 2735 <type>Format</type>
2691 <repeat_num>1</repeat_num> 2736 <repeat_num>1</repeat_num>
2692 <template>nome%</template> 2737 <template>nome%</template>
@@ -2701,7 +2746,7 @@ @@ -2701,7 +2746,7 @@
2701 </modified_values> 2746 </modified_values>
2702 </data_def> 2747 </data_def>
2703 <data_def> 2748 <data_def>
2704 - <column_id>2</column_id> 2749 + <column_id>24</column_id>
2705 <type>Format</type> 2750 <type>Format</type>
2706 <repeat_num>1</repeat_num> 2751 <repeat_num>1</repeat_num>
2707 <template>descricao%</template> 2752 <template>descricao%</template>
@@ -2719,48 +2764,52 @@ @@ -2719,48 +2764,52 @@
2719 </repeat_test_data> 2764 </repeat_test_data>
2720 </table_test_data> 2765 </table_test_data>
2721 <table_test_data> 2766 <table_test_data>
2722 - <table_id>4</table_id> 2767 + <table_id>6</table_id>
2723 <direct_test_data> 2768 <direct_test_data>
2724 <data> 2769 <data>
2725 <column_data> 2770 <column_data>
2726 - <column_id>3</column_id> 2771 + <column_id>11</column_id>
2727 <value>1</value> 2772 <value>1</value>
2728 </column_data> 2773 </column_data>
2729 <column_data> 2774 <column_data>
2730 - <column_id>4</column_id> 2775 + <column_id>12</column_id>
2731 <value>Município</value> 2776 <value>Município</value>
2732 </column_data> 2777 </column_data>
2733 <column_data> 2778 <column_data>
2734 - <column_id>5</column_id> 2779 + <column_id>13</column_id>
2735 <value>Limites municipais</value> 2780 <value>Limites municipais</value>
2736 </column_data> 2781 </column_data>
2737 <column_data> 2782 <column_data>
2738 - <column_id>6</column_id> 2783 + <column_id>14</column_id>
2739 <value>1</value> 2784 <value>1</value>
2740 </column_data> 2785 </column_data>
2741 <column_data> 2786 <column_data>
2742 - <column_id>7</column_id> 2787 + <column_id>15</column_id>
2743 <value>public</value> 2788 <value>public</value>
2744 </column_data> 2789 </column_data>
2745 <column_data> 2790 <column_data>
2746 - <column_id>8</column_id>  
2747 - <value></value> 2791 + <column_id>16</column_id>
  2792 + <value>tb_ibge</value>
2748 </column_data> 2793 </column_data>
2749 <column_data> 2794 <column_data>
2750 - <column_id>9</column_id>  
2751 - <value></value> 2795 + <column_id>17</column_id>
  2796 + <value>the_geom</value>
2752 </column_data> 2797 </column_data>
2753 <column_data> 2798 <column_data>
2754 - <column_id>10</column_id> 2799 + <column_id>18</column_id>
2755 <value></value> 2800 <value></value>
2756 </column_data> 2801 </column_data>
2757 <column_data> 2802 <column_data>
2758 - <column_id>11</column_id>  
2759 - <value></value> 2803 + <column_id>19</column_id>
  2804 + <value>ibge</value>
2760 </column_data> 2805 </column_data>
2761 <column_data> 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 </column_data> 2813 </column_data>
2765 </data> 2814 </data>
2766 </direct_test_data> 2815 </direct_test_data>
@@ -2768,7 +2817,7 @@ @@ -2768,7 +2817,7 @@
2768 <test_data_num>0</test_data_num> 2817 <test_data_num>0</test_data_num>
2769 <data_def_list> 2818 <data_def_list>
2770 <data_def> 2819 <data_def>
2771 - <column_id>3</column_id> 2820 + <column_id>11</column_id>
2772 <type>Format</type> 2821 <type>Format</type>
2773 <repeat_num>1</repeat_num> 2822 <repeat_num>1</repeat_num>
2774 <template>%</template> 2823 <template>%</template>
@@ -2783,7 +2832,7 @@ @@ -2783,7 +2832,7 @@
2783 </modified_values> 2832 </modified_values>
2784 </data_def> 2833 </data_def>
2785 <data_def> 2834 <data_def>
2786 - <column_id>4</column_id> 2835 + <column_id>12</column_id>
2787 <type>Format</type> 2836 <type>Format</type>
2788 <repeat_num>1</repeat_num> 2837 <repeat_num>1</repeat_num>
2789 <template>nome_tipo_regiao%</template> 2838 <template>nome_tipo_regiao%</template>
@@ -2798,7 +2847,7 @@ @@ -2798,7 +2847,7 @@
2798 </modified_values> 2847 </modified_values>
2799 </data_def> 2848 </data_def>
2800 <data_def> 2849 <data_def>
2801 - <column_id>5</column_id> 2850 + <column_id>13</column_id>
2802 <type>Format</type> 2851 <type>Format</type>
2803 <repeat_num>1</repeat_num> 2852 <repeat_num>1</repeat_num>
2804 <template>descricao_tipo_regiao%</template> 2853 <template>descricao_tipo_regiao%</template>
@@ -2813,7 +2862,7 @@ @@ -2813,7 +2862,7 @@
2813 </modified_values> 2862 </modified_values>
2814 </data_def> 2863 </data_def>
2815 <data_def> 2864 <data_def>
2816 - <column_id>6</column_id> 2865 + <column_id>14</column_id>
2817 <type>Foreign Key</type> 2866 <type>Foreign Key</type>
2818 <repeat_num>1</repeat_num> 2867 <repeat_num>1</repeat_num>
2819 <template>%</template> 2868 <template>%</template>
@@ -2828,7 +2877,7 @@ @@ -2828,7 +2877,7 @@
2828 </modified_values> 2877 </modified_values>
2829 </data_def> 2878 </data_def>
2830 <data_def> 2879 <data_def>
2831 - <column_id>7</column_id> 2880 + <column_id>15</column_id>
2832 <type>Format</type> 2881 <type>Format</type>
2833 <repeat_num>1</repeat_num> 2882 <repeat_num>1</repeat_num>
2834 <template>esquemadb%</template> 2883 <template>esquemadb%</template>
@@ -2843,7 +2892,7 @@ @@ -2843,7 +2892,7 @@
2843 </modified_values> 2892 </modified_values>
2844 </data_def> 2893 </data_def>
2845 <data_def> 2894 <data_def>
2846 - <column_id>8</column_id> 2895 + <column_id>16</column_id>
2847 <type>Format</type> 2896 <type>Format</type>
2848 <repeat_num>1</repeat_num> 2897 <repeat_num>1</repeat_num>
2849 <template>tabela%</template> 2898 <template>tabela%</template>
@@ -2858,7 +2907,7 @@ @@ -2858,7 +2907,7 @@
2858 </modified_values> 2907 </modified_values>
2859 </data_def> 2908 </data_def>
2860 <data_def> 2909 <data_def>
2861 - <column_id>9</column_id> 2910 + <column_id>17</column_id>
2862 <type>Format</type> 2911 <type>Format</type>
2863 <repeat_num>1</repeat_num> 2912 <repeat_num>1</repeat_num>
2864 <template>colunageo%</template> 2913 <template>colunageo%</template>
@@ -2873,7 +2922,7 @@ @@ -2873,7 +2922,7 @@
2873 </modified_values> 2922 </modified_values>
2874 </data_def> 2923 </data_def>
2875 <data_def> 2924 <data_def>
2876 - <column_id>10</column_id> 2925 + <column_id>18</column_id>
2877 <type>Format</type> 2926 <type>Format</type>
2878 <repeat_num>1</repeat_num> 2927 <repeat_num>1</repeat_num>
2879 <template>data%</template> 2928 <template>data%</template>
@@ -2888,7 +2937,7 @@ @@ -2888,7 +2937,7 @@
2888 </modified_values> 2937 </modified_values>
2889 </data_def> 2938 </data_def>
2890 <data_def> 2939 <data_def>
2891 - <column_id>11</column_id> 2940 + <column_id>19</column_id>
2892 <type>Format</type> 2941 <type>Format</type>
2893 <repeat_num>1</repeat_num> 2942 <repeat_num>1</repeat_num>
2894 <template>%</template> 2943 <template>%</template>
@@ -2903,7 +2952,7 @@ @@ -2903,7 +2952,7 @@
2903 </modified_values> 2952 </modified_values>
2904 </data_def> 2953 </data_def>
2905 <data_def> 2954 <data_def>
2906 - <column_id>12</column_id> 2955 + <column_id>20</column_id>
2907 <type>Format</type> 2956 <type>Format</type>
2908 <repeat_num>1</repeat_num> 2957 <repeat_num>1</repeat_num>
2909 <template>colunanomeregiao%</template> 2958 <template>colunanomeregiao%</template>
@@ -2917,31 +2966,46 @@ @@ -2917,31 +2966,46 @@
2917 <modified_values> 2966 <modified_values>
2918 </modified_values> 2967 </modified_values>
2919 </data_def> 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 </data_def_list> 2984 </data_def_list>
2921 </repeat_test_data> 2985 </repeat_test_data>
2922 </table_test_data> 2986 </table_test_data>
2923 <table_test_data> 2987 <table_test_data>
2924 - <table_id>8</table_id> 2988 + <table_id>4</table_id>
2925 <direct_test_data> 2989 <direct_test_data>
2926 <data> 2990 <data>
2927 <column_data> 2991 <column_data>
2928 - <column_id>22</column_id> 2992 + <column_id>0</column_id>
2929 <value>1</value> 2993 <value>1</value>
2930 </column_data> 2994 </column_data>
2931 <column_data> 2995 <column_data>
2932 - <column_id>23</column_id> 2996 + <column_id>1</column_id>
2933 <value>Unidade</value> 2997 <value>Unidade</value>
2934 </column_data> 2998 </column_data>
2935 <column_data> 2999 <column_data>
2936 - <column_id>24</column_id> 3000 + <column_id>2</column_id>
2937 <value>Un</value> 3001 <value>Un</value>
2938 </column_data> 3002 </column_data>
2939 <column_data> 3003 <column_data>
2940 - <column_id>25</column_id> 3004 + <column_id>3</column_id>
2941 <value></value> 3005 <value></value>
2942 </column_data> 3006 </column_data>
2943 <column_data> 3007 <column_data>
2944 - <column_id>26</column_id> 3008 + <column_id>4</column_id>
2945 <value></value> 3009 <value></value>
2946 </column_data> 3010 </column_data>
2947 </data> 3011 </data>
@@ -2950,7 +3014,7 @@ @@ -2950,7 +3014,7 @@
2950 <test_data_num>0</test_data_num> 3014 <test_data_num>0</test_data_num>
2951 <data_def_list> 3015 <data_def_list>
2952 <data_def> 3016 <data_def>
2953 - <column_id>22</column_id> 3017 + <column_id>0</column_id>
2954 <type>Format</type> 3018 <type>Format</type>
2955 <repeat_num>1</repeat_num> 3019 <repeat_num>1</repeat_num>
2956 <template>%</template> 3020 <template>%</template>
@@ -2965,7 +3029,7 @@ @@ -2965,7 +3029,7 @@
2965 </modified_values> 3029 </modified_values>
2966 </data_def> 3030 </data_def>
2967 <data_def> 3031 <data_def>
2968 - <column_id>23</column_id> 3032 + <column_id>1</column_id>
2969 <type>Format</type> 3033 <type>Format</type>
2970 <repeat_num>1</repeat_num> 3034 <repeat_num>1</repeat_num>
2971 <template>nome%</template> 3035 <template>nome%</template>
@@ -2980,7 +3044,7 @@ @@ -2980,7 +3044,7 @@
2980 </modified_values> 3044 </modified_values>
2981 </data_def> 3045 </data_def>
2982 <data_def> 3046 <data_def>
2983 - <column_id>24</column_id> 3047 + <column_id>2</column_id>
2984 <type>Format</type> 3048 <type>Format</type>
2985 <repeat_num>1</repeat_num> 3049 <repeat_num>1</repeat_num>
2986 <template>sigla%</template> 3050 <template>sigla%</template>
@@ -2995,7 +3059,7 @@ @@ -2995,7 +3059,7 @@
2995 </modified_values> 3059 </modified_values>
2996 </data_def> 3060 </data_def>
2997 <data_def> 3061 <data_def>
2998 - <column_id>25</column_id> 3062 + <column_id>3</column_id>
2999 <type>Format</type> 3063 <type>Format</type>
3000 <repeat_num>1</repeat_num> 3064 <repeat_num>1</repeat_num>
3001 <template>%</template> 3065 <template>%</template>
@@ -3010,7 +3074,7 @@ @@ -3010,7 +3074,7 @@
3010 </modified_values> 3074 </modified_values>
3011 </data_def> 3075 </data_def>
3012 <data_def> 3076 <data_def>
3013 - <column_id>26</column_id> 3077 + <column_id>4</column_id>
3014 <type>Format</type> 3078 <type>Format</type>
3015 <repeat_num>1</repeat_num> 3079 <repeat_num>1</repeat_num>
3016 <template>%</template> 3080 <template>%</template>
@@ -3028,55 +3092,55 @@ @@ -3028,55 +3092,55 @@
3028 </repeat_test_data> 3092 </repeat_test_data>
3029 </table_test_data> 3093 </table_test_data>
3030 <table_test_data> 3094 <table_test_data>
3031 - <table_id>9</table_id> 3095 + <table_id>10</table_id>
3032 <direct_test_data> 3096 <direct_test_data>
3033 <data> 3097 <data>
3034 <column_data> 3098 <column_data>
3035 - <column_id>27</column_id> 3099 + <column_id>34</column_id>
3036 <value>1</value> 3100 <value>1</value>
3037 </column_data> 3101 </column_data>
3038 <column_data> 3102 <column_data>
3039 - <column_id>28</column_id> 3103 + <column_id>35</column_id>
3040 <value>1</value> 3104 <value>1</value>
3041 </column_data> 3105 </column_data>
3042 <column_data> 3106 <column_data>
3043 - <column_id>29</column_id> 3107 + <column_id>36</column_id>
3044 <value>2</value> 3108 <value>2</value>
3045 </column_data> 3109 </column_data>
3046 <column_data> 3110 <column_data>
3047 - <column_id>30</column_id> 3111 + <column_id>37</column_id>
3048 <value>1</value> 3112 <value>1</value>
3049 </column_data> 3113 </column_data>
3050 <column_data> 3114 <column_data>
3051 - <column_id>31</column_id> 3115 + <column_id>38</column_id>
3052 <value>1</value> 3116 <value>1</value>
3053 </column_data> 3117 </column_data>
3054 <column_data> 3118 <column_data>
3055 - <column_id>32</column_id> 3119 + <column_id>39</column_id>
3056 <value>1</value> 3120 <value>1</value>
3057 </column_data> 3121 </column_data>
3058 <column_data> 3122 <column_data>
3059 - <column_id>33</column_id> 3123 + <column_id>40</column_id>
3060 <value>dbacoes_saude</value> 3124 <value>dbacoes_saude</value>
3061 </column_data> 3125 </column_data>
3062 <column_data> 3126 <column_data>
3063 - <column_id>34</column_id> 3127 + <column_id>41</column_id>
3064 <value>tb_farmacia_pop</value> 3128 <value>tb_farmacia_pop</value>
3065 </column_data> 3129 </column_data>
3066 <column_data> 3130 <column_data>
3067 - <column_id>35</column_id> 3131 + <column_id>42</column_id>
3068 <value>nu_farm_funcionando</value> 3132 <value>nu_farm_funcionando</value>
3069 </column_data> 3133 </column_data>
3070 <column_data> 3134 <column_data>
3071 - <column_id>36</column_id> 3135 + <column_id>43</column_id>
3072 <value>co_ibge</value> 3136 <value>co_ibge</value>
3073 </column_data> 3137 </column_data>
3074 <column_data> 3138 <column_data>
3075 - <column_id>37</column_id> 3139 + <column_id>44</column_id>
3076 <value></value> 3140 <value></value>
3077 </column_data> 3141 </column_data>
3078 <column_data> 3142 <column_data>
3079 - <column_id>38</column_id> 3143 + <column_id>45</column_id>
3080 <value>Número de farmácias em funcionamento por mês e ano</value> 3144 <value>Número de farmácias em funcionamento por mês e ano</value>
3081 </column_data> 3145 </column_data>
3082 </data> 3146 </data>
@@ -3085,7 +3149,7 @@ @@ -3085,7 +3149,7 @@
3085 <test_data_num>0</test_data_num> 3149 <test_data_num>0</test_data_num>
3086 <data_def_list> 3150 <data_def_list>
3087 <data_def> 3151 <data_def>
3088 - <column_id>27</column_id> 3152 + <column_id>34</column_id>
3089 <type>Format</type> 3153 <type>Format</type>
3090 <repeat_num>1</repeat_num> 3154 <repeat_num>1</repeat_num>
3091 <template>%</template> 3155 <template>%</template>
@@ -3100,7 +3164,7 @@ @@ -3100,7 +3164,7 @@
3100 </modified_values> 3164 </modified_values>
3101 </data_def> 3165 </data_def>
3102 <data_def> 3166 <data_def>
3103 - <column_id>28</column_id> 3167 + <column_id>35</column_id>
3104 <type>Foreign Key</type> 3168 <type>Foreign Key</type>
3105 <repeat_num>1</repeat_num> 3169 <repeat_num>1</repeat_num>
3106 <template>%</template> 3170 <template>%</template>
@@ -3115,7 +3179,7 @@ @@ -3115,7 +3179,7 @@
3115 </modified_values> 3179 </modified_values>
3116 </data_def> 3180 </data_def>
3117 <data_def> 3181 <data_def>
3118 - <column_id>29</column_id> 3182 + <column_id>36</column_id>
3119 <type>Foreign Key</type> 3183 <type>Foreign Key</type>
3120 <repeat_num>1</repeat_num> 3184 <repeat_num>1</repeat_num>
3121 <template>%</template> 3185 <template>%</template>
@@ -3130,7 +3194,7 @@ @@ -3130,7 +3194,7 @@
3130 </modified_values> 3194 </modified_values>
3131 </data_def> 3195 </data_def>
3132 <data_def> 3196 <data_def>
3133 - <column_id>30</column_id> 3197 + <column_id>37</column_id>
3134 <type>Foreign Key</type> 3198 <type>Foreign Key</type>
3135 <repeat_num>1</repeat_num> 3199 <repeat_num>1</repeat_num>
3136 <template>%</template> 3200 <template>%</template>
@@ -3145,7 +3209,7 @@ @@ -3145,7 +3209,7 @@
3145 </modified_values> 3209 </modified_values>
3146 </data_def> 3210 </data_def>
3147 <data_def> 3211 <data_def>
3148 - <column_id>31</column_id> 3212 + <column_id>38</column_id>
3149 <type>Foreign Key</type> 3213 <type>Foreign Key</type>
3150 <repeat_num>1</repeat_num> 3214 <repeat_num>1</repeat_num>
3151 <template>%</template> 3215 <template>%</template>
@@ -3160,7 +3224,7 @@ @@ -3160,7 +3224,7 @@
3160 </modified_values> 3224 </modified_values>
3161 </data_def> 3225 </data_def>
3162 <data_def> 3226 <data_def>
3163 - <column_id>32</column_id> 3227 + <column_id>39</column_id>
3164 <type>Foreign Key</type> 3228 <type>Foreign Key</type>
3165 <repeat_num>1</repeat_num> 3229 <repeat_num>1</repeat_num>
3166 <template>%</template> 3230 <template>%</template>
@@ -3175,7 +3239,7 @@ @@ -3175,7 +3239,7 @@
3175 </modified_values> 3239 </modified_values>
3176 </data_def> 3240 </data_def>
3177 <data_def> 3241 <data_def>
3178 - <column_id>33</column_id> 3242 + <column_id>40</column_id>
3179 <type>Format</type> 3243 <type>Format</type>
3180 <repeat_num>1</repeat_num> 3244 <repeat_num>1</repeat_num>
3181 <template>esquemadb%</template> 3245 <template>esquemadb%</template>
@@ -3190,7 +3254,7 @@ @@ -3190,7 +3254,7 @@
3190 </modified_values> 3254 </modified_values>
3191 </data_def> 3255 </data_def>
3192 <data_def> 3256 <data_def>
3193 - <column_id>34</column_id> 3257 + <column_id>41</column_id>
3194 <type>Format</type> 3258 <type>Format</type>
3195 <repeat_num>1</repeat_num> 3259 <repeat_num>1</repeat_num>
3196 <template>tabela%</template> 3260 <template>tabela%</template>
@@ -3205,7 +3269,7 @@ @@ -3205,7 +3269,7 @@
3205 </modified_values> 3269 </modified_values>
3206 </data_def> 3270 </data_def>
3207 <data_def> 3271 <data_def>
3208 - <column_id>35</column_id> 3272 + <column_id>42</column_id>
3209 <type>Format</type> 3273 <type>Format</type>
3210 <repeat_num>1</repeat_num> 3274 <repeat_num>1</repeat_num>
3211 <template>colunavalor%</template> 3275 <template>colunavalor%</template>
@@ -3220,7 +3284,7 @@ @@ -3220,7 +3284,7 @@
3220 </modified_values> 3284 </modified_values>
3221 </data_def> 3285 </data_def>
3222 <data_def> 3286 <data_def>
3223 - <column_id>36</column_id> 3287 + <column_id>43</column_id>
3224 <type>Format</type> 3288 <type>Format</type>
3225 <repeat_num>1</repeat_num> 3289 <repeat_num>1</repeat_num>
3226 <template>colunaidgeo_%</template> 3290 <template>colunaidgeo_%</template>
@@ -3235,7 +3299,7 @@ @@ -3235,7 +3299,7 @@
3235 </modified_values> 3299 </modified_values>
3236 </data_def> 3300 </data_def>
3237 <data_def> 3301 <data_def>
3238 - <column_id>37</column_id> 3302 + <column_id>44</column_id>
3239 <type>Format</type> 3303 <type>Format</type>
3240 <repeat_num>1</repeat_num> 3304 <repeat_num>1</repeat_num>
3241 <template>filtro%</template> 3305 <template>filtro%</template>
@@ -3250,7 +3314,7 @@ @@ -3250,7 +3314,7 @@
3250 </modified_values> 3314 </modified_values>
3251 </data_def> 3315 </data_def>
3252 <data_def> 3316 <data_def>
3253 - <column_id>38</column_id> 3317 + <column_id>45</column_id>
3254 <type>Format</type> 3318 <type>Format</type>
3255 <repeat_num>1</repeat_num> 3319 <repeat_num>1</repeat_num>
3256 <template>nomemedida_%</template> 3320 <template>nomemedida_%</template>
@@ -3268,57 +3332,57 @@ @@ -3268,57 +3332,57 @@
3268 </repeat_test_data> 3332 </repeat_test_data>
3269 </table_test_data> 3333 </table_test_data>
3270 <table_test_data> 3334 <table_test_data>
3271 - <table_id>10</table_id> 3335 + <table_id>5</table_id>
3272 <direct_test_data> 3336 <direct_test_data>
3273 <data> 3337 <data>
3274 <column_data> 3338 <column_data>
3275 - <column_id>39</column_id> 3339 + <column_id>5</column_id>
3276 <value>1</value> 3340 <value>1</value>
3277 </column_data> 3341 </column_data>
3278 <column_data> 3342 <column_data>
3279 - <column_id>40</column_id> 3343 + <column_id>6</column_id>
3280 <value>to_date(mes_farm_pop||&apos; &apos;||ano_farm,&apos;MM YYYY&apos;) as mes</value> 3344 <value>to_date(mes_farm_pop||&apos; &apos;||ano_farm,&apos;MM YYYY&apos;) as mes</value>
3281 </column_data> 3345 </column_data>
3282 <column_data> 3346 <column_data>
3283 - <column_id>41</column_id> 3347 + <column_id>7</column_id>
3284 <value>mês e ano</value> 3348 <value>mês e ano</value>
3285 </column_data> 3349 </column_data>
3286 <column_data> 3350 <column_data>
3287 - <column_id>42</column_id> 3351 + <column_id>8</column_id>
3288 <value></value> 3352 <value></value>
3289 </column_data> 3353 </column_data>
3290 <column_data> 3354 <column_data>
3291 - <column_id>43</column_id> 3355 + <column_id>9</column_id>
3292 <value>0</value> 3356 <value>0</value>
3293 </column_data> 3357 </column_data>
3294 <column_data> 3358 <column_data>
3295 - <column_id>44</column_id> 3359 + <column_id>10</column_id>
3296 <value>1</value> 3360 <value>1</value>
3297 </column_data> 3361 </column_data>
3298 </data> 3362 </data>
3299 <data> 3363 <data>
3300 <column_data> 3364 <column_data>
3301 - <column_id>39</column_id> 3365 + <column_id>5</column_id>
3302 <value>2</value> 3366 <value>2</value>
3303 </column_data> 3367 </column_data>
3304 <column_data> 3368 <column_data>
3305 - <column_id>40</column_id> 3369 + <column_id>6</column_id>
3306 <value>ano_farm</value> 3370 <value>ano_farm</value>
3307 </column_data> 3371 </column_data>
3308 <column_data> 3372 <column_data>
3309 - <column_id>41</column_id> 3373 + <column_id>7</column_id>
3310 <value>ano</value> 3374 <value>ano</value>
3311 </column_data> 3375 </column_data>
3312 <column_data> 3376 <column_data>
3313 - <column_id>42</column_id> 3377 + <column_id>8</column_id>
3314 <value></value> 3378 <value></value>
3315 </column_data> 3379 </column_data>
3316 <column_data> 3380 <column_data>
3317 - <column_id>43</column_id> 3381 + <column_id>9</column_id>
3318 <value>1</value> 3382 <value>1</value>
3319 </column_data> 3383 </column_data>
3320 <column_data> 3384 <column_data>
3321 - <column_id>44</column_id> 3385 + <column_id>10</column_id>
3322 <value>1</value> 3386 <value>1</value>
3323 </column_data> 3387 </column_data>
3324 </data> 3388 </data>
@@ -3327,7 +3391,7 @@ @@ -3327,7 +3391,7 @@
3327 <test_data_num>0</test_data_num> 3391 <test_data_num>0</test_data_num>
3328 <data_def_list> 3392 <data_def_list>
3329 <data_def> 3393 <data_def>
3330 - <column_id>39</column_id> 3394 + <column_id>5</column_id>
3331 <type>Format</type> 3395 <type>Format</type>
3332 <repeat_num>1</repeat_num> 3396 <repeat_num>1</repeat_num>
3333 <template>%</template> 3397 <template>%</template>
@@ -3342,7 +3406,7 @@ @@ -3342,7 +3406,7 @@
3342 </modified_values> 3406 </modified_values>
3343 </data_def> 3407 </data_def>
3344 <data_def> 3408 <data_def>
3345 - <column_id>40</column_id> 3409 + <column_id>6</column_id>
3346 <type>Format</type> 3410 <type>Format</type>
3347 <repeat_num>1</repeat_num> 3411 <repeat_num>1</repeat_num>
3348 <template>coluna%</template> 3412 <template>coluna%</template>
@@ -3357,7 +3421,7 @@ @@ -3357,7 +3421,7 @@
3357 </modified_values> 3421 </modified_values>
3358 </data_def> 3422 </data_def>
3359 <data_def> 3423 <data_def>
3360 - <column_id>41</column_id> 3424 + <column_id>7</column_id>
3361 <type>Format</type> 3425 <type>Format</type>
3362 <repeat_num>1</repeat_num> 3426 <repeat_num>1</repeat_num>
3363 <template>nomedimensao%</template> 3427 <template>nomedimensao%</template>
@@ -3372,7 +3436,7 @@ @@ -3372,7 +3436,7 @@
3372 </modified_values> 3436 </modified_values>
3373 </data_def> 3437 </data_def>
3374 <data_def> 3438 <data_def>
3375 - <column_id>42</column_id> 3439 + <column_id>8</column_id>
3376 <type>Format</type> 3440 <type>Format</type>
3377 <repeat_num>1</repeat_num> 3441 <repeat_num>1</repeat_num>
3378 <template>descricao%</template> 3442 <template>descricao%</template>
@@ -3387,7 +3451,7 @@ @@ -3387,7 +3451,7 @@
3387 </modified_values> 3451 </modified_values>
3388 </data_def> 3452 </data_def>
3389 <data_def> 3453 <data_def>
3390 - <column_id>43</column_id> 3454 + <column_id>9</column_id>
3391 <type>Format</type> 3455 <type>Format</type>
3392 <repeat_num>1</repeat_num> 3456 <repeat_num>1</repeat_num>
3393 <template>%</template> 3457 <template>%</template>
@@ -3402,7 +3466,7 @@ @@ -3402,7 +3466,7 @@
3402 </modified_values> 3466 </modified_values>
3403 </data_def> 3467 </data_def>
3404 <data_def> 3468 <data_def>
3405 - <column_id>44</column_id> 3469 + <column_id>10</column_id>
3406 <type>Foreign Key</type> 3470 <type>Foreign Key</type>
3407 <repeat_num>1</repeat_num> 3471 <repeat_num>1</repeat_num>
3408 <template>%</template> 3472 <template>%</template>
@@ -3420,19 +3484,19 @@ @@ -3420,19 +3484,19 @@
3420 </repeat_test_data> 3484 </repeat_test_data>
3421 </table_test_data> 3485 </table_test_data>
3422 <table_test_data> 3486 <table_test_data>
3423 - <table_id>6</table_id> 3487 + <table_id>9</table_id>
3424 <direct_test_data> 3488 <direct_test_data>
3425 <data> 3489 <data>
3426 <column_data> 3490 <column_data>
3427 - <column_id>19</column_id> 3491 + <column_id>31</column_id>
3428 <value>1</value> 3492 <value>1</value>
3429 </column_data> 3493 </column_data>
3430 <column_data> 3494 <column_data>
3431 - <column_id>20</column_id> 3495 + <column_id>32</column_id>
3432 <value>Farmácias populares existentes</value> 3496 <value>Farmácias populares existentes</value>
3433 </column_data> 3497 </column_data>
3434 <column_data> 3498 <column_data>
3435 - <column_id>21</column_id> 3499 + <column_id>33</column_id>
3436 <value>Quantidade de farmácias populares existentes</value> 3500 <value>Quantidade de farmácias populares existentes</value>
3437 </column_data> 3501 </column_data>
3438 </data> 3502 </data>
@@ -3441,7 +3505,7 @@ @@ -3441,7 +3505,7 @@
3441 <test_data_num>0</test_data_num> 3505 <test_data_num>0</test_data_num>
3442 <data_def_list> 3506 <data_def_list>
3443 <data_def> 3507 <data_def>
3444 - <column_id>19</column_id> 3508 + <column_id>31</column_id>
3445 <type>Format</type> 3509 <type>Format</type>
3446 <repeat_num>1</repeat_num> 3510 <repeat_num>1</repeat_num>
3447 <template>%</template> 3511 <template>%</template>
@@ -3456,7 +3520,7 @@ @@ -3456,7 +3520,7 @@
3456 </modified_values> 3520 </modified_values>
3457 </data_def> 3521 </data_def>
3458 <data_def> 3522 <data_def>
3459 - <column_id>20</column_id> 3523 + <column_id>32</column_id>
3460 <type>Format</type> 3524 <type>Format</type>
3461 <repeat_num>1</repeat_num> 3525 <repeat_num>1</repeat_num>
3462 <template>nome%</template> 3526 <template>nome%</template>
@@ -3471,7 +3535,7 @@ @@ -3471,7 +3535,7 @@
3471 </modified_values> 3535 </modified_values>
3472 </data_def> 3536 </data_def>
3473 <data_def> 3537 <data_def>
3474 - <column_id>21</column_id> 3538 + <column_id>33</column_id>
3475 <type>Format</type> 3539 <type>Format</type>
3476 <repeat_num>1</repeat_num> 3540 <repeat_num>1</repeat_num>
3477 <template>descricao%</template> 3541 <template>descricao%</template>
ferramentas/3d/index.js
@@ -41,7 +41,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -41,7 +41,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
41 */ 41 */
42 42
43 if(typeof(i3GEOF) === 'undefined'){ 43 if(typeof(i3GEOF) === 'undefined'){
44 - i3GEOF = []; 44 + var i3GEOF = {};
45 } 45 }
46 /* 46 /*
47 Classe: i3GEOF.t3d 47 Classe: i3GEOF.t3d
ferramentas/agrupaelementos/index.js
@@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
38 */ 38 */
39 if(typeof(i3GEOF) === 'undefined'){ 39 if(typeof(i3GEOF) === 'undefined'){
40 - i3GEOF = []; 40 + var i3GEOF = {};
41 } 41 }
42 /* 42 /*
43 Classe: i3GEOF.agrupaElementos 43 Classe: i3GEOF.agrupaElementos
ferramentas/analisageometrias/index.js
@@ -40,7 +40,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -40,7 +40,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
40 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 40 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
41 */ 41 */
42 if(typeof(i3GEOF) === 'undefined'){ 42 if(typeof(i3GEOF) === 'undefined'){
43 - i3GEOF = []; 43 + var i3GEOF = {};
44 } 44 }
45 /* 45 /*
46 Classe: i3GEOF.analisaGeometrias 46 Classe: i3GEOF.analisaGeometrias
ferramentas/animacao/index.js
@@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
38 */ 38 */
39 if(typeof(i3GEOF) === 'undefined'){ 39 if(typeof(i3GEOF) === 'undefined'){
40 - i3GEOF = []; 40 + var i3GEOF = {};
41 } 41 }
42 /* 42 /*
43 Classe: i3GEOF.animacao 43 Classe: i3GEOF.animacao
ferramentas/aplicarsld/index.js
@@ -38,7 +38,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -38,7 +38,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
38 38
39 39
40 if(typeof(i3GEOF) === 'undefined'){ 40 if(typeof(i3GEOF) === 'undefined'){
41 - i3GEOF = []; 41 + var i3GEOF = {};
42 } 42 }
43 /* 43 /*
44 Classe: i3GEOF.aplicarsld 44 Classe: i3GEOF.aplicarsld
ferramentas/buffer/index.js
@@ -39,7 +39,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -39,7 +39,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
39 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 39 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
40 */ 40 */
41 if(typeof(i3GEOF) === 'undefined'){ 41 if(typeof(i3GEOF) === 'undefined'){
42 - i3GEOF = []; 42 + var i3GEOF = {};
43 } 43 }
44 /* 44 /*
45 Class: i3GEOF.buffer 45 Class: i3GEOF.buffer
ferramentas/bufferpt/index.js
@@ -30,7 +30,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -30,7 +30,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
30 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 30 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
31 */ 31 */
32 if(typeof(i3GEOF) === 'undefined'){ 32 if(typeof(i3GEOF) === 'undefined'){
33 - i3GEOF = []; 33 + var i3GEOF = {};
34 } 34 }
35 /* 35 /*
36 Classe: i3GEOF.bufferpt 36 Classe: i3GEOF.bufferpt
ferramentas/busca/index.js
@@ -34,7 +34,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -34,7 +34,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
34 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 34 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
35 */ 35 */
36 if(typeof(i3GEOF) === 'undefined'){ 36 if(typeof(i3GEOF) === 'undefined'){
37 - i3GEOF = []; 37 + var i3GEOF = {};
38 } 38 }
39 /* 39 /*
40 Class: i3GEOF.busca 40 Class: i3GEOF.busca
ferramentas/buscafotos/index.js
@@ -38,7 +38,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -38,7 +38,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
38 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 38 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
39 */ 39 */
40 if(typeof(i3GEOF) === 'undefined'){ 40 if(typeof(i3GEOF) === 'undefined'){
41 - i3GEOF = []; 41 + var i3GEOF = {};
42 } 42 }
43 /* 43 /*
44 Class: i3GEOF.buscaFotos 44 Class: i3GEOF.buscaFotos
ferramentas/buscainde/index.js
@@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
38 */ 38 */
39 if(typeof(i3GEOF) === 'undefined'){ 39 if(typeof(i3GEOF) === 'undefined'){
40 - i3GEOF = []; 40 + var i3GEOF = {};
41 } 41 }
42 /* 42 /*
43 Classe: i3GEOF.buscainde 43 Classe: i3GEOF.buscainde
ferramentas/carouseltemas/index.js
@@ -39,7 +39,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -39,7 +39,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
39 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 39 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
40 */ 40 */
41 if(typeof(i3GEOF) === 'undefined'){ 41 if(typeof(i3GEOF) === 'undefined'){
42 - i3GEOF = []; 42 + var i3GEOF = {};
43 } 43 }
44 /* 44 /*
45 Class: i3GEOF.carouseltemas 45 Class: i3GEOF.carouseltemas
ferramentas/carregakml/index.js
@@ -36,7 +36,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -36,7 +36,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
36 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 36 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
37 */ 37 */
38 if(typeof(i3GEOF) === 'undefined'){ 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,7 +35,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
35 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 35 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
36 */ 36 */
37 if(typeof(i3GEOF) === 'undefined'){ 37 if(typeof(i3GEOF) === 'undefined'){
38 - i3GEOF = []; 38 + var i3GEOF = {};
39 } 39 }
40 /* 40 /*
41 Classe: i3GEOF.carregaMapa 41 Classe: i3GEOF.carregaMapa
ferramentas/centroide/index.js
@@ -36,7 +36,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -36,7 +36,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
36 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 36 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
37 */ 37 */
38 if(typeof(i3GEOF) === 'undefined'){ 38 if(typeof(i3GEOF) === 'undefined'){
39 - i3GEOF = []; 39 + var i3GEOF = {};
40 } 40 }
41 /* 41 /*
42 Class: i3GEOF.centroide 42 Class: i3GEOF.centroide
ferramentas/centromassa/index.js
@@ -36,7 +36,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -36,7 +36,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
36 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 36 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
37 */ 37 */
38 if(typeof(i3GEOF) === 'undefined'){ 38 if(typeof(i3GEOF) === 'undefined'){
39 - i3GEOF = []; 39 + var i3GEOF = {};
40 } 40 }
41 /* 41 /*
42 Classe: i3GEOF.centromassa 42 Classe: i3GEOF.centromassa
ferramentas/conectargeojson/index.js
@@ -36,7 +36,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -36,7 +36,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
36 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 36 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
37 */ 37 */
38 if(typeof(i3GEOF) === 'undefined'){ 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,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
38 */ 38 */
39 if(typeof(i3GEOF) === 'undefined'){ 39 if(typeof(i3GEOF) === 'undefined'){
40 - i3GEOF = []; 40 + var i3GEOF = {};
41 } 41 }
42 /* 42 /*
43 Classe: i3GEOF.confluence 43 Classe: i3GEOF.confluence
ferramentas/convertekml/index.js
@@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
38 */ 38 */
39 if(typeof(i3GEOF) === 'undefined'){ 39 if(typeof(i3GEOF) === 'undefined'){
40 - i3GEOF = []; 40 + var i3GEOF = {};
41 } 41 }
42 /* 42 /*
43 Classe: i3GEOF.converteKml 43 Classe: i3GEOF.converteKml
ferramentas/convertemapakml/index.js
@@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
38 */ 38 */
39 if(typeof(i3GEOF) === 'undefined'){ 39 if(typeof(i3GEOF) === 'undefined'){
40 - i3GEOF = []; 40 + var i3GEOF = {};
41 } 41 }
42 /* 42 /*
43 Classe: i3GEOF.converteMapaKml 43 Classe: i3GEOF.converteMapaKml
ferramentas/convertews/index.js
@@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
38 */ 38 */
39 if(typeof(i3GEOF) === 'undefined'){ 39 if(typeof(i3GEOF) === 'undefined'){
40 - i3GEOF = []; 40 + var i3GEOF = {};
41 } 41 }
42 /* 42 /*
43 Classe: i3GEOF.converteMapaWS 43 Classe: i3GEOF.converteMapaWS
ferramentas/cortina/index.js
@@ -39,7 +39,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -39,7 +39,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
39 */ 39 */
40 40
41 if(typeof(i3GEOF) === 'undefined'){ 41 if(typeof(i3GEOF) === 'undefined'){
42 - i3GEOF = []; 42 + var i3GEOF = {};
43 } 43 }
44 /* 44 /*
45 Classe: i3GEOF.cortina 45 Classe: i3GEOF.cortina
ferramentas/dissolve/index.js
@@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
38 */ 38 */
39 if(typeof(i3GEOF) === 'undefined'){ 39 if(typeof(i3GEOF) === 'undefined'){
40 - i3GEOF = []; 40 + var i3GEOF = {};
41 } 41 }
42 /* 42 /*
43 Classe: i3GEOF.dissolve 43 Classe: i3GEOF.dissolve
ferramentas/distanciaptpt/index.js
@@ -38,7 +38,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -38,7 +38,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
38 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 38 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
39 */ 39 */
40 if(typeof(i3GEOF) === 'undefined'){ 40 if(typeof(i3GEOF) === 'undefined'){
41 - i3GEOF = []; 41 + var i3GEOF = {};
42 } 42 }
43 /* 43 /*
44 Classe: i3GEOF.distanciaptpt 44 Classe: i3GEOF.distanciaptpt
ferramentas/download/index.js
@@ -36,7 +36,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -36,7 +36,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
36 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 36 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
37 */ 37 */
38 if(typeof(i3GEOF) === 'undefined'){ 38 if(typeof(i3GEOF) === 'undefined'){
39 - i3GEOF = []; 39 + var i3GEOF = {};
40 } 40 }
41 /* 41 /*
42 Classe: i3GEOF.download 42 Classe: i3GEOF.download
ferramentas/editorsql/index.js
@@ -39,7 +39,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -39,7 +39,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
39 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 39 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
40 */ 40 */
41 if(typeof(i3GEOF) === 'undefined'){ 41 if(typeof(i3GEOF) === 'undefined'){
42 - i3GEOF = []; 42 + var i3GEOF = {};
43 } 43 }
44 /* 44 /*
45 Classe: i3GEOF.editorsql 45 Classe: i3GEOF.editorsql
ferramentas/etiqueta/index.js
@@ -35,7 +35,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -35,7 +35,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
35 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 35 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
36 */ 36 */
37 if(typeof(i3GEOF) === 'undefined'){ 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,7 +34,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
34 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 34 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
35 */ 35 */
36 if(typeof(i3GEOF) === 'undefined'){ 36 if(typeof(i3GEOF) === 'undefined'){
37 - i3GEOF = []; 37 + var i3GEOF = {};
38 } 38 }
39 /* 39 /*
40 Classe: i3GEOF.excluirarvore 40 Classe: i3GEOF.excluirarvore
ferramentas/filtro/index.js
@@ -39,7 +39,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -39,7 +39,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
39 */ 39 */
40 40
41 if(typeof(i3GEOF) === 'undefined'){ 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,7 +34,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
34 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 34 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
35 */ 35 */
36 if(typeof(i3GEOF) === 'undefined'){ 36 if(typeof(i3GEOF) === 'undefined'){
37 - i3GEOF = []; 37 + var i3GEOF = {};
38 } 38 }
39 /* 39 /*
40 Classe: i3GEOF.filtroarvore 40 Classe: i3GEOF.filtroarvore
ferramentas/gradecoord/index.js
@@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
38 */ 38 */
39 if(typeof(i3GEOF) === 'undefined'){ 39 if(typeof(i3GEOF) === 'undefined'){
40 - i3GEOF = []; 40 + var i3GEOF = {};
41 } 41 }
42 /* 42 /*
43 Classe: i3GEOF.gradeCoord 43 Classe: i3GEOF.gradeCoord
ferramentas/gradehex/index.js
@@ -38,7 +38,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -38,7 +38,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
38 */ 38 */
39 39
40 if(typeof(i3GEOF) === 'undefined'){ 40 if(typeof(i3GEOF) === 'undefined'){
41 - i3GEOF = []; 41 + var i3GEOF = {};
42 } 42 }
43 /* 43 /*
44 Classe: i3GEOF.gradeDeHex 44 Classe: i3GEOF.gradeDeHex
ferramentas/gradepol/index.js
@@ -38,7 +38,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -38,7 +38,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
38 */ 38 */
39 39
40 if(typeof(i3GEOF) === 'undefined'){ 40 if(typeof(i3GEOF) === 'undefined'){
41 - i3GEOF = []; 41 + var i3GEOF = {};
42 } 42 }
43 /* 43 /*
44 Classe: i3GEOF.gradeDePoligonos 44 Classe: i3GEOF.gradeDePoligonos
ferramentas/gradepontos/index.js
@@ -38,7 +38,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -38,7 +38,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
38 */ 38 */
39 39
40 if(typeof(i3GEOF) === 'undefined'){ 40 if(typeof(i3GEOF) === 'undefined'){
41 - i3GEOF = []; 41 + var i3GEOF = {};
42 } 42 }
43 /* 43 /*
44 Classe: i3GEOF.gradeDePontos 44 Classe: i3GEOF.gradeDePontos
ferramentas/graficointerativo/index.js
@@ -39,9 +39,8 @@ GNU junto com este programa; se não, escreva para a @@ -39,9 +39,8 @@ GNU junto com este programa; se não, escreva para a
39 Free Software Foundation, Inc., no endere&ccedil;o 39 Free Software Foundation, Inc., no endere&ccedil;o
40 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 40 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
41 */ 41 */
42 -  
43 if(typeof(i3GEOF) === 'undefined'){ 42 if(typeof(i3GEOF) === 'undefined'){
44 - i3GEOF = []; 43 + var i3GEOF = {};
45 } 44 }
46 /* 45 /*
47 Classe: i3GEOF.graficointerativo 46 Classe: i3GEOF.graficointerativo
@@ -55,6 +54,15 @@ i3GEOF.graficointerativo = { @@ -55,6 +54,15 @@ i3GEOF.graficointerativo = {
55 */ 54 */
56 aguarde: "", 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 Propriedade: titulo 66 Propriedade: titulo
59 67
60 T&iacute;tulo do gr&aacute;fico. Se for vazio, ser&aacute; obtido do nome do tema selecionado 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,7 +127,10 @@ i3GEOF.graficointerativo = {
119 Para efeitos de compatibilidade antes da vers&atilde;o 4.7 que não tinha dicion&aacute;rio 127 Para efeitos de compatibilidade antes da vers&atilde;o 4.7 que não tinha dicion&aacute;rio
120 */ 128 */
121 criaJanelaFlutuante: function(dados){ 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 Function: iniciaDicionario 136 Function: iniciaDicionario
@@ -129,10 +140,13 @@ i3GEOF.graficointerativo = { @@ -129,10 +140,13 @@ i3GEOF.graficointerativo = {
129 O Javascript &eacute; carregado com o id i3GEOF.nomedaferramenta.dicionario_script 140 O Javascript &eacute; carregado com o id i3GEOF.nomedaferramenta.dicionario_script
130 */ 141 */
131 iniciaDicionario: function(dados){ 142 iniciaDicionario: function(dados){
  143 + if(dados){
  144 + i3GEOF.graficointerativo.dados = dados;
  145 + }
132 if(typeof(i3GEOF.graficointerativo.dicionario) === 'undefined'){ 146 if(typeof(i3GEOF.graficointerativo.dicionario) === 'undefined'){
133 i3GEO.util.scriptTag( 147 i3GEO.util.scriptTag(
134 i3GEO.configura.locaplic+"/ferramentas/graficointerativo/dicionario.js", 148 i3GEO.configura.locaplic+"/ferramentas/graficointerativo/dicionario.js",
135 - "i3GEOF.graficointerativo.iniciaJanelaFlutuante('"+dados+"')", 149 + "i3GEOF.graficointerativo.iniciaJanelaFlutuante()",
136 "i3GEOF.graficointerativo.dicionario_script" 150 "i3GEOF.graficointerativo.dicionario_script"
137 ); 151 );
138 } 152 }
@@ -151,7 +165,7 @@ i3GEOF.graficointerativo = { @@ -151,7 +165,7 @@ i3GEOF.graficointerativo = {
151 165
152 dados {JSON} - dados para o gr&aacute;fico (opcional) exemplo ["n;x","'Argentina';33796870","'Paraguay';4773464","'Brazil';151525400","'Chile';13772710"] 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 //try{ 169 //try{
156 $i(iddiv).innerHTML += i3GEOF.graficointerativo.html(); 170 $i(iddiv).innerHTML += i3GEOF.graficointerativo.html();
157 $i("i3GEOgraficointerativoAcumula").checked = i3GEOF.graficointerativo.acumula; 171 $i("i3GEOgraficointerativoAcumula").checked = i3GEOF.graficointerativo.acumula;
@@ -159,7 +173,6 @@ i3GEOF.graficointerativo = { @@ -159,7 +173,6 @@ i3GEOF.graficointerativo = {
159 $i("i3GEOgraficointerativoDadosPuros").checked = i3GEOF.graficointerativo.dadospuros; 173 $i("i3GEOgraficointerativoDadosPuros").checked = i3GEOF.graficointerativo.dadospuros;
160 if(i3GEOF.graficointerativo.navegacao === true) 174 if(i3GEOF.graficointerativo.navegacao === true)
161 {i3GEOF.graficointerativo.ativaNavegacao(true);} 175 {i3GEOF.graficointerativo.ativaNavegacao(true);}
162 - i3GEO.guias.mostraGuiaFerramenta("i3GEOgraficointerativoguia1","i3GEOgraficointerativoguia");  
163 //eventos das guias 176 //eventos das guias
164 $i("i3GEOgraficointerativoguia1").onclick = function(){ 177 $i("i3GEOgraficointerativoguia1").onclick = function(){
165 i3GEO.guias.mostraGuiaFerramenta("i3GEOgraficointerativoguia1","i3GEOgraficointerativoguia"); 178 i3GEO.guias.mostraGuiaFerramenta("i3GEOgraficointerativoguia1","i3GEOgraficointerativoguia");
@@ -207,12 +220,13 @@ i3GEOF.graficointerativo = { @@ -207,12 +220,13 @@ i3GEOF.graficointerativo = {
207 "i3GEOgraficointerativobotao1", 220 "i3GEOgraficointerativobotao1",
208 {onclick:{fn: i3GEOF.graficointerativo.obterDados}} 221 {onclick:{fn: i3GEOF.graficointerativo.obterDados}}
209 ); 222 );
210 - if(arguments.length === 2){ 223 + if(i3GEOF.graficointerativo.dados && i3GEOF.graficointerativo.dados != "undefined"){
211 //i3GEOF.graficointerativo.tipo = "pizza2d"; 224 //i3GEOF.graficointerativo.tipo = "pizza2d";
212 //var retorno = {"attributes":{"id":""},"data":{"dados":["n;x","'4';3839572","'8';81710320","'7';24631314","'2';10967753","'1';24496400","'3';18752482","'5';13574480","'6';216507515"]}}; 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 $i("i3GEOgraficointerativoguia4").onclick.call(); 227 $i("i3GEOgraficointerativoguia4").onclick.call();
215 } 228 }
  229 + i3GEO.guias.mostraGuiaFerramenta("i3GEOgraficointerativoguia1","i3GEOgraficointerativoguia");
216 //} 230 //}
217 //catch(erro){alert(erro);} 231 //catch(erro){alert(erro);}
218 }, 232 },
@@ -312,6 +326,9 @@ i3GEOF.graficointerativo = { @@ -312,6 +326,9 @@ i3GEOF.graficointerativo = {
312 dados {JSON} - dados para o gr&aacute;fico 326 dados {JSON} - dados para o gr&aacute;fico
313 */ 327 */
314 iniciaJanelaFlutuante: function(dados){ 328 iniciaJanelaFlutuante: function(dados){
  329 + if(dados){
  330 + i3GEOF.graficointerativo.dados = dados;
  331 + }
315 var minimiza,cabecalho,janela,divid,temp,titulo; 332 var minimiza,cabecalho,janela,divid,temp,titulo;
316 //cria a janela flutuante 333 //cria a janela flutuante
317 cabecalho = function(){ 334 cabecalho = function(){
@@ -320,10 +337,10 @@ i3GEOF.graficointerativo = { @@ -320,10 +337,10 @@ i3GEOF.graficointerativo = {
320 minimiza = function(){ 337 minimiza = function(){
321 i3GEO.janela.minimiza("i3GEOF.graficointerativo"); 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 janela = i3GEO.janela.cria( 341 janela = i3GEO.janela.cria(
325 "380px", 342 "380px",
326 - "280px", 343 + "300px",
327 "", 344 "",
328 "", 345 "",
329 "", 346 "",
@@ -337,27 +354,27 @@ i3GEOF.graficointerativo = { @@ -337,27 +354,27 @@ i3GEOF.graficointerativo = {
337 divid = janela[2].id; 354 divid = janela[2].id;
338 i3GEOF.graficointerativo.aguarde = $i("i3GEOF.graficointerativo_imagemCabecalho").style; 355 i3GEOF.graficointerativo.aguarde = $i("i3GEOF.graficointerativo_imagemCabecalho").style;
339 $i("i3GEOF.graficointerativo_corpo").style.backgroundColor = "white"; 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 Function: ativaFoco 380 Function: ativaFoco
@@ -365,7 +382,9 @@ i3GEOF.graficointerativo = { @@ -365,7 +382,9 @@ i3GEOF.graficointerativo = {
365 Refaz a interface da ferramenta quando a janela flutuante tem seu foco ativado 382 Refaz a interface da ferramenta quando a janela flutuante tem seu foco ativado
366 */ 383 */
367 ativaFoco: function(){ 384 ativaFoco: function(){
368 - i3GEO.barraDeBotoes.ativaIcone("graficointerativo"); 385 + if(i3GEO.Interface){
  386 + i3GEO.barraDeBotoes.ativaIcone("graficointerativo");
  387 + }
369 var i = $i("i3GEOF.graficointerativo_c").style; 388 var i = $i("i3GEOF.graficointerativo_c").style;
370 i3GEO.janela.ULTIMOZINDEX++; 389 i3GEO.janela.ULTIMOZINDEX++;
371 i.zIndex = i3GEO.janela.ULTIMOZINDEX; 390 i.zIndex = i3GEO.janela.ULTIMOZINDEX;
@@ -376,6 +395,7 @@ i3GEOF.graficointerativo = { @@ -376,6 +395,7 @@ i3GEOF.graficointerativo = {
376 Monta o combo para escolha do tema que ser&aacute; utilizado no gr&aacute;fico 395 Monta o combo para escolha do tema que ser&aacute; utilizado no gr&aacute;fico
377 */ 396 */
378 comboTemas: function(){ 397 comboTemas: function(){
  398 + if(!i3GEO.Interface){return;}
379 i3GEO.util.comboTemas( 399 i3GEO.util.comboTemas(
380 "i3GEOgraficointerativoComboTemasId", 400 "i3GEOgraficointerativoComboTemasId",
381 function(retorno){ 401 function(retorno){
@@ -405,7 +425,7 @@ i3GEOF.graficointerativo = { @@ -405,7 +425,7 @@ i3GEOF.graficointerativo = {
405 */ 425 */
406 ativaTipo: function(obj){ 426 ativaTipo: function(obj){
407 i3GEOF.graficointerativo.tipo = obj.value; 427 i3GEOF.graficointerativo.tipo = obj.value;
408 - if($i("i3GEOgraficointerativoGrafico").innerHTML === "") 428 + if($i("i3GEOgraficointerativoGrafico").innerHTML === "" || $i("i3GEOgraficointerativotabeladados").innerHTML == "")
409 {$i("i3GEOgraficointerativoguia2").onclick.call();} 429 {$i("i3GEOgraficointerativoguia2").onclick.call();}
410 else 430 else
411 {$i("i3GEOgraficointerativoguia4").onclick.call();} 431 {$i("i3GEOgraficointerativoguia4").onclick.call();}
@@ -416,8 +436,7 @@ i3GEOF.graficointerativo = { @@ -416,8 +436,7 @@ i3GEOF.graficointerativo = {
416 Configura o formul&aacute;rio para obten&ccedil;ão dos dados para cada tipo de gr&aacute;fico 436 Configura o formul&aacute;rio para obten&ccedil;ão dos dados para cada tipo de gr&aacute;fico
417 */ 437 */
418 configuraDados: function(){ 438 configuraDados: function(){
419 - var radios = $i("i3GEOgraficointerativoguia1obj").getElementsByTagName("input"),  
420 - ativa = function(comboxlinha,comboylinha,ajudapizza){ 439 + var ativa = function(comboxlinha,comboylinha,ajudapizza){
421 try{ 440 try{
422 $i("i3GEOgraficointerativoComboXlinha").style.display = comboxlinha; 441 $i("i3GEOgraficointerativoComboXlinha").style.display = comboxlinha;
423 $i("i3GEOgraficointerativoComboYlinha").style.display = comboylinha; 442 $i("i3GEOgraficointerativoComboYlinha").style.display = comboylinha;
@@ -472,6 +491,9 @@ i3GEOF.graficointerativo = { @@ -472,6 +491,9 @@ i3GEOF.graficointerativo = {
472 <GRAFICOSELECAO> 491 <GRAFICOSELECAO>
473 */ 492 */
474 obterDados: function(){ 493 obterDados: function(){
  494 + if(!i3GEO.Interface){
  495 + return;
  496 + }
475 if(i3GEOF.graficointerativo.aguarde.visibility === "visible") 497 if(i3GEOF.graficointerativo.aguarde.visibility === "visible")
476 {return;} 498 {return;}
477 var tema = $i("i3GEOgraficointerativoComboTemasId").value, 499 var tema = $i("i3GEOgraficointerativoComboTemasId").value,
@@ -581,8 +603,8 @@ i3GEOF.graficointerativo = { @@ -581,8 +603,8 @@ i3GEOF.graficointerativo = {
581 acum, 603 acum,
582 nomes = [], 604 nomes = [],
583 cores = [], 605 cores = [],
584 - indice = $i("i3GEOgraficointerativoComboTemasId").options.selectedIndex,  
585 - titulo = $i("i3GEOgraficointerativoComboTemasId").options[indice].text, 606 + indice = "",
  607 + titulo = "",
586 par = [], 608 par = [],
587 parcor = [], 609 parcor = [],
588 soma = 0, 610 soma = 0,
@@ -606,6 +628,10 @@ i3GEOF.graficointerativo = { @@ -606,6 +628,10 @@ i3GEOF.graficointerativo = {
606 legendaY = "", 628 legendaY = "",
607 fill = "#C4B86A", 629 fill = "#C4B86A",
608 pointSize = 4; 630 pointSize = 4;
  631 + if($i("i3GEOgraficointerativoComboTemasId")){
  632 + indice = $i("i3GEOgraficointerativoComboTemasId").options.selectedIndex;
  633 + titulo = $i("i3GEOgraficointerativoComboTemasId").options[indice].text;
  634 + }
609 if(i3GEOF.graficointerativo.titulo != "") 635 if(i3GEOF.graficointerativo.titulo != "")
610 {titulo = i3GEOF.graficointerativo.titulo;} 636 {titulo = i3GEOF.graficointerativo.titulo;}
611 if($i("i3GEOgraficointerativoComboXid")) 637 if($i("i3GEOgraficointerativoComboXid"))
@@ -650,8 +676,8 @@ i3GEOF.graficointerativo = { @@ -650,8 +676,8 @@ i3GEOF.graficointerativo = {
650 } 676 }
651 if(legendaX == legendaY){ 677 if(legendaX == legendaY){
652 menor = 0; 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 if($i("i3GEOgraficointerativoRelativa").checked){ 682 if($i("i3GEOgraficointerativoRelativa").checked){
657 n = valores.length; 683 n = valores.length;
@@ -897,6 +923,9 @@ i3GEOF.graficointerativo = { @@ -897,6 +923,9 @@ i3GEOF.graficointerativo = {
897 Ativa ou desativa a atualiza&ccedil;ão autom&aacute;tica ao navegar no mapa 923 Ativa ou desativa a atualiza&ccedil;ão autom&aacute;tica ao navegar no mapa
898 */ 924 */
899 ativaNavegacao: function(obj){ 925 ativaNavegacao: function(obj){
  926 + if(!i3GEO.Interface){
  927 + return;
  928 + }
900 if(obj === true){ 929 if(obj === true){
901 if(i3GEO.Interface.ATUAL !== "googlemaps" && i3GEO.Interface.ATUAL !== "googleearth"){ 930 if(i3GEO.Interface.ATUAL !== "googlemaps" && i3GEO.Interface.ATUAL !== "googleearth"){
902 i3GEO.eventos.NAVEGAMAPA.push("i3GEOF.graficointerativo.obterDados()"); 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,7 +35,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
35 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 35 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
36 */ 36 */
37 if(typeof(i3GEOF) === 'undefined'){ 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,7 +33,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
33 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 33 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
34 */ 34 */
35 if(typeof(i3GEOF) === 'undefined'){ 35 if(typeof(i3GEOF) === 'undefined'){
36 - i3GEOF = []; 36 + var i3GEOF = {};
37 } 37 }
38 /* 38 /*
39 Classe: i3GEOF.identifica 39 Classe: i3GEOF.identifica
ferramentas/importarwmc/index.js
@@ -38,7 +38,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -38,7 +38,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
38 38
39 39
40 if(typeof(i3GEOF) === 'undefined'){ 40 if(typeof(i3GEOF) === 'undefined'){
41 - i3GEOF = []; 41 + var i3GEOF = {};
42 } 42 }
43 /* 43 /*
44 Classe: i3GEOF.importarwmc 44 Classe: i3GEOF.importarwmc
ferramentas/imprimir/index.js
@@ -26,7 +26,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -26,7 +26,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
26 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 26 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
27 */ 27 */
28 if(typeof(i3GEOF) === 'undefined'){ 28 if(typeof(i3GEOF) === 'undefined'){
29 - i3GEOF = []; 29 + var i3GEOF = {};
30 } 30 }
31 /* 31 /*
32 Classe: i3GEOF.imprimir 32 Classe: i3GEOF.imprimir
ferramentas/inseregrafico/index.js
@@ -34,7 +34,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -34,7 +34,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
34 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 34 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
35 */ 35 */
36 if(typeof(i3GEOF) === 'undefined'){ 36 if(typeof(i3GEOF) === 'undefined'){
37 - i3GEOF = []; 37 + var i3GEOF = {};
38 } 38 }
39 /* 39 /*
40 Classe: i3GEOF.insereGrafico 40 Classe: i3GEOF.insereGrafico
ferramentas/inseretxt/index.js
@@ -36,7 +36,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -36,7 +36,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
36 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 36 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
37 */ 37 */
38 if(typeof(i3GEOF) === 'undefined'){ 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,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
38 */ 38 */
39 if(typeof(i3GEOF) === 'undefined'){ 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,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
37 */ 37 */
38 38
39 if(typeof(i3GEOF) === 'undefined'){ 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,7 +31,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
31 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 31 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
32 */ 32 */
33 if(typeof(i3GEOF) === 'undefined'){ 33 if(typeof(i3GEOF) === 'undefined'){
34 - i3GEOF = []; 34 + var i3GEOF = {};
35 } 35 }
36 /* 36 /*
37 Classe: i3GEOF.loginusuario 37 Classe: i3GEOF.loginusuario
ferramentas/metar/index.js
@@ -41,7 +41,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -41,7 +41,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
41 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 41 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
42 */ 42 */
43 if(typeof(i3GEOF) === 'undefined'){ 43 if(typeof(i3GEOF) === 'undefined'){
44 - i3GEOF = []; 44 + var i3GEOF = {};
45 } 45 }
46 /* 46 /*
47 Classe: i3GEOF.metar 47 Classe: i3GEOF.metar
ferramentas/mostraexten/index.js
@@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
38 */ 38 */
39 if(typeof(i3GEOF) === 'undefined'){ 39 if(typeof(i3GEOF) === 'undefined'){
40 - i3GEOF = []; 40 + var i3GEOF = {};
41 } 41 }
42 /* 42 /*
43 Classe: i3GEOF.mostraExten 43 Classe: i3GEOF.mostraExten
ferramentas/nptpol/index.js
@@ -36,7 +36,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -36,7 +36,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
36 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 36 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
37 */ 37 */
38 if(typeof(i3GEOF) === 'undefined'){ 38 if(typeof(i3GEOF) === 'undefined'){
39 - i3GEOF = []; 39 + var i3GEOF = {};
40 } 40 }
41 /* 41 /*
42 Classe: i3GEOF.nptpol 42 Classe: i3GEOF.nptpol
ferramentas/nuvemtags/index.js
@@ -41,7 +41,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -41,7 +41,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
41 */ 41 */
42 42
43 if(typeof(i3GEOF) === 'undefined'){ 43 if(typeof(i3GEOF) === 'undefined'){
44 - i3GEOF = []; 44 + var i3GEOF = {};
45 } 45 }
46 /* 46 /*
47 Classe: i3GEOF.nuvemtags 47 Classe: i3GEOF.nuvemtags
ferramentas/opacidademapa/index.js
@@ -40,7 +40,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -40,7 +40,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
40 */ 40 */
41 41
42 if(typeof(i3GEOF) === 'undefined'){ 42 if(typeof(i3GEOF) === 'undefined'){
43 - i3GEOF = []; 43 + var i3GEOF = {};
44 } 44 }
45 /* 45 /*
46 Classe: i3GEOF.opacidademapa 46 Classe: i3GEOF.opacidademapa
ferramentas/opcoes_autoredesenha/index.js
@@ -38,7 +38,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -38,7 +38,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
38 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 38 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
39 */ 39 */
40 if(typeof(i3GEOF) === 'undefined'){ 40 if(typeof(i3GEOF) === 'undefined'){
41 - i3GEOF = []; 41 + var i3GEOF = {};
42 } 42 }
43 /* 43 /*
44 Classe: i3GEOF.opcoesTempo 44 Classe: i3GEOF.opcoesTempo
ferramentas/opcoes_escala/index.js
@@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
38 */ 38 */
39 if(typeof(i3GEOF) === 'undefined'){ 39 if(typeof(i3GEOF) === 'undefined'){
40 - i3GEOF = []; 40 + var i3GEOF = {};
41 } 41 }
42 /* 42 /*
43 Classe: i3GEOF.opcoesEscala 43 Classe: i3GEOF.opcoesEscala
ferramentas/opcoes_fundo/index.js
@@ -35,7 +35,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -35,7 +35,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
35 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 35 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
36 */ 36 */
37 if(typeof(i3GEOF) === 'undefined'){ 37 if(typeof(i3GEOF) === 'undefined'){
38 - i3GEOF = []; 38 + var i3GEOF = {};
39 } 39 }
40 /* 40 /*
41 Classe: i3GEOF.opcoesFundo 41 Classe: i3GEOF.opcoesFundo
ferramentas/opcoes_label/index.js
@@ -30,7 +30,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -30,7 +30,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
30 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 30 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
31 */ 31 */
32 if(typeof(i3GEOF) === 'undefined'){ 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,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
38 */ 38 */
39 if(typeof(i3GEOF) === 'undefined'){ 39 if(typeof(i3GEOF) === 'undefined'){
40 - i3GEOF = []; 40 + var i3GEOF = {};
41 } 41 }
42 /* 42 /*
43 Classe: i3GEOF.opcoesLegenda 43 Classe: i3GEOF.opcoesLegenda
ferramentas/opcoes_quadros/index.js
@@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
38 */ 38 */
39 if(typeof(i3GEOF) === 'undefined'){ 39 if(typeof(i3GEOF) === 'undefined'){
40 - i3GEOF = []; 40 + var i3GEOF = {};
41 } 41 }
42 /* 42 /*
43 Classe: i3GEOF.opcoesQuadros 43 Classe: i3GEOF.opcoesQuadros
ferramentas/opcoes_querymap/index.js
@@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
38 */ 38 */
39 if(typeof(i3GEOF) === 'undefined'){ 39 if(typeof(i3GEOF) === 'undefined'){
40 - i3GEOF = []; 40 + var i3GEOF = {};
41 } 41 }
42 /* 42 /*
43 Classe: i3GEOF.opcoesQuery 43 Classe: i3GEOF.opcoesQuery
ferramentas/opcoes_tamanho/index.js
@@ -34,7 +34,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -34,7 +34,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
34 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 34 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
35 */ 35 */
36 if(typeof(i3GEOF) === 'undefined'){ 36 if(typeof(i3GEOF) === 'undefined'){
37 - i3GEOF = []; 37 + var i3GEOF = {};
38 } 38 }
39 /* 39 /*
40 Classe: i3GEOF.opcoesTamanho 40 Classe: i3GEOF.opcoesTamanho
ferramentas/outputformat/index.js
@@ -36,7 +36,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -36,7 +36,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
36 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 36 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
37 */ 37 */
38 if(typeof(i3GEOF) === 'undefined'){ 38 if(typeof(i3GEOF) === 'undefined'){
39 - i3GEOF = []; 39 + var i3GEOF = {};
40 } 40 }
41 /* 41 /*
42 Classe: i3GEOF.outputformat 42 Classe: i3GEOF.outputformat
ferramentas/perfil/index.js
@@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -37,7 +37,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 37 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
38 */ 38 */
39 if(typeof(i3GEOF) === 'undefined'){ 39 if(typeof(i3GEOF) === 'undefined'){
40 - i3GEOF = []; 40 + var i3GEOF = {};
41 } 41 }
42 /* 42 /*
43 Class: i3GEOF.perfil 43 Class: i3GEOF.perfil
ferramentas/pontoempoligono/index.js
@@ -38,7 +38,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -38,7 +38,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
38 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 38 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
39 */ 39 */
40 if(typeof(i3GEOF) === 'undefined'){ 40 if(typeof(i3GEOF) === 'undefined'){
41 - i3GEOF = []; 41 + var i3GEOF = {};
42 } 42 }
43 /* 43 /*
44 Classe: i3GEOF.pontoEmPoligono 44 Classe: i3GEOF.pontoEmPoligono
ferramentas/pontosdistri/index.js
@@ -33,7 +33,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -33,7 +33,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
33 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 33 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
34 */ 34 */
35 if(typeof(i3GEOF) === 'undefined'){ 35 if(typeof(i3GEOF) === 'undefined'){
36 - i3GEOF = []; 36 + var i3GEOF = {};
37 } 37 }
38 /* 38 /*
39 Classe: i3GEOF.pontosDistri 39 Classe: i3GEOF.pontosDistri
ferramentas/salvamapa/index.js
@@ -32,7 +32,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -32,7 +32,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
32 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 32 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
33 */ 33 */
34 if(typeof(i3GEOF) === 'undefined'){ 34 if(typeof(i3GEOF) === 'undefined'){
35 - i3GEOF = []; 35 + var i3GEOF = {};
36 } 36 }
37 /* 37 /*
38 Classe: i3GEOF.salvaMapa 38 Classe: i3GEOF.salvaMapa
ferramentas/salvamapfile/index.js
@@ -35,7 +35,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -35,7 +35,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
35 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 35 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
36 */ 36 */
37 if(typeof(i3GEOF) === 'undefined'){ 37 if(typeof(i3GEOF) === 'undefined'){
38 - i3GEOF = []; 38 + var i3GEOF = {};
39 } 39 }
40 /* 40 /*
41 Classe: i3GEOF.salvamapfile 41 Classe: i3GEOF.salvamapfile
ferramentas/selecao/index.js
@@ -38,7 +38,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -38,7 +38,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
38 */ 38 */
39 39
40 if(typeof(i3GEOF) === 'undefined'){ 40 if(typeof(i3GEOF) === 'undefined'){
41 - i3GEOF = []; 41 + var i3GEOF = {};
42 } 42 }
43 /* 43 /*
44 Classe: i3GEOF.selecao 44 Classe: i3GEOF.selecao
ferramentas/tabela/index.js
@@ -39,7 +39,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -39,7 +39,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
39 */ 39 */
40 40
41 if(typeof(i3GEOF) === 'undefined'){ 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,7 +36,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
36 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 36 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
37 */ 37 */
38 if(typeof(i3GEOF) === 'undefined'){ 38 if(typeof(i3GEOF) === 'undefined'){
39 - i3GEOF = []; 39 + var i3GEOF = {};
40 } 40 }
41 /* 41 /*
42 Classe: i3GEOF.telaremota 42 Classe: i3GEOF.telaremota
ferramentas/tipoimagem/index.js
@@ -36,7 +36,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -36,7 +36,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
36 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 36 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
37 */ 37 */
38 if(typeof(i3GEOF) === 'undefined'){ 38 if(typeof(i3GEOF) === 'undefined'){
39 - i3GEOF = []; 39 + var i3GEOF = {};
40 } 40 }
41 /* 41 /*
42 Classe: i3GEOF.tipoimagem 42 Classe: i3GEOF.tipoimagem
ferramentas/tme/index.js
@@ -35,7 +35,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -35,7 +35,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
35 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 35 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
36 */ 36 */
37 if(typeof(i3GEOF) === 'undefined'){ 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,7 +38,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
38 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 38 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
39 */ 39 */
40 if(typeof(i3GEOF) === 'undefined'){ 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,7 +32,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
32 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 32 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
33 */ 33 */
34 if(typeof(i3GEOF) === 'undefined'){ 34 if(typeof(i3GEOF) === 'undefined'){
35 - i3GEOF = []; 35 + var i3GEOF = {};
36 } 36 }
37 /* 37 /*
38 Classe: i3GEOF.upload 38 Classe: i3GEOF.upload
ferramentas/uploaddbf/index.js
@@ -32,7 +32,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -32,7 +32,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
32 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 32 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
33 */ 33 */
34 if(typeof(i3GEOF) === 'undefined'){ 34 if(typeof(i3GEOF) === 'undefined'){
35 - i3GEOF = []; 35 + var i3GEOF = {};
36 } 36 }
37 /* 37 /*
38 Classe: i3GEOF.uploaddbf 38 Classe: i3GEOF.uploaddbf
ferramentas/uploadgpx/index.js
@@ -38,7 +38,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -38,7 +38,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
38 38
39 39
40 if(typeof(i3GEOF) === 'undefined'){ 40 if(typeof(i3GEOF) === 'undefined'){
41 - i3GEOF = []; 41 + var i3GEOF = {};
42 } 42 }
43 /* 43 /*
44 Classe: i3GEOF.uploadgpx 44 Classe: i3GEOF.uploadgpx
ferramentas/uploadkml/index.js
@@ -38,7 +38,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -38,7 +38,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
38 38
39 39
40 if(typeof(i3GEOF) === 'undefined'){ 40 if(typeof(i3GEOF) === 'undefined'){
41 - i3GEOF = []; 41 + var i3GEOF = {};
42 } 42 }
43 /* 43 /*
44 Classe: i3GEOF.uploadkml 44 Classe: i3GEOF.uploadkml
ferramentas/wiki/index.js
@@ -41,7 +41,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o @@ -41,7 +41,7 @@ Free Software Foundation, Inc., no endere&amp;ccedil;o
41 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA. 41 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
42 */ 42 */
43 if(typeof(i3GEOF) === 'undefined'){ 43 if(typeof(i3GEOF) === 'undefined'){
44 - i3GEOF = []; 44 + var i3GEOF = {};
45 } 45 }
46 /* 46 /*
47 Classe: i3GEOF.wiki 47 Classe: i3GEOF.wiki