forked from vivo-community/scholars-discovery
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Harvest and index creative work date time interval with precision
- Loading branch information
William Welling
committed
Feb 21, 2023
1 parent
d82c369
commit 4649d4b
Showing
10 changed files
with
79 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
src/main/resources/defaults/displayViews/persons/creativeWorks/default.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 3 additions & 13 deletions
16
src/main/resources/defaults/displayViews/processes/overview/dateTimeInterval.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,5 @@ | ||
<div> | ||
{{#if dateTimeIntervalStart}} | ||
{{#if dateTimeIntervalEnd}} | ||
<span>{{toYear dateTimeIntervalStart}}</span> | ||
<span>-</span> | ||
<span>{{toYear dateTimeIntervalEnd}}</span> | ||
{{else}} | ||
<span>{{toYear dateTimeIntervalStart}}</span> | ||
{{#if dateTimeInterval}} | ||
<span>{{toDefinedPrecision dateTimeInterval}}</span> | ||
{{/if}} | ||
{{else}} | ||
{{#if dateTimeIntervalEnd}} | ||
<span>{{toYear dateTimeIntervalEnd}}</span> | ||
{{/if}} | ||
{{/if}} | ||
</div> | ||
</div> |
9 changes: 9 additions & 0 deletions
9
src/main/resources/templates/sparql/process/dateTimeInterval.sparql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
PREFIX vivo: <http://vivoweb.org/ontology/core#> | ||
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> | ||
|
||
CONSTRUCT { | ||
<{{uri}}> vivo:dateTimeInterval ?dateTimeIntervalWithId . | ||
} WHERE { | ||
<{{uri}}> vivo:dateTimeInterval ?dateTimeInterval . | ||
BIND(CONCAT(STR(?dateTimeInterval), REPLACE(STR(?dateTimeInterval), "(^.*/)", "::") ) AS ?dateTimeIntervalWithId) . | ||
} |
7 changes: 4 additions & 3 deletions
7
src/main/resources/templates/sparql/process/dateTimeIntervalEnd.sparql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
PREFIX vivo: <http://vivoweb.org/ontology/core#> | ||
|
||
CONSTRUCT { | ||
?dateTimeEnd vivo:dateTime ?dateTime . | ||
?endDate vivo:dateTime ?dateTimeWithId . | ||
} WHERE { | ||
<{{uri}}> vivo:dateTimeInterval ?dateTimeInterval . | ||
?dateTimeInterval vivo:end ?dateTimeEnd . | ||
?dateTimeEnd vivo:dateTime ?dateTime . | ||
?dateTimeInterval vivo:end ?endDate . | ||
?endDate vivo:dateTime ?dateTime . | ||
BIND( CONCAT( CONCAT( STR(?dateTime), REPLACE(STR(?dateTimeInterval), "(^.*/)", "::"), REPLACE(STR(?endDate), "(^.*/)", "::") ) ) AS ?dateTimeWithId) . | ||
} |
7 changes: 4 additions & 3 deletions
7
src/main/resources/templates/sparql/process/dateTimeIntervalStart.sparql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,10 @@ | ||
PREFIX vivo: <http://vivoweb.org/ontology/core#> | ||
|
||
CONSTRUCT { | ||
?dateTimeStart vivo:dateTime ?dateTime . | ||
?startDate vivo:dateTime ?dateTimeWithId . | ||
} WHERE { | ||
<{{uri}}> vivo:dateTimeInterval ?dateTimeInterval . | ||
?dateTimeInterval vivo:start ?dateTimeStart . | ||
?dateTimeStart vivo:dateTime ?dateTime . | ||
?dateTimeInterval vivo:start ?startDate . | ||
?startDate vivo:dateTime ?dateTime . | ||
BIND( CONCAT( CONCAT( STR(?dateTime), REPLACE(STR(?dateTimeInterval), "(^.*/)", "::"), REPLACE(STR(?startDate), "(^.*/)", "::" ) ) ) AS ?dateTimeWithId) . | ||
} |
8 changes: 0 additions & 8 deletions
8
src/main/resources/templates/sparql/process/dateTimePrecision.sparql
This file was deleted.
Oops, something went wrong.
10 changes: 10 additions & 0 deletions
10
src/main/resources/templates/sparql/process/dateTimePrecisionEnd.sparql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
PREFIX vivo: <http://vivoweb.org/ontology/core#> | ||
|
||
CONSTRUCT { | ||
?endDate vivo:dateTimePrecision ?dateTimePrecisionWithId . | ||
} WHERE { | ||
<{{uri}}> vivo:dateTimeInterval ?dateTimeInterval . | ||
?dateTimeInterval vivo:end ?endDate . | ||
?endDate vivo:dateTimePrecision ?dateTimePrecision . | ||
BIND( CONCAT( CONCAT( STR(?dateTimePrecision), REPLACE(STR(?dateTimeInterval), "(^.*/)", "::"), REPLACE(STR(?endDate), "(^.*/)", "::") ) ) AS ?dateTimePrecisionWithId) . | ||
} |
10 changes: 10 additions & 0 deletions
10
src/main/resources/templates/sparql/process/dateTimePrecisionStart.sparql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
PREFIX vivo: <http://vivoweb.org/ontology/core#> | ||
|
||
CONSTRUCT { | ||
?startDate vivo:dateTimePrecision ?dateTimePrecisionId . | ||
} WHERE { | ||
<{{uri}}> vivo:dateTimeInterval ?dateTimeInterval . | ||
?dateTimeInterval vivo:start ?startDate . | ||
?startDate vivo:dateTimePrecision ?dateTimePrecision . | ||
BIND( CONCAT( CONCAT( STR(?dateTimePrecision), REPLACE(STR(?dateTimeInterval), "(^.*/)", "::"), REPLACE(STR(?startDate), "(^.*/)", "::") ) ) AS ?dateTimePrecisionId) . | ||
} |