[tracker] Fixes NB#161457 - Images that have a creator create dummy contact items
- From: Ivan Frade <ifrade src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] Fixes NB#161457 - Images that have a creator create dummy contact items
- Date: Wed, 31 Mar 2010 14:25:56 +0000 (UTC)
commit e615259c9477a959c4572bd5c77a35b549e3b718
Author: Ivan Frade <ivan frade nokia com>
Date: Wed Mar 31 17:18:19 2010 +0300
Fixes NB#161457 - Images that have a creator create dummy contact items
extractors: comment out byline_title parsing.
Uses PersonContact due the hasAffiliation property. It is wrong and populates
the PersonContact class with useless contacts.
Commented out until we decided: to fix the ontology (unlikely) or to drop the support of the property (likely)
src/tracker-extract/tracker-extract-jpeg.c | 20 +++++++++++++-------
src/tracker-extract/tracker-extract-tiff.c | 20 +++++++++++++-------
2 files changed, 26 insertions(+), 14 deletions(-)
---
diff --git a/src/tracker-extract/tracker-extract-jpeg.c b/src/tracker-extract/tracker-extract-jpeg.c
index f8ad4ff..29c06bd 100644
--- a/src/tracker-extract/tracker-extract-jpeg.c
+++ b/src/tracker-extract/tracker-extract-jpeg.c
@@ -547,13 +547,19 @@ extract_jpeg (const gchar *uri,
tracker_sparql_builder_predicate (metadata, "nco:fullname");
tracker_sparql_builder_object_unvalidated (metadata, md.creator);
- if (id.byline_title) {
- tracker_sparql_builder_predicate (metadata, "a");
- tracker_sparql_builder_object (metadata, "nco:PersonContact");
- tracker_sparql_builder_predicate (metadata, "nco:hasAffiliation");
- tracker_sparql_builder_object (metadata, "_:affiliation_by_line");
- }
-
+ /*
+ * This must be a Contact, not a PersonContact. But hasAffiliation
+ * is property of PersonContact.
+ * Commented out the code while figuring out a solution (most
+ * probably to drop the property).
+ *
+ *if (id.byline_title) {
+ * tracker_sparql_builder_predicate (metadata, "a");
+ * tracker_sparql_builder_object (metadata, "nco:PersonContact");
+ * tracker_sparql_builder_predicate (metadata, "nco:hasAffiliation");
+ * tracker_sparql_builder_object (metadata, "_:affiliation_by_line");
+ *}
+ */
tracker_sparql_builder_object_blank_close (metadata);
g_free (md.creator);
}
diff --git a/src/tracker-extract/tracker-extract-tiff.c b/src/tracker-extract/tracker-extract-tiff.c
index cd86473..28f87d0 100644
--- a/src/tracker-extract/tracker-extract-tiff.c
+++ b/src/tracker-extract/tracker-extract-tiff.c
@@ -705,13 +705,19 @@ extract_tiff (const gchar *uri,
tracker_sparql_builder_predicate (metadata, "nco:fullname");
tracker_sparql_builder_object_unvalidated (metadata, merge_data.creator);
- if (iptc_data.byline_title) {
- tracker_sparql_builder_predicate (metadata, "a");
- tracker_sparql_builder_object (metadata, "nco:PersonContact");
- tracker_sparql_builder_predicate (metadata, "nco:hasAffiliation");
- tracker_sparql_builder_object (metadata, "_:affiliation_by_line");
- }
-
+ /*
+ * This must be a Contact, not a PersonContact. But hasAffiliation
+ * is property of PersonContact.
+ * Commented out the code while figuring out a solution (most
+ * probably to drop the property).
+ *
+ * if (iptc_data.byline_title) {
+ * tracker_sparql_builder_predicate (metadata, "a");
+ * tracker_sparql_builder_object (metadata, "nco:PersonContact");
+ * tracker_sparql_builder_predicate (metadata, "nco:hasAffiliation");
+ * tracker_sparql_builder_object (metadata, "_:affiliation_by_line");
+ * }
+ */
tracker_sparql_builder_object_blank_close (metadata);
g_free (merge_data.creator);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]