@prefix nco: <http://www.semanticdesktop.org/ontologies/2007/03/22/nco#> .
@prefix nfo: <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#> .
@prefix nie: <http://www.semanticdesktop.org/ontologies/2007/01/19/nie#> .
@prefix nmo: <http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#> .
@prefix nrl: <http://www.semanticdesktop.org/ontologies/2007/08/15/nrl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix tracker: <http://www.tracker-project.org/ontologies/tracker#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix nao: <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#> .
@prefix nao: <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#> .

nmo: a tracker:Namespace, tracker:Ontology ;
	tracker:prefix "nmo" ;
	nao:lastModified "2010-02-16T11:00:00Z" .

# FIXME Extension requested in Nepomuk
nmo:MimePart a rdfs:Class ;
	rdfs:subClassOf nfo:EmbeddedFileDataObject .

# FIXME Extension requested in Nepomuk
nmo:Multipart a rdfs:Class ;
	rdfs:subClassOf nfo:DataContainer .

# FIXME Extension requested in Nepomuk
nmo:partBoundary a rdf:Property ;
	rdfs:domain nmo:Multipart ;
	rdfs:range xsd:string .

nmo:Message a rdfs:Class ;
	rdfs:comment "A message. Could be an email, instant messanging message, SMS message etc." ;
	rdfs:subClassOf nfo:TextDocument ;
	tracker:notify true .

# FIXME Extension requested in Nepomuk
nmo:Email a rdfs:Class;
	rdfs:subClassOf nmo:Message .

# FIXME Extension requested in Nepomuk
nmo:hasContent a rdf:Property ;
	nrl:maxCardinality 1 ;
	rdfs:domain nmo:Email ;
	rdfs:range nmo:MimePart .

# FIXME Extension requested in Nepomuk
nmo:Attachment a rdfs:Class ;
	rdfs:subClassOf nmo:MimePart ;
	rdfs:subClassOf nfo:Attachment .

nmo:MailAccount a rdfs:Class ;
	rdfs:subClassOf nie:InformationElement .

# FIXME Remove this one next release
nmo:Mailbox a rdfs:Class ;
	nao:deprecated true ;
	rdfs:subClassOf nmo:MailAccount .

nmo:MailboxDataObject a rdfs:Class ;
	rdfs:subClassOf nie:DataObject .

nmo:MessageHeader a rdfs:Class ;
	rdfs:subClassOf rdfs:Resource .

nmo:IMMessage a rdfs:Class ;
	rdfs:subClassOf nmo:Message .

nmo:Conversation a rdfs:Class ;
	rdfs:comment "A conversation. An exchange of one or multiple messages within a time frame or about a specific topic." ;
	rdfs:subClassOf nie:InformationElement .

nmo:CommunicationChannel a rdfs:Class ;
	rdfs:comment "A communication channel. The container for all messages between participants of a specific group or in a persistent channel." ;
	rdfs:subClassOf nie:InformationElement .

nmo:PermanentChannel a rdfs:Class ;
	rdfs:subClassOf nmo:CommunicationChannel .

nmo:TransientChannel a rdfs:Class ;
	rdfs:subClassOf nmo:CommunicationChannel .

nmo:Call a rdfs:Class ;
	rdfs:subClassOf nmo:Message .

# required for backward compatibility
nmo:VOIPCall a rdfs:Class ;
	rdfs:subClassOf nmo:Call .

nmo:MailFolder a rdfs:Class ;
	rdfs:subClassOf nfo:Folder .

nmo:recipient a rdf:Property ;
	rdfs:domain nmo:Message ;
	rdfs:range nco:Contact .

nmo:from a rdf:Property ;
	rdfs:comment "The sender of the message." ;
	nrl:maxCardinality 1 ;
	rdfs:domain nmo:Message ;
	rdfs:range nco:Contact .

nmo:headerName a rdf:Property ;
	nrl:maxCardinality 1 ;
	rdfs:domain nmo:MessageHeader ;
	rdfs:range xsd:string ;
	tracker:weight 3 .

nmo:headerValue a rdf:Property ;
	nrl:maxCardinality 1 ;
	rdfs:domain nmo:MessageHeader ;
	rdfs:range xsd:string ;
	tracker:weight 4 .

nmo:isAnswered a rdf:Property ;
	nrl:maxCardinality 1 ;
	rdfs:domain nmo:Message ;
	rdfs:range xsd:boolean .

