[tracker] tracker-extract: png: Add mlo:asPostalAddress
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tracker-extract: png: Add mlo:asPostalAddress
- Date: Mon, 25 Oct 2010 14:03:15 +0000 (UTC)
commit 166ca6fa9792f3e8dff550eec0342598e37ebf41
Author: Philip Van Hoof <philip codeminded be>
Date: Mon Oct 25 15:56:49 2010 +0200
tracker-extract: png: Add mlo:asPostalAddress
Fixes NB#199131
src/tracker-extract/tracker-extract-png.c | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-png.c b/src/tracker-extract/tracker-extract-png.c
index 699f2c5..c29c6d2 100644
--- a/src/tracker-extract/tracker-extract-png.c
+++ b/src/tracker-extract/tracker-extract-png.c
@@ -438,6 +438,34 @@ read_metadata (TrackerSparqlBuilder *preupdate,
tracker_sparql_builder_object_unvalidated (metadata, xd->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 (xd->address) {
+ tracker_sparql_builder_predicate (metadata, "nco:streetAddress");
+ tracker_sparql_builder_object_unvalidated (metadata, xd->address);
+ }
+
+ if (xd->state) {
+ tracker_sparql_builder_predicate (metadata, "nco:region");
+ tracker_sparql_builder_object_unvalidated (metadata, xd->state);
+ }
+
+ if (xd->city) {
+ tracker_sparql_builder_predicate (metadata, "nco:locality");
+ tracker_sparql_builder_object_unvalidated (metadata, xd->city);
+ }
+
+ if (xd->country) {
+ tracker_sparql_builder_predicate (metadata, "nco:country");
+ tracker_sparql_builder_object_unvalidated (metadata, xd->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]