Skip to content

Commit

Permalink
Docs, SPARQL download links of latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
manonthegithub committed May 3, 2024
1 parent ff1a81f commit 27dc07a
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions docs/usage/quickstart-examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,30 @@ SELECT DISTINCT ?distribution, ?file, ?downloadUrl, ?format, ?byteSize WHERE {
}
```

Retrieving download links for the latest version of an artifact:
```sparql
PREFIX dcat: <http://www.w3.org/ns/dcat#>
PREFIX databus: <https://dataid.dbpedia.org/databus#>
PREFIX dct: <http://purl.org/dc/terms/>
SELECT ?file WHERE
{
{
SELECT ?v WHERE
{
?latestVersion databus:artifact <your artifact ID> .
?latestVersion dct:hasVersion ?v .
}
ORDER BY DESC(STR(?v)) LIMIT 1
}
?dataset dct:hasVersion ?v .
?dataset dcat:distribution ?distribution .
?distribution dcat:downloadURL ?file .
}
```

#### Group/Artifact Metadata Example

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:
Expand Down

0 comments on commit 27dc07a

Please sign in to comment.