[tracker] Fixed sparql inserts for applications



commit 56e1d680b1b29668ca048374b02c6ad14c68516f
Author: Philip Van Hoof <philip codeminded be>
Date:   Tue Sep 1 11:21:19 2009 +0200

    Fixed sparql inserts for applications

 data/ontologies/20-dc.ontology              |    1 -
 data/ontologies/30-nie.ontology             |    3 ---
 src/tracker-miner-fs/modules/applications.c |   10 +++++++---
 3 files changed, 7 insertions(+), 7 deletions(-)
---
diff --git a/data/ontologies/20-dc.ontology b/data/ontologies/20-dc.ontology
index 61d0ab5..3d29204 100644
--- a/data/ontologies/20-dc.ontology
+++ b/data/ontologies/20-dc.ontology
@@ -80,7 +80,6 @@ dc:identifier a rdf:Property ;
 dc:source a rdf:Property ;
 	rdfs:label "Source" ;
 	rdfs:comment "A related resource from which the described resource is derived." ;
-	nrl:maxCardinality 1 ;
 	rdfs:domain rdfs:Resource ;
 	rdfs:range xsd:string .
 
diff --git a/data/ontologies/30-nie.ontology b/data/ontologies/30-nie.ontology
index dd0c17b..e0f104f 100644
--- a/data/ontologies/30-nie.ontology
+++ b/data/ontologies/30-nie.ontology
@@ -104,7 +104,6 @@ nie:disclaimer a rdf:Property ;
 
 nie:dataSource a rdf:Property ;
 	rdfs:subPropertyOf dc:source ;
-	nrl:maxCardinality 1 ;
 	rdfs:domain nie:DataObject ;
 	rdfs:range nie:DataSource .
 
@@ -206,7 +205,6 @@ nie:hasPart a rdf:Property ;
 	rdfs:range nie:DataObject .
 
 nie:isPartOf a rdf:Property ;
-	nrl:maxCardinality 1 ;
 	rdfs:domain nie:DataObject ;
 	rdfs:range nie:InformationElement .
 
@@ -223,7 +221,6 @@ nie:characterSet a rdf:Property ;
 	rdfs:range xsd:string .
 
 nie:isLogicalPartOf a rdf:Property ;
-	nrl:maxCardinality 1 ;
 	rdfs:domain nie:InformationElement ;
 	rdfs:range nie:InformationElement .
 
diff --git a/src/tracker-miner-fs/modules/applications.c b/src/tracker-miner-fs/modules/applications.c
index 17e0089..d2ee8c5 100644
--- a/src/tracker-miner-fs/modules/applications.c
+++ b/src/tracker-miner-fs/modules/applications.c
@@ -224,6 +224,7 @@ tracker_application_file_get_metadata (TrackerModuleFile *file, gchar **mime_typ
 
 		tracker_sparql_builder_predicate (sparql, "a");
 		tracker_sparql_builder_object (sparql, "nfo:SoftwareApplication");
+		tracker_sparql_builder_object (sparql, "nie:DataObject");
 
 		tracker_sparql_builder_predicate (sparql, "nie:dataSource");
 		tracker_sparql_builder_object_iri (sparql, APPLICATION_DATASOURCE_URN);
@@ -257,9 +258,11 @@ tracker_application_file_get_metadata (TrackerModuleFile *file, gchar **mime_typ
 		tracker_sparql_builder_predicate (sparql, "a");
 		tracker_sparql_builder_object (sparql, "nfo:Executable");
 		tracker_sparql_builder_object (sparql, "nfo:FileDataObject");
+		tracker_sparql_builder_object (sparql, "nie:DataObject");
 
-		tracker_sparql_builder_predicate (sparql, "tracker:available");
-		tracker_sparql_builder_object_boolean (sparql, TRUE);
+		/* Apparently this gets added by the file-module ATM
+		   tracker_sparql_builder_predicate (sparql, "tracker:available");
+		   tracker_sparql_builder_object_boolean (sparql, TRUE); */
 
 		tracker_sparql_builder_predicate (sparql, "nie:title");
 		tracker_sparql_builder_object_string (sparql, name);
@@ -303,7 +306,7 @@ tracker_application_file_get_metadata (TrackerModuleFile *file, gchar **mime_typ
 				tracker_sparql_builder_object_string (sparql, cats[i]);
 
 				tracker_sparql_builder_subject_iri (sparql, uri);
-				tracker_sparql_builder_predicate (sparql, "nfo:belongsToContainer");
+				tracker_sparql_builder_predicate (sparql, "nie:isLogicalPartOf");
 				tracker_sparql_builder_object_iri (sparql, cat_uri);
 
 				g_free (cat_uri);
@@ -323,6 +326,7 @@ tracker_application_file_get_metadata (TrackerModuleFile *file, gchar **mime_typ
 		tracker_sparql_builder_subject_iri (sparql, desktop_file_uri);
 		tracker_sparql_builder_predicate (sparql, "a");
 		tracker_sparql_builder_object (sparql, "nfo:FileDataObject");
+		tracker_sparql_builder_object (sparql, "nie:DataObject");
 
 		tracker_sparql_builder_subject_iri (sparql, uri);
 		tracker_sparql_builder_predicate (sparql, "nie:isStoredAs");



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