[tracker/rss-enclosures] libtracker-extract: xmp: Add mlo:asPostalAddress
- From: Roberto Guido <rguido src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/rss-enclosures] libtracker-extract: xmp: Add mlo:asPostalAddress
- Date: Wed, 24 Nov 2010 02:12:36 +0000 (UTC)
commit 5c2c0ce055e1091bfe414bd7e30c4ca25483b15e
Author: Philip Van Hoof <philip codeminded be>
Date: Mon Oct 25 15:59:08 2010 +0200
libtracker-extract: xmp: Add mlo:asPostalAddress
Fixes NB#199131
src/libtracker-extract/tracker-xmp.c | 30 +++++++++++++++++++++++++++++-
1 files changed, 29 insertions(+), 1 deletions(-)
---
diff --git a/src/libtracker-extract/tracker-xmp.c b/src/libtracker-extract/tracker-xmp.c
index 229ba9d..7b3b394 100644
--- a/src/libtracker-extract/tracker-xmp.c
+++ b/src/libtracker-extract/tracker-xmp.c
@@ -897,7 +897,35 @@ tracker_xmp_apply (TrackerSparqlBuilder *preupdate,
tracker_sparql_builder_predicate (metadata, "mlo:country");
tracker_sparql_builder_object_unvalidated (metadata, data->country);
}
-
+
+ tracker_sparql_builder_predicate (metadata, "mlo:asPostalAddress");
+ tracker_sparql_builder_object_blank_open (metadata); /* PostalAddress */
+
+ tracker_sparql_builder_predicate (metadata, "a");
+ tracker_sparql_builder_object (metadata, "nco:PostalAddress");
+
+ if (data->address) {
+ tracker_sparql_builder_predicate (metadata, "nco:streetAddress");
+ tracker_sparql_builder_object_unvalidated (metadata, data->address);
+ }
+
+ if (data->state) {
+ tracker_sparql_builder_predicate (metadata, "nco:region");
+ tracker_sparql_builder_object_unvalidated (metadata, data->state);
+ }
+
+ if (data->city) {
+ tracker_sparql_builder_predicate (metadata, "nco:locality");
+ tracker_sparql_builder_object_unvalidated (metadata, data->city);
+ }
+
+ if (data->country) {
+ tracker_sparql_builder_predicate (metadata, "nco:country");
+ tracker_sparql_builder_object_unvalidated (metadata, data->country);
+ }
+
+ tracker_sparql_builder_object_blank_close (metadata); /* PostalAddress */
+
tracker_sparql_builder_object_blank_close (metadata);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]