Skip to content

Commit 699a631

Browse files
committed
refactor(queries): remove or rename some result columns
- rename Property Group to Category - rename instance to resource - rename prefLabel to label (likewise prefLabelLang to labelLang) - remove redundant actionType - remove redundant Class column (the section already names it)
1 parent 349c749 commit 699a631

16 files changed

+23
-22
lines changed

dqgen/resources/asciidoc_templates/statistics.jinja2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
[cols="1,1,1,1,1,1,1", options="header"]
2929
|===
30-
|Property group
30+
|Category
3131
|Property
3232
|Added
3333
|Deleted

dqgen/resources/html_templates/statistics.jinja2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<table class="display">
3737
<thead class="center aligned">
3838
<tr>
39-
<th>Property group</th>
39+
<th>Category</th>
4040
<th>Property</th>
4141
<th>Added</th>
4242
<th>Deleted</th>

dqgen/resources/query_templates/instance_additions.rq

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ PREFIX sh: <http://purl.org/skos-history/>
3737
PREFIX xhv: <http://www.w3.org/1999/xhtml/vocab#>
3838
# identify added instances
3939
{% if cls == "owl:ObjectProperty" or cls == "owl:DatatypeProperty" %}
40-
SELECT distinct ?class ?instance ?prefLabel ?prefLabelLang ?domain ?range ?minCardinality ?maxCardinality ("{{type_of_action}}" as ?actionType)
40+
SELECT DISTINCT (?instance AS ?resource) (?prefLabel as ?label) (?prefLabelLang AS ?labelLang) ?domain ?range ?minCardinality ?maxCardinality
4141
{% else %}
42-
SELECT distinct ?class ?instance ?prefLabel ?prefLabelLang ("{{type_of_action}}" as ?actionType)
42+
SELECT DISTINCT (?instance AS ?resource) (?prefLabel as ?label) (?prefLabelLang AS ?labelLang)
4343
{% endif %}
4444
WHERE {
4545
GRAPH ?versionHistoryGraph {

dqgen/resources/query_templates/instance_deletions.rq

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ PREFIX xhv: <http://www.w3.org/1999/xhtml/vocab#>
4242
# as bad practice, because they still may be referenced elsewhere.
4343
# Cosider using owl:deprecated instead)
4444

45-
SELECT distinct ?class ?instance ?prefLabel ?prefLabelLang ("{{type_of_action}}" as ?actionType)
45+
SELECT DISTINCT (?instance AS ?resource) (?prefLabel as ?label) (?prefLabelLang AS ?labelLang)
4646
WHERE {
4747
GRAPH ?versionHistoryGraph {
4848
# parameters

dqgen/resources/query_templates/movement_cross_instance.rq

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@ PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
2727
PREFIX shacl: <http://www.w3.org/ns/shacl#>
2828

2929
# Show all movements cross instances
30-
SELECT DISTINCT ?oldInstance ?class ?oldInstancePrefLabel ?oldInstancePrefLabelLang ?newInstance
31-
?newInstancePrefLabel
32-
?newInstancePrefLabelLang ?property ?value ?valueLang ("{{type_of_action}}" as ?actionType)
30+
SELECT DISTINCT
31+
(?oldInstance AS ?oldResource) (?oldInstancePrefLabel AS ?oldResourceLabel) (?oldInstancePrefLabelLang AS ?oldResourceLabelLang)
32+
(?newInstance AS ?newResource) (?newInstancePrefLabel AS ?newResourceLabel) (?newInstancePrefLabelLang AS ?newResourceLabelLang)
33+
?property ?value ?valueLang
3334
WHERE {
3435
GRAPH ?versionHistoryGraph {
3536
# parameters

dqgen/resources/query_templates/movement_cross_property.rq

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
2727
PREFIX shacl: <http://www.w3.org/ns/shacl#>
2828

2929
# Show all movements cross property
30-
SELECT DISTINCT ?instance ?class ?prefLabel ?prefLabelLang ?oldProperty ?newProperty ?value ?valueLang ("{{type_of_action}}" as ?actionType)
30+
SELECT DISTINCT (?instance AS ?resource) (?prefLabel as ?label) (?prefLabelLang AS ?labelLang) ?oldProperty ?newProperty ?value ?valueLang
3131
WHERE {
3232
GRAPH ?versionHistoryGraph {
3333
# parameters

dqgen/resources/query_templates/property_additions.rq

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ PREFIX sh: <http://purl.org/skos-history/>
3737
PREFIX xhv: <http://www.w3.org/1999/xhtml/vocab#>
3838

3939
# Show all added instance/property
40-
SELECT DISTINCT ?instance ?class ?prefLabel ?prefLabelLang ?property ?value ?valueLang ("{{type_of_action}}" as ?actionType)
40+
SELECT DISTINCT (?instance AS ?resource) (?prefLabel as ?label) (?prefLabelLang AS ?labelLang) ?property ?value ?valueLang
4141
WHERE {
4242
GRAPH ?versionHistoryGraph {
4343
# parameters

dqgen/resources/query_templates/property_deletions.rq

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ PREFIX sd: <http://www.w3.org/ns/sparql-service-description#>
3636
PREFIX sh: <http://purl.org/skos-history/>
3737
PREFIX xhv: <http://www.w3.org/1999/xhtml/vocab#>
3838
# Show all deleted instance/property
39-
SELECT DISTINCT ?instance ?class ?prefLabel ?prefLabelLang ?property ?value ?valueLang ("{{type_of_action}}" as ?actionType)
39+
SELECT DISTINCT (?instance AS ?resource) (?prefLabel as ?label) (?prefLabelLang AS ?labelLang) ?property ?value ?valueLang
4040
WHERE {
4141
GRAPH ?versionHistoryGraph {
4242
# parameters

dqgen/resources/query_templates/property_value_updates.rq

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,7 @@ PREFIX sh: <http://purl.org/skos-history/>
3737
PREFIX xhv: <http://www.w3.org/1999/xhtml/vocab#>
3838

3939
# Show all properties value updates
40-
SELECT DISTINCT ?instance ?class ?prefLabel ?prefLabelLang ?property ?oldValue ?oldValueLang ?newValue ?newValueLang
41-
("{{type_of_action}}" as ?actionType)
40+
SELECT DISTINCT (?instance AS ?resource) (?prefLabel as ?label) (?prefLabelLang AS ?labelLang) ?property ?oldValue ?oldValueLang ?newValue ?newValueLang
4241
WHERE {
4342
GRAPH ?versionHistoryGraph {
4443
# parameters

dqgen/resources/query_templates/reified_movement_cross_instance.rq

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@ PREFIX sh: <http://purl.org/skos-history/>
3737
PREFIX xhv: <http://www.w3.org/1999/xhtml/vocab#>
3838

3939
# Show all movements cross instance for reified structures
40-
SELECT DISTINCT ?oldInstance ?class ?oldInstancePrefLabel ?oldInstancePrefLabelLang ?newInstance ?newInstancePrefLabel
41-
?newInstancePrefLabelLang ?property ?object ?objProperty ?value ?valueLang ("{{type_of_action}}" as ?actionType)
40+
SELECT DISTINCT
41+
(?oldInstance AS ?oldResource) (?oldInstancePrefLabel AS ?oldResourceLabel) (?oldInstancePrefLabelLang AS ?oldResourceLabelLang)
42+
(?newInstance AS ?newResource) (?newInstancePrefLabel AS ?newResourceLabel) (?newInstancePrefLabelLang AS ?newResourceLabelLang)
43+
?property ?object ?objProperty ?value ?valueLang
4244
WHERE {
4345
GRAPH ?versionHistoryGraph {
4446
# parameters

0 commit comments

Comments
 (0)