Skip to content

Commit 86a76a6

Browse files
committed
#401 support method to list collections (vocabularies)
1 parent ddc0ec6 commit 86a76a6

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

R/geoflow_vocabulary.R

+13
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,19 @@ geoflow_skos_vocabulary <- R6Class("geoflow_skos_vocabulary",
104104
self$query(str)
105105
},
106106

107+
#'@description List SKOS collections
108+
#'@return the response of the SPARQL query
109+
list_collections = function(mimetype = "text/csv"){
110+
str = "
111+
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
112+
113+
SELECT ?collection ?label WHERE {
114+
?collection a skos:Collection .
115+
OPTIONAL { ?collection skos:prefLabel ?label }
116+
}"
117+
self$query(str = str, mimetype = mimetype)
118+
},
119+
107120
#'@description query_from_uri
108121
#'@param uri uri
109122
#'@param graphUri graphUri

0 commit comments

Comments
 (0)