nmo:isFlagged a rdf:Property ;
	nrl:maxCardinality 1 ;
	rdfs:domain nmo:Email ;
	rdfs:range xsd:boolean .

nmo:isDeleted a rdf:Property ;
	nrl:maxCardinality 1 ;
	rdfs:domain nmo:Message ;
	rdfs:range xsd:boolean .

nmo:isDraft a rdf:Property ;
	nrl:maxCardinality 1 ;
	rdfs:domain nmo:Message ;
	rdfs:range xsd:boolean .

nmo:isRecent a rdf:Property ;
	nrl:maxCardinality 1 ;
	rdfs:domain nmo:Email ;
	rdfs:range xsd:boolean .

nmo:isRead a rdf:Property ;
	nrl:maxCardinality 1 ;
	rdfs:domain nmo:Message ;
	rdfs:range xsd:boolean .

nmo:isSent a rdf:Property ;
	nrl:maxCardinality 1 ;
	rdfs:domain nmo:Message ;
	rdfs:range xsd:boolean .

nmo:plainTextMessageContent a rdf:Property ;
	rdfs:comment "nmo:plainTextMessageContent is deprecated, use nie:plainTextContent instead" ;
	nao:deprecated true ;
	nrl:maxCardinality 1 ;
	rdfs:domain nmo:Message ;
	rdfs:range xsd:string .

nmo:htmlMessageContent a rdf:Property ;
	nrl:maxCardinality 1 ;
	rdfs:domain nmo:Message ;
	rdfs:range xsd:string .

nmo:references a rdf:Property ;
	rdfs:domain nmo:Message ;
	rdfs:range nmo:Message .

nmo:inReplyTo a rdf:Property ;
	rdfs:subPropertyOf nmo:references ;
	rdfs:domain nmo:Message ;
	rdfs:range nmo:Message .

nmo:charSet a rdf:Property ;
	nrl:maxCardinality 1 ;
	rdfs:domain nmo:MimePart ;
	rdfs:range xsd:string .


nmo:contentId a rdf:Property ;
	nrl:maxCardinality 1 ;
	rdfs:domain nmo:MimePart ;
	rdfs:range xsd:string .

nmo:contentTransferEncoding a rdf:Property ;
	nrl:maxCardinality 1 ;
	rdfs:domain nmo:MimePart ;
	rdfs:range xsd:string .

nmo:contentDescription a rdf:Property ;
	nrl:maxCardinality 1 ;
	rdfs:domain nmo:MimePart ;
	rdfs:range xsd:string .

nmo:contentDisposition a rdf:Property ;
	nrl:maxCardinality 1 ;
	rdfs:domain nmo:MimePart ;
	rdfs:range xsd:string .

# FIXME Extension requested in Nepomuk
nmo:mimeHeader a rdf:Property ;
	rdfs:domain nmo:MimePart ;
	rdfs:range rdfs:Resource .

nmo:messageHeader a rdf:Property ;
	rdfs:domain nmo:Message ;
	rdfs:range nmo:MessageHeader .

nmo:messageId a rdf:Property ;
	nrl:maxCardinality 1 ;
	rdfs:domain nmo:Message ;
	rdfs:range xsd:string .

nmo:messageSubject a rdf:Property ;
	nrl:maxCardinality 1 ;
	rdfs:domain nmo:Message ;
	rdfs:range xsd:string ;
	tracker:fulltextIndexed true ;
	tracker:weight 5 .

nmo:receivedDate a rdf:Property ;
	nrl:maxCardinality 1 ;
	rdfs:domain nmo:Message ;
	rdfs:range xsd:dateTime .

nmo:replyTo a rdf:Property ;
	nrl:maxCardinality 1 ;
	rdfs:domain nmo:Message ;
	rdfs:range nco:Contact .

nmo:sender a rdf:Property ;
	tracker:indexed true ;
	rdfs:subPropertyOf nmo:recipient ;
	nrl:maxCardinality 1 ;
	rdfs:domain nmo:Message ;
	rdfs:range nco:Contact .

nmo:sentDate a rdf:Property ;
	rdfs:comment "Date when this message was sent." ;
	tracker:indexed true ;
	nrl:maxCardinality 1 ;
	rdfs:domain nmo:Message ;
	rdfs:range xsd:dateTime .

nmo:to a rdf:Property ;
	rdfs:domain nmo:Message ;
	rdfs:range nco:Contact .

