[tracker] tracker-extract: Extract media ID for bootable ISO
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] tracker-extract: Extract media ID for bootable ISO
- Date: Tue, 14 Feb 2012 15:15:45 +0000 (UTC)
commit dba66b6f8e039f20cb4df79708e82b70b33f39d0
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Tue Feb 14 01:37:08 2012 +0200
tracker-extract: Extract media ID for bootable ISO
In Boxes, we need to know which (libosinfo) media exactly are we talking
about. Otherwise, we will have to do detection again.
https://bugzilla.gnome.org/show_bug.cgi?id=670023
data/ontologies/93-libosinfo.ontology | 5 +++++
src/tracker-extract/tracker-extract-iso.c | 6 ++++++
2 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/data/ontologies/93-libosinfo.ontology b/data/ontologies/93-libosinfo.ontology
index cfe7377..a3621ff 100644
--- a/data/ontologies/93-libosinfo.ontology
+++ b/data/ontologies/93-libosinfo.ontology
@@ -21,3 +21,8 @@ osinfo:id a rdf:Property ;
nrl:maxCardinality 1 ;
rdfs:domain nie:InformationElement ;
rdfs:range xsd:string .
+
+osinfo:mediaId a rdf:Property ;
+ nrl:maxCardinality 1 ;
+ rdfs:domain nie:InformationElement ;
+ rdfs:range xsd:string .
diff --git a/src/tracker-extract/tracker-extract-iso.c b/src/tracker-extract/tracker-extract-iso.c
index f7854a8..c1ffff5 100644
--- a/src/tracker-extract/tracker-extract-iso.c
+++ b/src/tracker-extract/tracker-extract-iso.c
@@ -120,6 +120,12 @@ tracker_extract_get_metadata (TrackerExtractInfo *info_)
tracker_sparql_builder_object_string (metadata, id);
}
+ id = osinfo_entity_get_id (OSINFO_ENTITY (matched_media));
+ if (id != NULL) {
+ tracker_sparql_builder_predicate (metadata, "osinfo:mediaId");
+ tracker_sparql_builder_object_string (metadata, id);
+ }
+
g_object_unref (G_OBJECT (media));
g_object_unref (G_OBJECT (loader));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]