Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
smrgeoinfo committed Dec 21, 2023
2 parents 4f2bb4d + 5eacda4 commit a3fe9e6
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 22 deletions.
Binary file modified cache/vocabularies.db
Binary file not shown.
10 changes: 5 additions & 5 deletions docs/test_feature_type.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,27 +56,27 @@ <h2 id="toc-title">Table of contents</h2>
<p>getObject subject: https://w3id.org/isample/vocabulary/sampledfeature/1.0/testfeaturevocabulary</p>
<p>getObject predicate: http://www.w3.org/2004/02/skos/core#prefLabel</p>
<p>length of qres: 0</p>
<p>qres: &lt;rdflib.plugins.sparql.processor.SPARQLResult object at 0x7fb425ca12b0&gt;</p>
<p>qres: &lt;rdflib.plugins.sparql.processor.SPARQLResult object at 0x7efc8fd01580&gt;</p>
<p>getObject prefixes: PREFIX skos: <a href="http://www.w3.org/2004/02/skos/core#" class="uri">http://www.w3.org/2004/02/skos/core#</a> PREFIX owl: <a href="http://www.w3.org/2002/07/owl#" class="uri">http://www.w3.org/2002/07/owl#</a> PREFIX rdf: <a href="http://www.w3.org/1999/02/22-rdf-syntax-ns#" class="uri">http://www.w3.org/1999/02/22-rdf-syntax-ns#</a> PREFIX rdfs: <a href="http://www.w3.org/2000/01/rdf-schema#" class="uri">http://www.w3.org/2000/01/rdf-schema#</a></p>
<p>getObject subject: https://w3id.org/isample/vocabulary/sampledfeature/1.0/testfeaturevocabulary</p>
<p>getObject predicate: http://purl.org/dc/terms/modified</p>
<p>length of qres: 0</p>
<p>qres: &lt;rdflib.plugins.sparql.processor.SPARQLResult object at 0x7fb426d884a0&gt;</p>
<p>qres: &lt;rdflib.plugins.sparql.processor.SPARQLResult object at 0x7efc9028cc50&gt;</p>
<p>getObject prefixes: PREFIX skos: <a href="http://www.w3.org/2004/02/skos/core#" class="uri">http://www.w3.org/2004/02/skos/core#</a> PREFIX owl: <a href="http://www.w3.org/2002/07/owl#" class="uri">http://www.w3.org/2002/07/owl#</a> PREFIX rdf: <a href="http://www.w3.org/1999/02/22-rdf-syntax-ns#" class="uri">http://www.w3.org/1999/02/22-rdf-syntax-ns#</a> PREFIX rdfs: <a href="http://www.w3.org/2000/01/rdf-schema#" class="uri">http://www.w3.org/2000/01/rdf-schema#</a></p>
<p>getObject subject: https://w3id.org/isample/vocabulary/sampledfeature/1.0/testfeaturevocabulary</p>
<p>getObject predicate: http://www.w3.org/2004/02/skos/core#definition</p>
<p>length of qres: 0</p>
<p>qres: &lt;rdflib.plugins.sparql.processor.SPARQLResult object at 0x7fb425ccd6d0&gt;</p>
<p>qres: &lt;rdflib.plugins.sparql.processor.SPARQLResult object at 0x7efc8f1f9b20&gt;</p>
<p>getObject prefixes: PREFIX skos: <a href="http://www.w3.org/2004/02/skos/core#" class="uri">http://www.w3.org/2004/02/skos/core#</a> PREFIX owl: <a href="http://www.w3.org/2002/07/owl#" class="uri">http://www.w3.org/2002/07/owl#</a> PREFIX rdf: <a href="http://www.w3.org/1999/02/22-rdf-syntax-ns#" class="uri">http://www.w3.org/1999/02/22-rdf-syntax-ns#</a> PREFIX rdfs: <a href="http://www.w3.org/2000/01/rdf-schema#" class="uri">http://www.w3.org/2000/01/rdf-schema#</a></p>
<p>getObject subject: https://w3id.org/isample/vocabulary/sampledfeature/1.0/testfeaturevocabulary</p>
<p>getObject predicate: http://www.w3.org/2000/01/rdf-schema#comment</p>
<p>length of qres: 0</p>
<p>qres: &lt;rdflib.plugins.sparql.processor.SPARQLResult object at 0x7fb426d88800&gt;</p>
<p>qres: &lt;rdflib.plugins.sparql.processor.SPARQLResult object at 0x7efc9028d880&gt;</p>
<p>getObject prefixes: PREFIX skos: <a href="http://www.w3.org/2004/02/skos/core#" class="uri">http://www.w3.org/2004/02/skos/core#</a> PREFIX owl: <a href="http://www.w3.org/2002/07/owl#" class="uri">http://www.w3.org/2002/07/owl#</a> PREFIX rdf: <a href="http://www.w3.org/1999/02/22-rdf-syntax-ns#" class="uri">http://www.w3.org/1999/02/22-rdf-syntax-ns#</a> PREFIX rdfs: <a href="http://www.w3.org/2000/01/rdf-schema#" class="uri">http://www.w3.org/2000/01/rdf-schema#</a></p>
<p>getObject subject: https://w3id.org/isample/vocabulary/sampledfeature/1.0/testfeaturevocabulary</p>
<p>getObject predicate: http://www.w3.org/2004/02/skos/core#historyNote</p>
<p>length of qres: 0</p>
<p>qres: &lt;rdflib.plugins.sparql.processor.SPARQLResult object at 0x7fb425ccc5c0&gt;</p>
<p>qres: &lt;rdflib.plugins.sparql.processor.SPARQLResult object at 0x7efc8f1f9d60&gt;</p>
<p><span id="ConceptScheme"></span></p>
<section id="concept-scheme-conceptscheme" class="level1" data-number="1">
<h1 data-number="1"><span class="header-section-number">1</span> <strong>Concept scheme:</strong> ConceptScheme</h1>
Expand Down
10 changes: 5 additions & 5 deletions docs/test_feature_type.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ getObject predicate: http://www.w3.org/2004/02/skos/core#prefLabel

