Skip to content

Commit bcba46d

Browse files
Jamie-SAJamie-SA
Jamie-SA
authored andcommitted
Mint URIs in ex: instead of gist:
1 parent d0abe55 commit bcba46d

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

migration/v12.0/queries/action/default/replace_percentage.rq

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
prefix gist: <https://ontologies.semanticarts.com/gist/>
1+
PREFIX gist: <https://ontologies.semanticarts.com/gist/>
22
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
3+
PREFIX ex: <https://www.example.org/>
4+
5+
# This query will find instances of gist:Percentage as used in gist v11
6+
# and change them to instances of gist:Magnitude as used in gist v12.
7+
# However, you probably will want instances URIs to be different than what
8+
# this query will create, so review the BIND() below and change as needed.
39

410
DELETE {
511
?s ?p ?percentage .
@@ -37,5 +43,5 @@ WHERE {
3743
}
3844
# new gist:Magnitude using hash of percentage for iri
3945
# duplicates from union will be the same object from hash of percentage
40-
BIND(IRI(CONCAT(STR(gist:Magnitude), "-", SHA256(STR(?percentage))))AS ?magnitude)
46+
BIND(IRI(CONCAT(STR(ex:_Magnitude_), SHA256(STR(?percentage)))) AS ?magnitude)
4147
}

migration/v12.0/queries/action/ngraphs/replace_percentage.rq

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
1-
prefix gist: <https://ontologies.semanticarts.com/gist/>
1+
PREFIX gist: <https://ontologies.semanticarts.com/gist/>
22
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
3+
PREFIX ex: <https://www.example.org/>
4+
5+
# This query will find instances of gist:Percentage as used in gist v11
6+
# and change them to instances of gist:Magnitude as used in gist v12.
7+
# However, you probably will want instances URIs to be different than what
8+
# this query will create, so review the BIND() below and change as needed.
39

410
DELETE {
511
GRAPH ?g {
@@ -45,5 +51,5 @@ WHERE {
4551
}
4652
# new gist:Magnitude using hash of percentage for iri
4753
# duplicates from union will be the same object from hash of percentage
48-
BIND(IRI(CONCAT(STR(gist:Magnitude), "-", SHA256(STR(?percentage))))AS ?magnitude)
54+
BIND(IRI(CONCAT(STR(ex:_Magnitude_), SHA256(STR(?percentage)))) AS ?magnitude)
4955
}

0 commit comments

Comments
 (0)