[tracker/im] NCO: Add IMAddress and adapt existing IM classes and properties



commit 7e2b2afe0ee6d2b592434c5515cc34f8699a524f
Author: Jürg Billeter <j bitron ch>
Date:   Tue Feb 9 16:49:14 2010 +0100

    NCO: Add IMAddress and adapt existing IM classes and properties
    
    This commit applies various changes to the ontology for multiple
    reasons. It increases consistency between email addresses, phone
    numbers, and IM addresses. This enables the use of anonymous contacts
    for IM messages. Furthermore, this commit also simplifies queries
    that involve merged contacts, which improves the performance
    significantly.
    
    The class nco:IMAddress and the property nco:hasIMAddress have been
    added. nco:hasIMAddress can be used by any nco:Contact and represents
    an instant messaging address consisting of nco:imID and nco:imProtocol.
    This improves consistency with how email addresses and phone numbers
    are handled in NCO.
    
    nco:IMContact has been deprecated in favor of using nco:PersonContact
    with nco:hasIMAddress. This avoids special casing IM contacts.
    
    The address of a nco:IMAccount is now stored in nco:imAccountAddress,
    this allows to consolidate the nearly duplicate properties such as
    nco:imId and nco:imContactId and the other nco:im* and nco:imContact*
    property pairs. To improve consistency among these properties and ease
    transition, nco:imContactCapability has been renamed to
    nco:imCapability.
    
    nco:hasIMAccount has been deprecated as it did not provide any
    information as it was only applicable to a single subject,
    nco:default-contact-me.
    
    nco:fromIMAccount has been deprecated and replaced by nco:hasIMContact,
    which provides the same information in reversed form, that is, it links
    IM accounts of the user to IM contacts (buddy list).
    
    nco:MetaContact and nco:metaContact have been deprecated in favor of
    storing merged contacts. Contact details can be linked to the data
    source with named graphs in future versions of Tracker. This provides
    vastly simpler and more efficient access to merged contacts.

 data/ontologies/32-nco.ontology |   53 +++++++++++++++++++++++++++++++++------
 1 files changed, 45 insertions(+), 8 deletions(-)
---
diff --git a/data/ontologies/32-nco.ontology b/data/ontologies/32-nco.ontology
index a9c285a..d40f50a 100644
--- a/data/ontologies/32-nco.ontology
+++ b/data/ontologies/32-nco.ontology
@@ -48,11 +48,18 @@ nco:EmailAddress a rdfs:Class ;
 	rdfs:comment "An email address. The recommended best practice is to use mailto: uris for instances of this class." ;
 	rdfs:subClassOf nco:ContactMedium .
 
+nco:IMAddress a rdfs:Class ;
+	rdfs:label "IM Address" ;
+	rdfs:comment "An instant messaging address such as xmpp:foo bar com " ;
+	rdfs:subClassOf nco:ContactMedium .
+
+# switch to rdfs:subClassOf nie:InformationElement
+# after transition period
 nco:IMAccount a rdfs:Class ;
 	rdfs:label "IMAccount" ;
 	rdfs:comment "An account in an Instant Messaging system. Only user 'me' can have IM Accounts (check hasIMAccount). All other contacts in the address book can come from one (check nco:fromIMAccount). The properties in this class (id, status,...) refers only to 'me'. The specific details of contacts coming from that account are properties of IMContact." ;
 	tracker:notify true ;
-	rdfs:subClassOf nco:ContactMedium .
+	rdfs:subClassOf nco:IMAddress .
 
 nco:OrganizationContact a rdfs:Class ;
 	rdfs:label "OrganizationContact" ;
@@ -70,11 +77,13 @@ nco:default-contact-me a nco:PersonContact.
 nco:IMContact a rdfs:Class ;
 	rdfs:label "IM Contact" ;
 	rdfs:comment "Contact coming from an IM Account" ;
+	nao:deprecated true ;
 	rdfs:subClassOf nco:PersonContact .
 
 nco:MetaContact a rdfs:Class ;
         rdfs:label "MetaContact" ;
 	rdfs:comment "A metacontact groups PersonContacts and IMContacts coming from different sources, indicating that are the same entity in the real world." ;
+	nao:deprecated true ;
 	rdfs:subClassOf rdfs:Resource.
 
 nco:PhoneNumber a rdfs:Class ;
@@ -200,6 +209,7 @@ nco:metacontact a rdf:Property ;
         rdfs:label "metacontact" ;
 	rdfs:comment "Link a single contact with a metacontact" ;
 	nrl:maxCardinality 1 ;
+	nao:deprecated true ;
 	rdfs:domain nco:PersonContact ;
 	rdfs:range nco:MetaContact .
 
@@ -301,17 +311,23 @@ nco:extendedAddress a rdf:Property ;
 nco:hasIMAccount a rdf:Property ;
 	rdfs:label "hasIMAccount" ;
 	rdfs:comment "Indicates that an Instant Messaging account owned by an entity represented by this contact." ;
-	rdfs:subPropertyOf nco:hasContactMedium ;
+	nao:deprecated true ;
 	rdfs:domain nco:PersonContact ;
 	rdfs:range nco:IMAccount .
 
 nco:fromIMAccount a rdf:Property ;
 	rdfs:label "hasIMAccount" ;
 	rdfs:comment "Indicates that an Instant Messaging account owned by an entity represented by this contact." ;
-	rdfs:subPropertyOf nco:hasContactMedium ;
+	nao:deprecated true ;
 	rdfs:domain nco:IMContact ;
 	rdfs:range nco:IMAccount .
 
