- Issue created by @guignonv
SPARQL is a nice way to query RDF data across the web. With External Entities v3, new categories of storage clients where defined and one of them is the "QueryLanguageClientBase
". It is used as base for the SQL storage client but the SQL storage client requires an extra module to work and therefore has been added as a companion module (xnttsql). There are no other example implementation of the "QueryLanguageClientBase
" while a SPARQL client could be one. Furthermore, implementing such a client would help improve the design of "QueryLanguageClientBase
" to better identify what could be common or not between query language clients before that API could be considered stable and widely usable for other client implementations.
I am not a SPARQL expert and I don't know much about it so I would need (expert) help on the design and the implementation.
What I think we would need on the storage client config form would be:
SELECT ?item ?itemLabel WHERE {
VALUES ?item { <id> }
SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en". }
}
where "" could be replaced by "wd:Q378619" to load a single entity or "wd:Q378619 wd:Q498787 wd:Q677525" to load multiple entities at once for instance.
QueryLanguageClientInterface
")From the given SPARQL query, I believe it should be possible to automatically add filters for search queries as well as turn it into a "count" query using some kind of regexp. Maybe some structural constraints should be added to the query to have it supported by the storage client? What do SPARQL users think?
A query building interface could be possible but it would require too much work. I would see it as a layer above a simple SPARQL storage client module, just like I did with the SQL database storage client with the Chado Light module that hides the SQL query generation behind the scene while the SQL client exposes raw SQL queries.
Discuss, design and implement if it's a need.
None.
"QueryLanguageClientBase
" may be changed.
None.
If you are interested by such a storage client, please post a comment here or follow the issue to help me measure if it is something that should be implemented as part of xntt v3 or not.
Active
3.0
Code