[tracker/poppler-glib: 10/16] tracker-extract, pdf: Port 'Add mlo:asPostalAddress'
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/poppler-glib: 10/16] tracker-extract, pdf: Port 'Add mlo:asPostalAddress'
- Date: Wed, 2 Mar 2011 14:53:36 +0000 (UTC)
commit 0e58e26094df576ff79283db700a049725f0bc03
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]