nmo:bcc a rdf:Property ;
	rdfs:domain nmo:Message ;
	rdfs:range nco:Contact .

nmo:cc a rdf:Property ;
	rdfs:domain nmo:Message ;
	rdfs:range nco:Contact .

nmo:conversation a rdf:Property ;
	rdfs:comment "Connects this message to a conversation. Every message must only be part of a single conversation." ;
	tracker:indexed true ;
	nrl:maxCardinality 1 ;
	rdfs:domain nmo:Message ;
	rdfs:range nmo:Conversation .

nmo:communicationChannel a rdf:Property ;
	rdfs:comment "Connects this message to a communication channel. Every message must only be in a single channel." ;
	tracker:indexed true ;
	nrl:maxCardinality 1 ;
	rdfs:domain nmo:Message ;
	rdfs:range nmo:CommunicationChannel .

nmo:lastMessageDate a rdf:Property ;
	rdfs:comment "nmo:sentDate of the most recent message in this channel." ;
	tracker:indexed true ;
	nrl:maxCardinality 1 ;
	rdfs:domain nmo:CommunicationChannel ;
	rdfs:range xsd:dateTime .

nmo:hasParticipant a rdf:Property ;
	tracker:indexed true ;
	rdfs:domain nmo:CommunicationChannel ;
	rdfs:range nco:Contact .

nmo:duration a rdf:Property ;
        rdfs:comment "Duration of the call in seconds" ;
	nrl:maxCardinality 1 ;
	rdfs:domain nmo:Call ;
	rdfs:range xsd:integer .

# FIXME Extension to nepomuk
nmo:accountName a rdf:Property ;
	nrl:maxCardinality 1 ;
	rdfs:domain nmo:MailAccount ;
	rdfs:range xsd:string ;
	tracker:weight 3 .

# FIXME Extension to nepomuk
nmo:accountDisplayName a rdf:Property ;
	nrl:maxCardinality 1 ;
	rdfs:domain nmo:MailAccount ;
	rdfs:range xsd:string ;
	tracker:weight 3 .

# FIXME Extension to nepomuk
nmo:fromAddress a rdf:Property ;
	rdfs:comment "From address of an account" ;
	nrl:maxCardinality 1 ;
	rdfs:domain nmo:MailAccount ;
	rdfs:range nco:EmailAddress .

# FIXME Extension to nepomuk
nmo:signature a rdf:Property ;
	nrl:maxCardinality 1 ;
	rdfs:domain nmo:MailAccount ;
	rdfs:range xsd:string ;
	tracker:weight 2 .

# FIXME Extension to nepomuk
nmo:folderName a rdf:Property ;
	nrl:maxCardinality 1 ;
	rdfs:domain nmo:MailFolder ;
	rdfs:range xsd:string ;
	tracker:weight 4 .

# FIXME Extension to nepomuk
nmo:status a rdf:Property ;
	nrl:maxCardinality 1 ;
	rdfs:domain nmo:Email ;
	rdfs:range xsd:string .

# FIXME Extension to nepomuk
nmo:responseType a rdf:Property ;
	nrl:maxCardinality 1 ;
	rdfs:domain nmo:Email ;
	rdfs:range xsd:string .

# FIXME Extension to nepomuk
nmo:serverCount a rdf:Property ;
	nrl:maxCardinality 1 ;
	rdfs:domain nmo:MailFolder ;
	rdfs:range xsd:integer .

# FIXME Extension to nepomik
nmo:serverUnreadCount a rdf:Property ;
	nrl:maxCardinality 1 ;
	rdfs:domain nmo:MailFolder ;
	rdfs:range xsd:integer .

# Don't use this!! Only for compat with original Nepomuk NMO
nmo:hasAttachment a rdf:Property ;
	rdfs:domain nmo:Message ;
	rdfs:range nfo:Attachment .

# Don't use this!! Only for compat with original Nepomuk NMO
nmo:contentMimeType a rdf:Property ;
	rdfs:domain nmo:Email ;
	rdfs:range xsd:string ;
	rdfs:subPropertyOf nie:mimeType .


#
# SMS support
#
nmo:SMSMessage a rdfs:Class ;
	rdfs:label "SMS Message";
	rdfs:comment "Plain SMS Message" ;
	rdfs:subClassOf nmo:Message.

