[tracker] tracker-extract,pdf: Port 'Add mlo:asPostalAddress'
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tracker-extract,pdf: Port 'Add mlo:asPostalAddress'
- Date: Wed, 2 Mar 2011 15:26:11 +0000 (UTC)
commit 2aae351905e1cce2725dd7f9aa3068bd3fb32cd7
Author: Aleksander Morgado <aleksander lanedo com>
Date: Tue Feb 22 11:26:39 2011 +0100
tracker-extract,pdf: Port 'Add mlo:asPostalAddress'
Original commit ID: 0dffb95fa28bb61efb998d48785fc573ad986f64
src/tracker-extract/tracker-extract-pdf.c | 28 ++++++++++++++++++++++++++++
1 files changed, 28 insertions(+), 0 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-pdf.c b/src/tracker-extract/tracker-extract-pdf.c
index 5fb562a..3f86b4b 100644
--- a/src/tracker-extract/tracker-extract-pdf.c
+++ b/src/tracker-extract/tracker-extract-pdf.c
@@ -527,6 +527,34 @@ extract_pdf (const gchar *uri,
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]