[tracker] tracker-extract: jpeg: Add mlo:asPostalAddress
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tracker-extract: jpeg: Add mlo:asPostalAddress
- Date: Mon, 25 Oct 2010 14:03:05 +0000 (UTC)
commit 8d7538b1276891428b6ff872e1e2063653fc498f
Author: Philip Van Hoof <philip codeminded be>
Date: Mon Oct 25 15:56:03 2010 +0200
tracker-extract: jpeg: Add mlo:asPostalAddress
Fixes NB#199131
src/tracker-extract/tracker-extract-jpeg.c | 41 +++++++++++++++++++++++-----
1 files changed, 34 insertions(+), 7 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-jpeg.c b/src/tracker-extract/tracker-extract-jpeg.c
index 429b1dd..fea486a 100644
--- a/src/tracker-extract/tracker-extract-jpeg.c
+++ b/src/tracker-extract/tracker-extract-jpeg.c
@@ -538,31 +538,58 @@ extract_jpeg (const gchar *uri,
if (md.city || md.state || md.address || md.country) {
tracker_sparql_builder_predicate (metadata, "mlo:location");
- tracker_sparql_builder_object_blank_open (metadata);
+ tracker_sparql_builder_object_blank_open (metadata); /* GeoPoint */
tracker_sparql_builder_predicate (metadata, "a");
tracker_sparql_builder_object (metadata, "mlo:GeoPoint");
-
+
if (md.address) {
tracker_sparql_builder_predicate (metadata, "mlo:address");
tracker_sparql_builder_object_unvalidated (metadata, md.address);
}
-
+
if (md.state) {
tracker_sparql_builder_predicate (metadata, "mlo:state");
tracker_sparql_builder_object_unvalidated (metadata, md.state);
}
-
+
if (md.city) {
tracker_sparql_builder_predicate (metadata, "mlo:city");
tracker_sparql_builder_object_unvalidated (metadata, md.city);
}
-
+
if (md.country) {
tracker_sparql_builder_predicate (metadata, "mlo:country");
tracker_sparql_builder_object_unvalidated (metadata, md.country);
}
-
- tracker_sparql_builder_object_blank_close (metadata);
+
+ 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 (md.address) {
+ tracker_sparql_builder_predicate (metadata, "nco:streetAddress");
+ tracker_sparql_builder_object_unvalidated (metadata, md.address);
+ }
+
+ if (md.state) {
+ tracker_sparql_builder_predicate (metadata, "nco:region");
+ tracker_sparql_builder_object_unvalidated (metadata, md.state);
+ }
+
+ if (md.city) {
+ tracker_sparql_builder_predicate (metadata, "nco:locality");
+ tracker_sparql_builder_object_unvalidated (metadata, md.city);
+ }
+
+ if (md.country) {
+ tracker_sparql_builder_predicate (metadata, "nco:country");
+ tracker_sparql_builder_object_unvalidated (metadata, md.country);
+ }
+
+ tracker_sparql_builder_object_blank_close (metadata); /* PostalAddress */
+ tracker_sparql_builder_object_blank_close (metadata); /* GeoPoint */
}
if (cinfo.density_unit != 0 || ed->x_resolution) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]