[tracker] NCO: Remove tracker:notify from immutable helper classes



commit 2c493bf84b4eefc9c2d5768ef95274f21ecc264d
Author: Jürg Billeter <j bitron ch>
Date:   Thu Apr 14 12:12:40 2011 +0200

    NCO: Remove tracker:notify from immutable helper classes
    
    This removes tracker:notify from nco:Contact, nco:EmailAddress,
    nco:PhoneNumber, and nco:PostalAddress to avoid unnecessary GraphUpdated
    emissions as instances of these helper classes are never modified after
    creation.

 data/ontologies/32-nco.ontology      |    6 +-----
 tests/functional-tests/14-signals.py |    6 +++---
 2 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/data/ontologies/32-nco.ontology b/data/ontologies/32-nco.ontology
index 915ad3f..9815d6f 100644
--- a/data/ontologies/32-nco.ontology
+++ b/data/ontologies/32-nco.ontology
@@ -11,7 +11,7 @@
 
 nco: a tracker:Namespace, tracker:Ontology ;
 	tracker:prefix "nco" ;
-	nao:lastModified "2011-01-25T13:30:00Z" .
+	nao:lastModified "2011-04-14T10:00:00Z" .
 
 nco:Role a rdfs:Class ;
 	rdfs:label "Role" ;
@@ -26,7 +26,6 @@ nco:Affiliation a rdfs:Class ;
 nco:Contact a rdfs:Class ;
 	rdfs:label "Contact" ;
 	rdfs:comment "A Contact. A piece of data that can provide means to identify or communicate with an entity." ;
-	tracker:notify true ;
 	rdfs:subClassOf nie:InformationElement , nco:Role .
 
 nco:ContactGroup a rdfs:Class ;
@@ -50,7 +49,6 @@ nco:ContactMedium a rdfs:Class ;
 nco:EmailAddress a rdfs:Class ;
 	rdfs:label "EmailAddress" ;
 	rdfs:comment "An email address. The recommended best practice is to use mailto: uris for instances of this class." ;
-	tracker:notify true ;
 	rdfs:subClassOf nco:ContactMedium .
 
 nco:IMAddress a rdfs:Class ;
@@ -81,13 +79,11 @@ nco:default-contact-me a nco:PersonContact.
 nco:PhoneNumber a rdfs:Class ;
 	rdfs:label "PhoneNumber" ;
 	rdfs:comment "A telephone number." ;
-	tracker:notify true ;
 	rdfs:subClassOf nco:ContactMedium .
 
 nco:PostalAddress a rdfs:Class ;
 	rdfs:label "PostalAddress" ;
 	rdfs:comment "A postal address. A class aggregating the various parts of a value for the 'ADR' property as defined in RFC 2426 Sec. 3.2.1." ;
-	tracker:notify true ;
 	rdfs:subClassOf nco:ContactMedium .
 
 nco:ModemNumber a rdfs:Class ;
diff --git a/tests/functional-tests/14-signals.py b/tests/functional-tests/14-signals.py
index 74c3cb4..c999f05 100755
--- a/tests/functional-tests/14-signals.py
+++ b/tests/functional-tests/14-signals.py
@@ -38,7 +38,7 @@ GRAPH_UPDATED_SIGNAL = "GraphUpdated"
 SIGNALS_PATH = "/org/freedesktop/Tracker1/Resources"
 SIGNALS_IFACE = "org.freedesktop.Tracker1.Resources"
 
-CONTACT_CLASS_URI = "http://www.semanticdesktop.org/ontologies/2007/03/22/nco#Contact";
+CONTACT_CLASS_URI = "http://www.semanticdesktop.org/ontologies/2007/03/22/nco#PersonContact";
 
 REASONABLE_TIMEOUT = 10 # Time waiting for the signal to be emitted
 
@@ -125,7 +125,7 @@ class TrackerStoreSignalsTests (CommonTrackerStoreTest):
 
         # validate results
         self.assertEquals (len (self.results_deletes), 0)
-        self.assertEquals (len (self.results_inserts), 7)
+        self.assertEquals (len (self.results_inserts), 6)
         
     def test_02_remove_contact (self):
         CONTACT = """
@@ -146,7 +146,7 @@ class TrackerStoreSignalsTests (CommonTrackerStoreTest):
         self.__wait_for_signal ()
 
         # Validate results:
-        self.assertEquals (len (self.results_deletes), 2)
+        self.assertEquals (len (self.results_deletes), 1)
         self.assertEquals (len (self.results_inserts), 0)
 
 



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