Mercurial > hg > classical
diff import/Import.cpp @ 18:c8ef23d3888c classical-rdf
* Update for new Dataquay::Uri in preference to QUrl
author | Chris Cannam |
---|---|
date | Mon, 22 Feb 2010 14:18:30 +0000 |
parents | d35e5d769c87 |
children | c4cb65c436ef |
line wrap: on
line diff
--- a/import/Import.cpp Fri Feb 19 17:42:15 2010 +0000 +++ b/import/Import.cpp Mon Feb 22 14:18:30 2010 +0000 @@ -309,7 +309,7 @@ other->addNationality(s); } - foreach (QUrl s, c->geonameURIs()) { + foreach (Uri s, c->geonameURIs()) { other->addGeonameURI(s); } @@ -390,13 +390,13 @@ i++; } convSet.insert(conv); - c->setProperty("uri", s->expand(":composer/" + conv)); + c->setProperty("uri", QVariant::fromValue(s->expand(":composer/" + conv))); } void assignUri(Store *s, Work *w, Composer *c) { - QString pfx = c->property("uri").toUrl().toString(); + QString pfx = c->property("uri").value<Uri>().toString(); DEBUG << "pfx = " << pfx << endl; if (!pfx.contains("composer/")) pfx = ":work/"; else { @@ -438,17 +438,17 @@ void addDbpediaResource(Store *store, QObject *o, QString s) { - QUrl u = o->property("uri").toUrl(); - if (u == QUrl()) return; + Uri u = o->property("uri").value<Uri>(); + if (u == Uri()) return; if (s.startsWith("http://en.wikipedia.org/wiki/")) { store->add(Triple(u, "mo:wikipedia", - QUrl(s))); + Uri(s))); s.replace("http://en.wikipedia.org/wiki/", "http://dbpedia.org/resource/"); store->add(Triple(u, "owl:sameAs", - QUrl(s))); + Uri(s))); } } @@ -605,7 +605,7 @@ } } - QString u = w->property("uri").toUrl().toString(); + QString u = w->property("uri").value<Uri>().toString(); if (u == "" || !storedUris.contains(u)) { toStore.push_back(w); if (u != "") storedUris.insert(u);