nmo:toVCard a rdf:Property ;
	rdfs:label "fromVCard" ;
	rdfs:comment "Reference to a VCard in the filesystem, containing the Contact information of 'to' recipients" ;
        rdfs:domain nmo:SMSMessage ;
        rdfs:range nfo:FileDataObject .

nmo:fromVCard a rdf:Property ;
	rdfs:label "fromVCard" ;
	rdfs:comment "Reference to a VCard in the filesystem, containing the Contact information of the 'from' recipient";
        nrl:maxCardinality 1 ;
        rdfs:domain nmo:SMSMessage ;
        rdfs:range nfo:FileDataObject .

#FIXME unify encoding representation... this is the third encoding property in nepomuk
nmo:encoding a rdf:Property ;
	rdfs:label "enconding";
	rdfs:comment "Encoding of the message" ;
        nrl:maxCardinality 1 ;
        rdfs:domain nmo:SMSMessage ;
        rdfs:range xsd:string .

nmo:smsId a rdf:Property ;
        rdfs:label "sms Id";
	rdfs:comment "Id assigned in the system when the sms is received" ;
	nrl:maxCardinality 1 ;
	rdfs:domain nmo:SMSMessage;
	rdfs:range xsd:integer.

nmo:SMSFolder a rdfs:Class ;
	rdfs:label "SMS Folder";
	rdfs:comment "Folder for SMS. Not a subclass of nfo:Folder because it would confuse filesystem folders" ;
	rdfs:subClassOf nie:InformationElement .

nmo:smsFolderId a rdf:Property ;
	rdfs:label "folder id";
	rdfs:comment "Id assigned to the folder for sync purpouses" ;
	nrl:maxCardinality 1 ;
	rdfs:domain nmo:SMSFolder ;
	rdfs:range xsd:string ;
	rdfs:subPropertyOf nie:identifier .


nmo:containsSMSFolder a rdf:Property ;
	rdfs:label "contains SMS Folder";
	rdfs:comment "To link and reconstruct a hierarchy of folders" ;
	rdfs:domain nmo:SMSFolder;
	rdfs:range nmo:SMSFolder .

nmo:containsSMS a rdf:Property ;
	rdfs:label "Contains SMS";
	rdfs:comment "Link between an SMS Message and a Folder" ;
	rdfs:domain nmo:SMSFolder;
	rdfs:range nmo:SMSMessage .

nmo:default-sms-folder-inbox a nmo:SMSFolder ;
			     nie:title "Inbox" ;
			     nmo:smsFolderId "0x1002" .

nmo:default-sms-folder-outbox a nmo:SMSFolder ;
			     nie:title "Outbox" ;
			     nmo:smsFolderId "0x1003" .

nmo:default-sms-folder-draft a nmo:SMSFolder ;
			     nie:title "Draft" ;
			     nmo:smsFolderId "0x1004" .

nmo:default-sms-folder-sent a nmo:SMSFolder ;
			     nie:title "Sent" ;
			     nmo:smsFolderId "0x1005" .


nmo:default-sms-folder-myfolder a nmo:SMSFolder ;
			     nie:title "MyFolder" ;
			     nmo:smsFolderId "0x1008" .

nmo:DeliveryStatus a rdfs:Class ;
	rdfs:label "Delivery statuses" ;
	rdfs:comment "Predefined set of delivery status instances" ;
	rdfs:subClassOf rdfs:Resource .

nmo:deliveryStatus a rdf:Property ;
	rdfs:label "deliveryStatus" ;
	nrl:maxCardinality 1 ;
	rdfs:domain nmo:Message ;
	rdfs:range nmo:DeliveryStatus .

nmo:delivery-status-sent a nmo:DeliveryStatus .
nmo:delivery-status-delivered a nmo:DeliveryStatus .
nmo:delivery-status-temporarily-failed a nmo:DeliveryStatus .
nmo:delivery-status-permanently-failed a nmo:DeliveryStatus .


nmo:reportDelivery a rdf:Property ;
         rdfs:label "Report delivery" ;
         rdfs:comment "Report delivery has been requested for the message" ;
         nrl:maxCardinality 1 ;
         rdfs:domain nmo:Message ;
         rdfs:range xsd:boolean .

# MMS support
nmo:MMSMessage a rdfs:Class;
         rdfs:label "MMS Message";
         rdfs:comment "An MMS message is basically a Email with different envelop. It inherits also from SMS the folders and delivery status";
         rdfs:subClassOf nmo:Email;
         rdfs:subClassOf nmo:SMSMessage.