+nco:hasIMContact a rdf:Property ;
+	rdfs:label "hasIMAccount" ;
+	rdfs:comment "Indicates that an Instant Messaging account owned by an entity represented by this contact." ;
+	rdfs:domain nco:IMAccount ;
+	rdfs:range nco:IMAddress .
+
 # FIXME Range geo:Point but we dont have that class
 nco:hasLocation a rdf:Property ;
 	rdfs:label "hasLocation" ;
@@ -360,11 +376,17 @@ nco:imID a rdf:Property ;
 	rdfs:comment "Identifier of the IM account. Examples of such identifier might include ICQ UINs, Jabber IDs, Skype names etc." ;
 	rdfs:subPropertyOf nao:identifier ;
 	nrl:maxCardinality 1 ;
-	rdfs:domain nco:IMAccount ;
+	rdfs:domain nco:IMAddress ;
 	rdfs:range xsd:string ;
 	tracker:fulltextIndexed true ;
 	tracker:weight 5 .
 
+nco:imAccountAddress a rdf:Property ;
+	a nrl:InverseFunctionalProperty ;
+	nrl:maxCardinality 1 ;
+	rdfs:domain nco:IMAccount ;
+	rdfs:range nco:IMAddress .
+
 # FIXME Range geo:Point but we dont have that class
 nco:addressLocation a rdf:Property ;
 	rdfs:label "addressLocation" ;
@@ -571,7 +593,7 @@ nco:imNickname a rdf:Property ;
 	rdfs:label "imNickname" ;
 	rdfs:comment "A nickname attached to a particular IM Account." ;
 	nrl:maxCardinality 1 ;
-	rdfs:domain nco:IMAccount ;
+	rdfs:domain nco:IMAddress ;
 	rdfs:range xsd:string ;
 	tracker:fulltextIndexed true ;
 	tracker:weight 5 .
@@ -620,7 +642,7 @@ nco:imProtocol a rdf:Property ;
 	rdfs:label "imProtocol" ;
 	rdfs:comment "Protocol of the account ('skype', 'gtalk', 'icq', ...)" ;
 	nrl:maxCardinality 1 ;
-	rdfs:domain nco:IMAccount ;
+	rdfs:domain nco:IMAddress ;
 	rdfs:range xsd:string .
 
 nco:pobox a rdf:Property ;
@@ -636,7 +658,7 @@ nco:imStatusMessage a rdf:Property ;
 	rdfs:label "imStatusMessage" ;
 	rdfs:comment "A feature common in most IM systems. A message left by the user for all his/her contacts to see." ;
 	nrl:maxCardinality 1 ;
-	rdfs:domain nco:IMAccount ;
+	rdfs:domain nco:IMAddress ;
 	rdfs:range xsd:string .
 
 nco:imDisplayName a rdf:Property ;
@@ -680,6 +702,7 @@ nco:hasAffiliation a rdf:Property ;
 nco:imContactId a rdf:Property ;
 	rdfs:label "imContactId" ;
 	rdfs:comment "ID of the contact in the service like my friend xmail com" ;
+	nao:deprecated true ;
 	nrl:maxCardinality 1;
 	rdfs:domain nco:IMContact ;
 	rdfs:range xsd:string .
@@ -687,6 +710,7 @@ nco:imContactId a rdf:Property ;
 nco:imContactNickname a rdf:Property ;
 	rdfs:label "imContactNickname" ;
 	rdfs:comment "Visible nickname of the user in a service";
+	nao:deprecated true ;
 	nrl:maxCardinality 1;
 	rdfs:domain nco:IMContact ;
 	rdfs:range xsd:string .
@@ -694,6 +718,7 @@ nco:imContactNickname a rdf:Property ;
 nco:imContactStatusMessage a rdf:Property ;
 	rdfs:label "imContactStatusMessage" ;
 	rdfs:comment "Status message of the user in a service";
+	nao:deprecated true ;
 	nrl:maxCardinality 1;
 	rdfs:domain nco:IMContact ;
 	rdfs:range xsd:string .
@@ -716,6 +741,7 @@ nco:presence-status-error a nco:PresenceStatus .
 nco:imContactPresence a rdf:Property ;
 	rdfs:label "imContactPresence" ;
 	rdfs:comment "Online availability of the user in a service";
+	nao:deprecated true ;
 	nrl:maxCardinality 1;
 	rdfs:domain nco:IMContact ;
 	rdfs:range nco:PresenceStatus .
@@ -723,7 +749,7 @@ nco:imContactPresence a rdf:Property ;
 nco:imPresence a rdf:Property ;
 	rdfs:label "imPresence" ;
 	nrl:maxCardinality 1 ;
-	rdfs:domain nco:IMAccount ;
+	rdfs:domain nco:IMAddress ;
 	rdfs:range nco:PresenceStatus .
 
 
@@ -745,5 +771,16 @@ nco:im-capability-dbus-tubes a nco:IMCapability .
 nco:imContactCapability a rdf:Property ;
 	rdfs:label "imContact Capability";
 	rdfs:comment "Capabilities of an IM Contact, what can we interact with him";
+	nao:deprecated true ;
 	rdfs:domain nco:IMContact ;
 	rdfs:range nco:IMCapability .
+
+nco:imCapability a rdf:Property ;
+	rdfs:label "imContact Capability";
+	rdfs:comment "Capabilities of an IM Contact, what can we interact with him";
+	rdfs:domain nco:IMAddress ;
+	rdfs:range nco:IMCapability .
+
+nco:hasIMAddress a rdf:Property ;
+	rdfs:domain nco:Role ;
+	rdfs:range nco:IMAddress .



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