Skip to content

Commit

Permalink
1603_3_12_16_5305.sh (#41): p5305_sparql_endpoint_jena_fuseki_start()
Browse files Browse the repository at this point in the history
  • Loading branch information
fititnt committed May 14, 2022
1 parent f63829e commit 570f4c4
Show file tree
Hide file tree
Showing 4 changed files with 107 additions and 3 deletions.
21 changes: 21 additions & 0 deletions officinam/1679/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,24 @@ P9119 LexML Brazil ID identifier for laws in the LexML system ExternalId 27,718
### [45:16:76:21] //Espaço numérico do Brasil, relacionado à geografia (Níveis 1+2+3+4+5+6)//

`P1585 Brazilian municipality code identifier for municipalities in Brazil IBGE code ExternalId 5,570`


<!--
- Pessoa jurítica
- (...)
- Pessoa física
- https://pt.wikipedia.org/wiki/Cadastro_de_Pessoas_F%C3%ADsicas
- http://www.receita.fazenda.gov.br/Aplicacoes/ATCTA/CPF/
- https://pt.wikipedia.org/wiki/C%C3%A9dula_de_identidade
- Na pagina da Carteira de identidade cita os demais. Exemplo:
- https://pt.wikipedia.org/wiki/Carteira_Nacional_de_Habilita%C3%A7%C3%A3o
- https://pt.wikipedia.org/wiki/T%C3%ADtulo_de_Eleitor
- https://pt.wikipedia.org/wiki/Carteira_de_trabalho
- https://pt.wikipedia.org/wiki/Instituto_Nacional_do_Seguro_Social (numero do INSS, nao tem conceito direto)
- https://pt.wikipedia.org/wiki/PIS/PASEP
- Número de Identidade Profissional (opcional)
- https://pt.wikipedia.org/wiki/Certificado_de_alistamento_militar
- https://pt.wikipedia.org/wiki/SUS (cartão do SUS)
- https://pt.wikipedia.org/wiki/Certid%C3%A3o_de_nascimento
- https://pt.wikipedia.org/wiki/Registro_Nacional_de_Estrangeiros
-->
7 changes: 6 additions & 1 deletion officinam/999999999/0/1686799/README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
# 999999999/0/1686799/
> https://www.wikidata.org/wiki/Q1686799
> - https://www.wikidata.org/wiki/Q1686799
> - https://github.com/EticaAI/lexicographi-sine-finibus/issues/41
> - https://jena.apache.org/documentation/tools/index.html
### Apache Jena
- https://jena.apache.org/documentation/fuseki2/fuseki-quick-start.html
77 changes: 75 additions & 2 deletions officinam/999999999/1603_3_12_16_5305.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ ROOTDIR="$(pwd)"
# Recommended use the lastest from https://jena.apache.org/download/
SPARQL_ENDPOINT_JENA_VERSION="4.5.0"

# @see https://jena.apache.org/documentation/tools/index.html
JENA_HOME="$ROOTDIR/999999999/0/1686799/apache-jena"
export PATH=$PATH:$JENA_HOME/bin

# @TODO eventualmente talvez anotar as propriedades de campos que tem aqui
# Cadastro Nacional de Endereços para Fins Estatísticos
# https://ftp.ibge.gov.br/Censos/Censo_Demografico_2010/Cadastro_Nacional_de_Enderecos_Fins_Estatisticos/
Expand Down Expand Up @@ -99,7 +103,7 @@ p5305_sparql_endpoint_jena_install() {
tar -C "${objectivum_archivum}" \
-zxf "${fontem_archivum_temporarium}" \
"${targz_subdir}" \
--strip-components=2
--strip-components=1
set +x
# @TODO: remove cached downloaded file
}
Expand Down Expand Up @@ -139,12 +143,81 @@ p5305_sparql_endpoint_jena_fuseki_install() {
tar -C "${objectivum_archivum}" \
-zxf "${fontem_archivum_temporarium}" \
"${targz_subdir}" \
--strip-components=2
--strip-components=1

# cd "${objectivum_archivum}"
# tar -zxf "${fontem_archivum_temporarium}" "${targz_subdir}"
# cd "${ROOTDIR}"
set +x
# @TODO: remove cached downloaded file
}

#######################################
# Download Apache JENA fuseki to 999999999/0/1686799/
#
# Globals:
# ROOTDIR
# SPARQL_ENDPOINT_JENA_VERSION
# Arguments:
# numerordinatio
# Outputs:
# Convert files
#######################################
p5305_sparql_endpoint_jena_fuseki_start() {

fontem_archivum="${ROOTDIR}/999999999/0/1686799/apache-jena-fuseki"
targz_subdir="apache-jena-fuseki-${SPARQL_ENDPOINT_JENA_VERSION}"
objectivum_archivum_basi="${ROOTDIR}/999999999/0/1686799/apache-jena-fuseki"
objectivum_archivum_bin="${objectivum_archivum_basi}/fuseki-server"
# officinam/999999999/0/1686799/apache-jena-fuseki/fuseki-server
objectivum_archivum="${ROOTDIR}/999999999/0/1686799/apache-jena-fuseki"


echo "${FUNCNAME[0]} ... [$SPARQL_ENDPOINT_JENA_VERSION] [$iri]"

# Starts at http://localhost:3030/#/
# @TODO: change home directory
"${objectivum_archivum_bin}"

sparql --version

# if [ ! -f "${fontem_archivum_temporarium}" ]; then
# set -x
# curl --compressed --silent --show-error \
# -get "$iri" \
# --output "$fontem_archivum_temporarium"
# set +x
# else
# echo "Already cached at [${fontem_archivum_temporarium}]"
# fi

# set -x
# tar -C "${objectivum_archivum}" \
# -zxf "${fontem_archivum_temporarium}" \
# "${targz_subdir}" \
# --strip-components=2
# set +x
# @TODO: remove cached downloaded file
}

#### Java dependencies _________________________________________________________
# - https://jena.apache.org/download/index.cgi
# - "Jena4 requires Java 11."
# - https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-on-ubuntu-20-04-pt
#
# sudo apt install default-jre

#### Apache Jena, install ______________________________________________________
# Uncomment these.
# p5305_sparql_endpoint_jena_install
# p5305_sparql_endpoint_jena_fuseki_install


#### Other commends (move or remove later) _____________________________________
# https://www.wikidata.org/wiki/Wikidata:Identifier_migration
# https://www.wikidata.org/wiki/Help:Authority_control

p5305_sparql_endpoint_jena_fuseki_start


# @TODO https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-on-ubuntu-20-04-pt
5 changes: 5 additions & 0 deletions officinam/999999999/999999_17.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,8 @@ deploy_0_9_markdown
# ./999999999/0/1603_1.py --methodus='status-quo' --status-quo-in-rdf-skos-turtle --codex-de 1603_1_7

# ./999999999/0/1603_1.py --methodus='status-quo' --status-quo-in-rdf-skos-turtle --codex-de 1603_1_7 > ~/Downloads/1603_1_7.no11.skos.ttl


#### TODO ______________________________________________________________________
# GitHub gist, create from command line
# https://cli.github.com/manual/gh_gist_edit

0 comments on commit 570f4c4

Please sign in to comment.