[tracker/tracker-0.10] tracker-extract, pdf: Port 'Adapted extractors to nfo:Equipment ontology change'



commit 52d0ead714bd8b1f89e6abc980cdec606823d017
Author: Aleksander Morgado <aleksander lanedo com>
Date:   Tue Feb 22 11:21:52 2011 +0100

    tracker-extract,pdf: Port 'Adapted extractors to nfo:Equipment ontology change'
    
    Original commit ID: dfdca96df57fe2c2b04743a646c61a3dcc0d09b5

 src/tracker-extract/tracker-extract-pdf.c |   22 ++++++++++++----------
 1 files changed, 12 insertions(+), 10 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-pdf.c b/src/tracker-extract/tracker-extract-pdf.c
index 6c03740..e1295b1 100644
--- a/src/tracker-extract/tracker-extract-pdf.c
+++ b/src/tracker-extract/tracker-extract-pdf.c
@@ -397,18 +397,20 @@ extract_pdf (const gchar          *uri,
 		}
 
 		if (xd->make || xd->model) {
-			gchar *camera;
-
-			if ((xd->make == NULL || xd->model == NULL) ||
-			    (xd->make && xd->model && strstr (xd->model, xd->make) == NULL)) {
-				camera = tracker_merge_const (" ", 2, xd->make, xd->model);
-			} else {
-				camera = g_strdup (xd->model);
+			tracker_sparql_builder_predicate (metadata, "nfo:equipment");
+			tracker_sparql_builder_object_blank_open (metadata);
+			tracker_sparql_builder_predicate (metadata, "a");
+			tracker_sparql_builder_object (metadata, "nco:Equipment");
+			if (xd->model) {
+				tracker_sparql_builder_predicate (metadata, "nco:model");
+				tracker_sparql_builder_object_unvalidated (metadata, xd->model);
 			}
 
-			tracker_sparql_builder_predicate (metadata, "nfo:device");
-			tracker_sparql_builder_object_unvalidated (metadata, camera);
-			g_free (camera);
+			if (xd->make) {
+				tracker_sparql_builder_predicate (metadata, "nco:make");
+				tracker_sparql_builder_object_unvalidated (metadata, xd->make);
+			}
+			tracker_sparql_builder_object_blank_close (metadata);
 		}
 
 		if (xd->orientation) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]