Commit 291a14f707e6805fa2edb1851777a4c9bc8ddc57
1 parent
57e06093
Exists in
master
and in
7 other branches
Inclusão de opção para upload de shapefile e gravação no postgis
Showing
10 changed files
with
266 additions
and
22 deletions
Show diff stats
admin/admin.db
No preview for this file type
admin/html/estat_editor.html
| ... | ... | @@ -43,6 +43,7 @@ body { |
| 43 | 43 | Apenas as tabelas e os dados existentes no esquema i3geo_metaestat podem ser editados<br> |
| 44 | 44 | <div id="i3GEOadminEditorConexao" style="left: -5px;"></div><br> |
| 45 | 45 | <div id="i3GEOadminEditorEsquema" style="left: -5px;"></div> |
| 46 | + <div id="i3GEOadminEditorUpload" style="left: -5px;"></div> | |
| 46 | 47 | <div id="i3GEOadminEditorTabela" style="left: -5px;"></div> |
| 47 | 48 | <div id="i3GEOadminEditorColuna" style="left: -5px;"></div> |
| 48 | 49 | </div> | ... | ... |
admin/html/estat_tipo_regiao.html
| ... | ... | @@ -41,7 +41,7 @@ body { |
| 41 | 41 | <div class="ft"></div> |
| 42 | 42 | </div> |
| 43 | 43 | <br> <input type=button id=adicionaNovaLinha |
| 44 | - value="Adicionar um novo registro" style="left: -5px;" /> | |
| 44 | + value="Adicionar um novo registro" style="left: -5px;" /> Utilize a opção "Editor" no menu superior caso você queira fazer o upload de shapefile para criar uma nova tabela com os dados que serão utilizados em uma determinada região | |
| 45 | 45 | <p> |
| 46 | 46 | <br> |
| 47 | 47 | <div id="tabela" style="left: -5px;"></div> | ... | ... |
admin/index.html
| ... | ... | @@ -188,7 +188,7 @@ |
| 188 | 188 | </tr> |
| 189 | 189 | <tr onclick="abre('html/estat_uploaddados.html')"> |
| 190 | 190 | <td><div class=aplicar></div></td> |
| 191 | - <td>Upload de dados</td> | |
| 191 | + <td>Upload de dados para uma variável (para upload de shapefile, utilize o gerenciador de tabelas)</td> | |
| 192 | 192 | </tr> |
| 193 | 193 | <tr onclick="abre('html/estat_editor.html')"> |
| 194 | 194 | <td><div class=aplicar></div></td> | ... | ... |
admin/js/estat_editor.js
| ... | ... | @@ -81,11 +81,13 @@ i3GEOadmin.editor = { |
| 81 | 81 | success:function(o){ |
| 82 | 82 | try { |
| 83 | 83 | var dados = YAHOO.lang.JSON.parse(o.responseText), |
| 84 | - temp = "<fieldset>Escolha uma tabela: "; | |
| 85 | - temp += "<select id='i3GEOadmintabela' onchange='i3GEOadmin.editor.coluna.lista()'>"; | |
| 84 | + temp = "<fieldset>" + | |
| 85 | + "<p><input type=button value='Upload Shapefile' id='i3GEOadmin_botaoupload' /></p>" + | |
| 86 | + "<div id='i3GEOadmin_formupload'></div>" + | |
| 87 | + "Escolha uma tabela existente: " + | |
| 88 | + "<select id='i3GEOadmintabela' onchange='i3GEOadmin.editor.coluna.lista()'>"; | |
| 86 | 89 | temp += core_comboObjeto(dados,"tabela","tabela"); |
| 87 | - temp += "</select>"; | |
| 88 | - temp += "" + | |
| 90 | + temp += "</select>" + | |
| 89 | 91 | "<p><input type=button value='Relatório' id='i3GEOadmintabelaMostrar' />" + |
| 90 | 92 | "<input type=button value='CSV' id='i3GEOadmintabelaCsv'/>" + |
| 91 | 93 | "<input type=button value='Criar uma nova tabela' id='i3GEOadmintabelaCriar' />" + |
| ... | ... | @@ -93,6 +95,10 @@ i3GEOadmin.editor = { |
| 93 | 95 | "<input type=button value='Copiar para' id='i3GEOadmintabelaCopiar' />"; |
| 94 | 96 | $i(i3GEOadmin.editor.tabela.onde).innerHTML = temp+"</fieldset>"; |
| 95 | 97 | new YAHOO.widget.Button( |
| 98 | + "i3GEOadmin_botaoupload", | |
| 99 | + {onclick:{fn: i3GEOadmin.editor.uploadshp.inicia}} | |
| 100 | + ); | |
| 101 | + new YAHOO.widget.Button( | |
| 96 | 102 | "i3GEOadmintabelaMostrar", |
| 97 | 103 | {onclick:{fn: i3GEOadmin.editor.tabela.mostrar}} |
| 98 | 104 | ); |
| ... | ... | @@ -399,5 +405,50 @@ i3GEOadmin.editor = { |
| 399 | 405 | } |
| 400 | 406 | return false; |
| 401 | 407 | } |
| 408 | + }, | |
| 409 | + uploadshp: { | |
| 410 | + inicia: function(){ | |
| 411 | + var onde = $i("i3GEOadmin_formupload"); | |
| 412 | + if(onde.innerHTML != ""){ | |
| 413 | + onde.innerHTML = ""; | |
| 414 | + return; | |
| 415 | + } | |
| 416 | + $i("i3GEOadmin_formupload").innerHTML = i3GEOadmin.editor.uploadshp.formulario(); | |
| 417 | + new YAHOO.widget.Button( | |
| 418 | + "i3GEOuploadsubmit", | |
| 419 | + {onclick:{fn: i3GEOadmin.editor.uploadshp.submit}} | |
| 420 | + ); | |
| 421 | + }, | |
| 422 | + formulario: function(){ | |
| 423 | + var ins = '<fieldset><form id=i3GEOuploadf target="i3GEOuploadiframe" action="../php/metaestat_uploadshp_submit.php" method="post" ENCTYPE="multipart/form-data">' + | |
| 424 | + '<p class="paragrafo" >shp: <br><input class=digitar type="file" size=22 name="i3GEOuploadshp" style="top:0px;left:0px;cursor:pointer;"></p>' + | |
| 425 | + '<p class="paragrafo" >shx: <br><input class=digitar type="file" size=22 name="i3GEOuploadshx" style="top:0px;left:0px;cursor:pointer;"></p>' + | |
| 426 | + '<p class="paragrafo" >dbf: <br><input class=digitar type="file" size=22 name="i3GEOuploaddbf" style="top:0px;left:0px;cursor:pointer;"></p>' + | |
| 427 | + '<p class="paragrafo" >Nome da nova tabela:<br><input class=digitar type="text" size=20 id="tabelaDestino" name="tabelaDestino" style="top:0px;left:0px;cursor:pointer;"></p>' + | |
| 428 | + '<p class="paragrafo" >Código da projeção (SRID):<br><input class=digitar type="text" value="4326" size=20 id="srid" name="srid" style="top:0px;left:0px;cursor:pointer;"></p>' + | |
| 429 | + | |
| 430 | + '<p class="paragrafo" ><input id=i3GEOuploadsubmit type="button" value="Enviar" size=12 />' + | |
| 431 | + '<input type="hidden" name="MAX_FILE_SIZE" value="1000000">' + | |
| 432 | + '<input type="hidden" id="i3GEOuploadcodigoconexao" name="i3GEOuploadcodigoconexao" value="">' + | |
| 433 | + '<input type="hidden" id="i3GEOuploadesquema" name="i3GEOuploadesquema" value="">' + | |
| 434 | + '</form>' + | |
| 435 | + "<p class='paragrafo' style=color:red >Não utilize '_' no nome do arquivo. Apenas letras e números são aceitos!!!</p>" + | |
| 436 | + '<iframe name=i3GEOuploadiframe style="text-align:left;border:1px solid gray;" width="98%" height="60px"></iframe></fieldset>'; | |
| 437 | + return ins; | |
| 438 | + }, | |
| 439 | + submit: function(){ | |
| 440 | + if($i("tabelaDestino").value == ""){ | |
| 441 | + alert("Digite o nome da tabela a ser criada"); | |
| 442 | + return; | |
| 443 | + } | |
| 444 | + if($i("srid").value == ""){ | |
| 445 | + alert("Digite o valor do SRID"); | |
| 446 | + return; | |
| 447 | + } | |
| 448 | + $i("i3GEOuploadcodigoconexao").value = $i("i3GEOadmincodigo_estat_conexao").value; | |
| 449 | + $i("i3GEOuploadesquema").value = $i("i3GEOadminesquema").value; | |
| 450 | + $i("i3GEOuploadf").submit(); | |
| 451 | + } | |
| 402 | 452 | } |
| 453 | + | |
| 403 | 454 | }; |
| 404 | 455 | \ No newline at end of file | ... | ... |
admin/js/estat_tipo_regiao.js
| ... | ... | @@ -55,13 +55,13 @@ function montaTabela(dados){ |
| 55 | 55 | elCell.innerHTML = "<div class=editar style='text-align:center' ></div>"; |
| 56 | 56 | }, |
| 57 | 57 | formatShp = function(elCell, oRecord, oColumn){ |
| 58 | - elCell.innerHTML = "<div class=download style='text-align:center' ></div>"; | |
| 58 | + elCell.innerHTML = "<div class=download style='text-align:center' title='shape file' ></div>"; | |
| 59 | 59 | }, |
| 60 | 60 | myColumnDefs = [ |
| 61 | 61 | {key:"excluir",label:"excluir",formatter:formatExclui}, |
| 62 | - {key:"shapefile",label:"shapefile",formatter:formatShp}, | |
| 62 | + {key:"shapefile",label:"download",formatter:formatShp}, | |
| 63 | 63 | {key:"rel",label:"agregações",formatter:formatRel}, |
| 64 | - {key:"mais",label:"editar",formatter:formatMais}, | |
| 64 | + {key:"mais",label:"propriedades",formatter:formatMais}, | |
| 65 | 65 | {label:"código",key:"codigo_tipo_regiao", formatter:formatTexto}, |
| 66 | 66 | {label:"Nome",resizeable:true,key:"nome_tipo_regiao", formatter:formatTexto}, |
| 67 | 67 | {label:"Descrição",resizeable:true,key:"descricao_tipo_regiao", formatter:formatTexto}, | ... | ... |
admin/php/criabanco.php
| ... | ... | @@ -173,6 +173,8 @@ |
| 173 | 173 | $dbhw->query("INSERT INTO ".$esquemaadmin."i3geousr_operacoes VALUES('16', 'admin/php/editortexto', 'editor de textos para edicao de mapfiles')"); |
| 174 | 174 | $dbhw->query("INSERT INTO ".$esquemaadmin."i3geousr_operacoes VALUES('17', 'admin/html/usuarios', 'cadastro de usuarios')"); |
| 175 | 175 | $dbhw->query("INSERT INTO ".$esquemaadmin."i3geousr_operacoes VALUES('18', 'admin/metaestat/geral', 'permite edicoes mais comuns do sistema de metadados estatisticos')"); |
| 176 | + $dbhw->query("INSERT INTO ".$esquemaadmin."i3geousr_operacoes VALUES('19', 'admin/metaestat/editorbanco', 'permite gerenciar as tabelas do banco')"); | |
| 177 | + | |
| 176 | 178 | //papeis por operacao |
| 177 | 179 | $dbhw->query("INSERT INTO ".$esquemaadmin."i3geousr_operacoespapeis VALUES(1,2)"); |
| 178 | 180 | $dbhw->query("INSERT INTO ".$esquemaadmin."i3geousr_operacoespapeis VALUES(1,3)"); | ... | ... |
| ... | ... | @@ -0,0 +1,173 @@ |
| 1 | +<?php | |
| 2 | +/* | |
| 3 | + * Faz o upload de shapefile e insere no banco de dados | |
| 4 | + */ | |
| 5 | +include_once("admin.php"); | |
| 6 | +include_once("login.php"); | |
| 7 | +if(verificaOperacaoSessao("admin/metaestat/editorbanco") == false){ | |
| 8 | + echo "Vc nao pode realizar essa operacao.";exit; | |
| 9 | +} | |
| 10 | +error_reporting(E_ALL); | |
| 11 | +?> | |
| 12 | +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | |
| 13 | +<html> | |
| 14 | +<head> | |
| 15 | +<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"> | |
| 16 | +<link rel="stylesheet" type="text/css" href="../../css/geral.css" /> | |
| 17 | +<title></title> | |
| 18 | +</head> | |
| 19 | +<body bgcolor="white" style="background-color:white;text-align:left;"> | |
| 20 | +<p> | |
| 21 | +<?php | |
| 22 | +if($_POST["tabelaDestino"] == ""){ | |
| 23 | + echo "Nome da tabela não definido"; | |
| 24 | + exit; | |
| 25 | +} | |
| 26 | +if($_POST["srid"] == ""){ | |
| 27 | + echo "SRID não definido"; | |
| 28 | + exit; | |
| 29 | +} | |
| 30 | +if ($_FILES['i3GEOuploadshp']['name'] == ""){ | |
| 31 | + echo "Arquivo não definido"; | |
| 32 | + exit; | |
| 33 | +} | |
| 34 | +if (isset($_FILES['i3GEOuploadshp']['name'])){ | |
| 35 | + require_once ("../../ms_configura.php"); | |
| 36 | + echo "<p class='paragrafo' >Carregando o arquivo...</p>"; | |
| 37 | + $arqshp = $_FILES['i3GEOuploadshp']['tmp_name']; | |
| 38 | + //verifica nomes e sobe arquivo | |
| 39 | + verificaNome($_FILES['i3GEOuploadshp']['name'],"shp"); | |
| 40 | + $nomePrefixo = str_replace(" ","_",removeAcentos(str_replace(".shp","",$_FILES['i3GEOuploadshp']['name']))); | |
| 41 | + $nomePrefixo = $nomePrefixo."_".(nomeRandomico(4)); | |
| 42 | + | |
| 43 | + $Arquivo = $_FILES['i3GEOuploadshp']['tmp_name']; | |
| 44 | + $status = move_uploaded_file($Arquivo,$dir_tmp."/".$nomePrefixo.".shp"); | |
| 45 | + if($status != 1) | |
| 46 | + {echo "<p class='paragrafo' >Ocorreu um erro no envio do arquivo SHP";exit;} | |
| 47 | + $Arquivo = $_FILES['i3GEOuploadshx']['tmp_name']; | |
| 48 | + $status = move_uploaded_file($Arquivo,$dir_tmp."/".$nomePrefixo.".shx"); | |
| 49 | + if($status != 1) | |
| 50 | + {echo "<p class='paragrafo' >Ocorreu um erro no envio do arquivo SHX";exit;} | |
| 51 | + $Arquivo = $_FILES['i3GEOuploaddbf']['tmp_name']; | |
| 52 | + $status = move_uploaded_file($Arquivo,$dir_tmp."/".$nomePrefixo.".dbf"); | |
| 53 | + if($status != 1) | |
| 54 | + {echo "<p class='paragrafo' >Ocorreu um erro no envio do arquivo DBF";exit;} | |
| 55 | + | |
| 56 | + if(!file_exists($dir_tmp."/".$nomePrefixo.".shp")) | |
| 57 | + {echo "<p class='paragrafo' >Ocorreu algum problema no envio do arquivo ".$dir_tmp."/".$nomePrefixo;paraAguarde();exit;} | |
| 58 | + $arqshp = $dir_tmp."/".$nomePrefixo.".shp"; | |
| 59 | + | |
| 60 | + //pega os parametros de conexao | |
| 61 | + include("classe_metaestat.php"); | |
| 62 | + $m = new Metaestat(); | |
| 63 | + $conexao = $m->listaConexao($_POST["i3GEOuploadcodigoconexao"],true); | |
| 64 | + //array(5) { ["codigo_estat_conexao"]=> string(1) "1" ["bancodedados"]=> string(8) "geosaude" ["host"]=> string(9) "localhost" ["porta"]=> string(4) "5432" ["usuario"]=> string(8) "postgres" } | |
| 65 | + //pega as colunas do shapefile | |
| 66 | + $shapefileObj = ms_newShapefileObj($arqshp,-1); | |
| 67 | + $numshapes = $shapefileObj->numshapes; | |
| 68 | + $mapObj = ms_newMapObjFromString("MAP END"); | |
| 69 | + $layer = ms_newLayerObj($mapObj); | |
| 70 | + $layer->set("data",$arqshp); | |
| 71 | + $layer->open(); | |
| 72 | + $colunas = $layer->getItems(); | |
| 73 | + | |
| 74 | + echo "<br>Numshapes: ". $numshapes; | |
| 75 | + $tipo = $shapefileObj->type; | |
| 76 | + echo "<br>Tipo: ". $tipo; | |
| 77 | + echo "<br>Colunas: "; | |
| 78 | + var_dump($colunas); | |
| 79 | + | |
| 80 | + $sqinsert = array(); | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + //verifica o tipo de coluna | |
| 85 | + $tipoColuna = array(); | |
| 86 | + if($numshapes < 10){ | |
| 87 | + $testar = $numshapes; | |
| 88 | + } | |
| 89 | + else{ | |
| 90 | + $testar = 10; | |
| 91 | + } | |
| 92 | + foreach($colunas as $coluna){ | |
| 93 | + $tipo = "numeric"; | |
| 94 | + for ($i=0; $i<$testar;$i++){ | |
| 95 | + $s = $layer->getShape(new resultObj($i)); | |
| 96 | + $v = $s->getValue($layer,$coluna); | |
| 97 | + if(!is_numeric($v)){ | |
| 98 | + $tipo = "varchar"; | |
| 99 | + } | |
| 100 | + } | |
| 101 | + $tipoColuna[$coluna] = $tipo; | |
| 102 | + } | |
| 103 | + echo "<br>Tipos das colunas: <pre>"; | |
| 104 | + var_dump($tipoColuna); | |
| 105 | + echo "</pre>"; | |
| 106 | + //gera o script para criar a tabela | |
| 107 | + $sqltabela = array(); | |
| 108 | + $sql = "CREATE TABLE ".$_POST["i3GEOuploadesquema"].".".$_POST["tabelaDestino"]."(gid integer, the_geom geometry"; | |
| 109 | + foreach($colunas as $coluna){ | |
| 110 | + $sql .= ",".strtolower($coluna)." ".$tipoColuna[$coluna]; | |
| 111 | + } | |
| 112 | + $sql .= ")WITH(OIDS=FALSE)"; | |
| 113 | + $sqltabela[] = $sql; | |
| 114 | + $sqltabela[] = "ALTER TABLE ".$_POST["i3GEOuploadesquema"].".".$_POST["tabelaDestino"]." OWNER TO ".$conexao["usuario"]; | |
| 115 | + $sqltabela[] = "CREATE INDEX ".$_POST["tabelaDestino"]."_indx_thegeom ON ".$_POST["i3GEOuploadesquema"].".".$_POST["tabelaDestino"]." USING gist (the_geom )"; | |
| 116 | + echo "<br>Sql tabela: <pre>"; | |
| 117 | + var_dump($sqltabela); | |
| 118 | + echo "</pre>"; | |
| 119 | + //gera o script para inserir os dados | |
| 120 | + $linhas = array(); | |
| 121 | + $insert = "INSERT INTO ".$_POST["i3GEOuploadesquema"].".".$_POST["tabelaDestino"]."( gid,".strtolower(implode(",",$colunas)).",the_geom)"; | |
| 122 | + for ($i=0; $i<$numshapes;$i++){ | |
| 123 | + $s = $layer->getShape(new resultObj($i)); | |
| 124 | + $vs = array(); | |
| 125 | + $vs[] = $i; | |
| 126 | + foreach($colunas as $coluna){ | |
| 127 | + if($tipoColuna[$coluna] == "varchar"){ | |
| 128 | + $vs[] = "'".$s->getValue($layer,$coluna)."'"; | |
| 129 | + } | |
| 130 | + else{ | |
| 131 | + $vs[] = $s->getValue($layer,$coluna); | |
| 132 | + } | |
| 133 | + } | |
| 134 | + $vs[] = "st_geomfromtext('".$s->toWkt()."','".$_POST["srid"]."')"; | |
| 135 | + $linhas[] = $insert."VALUES(".implode(",",$vs).")"; | |
| 136 | + } | |
| 137 | + $layer->close(); | |
| 138 | + try { | |
| 139 | + $dbh = new PDO('pgsql:dbname='.$conexao["bancodedados"].';user='.$conexao["usuario"].';password='.$conexao["senha"].';host='.$conexao["host"].';port='.$conexao["porta"]); | |
| 140 | + } catch (PDOException $e) { | |
| 141 | + echo 'Connection failed: ' . $e->getMessage(); | |
| 142 | + } | |
| 143 | + foreach($sqltabela as $linha){ | |
| 144 | + try { | |
| 145 | + $dbh->query($linha); | |
| 146 | + } catch (PDOException $e) { | |
| 147 | + echo 'Erro: ' . $e->getMessage(); | |
| 148 | + } | |
| 149 | + } | |
| 150 | + foreach($linhas as $linha){ | |
| 151 | + try { | |
| 152 | + $dbh->query($linha); | |
| 153 | + } catch (PDOException $e) { | |
| 154 | + echo 'Erro: ' . $e->getMessage(); | |
| 155 | + } | |
| 156 | + } | |
| 157 | + echo "<br>Feito!!!"; | |
| 158 | +} | |
| 159 | +else{ | |
| 160 | + echo "<p class='paragrafo' >Erro ao enviar o arquivo. Talvez o tamanho do arquivo seja maior do que o permitido.</p>"; | |
| 161 | +} | |
| 162 | +function verificaNome($nome,$ext){ | |
| 163 | + $nome = strtolower($nome); | |
| 164 | + $lista = explode(".",$nome); | |
| 165 | + $extensao = $lista[count($lista) - 1]; | |
| 166 | + if($extensao != $ext){ | |
| 167 | + echo "Nome de arquivo inválido."; | |
| 168 | + exit; | |
| 169 | + } | |
| 170 | +} | |
| 171 | +?> | |
| 172 | +</body> | |
| 173 | +</html> | |
| 0 | 174 | \ No newline at end of file | ... | ... |
admin/php/upgradebanco46_47.php
| ... | ... | @@ -176,6 +176,9 @@ if(!in_array($teste,17)) |
| 176 | 176 | $dbhw->query("INSERT INTO ".$esquemaadmin."i3geousr_operacoes VALUES('17', 'admin/html/usuarios', 'cadastro de usuarios')"); |
| 177 | 177 | if(!in_array($teste,18)) |
| 178 | 178 | $dbhw->query("INSERT INTO ".$esquemaadmin."i3geousr_operacoes VALUES('18', 'admin/metaestat/geral', 'permite edicoes mais comuns do sistema de metadados estatisticos')"); |
| 179 | +if(!in_array($teste,19)) | |
| 180 | + $dbhw->query("INSERT INTO ".$esquemaadmin."i3geousr_operacoes VALUES('19', 'admin/metaestat/editorbanco', 'permite gerenciar as tabelas do banco')"); | |
| 181 | + | |
| 179 | 182 | |
| 180 | 183 | |
| 181 | 184 | $teste = lista("select * from ".$esquemaadmin."i3geousr_operacoes","id_operacao","id_papel"); | ... | ... |
documentacao/diagramas/cadastrodeusuarios.erm
| ... | ... | @@ -110,7 +110,7 @@ |
| 110 | 110 | </connections> |
| 111 | 111 | <display>false</display> |
| 112 | 112 | <creation_date>2012-07-19 01:51:14</creation_date> |
| 113 | - <updated_date>2012-11-28 13:56:34</updated_date> | |
| 113 | + <updated_date>2013-01-31 12:16:31</updated_date> | |
| 114 | 114 | <model_property> |
| 115 | 115 | <name>Project Name</name> |
| 116 | 116 | <value></value> |
| ... | ... | @@ -656,7 +656,7 @@ |
| 656 | 656 | <connections> |
| 657 | 657 | <relation> |
| 658 | 658 | <id>0</id> |
| 659 | - <source>1</source> | |
| 659 | + <source>4</source> | |
| 660 | 660 | <target>2</target> |
| 661 | 661 | <child_cardinality>1..n</child_cardinality> |
| 662 | 662 | <parent_cardinality>1</parent_cardinality> |
| ... | ... | @@ -673,7 +673,7 @@ |
| 673 | 673 | </relation> |
| 674 | 674 | <relation> |
| 675 | 675 | <id>1</id> |
| 676 | - <source>4</source> | |
| 676 | + <source>1</source> | |
| 677 | 677 | <target>2</target> |
| 678 | 678 | <child_cardinality>1..n</child_cardinality> |
| 679 | 679 | <parent_cardinality>1</parent_cardinality> |
| ... | ... | @@ -699,7 +699,7 @@ |
| 699 | 699 | <normal_column> |
| 700 | 700 | <id>7</id> |
| 701 | 701 | <referenced_column>0</referenced_column> |
| 702 | - <relation>0</relation> | |
| 702 | + <relation>1</relation> | |
| 703 | 703 | <description></description> |
| 704 | 704 | <unique_key_name></unique_key_name> |
| 705 | 705 | <logical_name></logical_name> |
| ... | ... | @@ -732,7 +732,7 @@ |
| 732 | 732 | <normal_column> |
| 733 | 733 | <id>8</id> |
| 734 | 734 | <referenced_column>11</referenced_column> |
| 735 | - <relation>1</relation> | |
| 735 | + <relation>0</relation> | |
| 736 | 736 | <description></description> |
| 737 | 737 | <unique_key_name></unique_key_name> |
| 738 | 738 | <logical_name></logical_name> |
| ... | ... | @@ -787,7 +787,7 @@ |
| 787 | 787 | <connections> |
| 788 | 788 | <relation> |
| 789 | 789 | <id>2</id> |
| 790 | - <source>6</source> | |
| 790 | + <source>4</source> | |
| 791 | 791 | <target>3</target> |
| 792 | 792 | <child_cardinality>1..n</child_cardinality> |
| 793 | 793 | <parent_cardinality>1</parent_cardinality> |
| ... | ... | @@ -804,7 +804,7 @@ |
| 804 | 804 | </relation> |
| 805 | 805 | <relation> |
| 806 | 806 | <id>3</id> |
| 807 | - <source>4</source> | |
| 807 | + <source>6</source> | |
| 808 | 808 | <target>3</target> |
| 809 | 809 | <child_cardinality>1..n</child_cardinality> |
| 810 | 810 | <parent_cardinality>1</parent_cardinality> |
| ... | ... | @@ -830,7 +830,7 @@ |
| 830 | 830 | <normal_column> |
| 831 | 831 | <id>9</id> |
| 832 | 832 | <referenced_column>16</referenced_column> |
| 833 | - <relation>2</relation> | |
| 833 | + <relation>3</relation> | |
| 834 | 834 | <description></description> |
| 835 | 835 | <unique_key_name></unique_key_name> |
| 836 | 836 | <logical_name></logical_name> |
| ... | ... | @@ -863,7 +863,7 @@ |
| 863 | 863 | <normal_column> |
| 864 | 864 | <id>10</id> |
| 865 | 865 | <referenced_column>11</referenced_column> |
| 866 | - <relation>3</relation> | |
| 866 | + <relation>2</relation> | |
| 867 | 867 | <description></description> |
| 868 | 868 | <unique_key_name></unique_key_name> |
| 869 | 869 | <logical_name></logical_name> |
| ... | ... | @@ -1045,7 +1045,7 @@ |
| 1045 | 1045 | <connections> |
| 1046 | 1046 | <relation> |
| 1047 | 1047 | <id>4</id> |
| 1048 | - <source>1</source> | |
| 1048 | + <source>7</source> | |
| 1049 | 1049 | <target>5</target> |
| 1050 | 1050 | <child_cardinality>1..n</child_cardinality> |
| 1051 | 1051 | <parent_cardinality>1</parent_cardinality> |
| ... | ... | @@ -1062,7 +1062,7 @@ |
| 1062 | 1062 | </relation> |
| 1063 | 1063 | <relation> |
| 1064 | 1064 | <id>5</id> |
| 1065 | - <source>7</source> | |
| 1065 | + <source>1</source> | |
| 1066 | 1066 | <target>5</target> |
| 1067 | 1067 | <child_cardinality>1..n</child_cardinality> |
| 1068 | 1068 | <parent_cardinality>1</parent_cardinality> |
| ... | ... | @@ -1088,7 +1088,7 @@ |
| 1088 | 1088 | <normal_column> |
| 1089 | 1089 | <id>14</id> |
| 1090 | 1090 | <referenced_column>0</referenced_column> |
| 1091 | - <relation>4</relation> | |
| 1091 | + <relation>5</relation> | |
| 1092 | 1092 | <description></description> |
| 1093 | 1093 | <unique_key_name></unique_key_name> |
| 1094 | 1094 | <logical_name></logical_name> |
| ... | ... | @@ -1121,7 +1121,7 @@ |
| 1121 | 1121 | <normal_column> |
| 1122 | 1122 | <id>15</id> |
| 1123 | 1123 | <referenced_column>19</referenced_column> |
| 1124 | - <relation>5</relation> | |
| 1124 | + <relation>4</relation> | |
| 1125 | 1125 | <description></description> |
| 1126 | 1126 | <unique_key_name></unique_key_name> |
| 1127 | 1127 | <logical_name></logical_name> |
| ... | ... | @@ -2054,6 +2054,20 @@ |
| 2054 | 2054 | <value>permite edicoes mais comuns do sistema de metadados estatisticos</value> |
| 2055 | 2055 | </column_data> |
| 2056 | 2056 | </data> |
| 2057 | + <data> | |
| 2058 | + <column_data> | |
| 2059 | + <column_id>16</column_id> | |
| 2060 | + <value>19</value> | |
| 2061 | + </column_data> | |
| 2062 | + <column_data> | |
| 2063 | + <column_id>17</column_id> | |
| 2064 | + <value>admin/metaestat/editorbanco</value> | |
| 2065 | + </column_data> | |
| 2066 | + <column_data> | |
| 2067 | + <column_id>18</column_id> | |
| 2068 | + <value>permite gerenciar as tabelas do banco de dados metaestat</value> | |
| 2069 | + </column_data> | |
| 2070 | + </data> | |
| 2057 | 2071 | </direct_test_data> |
| 2058 | 2072 | <repeat_test_data> |
| 2059 | 2073 | <test_data_num>0</test_data_num> | ... | ... |