[tracker/wip/extract-graphs: 26/30] tracker-extract, png: Do all inserts in miner-fs's graph
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/extract-graphs: 26/30] tracker-extract, png: Do all inserts in miner-fs's graph
- Date: Tue, 6 Sep 2011 10:53:19 +0000 (UTC)
commit b85a1a51df61b9951b39d93f95754af824b91c65
Author: Philip Van Hoof <philip codeminded be>
Date: Tue Sep 6 10:50:35 2011 +0200
tracker-extract, png: Do all inserts in miner-fs's graph
src/tracker-extract/tracker-extract-png.c | 44 +++++++++++++++++++++++++++-
1 files changed, 42 insertions(+), 2 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-png.c b/src/tracker-extract/tracker-extract-png.c
index 5147553..c5395a7 100644
--- a/src/tracker-extract/tracker-extract-png.c
+++ b/src/tracker-extract/tracker-extract-png.c
@@ -230,11 +230,19 @@ read_metadata (TrackerSparqlBuilder *preupdate,
gchar *uri = tracker_sparql_escape_uri_printf ("urn:contact:%s", md.creator);
tracker_sparql_builder_insert_open (preupdate, NULL);
+ if (graph) {
+ tracker_sparql_builder_graph_open (preupdate, graph);
+ }
+
tracker_sparql_builder_subject_iri (preupdate, uri);
tracker_sparql_builder_predicate (preupdate, "a");
tracker_sparql_builder_object (preupdate, "nco:Contact");
tracker_sparql_builder_predicate (preupdate, "nco:fullname");
tracker_sparql_builder_object_unvalidated (preupdate, md.creator);
+
+ if (graph) {
+ tracker_sparql_builder_graph_close (preupdate);
+ }
tracker_sparql_builder_insert_close (preupdate);
tracker_sparql_builder_predicate (metadata, "nco:creator");
@@ -270,6 +278,10 @@ read_metadata (TrackerSparqlBuilder *preupdate,
md.model ? md.model : "");
tracker_sparql_builder_insert_open (preupdate, NULL);
+ if (graph) {
+ tracker_sparql_builder_graph_open (preupdate, graph);
+ }
+
tracker_sparql_builder_subject_iri (preupdate, equip_uri);
tracker_sparql_builder_predicate (preupdate, "a");
tracker_sparql_builder_object (preupdate, "nfo:Equipment");
@@ -282,7 +294,12 @@ read_metadata (TrackerSparqlBuilder *preupdate,
tracker_sparql_builder_predicate (preupdate, "nfo:model");
tracker_sparql_builder_object_unvalidated (preupdate, md.model);
}
+
+ if (graph) {
+ tracker_sparql_builder_graph_close (preupdate);
+ }
tracker_sparql_builder_insert_close (preupdate);
+
tracker_sparql_builder_predicate (metadata, "nfo:equipment");
tracker_sparql_builder_object_iri (metadata, equip_uri);
g_free (equip_uri);
@@ -292,11 +309,19 @@ read_metadata (TrackerSparqlBuilder *preupdate,
gchar *uri = tracker_sparql_escape_uri_printf ("urn:contact:%s", md.artist);
tracker_sparql_builder_insert_open (preupdate, NULL);
+ if (graph) {
+ tracker_sparql_builder_graph_open (preupdate, graph);
+ }
+
tracker_sparql_builder_subject_iri (preupdate, uri);
tracker_sparql_builder_predicate (preupdate, "a");
tracker_sparql_builder_object (preupdate, "nco:Contact");
tracker_sparql_builder_predicate (preupdate, "nco:fullname");
tracker_sparql_builder_object_unvalidated (preupdate, md.artist);
+
+ if (graph) {
+ tracker_sparql_builder_graph_close (preupdate);
+ }
tracker_sparql_builder_insert_close (preupdate);
tracker_sparql_builder_predicate (metadata, "nco:contributor");
@@ -366,11 +391,19 @@ read_metadata (TrackerSparqlBuilder *preupdate,
gchar *uri = tracker_sparql_escape_uri_printf ("urn:contact:%s", xd->publisher);
tracker_sparql_builder_insert_open (preupdate, NULL);
+ if (graph) {
+ tracker_sparql_builder_graph_open (preupdate, graph);
+ }
+
tracker_sparql_builder_subject_iri (preupdate, uri);
tracker_sparql_builder_predicate (preupdate, "a");
tracker_sparql_builder_object (preupdate, "nco:Contact");
tracker_sparql_builder_predicate (preupdate, "nco:fullname");
tracker_sparql_builder_object_unvalidated (preupdate, xd->publisher);
+
+ if (graph) {
+ tracker_sparql_builder_graph_close (preupdate);
+ }
tracker_sparql_builder_insert_close (preupdate);
tracker_sparql_builder_predicate (metadata, "nco:creator");
@@ -427,9 +460,13 @@ read_metadata (TrackerSparqlBuilder *preupdate,
addruri = tracker_sparql_get_uuid_urn ();
tracker_sparql_builder_predicate (metadata, "slo:postalAddress");
- tracker_sparql_builder_object_iri (metadata, addruri);
+ tracker_sparql_builder_object_iri (metadata, addruri);
tracker_sparql_builder_insert_open (preupdate, NULL);
+ if (graph) {
+ tracker_sparql_builder_graph_open (preupdate, graph);
+ }
+
tracker_sparql_builder_subject_iri (preupdate, addruri);
g_free (addruri);
@@ -457,6 +494,9 @@ read_metadata (TrackerSparqlBuilder *preupdate,
tracker_sparql_builder_object_unvalidated (preupdate, xd->country);
}
+ if (graph) {
+ tracker_sparql_builder_graph_close (preupdate);
+ }
tracker_sparql_builder_insert_close (preupdate);
}
@@ -556,7 +596,7 @@ guess_dlna_profile (gint depth,
const gchar **dlna_profile,
const gchar **dlna_mimetype)
{
- gchar *profile = NULL;
+ const gchar *profile = NULL;
if (dlna_profile) {
*dlna_profile = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]