length of qres: 0

qres: <rdflib.plugins.sparql.processor.SPARQLResult object at 0x7fb425ca12b0>
qres: <rdflib.plugins.sparql.processor.SPARQLResult object at 0x7efc8fd01580>

getObject prefixes:
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
Expand All @@ -27,7 +27,7 @@ getObject predicate: http://purl.org/dc/terms/modified

length of qres: 0

qres: <rdflib.plugins.sparql.processor.SPARQLResult object at 0x7fb426d884a0>
qres: <rdflib.plugins.sparql.processor.SPARQLResult object at 0x7efc9028cc50>

getObject prefixes:
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
Expand All @@ -42,7 +42,7 @@ getObject predicate: http://www.w3.org/2004/02/skos/core#definition

length of qres: 0

qres: <rdflib.plugins.sparql.processor.SPARQLResult object at 0x7fb425ccd6d0>
qres: <rdflib.plugins.sparql.processor.SPARQLResult object at 0x7efc8f1f9b20>

getObject prefixes:
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
Expand All @@ -57,7 +57,7 @@ getObject predicate: http://www.w3.org/2000/01/rdf-schema#comment

length of qres: 0

qres: <rdflib.plugins.sparql.processor.SPARQLResult object at 0x7fb426d88800>
qres: <rdflib.plugins.sparql.processor.SPARQLResult object at 0x7efc9028d880>

getObject prefixes:
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
Expand All @@ -72,7 +72,7 @@ getObject predicate: http://www.w3.org/2004/02/skos/core#historyNote

length of qres: 0

qres: <rdflib.plugins.sparql.processor.SPARQLResult object at 0x7fb425ccc5c0>
qres: <rdflib.plugins.sparql.processor.SPARQLResult object at 0x7efc8f1f9d60>

