Skip to content

Commit

Permalink
Update LDES fragment template and TTL files to include LessThanRelati…
Browse files Browse the repository at this point in the history
…on and correct datetime formatting
  • Loading branch information
cedricdcc committed Feb 17, 2025
1 parent ac6cfc5 commit 6cc443a
Show file tree
Hide file tree
Showing 11 changed files with 61 additions and 10 deletions.
1 change: 1 addition & 0 deletions BODC_LDES_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ def make_pykg2tbl_files(collections, begin_date, end_date):
vars_dict = {
"this_fragment_delta": this_delta_quoted,
"next_fragment_delta": next_delta_quoted,
"next_fragment_time": end_date_year.replace(" ", "T") + "Z",
"retention_period": retention_period,
"collection": collection,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
<http://vocab.nerc.ac.uk/ldes/P02/2013-01-01%2000%3A00%3A00_2013-12-31%2000%3A00%3A00>
a tree:Node ;

tree:relation [ tree:node <http://vocab.nerc.ac.uk/ldes/P02/2012-12-31%2000%3A00%3A00_2013-01-01%2000%3A00%3A00> ] ;
tree:relation [
a tree:LessThanRelation ;
tree:node <http://vocab.nerc.ac.uk/ldes/P02/2012-12-31%2000%3A00%3A00_2013-01-01%2000%3A00%3A00> ;
tree:path dc:modified ;
tree:value "2013-12-31T00:00:00Z"^^xsd:dateTime
] ;

ldes:retentionPolicy [
a ldes:LatestVersionSubset ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
<http://vocab.nerc.ac.uk/ldes/P02/2014-01-01%2000%3A00%3A00_2014-12-31%2000%3A00%3A00>
a tree:Node ;

tree:relation [ tree:node <http://vocab.nerc.ac.uk/ldes/P02/2013-12-31%2000%3A00%3A00_2014-01-01%2000%3A00%3A00> ] ;
tree:relation [
a tree:LessThanRelation ;
tree:node <http://vocab.nerc.ac.uk/ldes/P02/2013-12-31%2000%3A00%3A00_2014-01-01%2000%3A00%3A00> ;
tree:path dc:modified ;
tree:value "2014-12-31T00:00:00Z"^^xsd:dateTime
] ;

ldes:retentionPolicy [
a ldes:LatestVersionSubset ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
<http://vocab.nerc.ac.uk/ldes/P02/2015-01-01%2000%3A00%3A00_2015-12-31%2000%3A00%3A00>
a tree:Node ;

tree:relation [ tree:node <http://vocab.nerc.ac.uk/ldes/P02/2014-12-31%2000%3A00%3A00_2015-01-01%2000%3A00%3A00> ] ;
tree:relation [
a tree:LessThanRelation ;
tree:node <http://vocab.nerc.ac.uk/ldes/P02/2014-12-31%2000%3A00%3A00_2015-01-01%2000%3A00%3A00> ;
tree:path dc:modified ;
tree:value "2015-12-31T00:00:00Z"^^xsd:dateTime
] ;

ldes:retentionPolicy [
a ldes:LatestVersionSubset ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
<http://vocab.nerc.ac.uk/ldes/P02/2016-01-01%2000%3A00%3A00_2016-12-31%2000%3A00%3A00>
a tree:Node ;

tree:relation [ tree:node <http://vocab.nerc.ac.uk/ldes/P02/2015-12-31%2000%3A00%3A00_2016-01-01%2000%3A00%3A00> ] ;
tree:relation [
a tree:LessThanRelation ;
tree:node <http://vocab.nerc.ac.uk/ldes/P02/2015-12-31%2000%3A00%3A00_2016-01-01%2000%3A00%3A00> ;
tree:path dc:modified ;
tree:value "2016-12-31T00:00:00Z"^^xsd:dateTime
] ;

ldes:retentionPolicy [
a ldes:LatestVersionSubset ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
<http://vocab.nerc.ac.uk/ldes/P02/2017-01-01%2000%3A00%3A00_2017-12-31%2000%3A00%3A00>
a tree:Node ;

tree:relation [ tree:node <http://vocab.nerc.ac.uk/ldes/P02/2016-12-31%2000%3A00%3A00_2017-01-01%2000%3A00%3A00> ] ;
tree:relation [
a tree:LessThanRelation ;
tree:node <http://vocab.nerc.ac.uk/ldes/P02/2016-12-31%2000%3A00%3A00_2017-01-01%2000%3A00%3A00> ;
tree:path dc:modified ;
tree:value "2017-12-31T00:00:00Z"^^xsd:dateTime
] ;

ldes:retentionPolicy [
a ldes:LatestVersionSubset ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
<http://vocab.nerc.ac.uk/ldes/P02/2018-01-01%2000%3A00%3A00_2018-12-31%2000%3A00%3A00>
a tree:Node ;

tree:relation [ tree:node <http://vocab.nerc.ac.uk/ldes/P02/2017-12-31%2000%3A00%3A00_2018-01-01%2000%3A00%3A00> ] ;
tree:relation [
a tree:LessThanRelation ;
tree:node <http://vocab.nerc.ac.uk/ldes/P02/2017-12-31%2000%3A00%3A00_2018-01-01%2000%3A00%3A00> ;
tree:path dc:modified ;
tree:value "2018-12-31T00:00:00Z"^^xsd:dateTime
] ;

ldes:retentionPolicy [
a ldes:LatestVersionSubset ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
<http://vocab.nerc.ac.uk/ldes/P02/2019-01-01%2000%3A00%3A00_2019-12-31%2000%3A00%3A00>
a tree:Node ;

tree:relation [ tree:node <http://vocab.nerc.ac.uk/ldes/P02/2018-12-31%2000%3A00%3A00_2019-01-01%2000%3A00%3A00> ] ;
tree:relation [
a tree:LessThanRelation ;
tree:node <http://vocab.nerc.ac.uk/ldes/P02/2018-12-31%2000%3A00%3A00_2019-01-01%2000%3A00%3A00> ;
tree:path dc:modified ;
tree:value "2019-12-31T00:00:00Z"^^xsd:dateTime
] ;

ldes:retentionPolicy [
a ldes:LatestVersionSubset ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
<http://vocab.nerc.ac.uk/ldes/P02/2020-01-01%2000%3A00%3A00_2020-12-31%2000%3A00%3A00>
a tree:Node ;

tree:relation [ tree:node <http://vocab.nerc.ac.uk/ldes/P02/2019-12-31%2000%3A00%3A00_2020-01-01%2000%3A00%3A00> ] ;
tree:relation [
a tree:LessThanRelation ;
tree:node <http://vocab.nerc.ac.uk/ldes/P02/2019-12-31%2000%3A00%3A00_2020-01-01%2000%3A00%3A00> ;
tree:path dc:modified ;
tree:value "2020-12-31T00:00:00Z"^^xsd:dateTime
] ;

ldes:retentionPolicy [
a ldes:LatestVersionSubset ;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
<http://vocab.nerc.ac.uk/ldes/P02/2021-01-01%2000%3A00%3A00_2021-12-31%2000%3A00%3A00>
a tree:Node ;

tree:relation [ tree:node <http://vocab.nerc.ac.uk/ldes/P02/2020-12-31%2000%3A00%3A00_2021-01-01%2000%3A00%3A00> ] ;
tree:relation [
a tree:LessThanRelation ;
tree:node <http://vocab.nerc.ac.uk/ldes/P02/2020-12-31%2000%3A00%3A00_2021-01-01%2000%3A00%3A00> ;
tree:path dc:modified ;
tree:value "2021-01-02T00:00:00Z"^^xsd:dateTime
] ;

ldes:retentionPolicy [
a ldes:LatestVersionSubset ;
Expand Down
7 changes: 6 additions & 1 deletion pysubyt/ldes_fragment.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ ldes fragment template
<http://vocab.nerc.ac.uk/ldes/{{collection}}/{{this_fragment_delta}}>
a tree:Node ;
{% if next_fragment_delta %}
tree:relation [ tree:node <http://vocab.nerc.ac.uk/ldes/{{collection}}/{{next_fragment_delta}}> ] ;
tree:relation [
a tree:LessThanRelation ;
tree:node <http://vocab.nerc.ac.uk/ldes/{{collection}}/{{next_fragment_delta}}> ;
tree:path dc:modified ;
tree:value "{{next_fragment_time}}"^^xsd:dateTime
] ;
{% endif %}
ldes:retentionPolicy [
a ldes:LatestVersionSubset ;
Expand Down

0 comments on commit 6cc443a

Please sign in to comment.