From e3945af9c25b8c0d79a78cd13a7af3ece4cc4466 Mon Sep 17 00:00:00 2001 From: Emerson Rocha Date: Sat, 4 Jun 2022 19:35:09 -0300 Subject: [PATCH] rdf+bcp47+hxl (#41): partial refactoring --- .../999999999/1568346/bcp47-to-hxl-to-rdf.sh | 50 ++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/officina/999999999/1568346/bcp47-to-hxl-to-rdf.sh b/officina/999999999/1568346/bcp47-to-hxl-to-rdf.sh index 9622283..1e8a461 100755 --- a/officina/999999999/1568346/bcp47-to-hxl-to-rdf.sh +++ b/officina/999999999/1568346/bcp47-to-hxl-to-rdf.sh @@ -76,6 +76,54 @@ bcp47_to_hxl_to_rdf__tests() { } +####################################### +# bcp47_to_hxl_to_rdf__tests +# +# Globals: +# ROOTDIR +# Arguments: +# None +# Outputs: +# Test result +####################################### +test_unesco_thesaurus() { + archivum__namespace="${ROOTDIR}/999999999/1568346/data/hxlstandard-rdf-namespaces-example.hxl.csv" + archivum__unesco_thesaurus_bcp47="${ROOTDIR}/999999999/1568346/data/unesco-thesaurus.bcp47g.tsv" + archivum__resultata_bag1="${ROOTDIR}/999999/0/unesco-thesaurus~rdfbag1.ttl" + archivum__resultata_bag2="${ROOTDIR}/999999/0/unesco-thesaurus~rdfbag2.ttl" + archivum__resultata_ttl="${ROOTDIR}/999999/0/unesco-thesaurus.rdf.ttl" + archivum__resultata_xml="${ROOTDIR}/999999/0/unesco-thesaurus.rdf.xml" + + "${ROOTDIR}/999999999/0/999999999_54872.py" \ + --objectivum-formato=_temp_bcp47 \ + --rdf-bag=1 \ + --rdf-namespaces-archivo="${archivum__namespace}" \ + "${archivum__unesco_thesaurus_bcp47}" | + rapper --quiet --input=turtle --output=turtle /dev/fd/0 \ + > "${archivum__resultata_bag1}" + + "${ROOTDIR}/999999999/0/999999999_54872.py" \ + --objectivum-formato=_temp_bcp47 \ + --rdf-bag=2 \ + --rdf-namespaces-archivo="${archivum__namespace}" \ + "${archivum__unesco_thesaurus_bcp47}" | + rapper --quiet --input=turtle --output=turtle /dev/fd/0 \ + > "${archivum__resultata_bag2}" + + # riot --output=Turtle \ + riot --time --output=RDF/XML \ + "${archivum__resultata_bag1}" \ + "${archivum__resultata_bag2}" \ + > "${archivum__resultata_xml}" + + riot --time --output=Turtle \ + "${archivum__resultata_xml}" \ + > "${archivum__resultata_ttl}" + + riot --validate "${archivum__resultata_ttl}" +} + # echo "test" -bcp47_to_hxl_to_rdf__tests +# bcp47_to_hxl_to_rdf__tests +test_unesco_thesaurus