Skip to content

Commit b6d6052

Browse files
Eisenbahnplattegitbook-bot
authored andcommitted
GITBOOK-22: change request with no subject merged in GitBook
1 parent d1c94c4 commit b6d6052

2 files changed

Lines changed: 37 additions & 16 deletions

File tree

README.md

Lines changed: 36 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -39,28 +39,49 @@ Download `databus-client.jar` of the latest [Databus Client release](https://git
3939

4040
### Choose Data for your application
4141

42-
To select data from DBpedia Databus, you can perform queries. Databus provides two mechanisms for this, which are described in detail [here](https://dbpedia.gitbook.io/databus/#querying-metainformation). 
42+
First, we need to select the Databus, where we want to get our data from. We take [this](https://dev.databus.dbpedia.org/) databus. Its SPARQL Endpoint is located here: [https://dev.databus.dbpedia.org/sparql](https://dev.databus.dbpedia.org/sparql) .
4343

44-
We use [this query](src/test/resources/queries/query3.sparql) as selection for this example.
44+
To select data from a DBpedia Databus, you can perform queries. Databus provides two mechanisms for this, which are described in detail [here](https://dbpedia.gitbook.io/databus/#querying-metainformation). 
45+
46+
We use the following query as selection for this example:
47+
48+
```
49+
PREFIX dcat: <http://www.w3.org/ns/dcat#>
50+
PREFIX databus: <https://dataid.dbpedia.org/databus#>
51+
52+
SELECT ?file WHERE
53+
{
54+
GRAPH ?g
55+
{
56+
?dataset databus:artifact <https://dev.databus.dbpedia.org/tester/testgroup/testartifact> .
57+
{ ?distribution <http://purl.org/dc/terms/hasVersion> '2023-06-23' . }
58+
?dataset dcat:distribution ?distribution .
59+
?distribution databus:file ?file .
60+
}
61+
}
62+
```
4563

4664
### Download and convert selected data
4765

48-
In order to download the data we need to pass the query as the _`-s`_ argument. Furthermore if we want to convert the files to _.jsonld_ we need to specify if in the _`-f`_ parameter and finally we need to tell the client the desired compression. There are more options described in [#cli-options](docs/usage/cli.md#cli-options "mention")
66+
In order to download the data we need to pass the query as the _`-s`_ argument. Additionaly we need to specify where the query needs to be asked to. This is done using the `-e` argument. Furthermore if we want to convert the files to _.nt_ we need to specify if in the _`-f`_ parameter and finally we need to tell the client the desired compression. There are more options described in [#cli-options](docs/usage/cli.md#cli-options "mention")
4967

5068
```
51-
java -jar databus-client.jar \
52-
-s "PREFIX dataid: <http://dataid.dbpedia.org/ns/core#>
53-
PREFIX dataid-cv: <http://dataid.dbpedia.org/ns/cv#>
54-
PREFIX dct: <http://purl.org/dc/terms/>
55-
PREFIX dcat: <http://www.w3.org/ns/dcat#>
56-
57-
SELECT DISTINCT ?file WHERE {
58-
?dataset dataid:version <https://databus.dbpedia.org/dbpedia/enrichment/specific-mappingbased-properties/2019.03.01> .
59-
?dataset dcat:distribution ?distribution .
60-
?distribution dcat:downloadURL ?file .
69+
java -jar target/databus-client-v2.1-beta.jar \
70+
-s "PREFIX dcat: <http://www.w3.org/ns/dcat#>
71+
PREFIX databus: <https://dataid.dbpedia.org/databus#>
72+
73+
SELECT ?file WHERE
74+
{
75+
GRAPH ?g
76+
{
77+
?dataset databus:artifact <https://dev.databus.dbpedia.org/tester/testgroup/testartifact> .
78+
{ ?distribution <http://purl.org/dc/terms/hasVersion> '2023-06-23' . }
79+
?dataset dcat:distribution ?distribution .
80+
?distribution databus:file ?file .
81+
}
6182
}" \
62-
-f jsonld \
63-
-c gz
83+
-e "https://dev.databus.dbpedia.org/sparql" \
84+
-f nt
6485
```
6586

6687
Per default the resulting files will be saved to `./files/` . &#x20;

SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
* [Scala/Java API](docs/usage/api.md)
1010
* [Examples](docs/examples/README.md)
1111
* [Test](docs/examples/exampleCLI.md)
12-
* [Download DBpedia Ontology (CLI)](docs/examples/exampleCLI.md)
12+
*
1313
* [Loading geocoordinates from Wikipedia into Virtuoso (Docker)](docs/examples/exampleDocker.md)
1414
* [Docker Example 2](docs/examples/exampleDocker2.md)

0 commit comments

Comments
 (0)