comparison rdf/SimpleSPARQLQuery.cpp @ 449:a75edaa08d28

* Support importing features from RDF whose times are intervals rather than only instants; import them into region or note models. Sadly this makes RDF import much, much slower, because we need to work around Rasqal's single-OPTIONAL limitation by repeatedly querying each feature for time and range. * Add segmentation view to region layer, and display label texts
author Chris Cannam
date Tue, 07 Oct 2008 12:42:17 +0000
parents 5746c559af15
children ef14acd6d102
comparison
equal deleted inserted replaced
448:2fb0061c5d23 449:a75edaa08d28
119 SimpleSPARQLQuery::Impl::Impl(QString query) : 119 SimpleSPARQLQuery::Impl::Impl(QString query) :
120 m_query(query), 120 m_query(query),
121 m_reporter(0), 121 m_reporter(0),
122 m_cancelled(false) 122 m_cancelled(false)
123 { 123 {
124 std::cerr << "SimpleSPARQLQuery::Impl: Query is: \"" << query.toStdString() << "\"" << std::endl;
124 } 125 }
125 126
126 SimpleSPARQLQuery::Impl::~Impl() 127 SimpleSPARQLQuery::Impl::~Impl()
127 { 128 {
128 } 129 }
230 ValueType type = LiteralValue; 231 ValueType type = LiteralValue;
231 if (literal->type == RASQAL_LITERAL_URI) type = URIValue; 232 if (literal->type == RASQAL_LITERAL_URI) type = URIValue;
232 else if (literal->type == RASQAL_LITERAL_BLANK) type = BlankValue; 233 else if (literal->type == RASQAL_LITERAL_BLANK) type = BlankValue;
233 234
234 QString text = (const char *)rasqal_literal_as_string(literal); 235 QString text = (const char *)rasqal_literal_as_string(literal);
236
237 std::cerr << i << ". " << key.toStdString() << " -> " << text.toStdString() << " (type " << type << ")" << std::endl;
235 238
236 resultmap[key] = Value(type, text); 239 resultmap[key] = Value(type, text);
237 } 240 }
238 241
239 list.push_back(resultmap); 242 list.push_back(resultmap);