comparison 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
comparison
equal deleted inserted replaced
479:f933062a7f80 480:3ffce691c9bf
35 }; 35 };
36 36
37 typedef std::map<QString, Value> KeyValueMap; 37 typedef std::map<QString, Value> KeyValueMap;
38 typedef std::vector<KeyValueMap> ResultList; 38 typedef std::vector<KeyValueMap> ResultList;
39 39
40 SimpleSPARQLQuery(QString query); 40 SimpleSPARQLQuery(QString fromUri, QString query);
41 ~SimpleSPARQLQuery(); 41 ~SimpleSPARQLQuery();
42 42
43 void setProgressReporter(ProgressReporter *reporter); 43 void setProgressReporter(ProgressReporter *reporter);
44 bool wasCancelled() const; 44 bool wasCancelled() const;
45 45
48 bool isOK() const; 48 bool isOK() const;
49 QString getErrorString() const; 49 QString getErrorString() const;
50 50
51 // Do a query and return the value for the given binding, from the 51 // Do a query and return the value for the given binding, from the
52 // first result that has a value for it 52 // first result that has a value for it
53 static Value singleResultQuery(QString query, QString binding); 53 static Value singleResultQuery(QString fromUri,
54 QString query,
55 QString binding);
56
57 enum ImplementationPreference {
58 UseDirectParser, // rasqal (default because it's simpler if seldom used)
59 UseDatastore // redland
60 };
61 static void setImplementationPreference(ImplementationPreference);
54 62
55 protected: 63 protected:
56 class Impl; 64 class Impl;
57 Impl *m_impl; 65 Impl *m_impl;
58 }; 66 };