Skip to content

Commit 27dc07a

Browse files
Docs, SPARQL download links of latest version
1 parent ff1a81f commit 27dc07a

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

docs/usage/quickstart-examples.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,30 @@ SELECT DISTINCT ?distribution, ?file, ?downloadUrl, ?format, ?byteSize WHERE {
211211
}
212212
```
213213

214+
Retrieving download links for the latest version of an artifact:
215+
```sparql
216+
PREFIX dcat: <http://www.w3.org/ns/dcat#>
217+
PREFIX databus: <https://dataid.dbpedia.org/databus#>
218+
PREFIX dct: <http://purl.org/dc/terms/>
219+
220+
221+
SELECT ?file WHERE
222+
{
223+
{
224+
SELECT ?v WHERE
225+
{
226+
?latestVersion databus:artifact <your artifact ID> .
227+
?latestVersion dct:hasVersion ?v .
228+
}
229+
ORDER BY DESC(STR(?v)) LIMIT 1
230+
}
231+
?dataset dct:hasVersion ?v .
232+
?dataset dcat:distribution ?distribution .
233+
?distribution dcat:downloadURL ?file .
234+
235+
}
236+
```
237+
214238
#### Group/Artifact Metadata Example
215239

216240
In the minimal example metadata for the group is missing and the artifact is initialized with the metadata of the dataset. Both can be explicitly set for better documentation:

0 commit comments

Comments
 (0)