Mercurial > hg > svcore
diff rdf/SimpleSPARQLQuery.h @ 480:3ffce691c9bf
* Add Redland datastore support to SimpleSPARQLQuery
author | Chris Cannam |
---|---|
date | Thu, 13 Nov 2008 14:23:23 +0000 |
parents | 5746c559af15 |
children | a82645e788fc |
line wrap: on
line diff
--- a/rdf/SimpleSPARQLQuery.h Wed Nov 12 16:39:29 2008 +0000 +++ b/rdf/SimpleSPARQLQuery.h Thu Nov 13 14:23:23 2008 +0000 @@ -37,7 +37,7 @@ typedef std::map<QString, Value> KeyValueMap; typedef std::vector<KeyValueMap> ResultList; - SimpleSPARQLQuery(QString query); + SimpleSPARQLQuery(QString fromUri, QString query); ~SimpleSPARQLQuery(); void setProgressReporter(ProgressReporter *reporter); @@ -50,7 +50,15 @@ // Do a query and return the value for the given binding, from the // first result that has a value for it - static Value singleResultQuery(QString query, QString binding); + static Value singleResultQuery(QString fromUri, + QString query, + QString binding); + + enum ImplementationPreference { + UseDirectParser, // rasqal (default because it's simpler if seldom used) + UseDatastore // redland + }; + static void setImplementationPreference(ImplementationPreference); protected: class Impl;