Skip to content

Commit

Permalink
solved dataid query issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Eisenbahnplatte committed Jun 27, 2023
1 parent 555a43c commit 683f23e
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@ object DataIdQueries {

def queryDirStructure(): String = {
s"""
|PREFIX dataid: <http://dataid.dbpedia.org/ns/core#>
|PREFIX databus: <https://dataid.dbpedia.org/databus#>
|PREFIX dct: <http://purl.org/dc/terms/>
|
|SELECT ?publisher ?group ?artifact ?version {
| ?dataset dct:publisher ?publisher .
| ?group a dataid:Group .
| ?artifact a dataid:Artifact .
| ?version a dataid:Version .
| ?group a databus:Group .
| ?artifact a databus:Artifact .
| ?version a databus:Version .
|}
""".stripMargin
}

def queryFileExtension(fileName: String): String = {
s"""
|PREFIX dataid: <http://dataid.dbpedia.org/ns/core#>
|PREFIX databus: <https://dataid.dbpedia.org/databus#>
|SELECT ?type {
| ?distribution dataid:formatExtension ?type .
| ?distribution databus:formatExtension ?type .
| FILTER regex(str(?distribution), "#$fileName") .
|}
""".stripMargin
Expand Down

0 comments on commit 683f23e

Please sign in to comment.