[tracker] tracker-extract: pdf: Add mlo:asPostalAddress



commit 0dffb95fa28bb61efb998d48785fc573ad986f64
Author: Philip Van Hoof <philip codeminded be>
Date:   Mon Oct 25 15:56:30 2010 +0200

    tracker-extract: pdf: Add mlo:asPostalAddress
    
    Fixes NB#199131

 src/tracker-extract/tracker-extract-pdf.cpp |   28 +++++++++++++++++++++++++++
 1 files changed, 28 insertions(+), 0 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-pdf.cpp b/src/tracker-extract/tracker-extract-pdf.cpp
index 465b817..cec2ef3 100644
--- a/src/tracker-extract/tracker-extract-pdf.cpp
+++ b/src/tracker-extract/tracker-extract-pdf.cpp
@@ -766,6 +766,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]