---
comment: |
Expand Down
10 changes: 5 additions & 5 deletions docs/test_sample_type.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,27 +56,27 @@ <h2 id="toc-title">Table of contents</h2>
<p>getObject subject: https://w3id.org/isample/vocabulary/specimentype/1.0/testvocabulary</p>
<p>getObject predicate: http://www.w3.org/2004/02/skos/core#prefLabel</p>
<p>length of qres: 0</p>
<p>qres: &lt;rdflib.plugins.sparql.processor.SPARQLResult object at 0x7fcc3d711040&gt;</p>
<p>qres: &lt;rdflib.plugins.sparql.processor.SPARQLResult object at 0x7f94df6cfdd0&gt;</p>
<p>getObject prefixes: PREFIX skos: <a href="http://www.w3.org/2004/02/skos/core#" class="uri">http://www.w3.org/2004/02/skos/core#</a> PREFIX owl: <a href="http://www.w3.org/2002/07/owl#" class="uri">http://www.w3.org/2002/07/owl#</a> PREFIX rdf: <a href="http://www.w3.org/1999/02/22-rdf-syntax-ns#" class="uri">http://www.w3.org/1999/02/22-rdf-syntax-ns#</a> PREFIX rdfs: <a href="http://www.w3.org/2000/01/rdf-schema#" class="uri">http://www.w3.org/2000/01/rdf-schema#</a></p>
<p>getObject subject: https://w3id.org/isample/vocabulary/specimentype/1.0/testvocabulary</p>
<p>getObject predicate: http://purl.org/dc/terms/modified</p>
<p>length of qres: 0</p>
<p>qres: &lt;rdflib.plugins.sparql.processor.SPARQLResult object at 0x7fcc3c9e8200&gt;</p>
<p>qres: &lt;rdflib.plugins.sparql.processor.SPARQLResult object at 0x7f94df750770&gt;</p>
<p>getObject prefixes: PREFIX skos: <a href="http://www.w3.org/2004/02/skos/core#" class="uri">http://www.w3.org/2004/02/skos/core#</a> PREFIX owl: <a href="http://www.w3.org/2002/07/owl#" class="uri">http://www.w3.org/2002/07/owl#</a> PREFIX rdf: <a href="http://www.w3.org/1999/02/22-rdf-syntax-ns#" class="uri">http://www.w3.org/1999/02/22-rdf-syntax-ns#</a> PREFIX rdfs: <a href="http://www.w3.org/2000/01/rdf-schema#" class="uri">http://www.w3.org/2000/01/rdf-schema#</a></p>
<p>getObject subject: https://w3id.org/isample/vocabulary/specimentype/1.0/testvocabulary</p>
<p>getObject predicate: http://www.w3.org/2004/02/skos/core#definition</p>
<p>length of qres: 0</p>
<p>qres: &lt;rdflib.plugins.sparql.processor.SPARQLResult object at 0x7fcc3b929940&gt;</p>
<p>qres: &lt;rdflib.plugins.sparql.processor.SPARQLResult object at 0x7f94de699160&gt;</p>
<p>getObject prefixes: PREFIX skos: <a href="http://www.w3.org/2004/02/skos/core#" class="uri">http://www.w3.org/2004/02/skos/core#</a> PREFIX owl: <a href="http://www.w3.org/2002/07/owl#" class="uri">http://www.w3.org/2002/07/owl#</a> PREFIX rdf: <a href="http://www.w3.org/1999/02/22-rdf-syntax-ns#" class="uri">http://www.w3.org/1999/02/22-rdf-syntax-ns#</a> PREFIX rdfs: <a href="http://www.w3.org/2000/01/rdf-schema#" class="uri">http://www.w3.org/2000/01/rdf-schema#</a></p>
<p>getObject subject: https://w3id.org/isample/vocabulary/specimentype/1.0/testvocabulary</p>
<p>getObject predicate: http://www.w3.org/2000/01/rdf-schema#comment</p>
<p>length of qres: 0</p>
<p>qres: &lt;rdflib.plugins.sparql.processor.SPARQLResult object at 0x7fcc3c9e8710&gt;</p>
<p>qres: &lt;rdflib.plugins.sparql.processor.SPARQLResult object at 0x7f94df751160&gt;</p>
<p>getObject prefixes: PREFIX skos: <a href="http://www.w3.org/2004/02/skos/core#" class="uri">http://www.w3.org/2004/02/skos/core#</a> PREFIX owl: <a href="http://www.w3.org/2002/07/owl#" class="uri">http://www.w3.org/2002/07/owl#</a> PREFIX rdf: <a href="http://www.w3.org/1999/02/22-rdf-syntax-ns#" class="uri">http://www.w3.org/1999/02/22-rdf-syntax-ns#</a> PREFIX rdfs: <a href="http://www.w3.org/2000/01/rdf-schema#" class="uri">http://www.w3.org/2000/01/rdf-schema#</a></p>
<p>getObject subject: https://w3id.org/isample/vocabulary/specimentype/1.0/testvocabulary</p>
<p>getObject predicate: http://www.w3.org/2004/02/skos/core#historyNote</p>
<p>length of qres: 0</p>
<p>qres: &lt;rdflib.plugins.sparql.processor.SPARQLResult object at 0x7fcc3b929d60&gt;</p>
<p>qres: &lt;rdflib.plugins.sparql.processor.SPARQLResult object at 0x7f94de698350&gt;</p>
<p><span id="ConceptScheme"></span></p>
<section id="concept-scheme-conceptscheme" class="level1" data-number="1">
<h1 data-number="1"><span class="header-section-number">1</span> <strong>Concept scheme:</strong> ConceptScheme</h1>
Expand Down
10 changes: 5 additions & 5 deletions docs/test_sample_type.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ getObject predicate: http://www.w3.org/2004/02/skos/core#prefLabel

