comparison rdf/RDFTransformFactory.cpp @ 480:3ffce691c9bf

* Add Redland datastore support to SimpleSPARQLQuery
author Chris Cannam
date Thu, 13 Nov 2008 14:23:23 +0000
parents 5746c559af15
children 82ab61fa9223
comparison
equal deleted inserted replaced
479:f933062a7f80 480:3ffce691c9bf
141 " vamp:plugin ?plugin . " 141 " vamp:plugin ?plugin . "
142 " %3 " 142 " %3 "
143 " } "; 143 " } ";
144 144
145 SimpleSPARQLQuery transformsQuery 145 SimpleSPARQLQuery transformsQuery
146 (queryTemplate.arg("").arg(m_urlString).arg("")); 146 (m_urlString, queryTemplate.arg("").arg(m_urlString).arg(""));
147 147
148 SimpleSPARQLQuery::ResultList transformResults = transformsQuery.execute(); 148 SimpleSPARQLQuery::ResultList transformResults = transformsQuery.execute();
149 149
150 if (!transformsQuery.isOK()) { 150 if (!transformsQuery.isOK()) {
151 m_errorString = transformsQuery.getErrorString(); 151 m_errorString = transformsQuery.getErrorString();
201 for (int i = 0; i < sizeof(optionals)/sizeof(optionals[0]); ++i) { 201 for (int i = 0; i < sizeof(optionals)/sizeof(optionals[0]); ++i) {
202 202
203 QString optional = optionals[i]; 203 QString optional = optionals[i];
204 204
205 SimpleSPARQLQuery query 205 SimpleSPARQLQuery query
206 (queryTemplate 206 (m_urlString,
207 queryTemplate
207 .arg(QString("?%1").arg(optional)) 208 .arg(QString("?%1").arg(optional))
208 .arg(m_urlString) 209 .arg(m_urlString)
209 .arg(QString("?transform vamp:%1 ?%2") 210 .arg(QString("?transform vamp:%1 ?%2")
210 .arg(optionals[i]).arg(optional))); 211 .arg(optionals[i]).arg(optional)));
211 212
275 RDFTransformFactoryImpl::setOutput(Transform &transform, 276 RDFTransformFactoryImpl::setOutput(Transform &transform,
276 QString transformUri, 277 QString transformUri,
277 QString pluginDescriptionURL) 278 QString pluginDescriptionURL)
278 { 279 {
279 SimpleSPARQLQuery outputQuery 280 SimpleSPARQLQuery outputQuery
280 (QString 281 (m_urlString,
282 QString
281 ( 283 (
282 " PREFIX vamp: <http://purl.org/ontology/vamp/> " 284 " PREFIX vamp: <http://purl.org/ontology/vamp/> "
283 285
284 " SELECT ?output_id " 286 " SELECT ?output_id "
285 287
320 RDFTransformFactoryImpl::setParameters(Transform &transform, 322 RDFTransformFactoryImpl::setParameters(Transform &transform,
321 QString transformUri, 323 QString transformUri,
322 QString pluginDescriptionURL) 324 QString pluginDescriptionURL)
323 { 325 {
324 SimpleSPARQLQuery paramQuery 326 SimpleSPARQLQuery paramQuery
325 (QString 327 (m_urlString,
328 QString
326 ( 329 (
327 " PREFIX vamp: <http://purl.org/ontology/vamp/> " 330 " PREFIX vamp: <http://purl.org/ontology/vamp/> "
328 331
329 " SELECT ?param_id ?param_value " 332 " SELECT ?param_id ?param_value "
330 333