length of qres: 0

qres: <rdflib.plugins.sparql.processor.SPARQLResult object at 0x7fcc3d711040>
qres: <rdflib.plugins.sparql.processor.SPARQLResult object at 0x7f94df6cfdd0>

getObject prefixes:
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
Expand All @@ -27,7 +27,7 @@ getObject predicate: http://purl.org/dc/terms/modified

length of qres: 0

qres: <rdflib.plugins.sparql.processor.SPARQLResult object at 0x7fcc3c9e8200>
qres: <rdflib.plugins.sparql.processor.SPARQLResult object at 0x7f94df750770>

getObject prefixes:
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
Expand All @@ -42,7 +42,7 @@ getObject predicate: http://www.w3.org/2004/02/skos/core#definition

length of qres: 0

qres: <rdflib.plugins.sparql.processor.SPARQLResult object at 0x7fcc3b929940>
qres: <rdflib.plugins.sparql.processor.SPARQLResult object at 0x7f94de699160>

getObject prefixes:
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
Expand All @@ -57,7 +57,7 @@ getObject predicate: http://www.w3.org/2000/01/rdf-schema#comment

length of qres: 0

qres: <rdflib.plugins.sparql.processor.SPARQLResult object at 0x7fcc3c9e8710>
qres: <rdflib.plugins.sparql.processor.SPARQLResult object at 0x7f94df751160>

getObject prefixes:
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
Expand All @@ -72,7 +72,7 @@ getObject predicate: http://www.w3.org/2004/02/skos/core#historyNote

length of qres: 0

qres: <rdflib.plugins.sparql.processor.SPARQLResult object at 0x7fcc3b929d60>
qres: <rdflib.plugins.sparql.processor.SPARQLResult object at 0x7f94de698350>

---
comment: |
Expand Down
5 changes: 3 additions & 2 deletions tools/navocab/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def __init__(
storage_uri=DEFAULT_STORE,
store_identifier=STORE_IDENTIFIER,
# purge_existing=False,
purge_existing=False # change to true to get rid of previous loads
purge_existing=True # change to true to get rid of previous loads
):
self.origin = None
self.storage_uri = storage_uri
Expand All @@ -93,6 +93,7 @@ def _initialize_store(self, purge=False):


if purge:
L.debug("navocab init: purging %s", self.store_identifier)
graph.destroy(self.storage_uri)

graph.open(self.storage_uri, create=True)
Expand Down Expand Up @@ -142,6 +143,7 @@ def load(
# First check for extension_vocab rdfs:subPropertyOf extended_vocab
# if not present, then compute and add it for later use.
# What vocabulary did we just load?
L.debug("bindings: %s", bindings.items())
q = (
VocabularyStore._PFX
+ """SELECT ?s
Expand All @@ -150,7 +152,6 @@ def load(
}"""
)
qres = g_loaded.query(q)
L.info("Navocab.load.query result: %s", qres)
loaded_vocabulary = self._result_single_value(qres, abbreviate=False)
if loaded_vocabulary is not None:
L.info("Loaded vocabulary %s", loaded_vocabulary)
Expand Down

0 comments on commit a3fe9e6

Please sign in to comment.