#
# Copyright (c) 2007 NEPOMUK Consortium
# Copyright (c) 2009-2011 Sebastian Trueg <trueg@kde.org>
# All rights reserved, licensed under either CC-BY or BSD.
#
# You are free:
#  * to Share - to copy, distribute and transmit the work
#  * to Remix - to adapt the work
# Under the following conditions:
#  * Attribution - You must attribute the work in the manner specified by the author
#    or licensor (but not in any way that suggests that they endorse you or your use 
#    of the work).
#
# Redistribution and use in source and binary forms, with or without modification, 
# are permitted provided that the following conditions are met:
#  * Redistributions of source code must retain the above copyright notice, this 
#    list of conditions and the following disclaimer.
#  * Redistributions in binary form must reproduce the above copyright notice, this 
#    list of conditions and the following disclaimer in the documentation and/or 
#    other materials provided with the distribution.
#  * Neither the names of the authors nor the names of contributors may
#    be used to endorse or promote products derived from this ontology without 
#    specific prior written permission.
#
# THIS ONTOLOGY IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
# THIS ONTOLOGY, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#

@prefix exif:    <http://www.kanzaki.com/ns/exif#> .
@prefix nid3:    <http://www.semanticdesktop.org/ontologies/2007/05/10/nid3#> .
@prefix nrl:     <http://www.semanticdesktop.org/ontologies/2007/08/15/nrl#> .
@prefix nfo:     <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#> .
@prefix xsd:     <http://www.w3.org/2001/XMLSchema#> .
@prefix tmo:     <http://www.semanticdesktop.org/ontologies/2008/05/20/tmo#> .
@prefix protege:  <http://protege.stanford.edu/system#> .
@prefix nmo:     <http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
@prefix nexif:   <http://www.semanticdesktop.org/ontologies/2007/05/10/nexif#> .
@prefix ncal:    <http://www.semanticdesktop.org/ontologies/2007/04/02/ncal#> .
@prefix pimo:    <http://www.semanticdesktop.org/ontologies/2007/11/01/pimo#> .
@prefix dcterms:  <http://purl.org/dc/terms/> .
@prefix nao:     <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#> .
@prefix geo:     <http://www.w3.org/2003/01/geo/wgs84_pos#> .
@prefix dc:      <http://purl.org/dc/elements/1.1/> .
@prefix nie:     <http://www.semanticdesktop.org/ontologies/2007/01/19/nie#> .
@prefix nco:     <http://www.semanticdesktop.org/ontologies/2007/03/22/nco#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

nmo: {nmo:IMMessage
          a       rdfs:Class ;
          rdfs:comment "A message sent with Instant Messaging software." ;
          rdfs:label "IMMessage" ;
          rdfs:subClassOf nmo:Message .

    nmo:Email
          a       rdfs:Class ;
          rdfs:comment "An email." ;
          rdfs:label "Email" ;
          rdfs:subClassOf nmo:Message .

    nmo:messageSubject
          a       rdf:Property ;
          rdfs:comment "The subject of a message" ;
          rdfs:domain nmo:Message ;
          rdfs:label "messageSubject" ;
          rdfs:range xsd:string ;
          rdfs:subPropertyOf nie:subject ;
          nrl:maxCardinality 1 .

    nmo:MessageHeader
          a       rdfs:Class ;
          rdfs:comment "An arbitrary message header." ;
          rdfs:label "MessageHeader" ;
          rdfs:subClassOf rdfs:Resource .

    nmo:references
          a       rdf:Property ;
          rdfs:comment "Signifies that a message references another message. This property is a generic one. See RFC 2822 Sec. 3.6.4" ;
          rdfs:domain nmo:Message ;
          rdfs:label "references" ;
          rdfs:range nmo:Message .

    nmo:to
          a       rdf:Property ;
          nao:deprecated true ;
          rdfs:comment "deprecated in favor of nmo:emailTo" ;
          rdfs:domain nmo:Email ;
          rdfs:label "to" ;
          rdfs:range nco:Contact ;
          rdfs:subPropertyOf nmo:primaryRecipient .

    nmo:emailTo
          a       rdf:Property ;
          rdfs:comment "The primary intended recipient of an email." ;
          rdfs:domain nmo:Email ;
          rdfs:label "to" ;
          rdfs:range nco:ContactMedium ;
          rdfs:subPropertyOf nmo:primaryMessageRecipient .

    nmo:cc
          a       rdf:Property ;
          nao:deprecated true ;
          rdfs:comment "deprecated in favor of nmo:emailCc" ;
          rdfs:domain nmo:Email ;
          rdfs:label "cc" ;
          rdfs:range nco:Contact ;
          rdfs:subPropertyOf nmo:secondaryRecipient .

    nmo:emailCc
          a       rdf:Property ;
          rdfs:comment "A Contact that is to receive a cc of the email. A cc (carbon copy) is a copy of an email message whose recipient appears on the recipient list, so that all other recipients are aware of it." ;
          rdfs:domain nmo:Email ;
          rdfs:label "cc" ;
          rdfs:range nco:ContactMedium ;
          rdfs:subPropertyOf nmo:secondaryMessageRecipient .

    nmo:from
          a       rdf:Property ;
          nao:deprecated true ;
          rdfs:comment "deprecated in favor of nmo:messageFrom" ;
          rdfs:domain nmo:Message ;
          rdfs:label "from" ;
          rdfs:range nco:Contact .

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

    nmo:isRead
          a       rdf:Property ;
          rdfs:comment "A flag that states the fact that a MailboxDataObject has been read." ;
          rdfs:domain nmo:Message ;
          rdfs:label "isRead" ;
          rdfs:range xsd:boolean ;
          nrl:maxCardinality 1 .

    nmo:Mailbox
          a       rdfs:Class ;
          rdfs:comment "A mailbox - container for MailboxDataObjects." ;
          rdfs:label "Mailbox" ;
          rdfs:subClassOf nie:InformationElement .

    nmo:MailboxDataObject
          a       rdfs:Class ;
          rdfs:comment "An entity encountered in a mailbox. Most common interpretations for such an entity include Message or Folder" ;
          rdfs:label "MailboxDataObject" ;
          rdfs:subClassOf nie:DataObject .

    nmo:messageHeader
          a       rdf:Property ;
          rdfs:comment "Links the message with an arbitrary message header." ;
          rdfs:domain nmo:Message ;
          rdfs:label "messageHeader" ;
          rdfs:range nmo:MessageHeader .

    nmo:primaryRecipient
          a       rdf:Property ;
          nao:deprecated true ;
          rdfs:comment "deprecated in favor of primaryMessageRecipient" ;
          rdfs:domain nmo:Message ;
          rdfs:label "primaryRecipient" ;
          rdfs:range nco:Contact ;
          rdfs:subPropertyOf nmo:recipient .

    nmo:primaryMessageRecipient
          a       rdf:Property ;
          rdfs:comment "The primary intended recipient of a message." ;
          rdfs:domain nmo:Message ;
          rdfs:label "primaryRecipient" ;
          rdfs:range nco:ContactMedium ;
          rdfs:subPropertyOf nmo:messageRecipient .

    nmo:inReplyTo
          a       rdf:Property ;
          rdfs:comment "Signifies that a message is a reply to another message. This feature is commonly used to link messages into conversations. Note that it is more specific than nmo:references. See RFC 2822 sec. 3.6.4" ;
          rdfs:domain nmo:Message ;
          rdfs:label "inReplyTo" ;
          rdfs:range nmo:Message ;
          rdfs:subPropertyOf nmo:references ;
          nrl:maxCardinality 1 .

    nmo:messageId
          a       rdf:Property ;
          rdfs:comment "An identifier of a message. This property has been inspired by the message-id property defined in RFC 2822, Sec. 3.6.4. It should be used for all kinds of identifiers used by various messaging applications to connect multiple messages into conversations. For email messageids, values are according to RFC2822/sec 3.6.4 and the literal value in RDF must include the brackets." ;
          rdfs:domain nmo:Message ;
          rdfs:label "messageId" ;
          rdfs:range xsd:string ;
          rdfs:subPropertyOf nie:identifier .

    nmo:receivedDate
          a       rdf:Property ;
          rdfs:comment "Date when this message was received." ;
          rdfs:domain nmo:Message ;
          rdfs:label "receivedDate" ;
          rdfs:range xsd:dateTime ;
          rdfs:subPropertyOf dc:date ;
          nrl:maxCardinality 1 .

    nmo:MimeEntity
          a       rdfs:Class ;
          rdfs:comment "A MIME entity, as defined in RFC2045, Section 2.4." ;
          rdfs:label "MimeEntity" ;
          rdfs:subClassOf nie:InformationElement .

    nmo:replyTo
          a       rdf:Property ;
          nao:deprecated true ;
          rdfs:comment "deprecated in favor of nmo:messageReplyTo" ;
          rdfs:domain nmo:Message ;
          rdfs:label "replyTo" ;
          rdfs:range nco:Contact .

    nmo:messageReplyTo
          a       rdf:Property ;
          rdfs:comment "An address where the reply should be sent." ;
          rdfs:domain nmo:Message ;
          rdfs:label "replyTo" ;
          rdfs:range nco:ContactMedium ;
          nrl:maxCardinality 1 .

    nmo:recipient
          a       rdf:Property ;
          nao:deprecated true ;
          rdfs:comment "deprecated in favor of nmo:messageRecipient" ;
          rdfs:domain nmo:Message ;
          rdfs:label "recipient" ;
          rdfs:range nco:Contact .

    nmo:messageRecipient
          a       rdf:Property ;
          rdfs:comment "A common superproperty for all properties that link a message with its recipients. Please don't use this property directly." ;
          rdfs:domain nmo:Message ;
          rdfs:label "recipient" ;
          rdfs:range nco:ContactMedium .

    nmo:bcc
          a       rdf:Property ;
          nao:deprecated true ;
          rdfs:comment "deprecated in favor of nmo:emailBcc" ;
          rdfs:domain nmo:Email ;
          rdfs:label "bcc" ;
          rdfs:range nco:Contact ;
          rdfs:subPropertyOf nmo:secondaryRecipient .

    nmo:emailBcc
          a       rdf:Property ;
          rdfs:comment "A Contact that is to receive a bcc of the email. A Bcc (blind carbon copy) is a copy of an email message sent to a recipient whose email address does not appear in the message." ;
          rdfs:domain nmo:Email ;
          rdfs:label "bcc" ;
          rdfs:range nco:ContactMedium ;
          rdfs:subPropertyOf nmo:secondaryMessageRecipient .

    nmo:secondaryRecipient
          a       rdf:Property ;
          nao:deprecated true ;
          rdfs:comment "deprecated in favor of nmo:secondaryMessageRecipient" ;
          rdfs:domain nmo:Message ;
          rdfs:label "secondaryRecipient" ;
          rdfs:range nco:Contact ;
          rdfs:subPropertyOf nmo:recipient .

    nmo:secondaryMessageRecipient
          a       rdf:Property ;
          rdfs:comment "A superproperty for all \"additional\" recipients of a message." ;
          rdfs:domain nmo:Message ;
          rdfs:label "secondaryRecipient" ;
          rdfs:range nco:ContactMedium ;
          rdfs:subPropertyOf nmo:messageRecipient .

    nmo:contentMimeType
          a       rdf:Property ;
          rdfs:comment """Key used to store the MIME type of the content of an object when it is different from the object's main MIME type. This value can be used, for example, to model an e-mail message whose mime type is\"message/rfc822\", but whose content has type \"text/html\". If not specified, the MIME type of the
content defaults to the value specified by the 'mimeType' property.""" ;
          rdfs:domain nmo:Email ;
          rdfs:label "contentMimeType" ;
          rdfs:range xsd:string ;
          rdfs:subPropertyOf nie:mimeType ;
          nrl:maxCardinality 1 .

    nmo:plainTextMessageContent
          a       rdf:Property ;
          rdfs:comment "Plain text representation of the body of the message. For multipart messages, all parts are concatenated into the value of this property. Attachments, whose mimeTypes are different from text/plain or message/rfc822 are considered separate DataObjects and are therefore not included in the value of this property." ;
          rdfs:domain nmo:Message ;
          rdfs:label "plainTextMessageContent" ;
          rdfs:range xsd:string ;
          rdfs:subPropertyOf nie:plainTextContent .

    nmo:Message
          a       rdfs:Class ;
          rdfs:comment "A message. Could be an email, instant messanging message, SMS message etc." ;
          rdfs:label "Message" ;
          rdfs:subClassOf nie:InformationElement .

    nmo:htmlMessageContent
          a       rdf:Property ;
          rdfs:comment "HTML representation of the body of the message. For multipart messages, all parts are concatenated into the value of this property. Attachments, whose mimeTypes are different from text/plain or message/rfc822 are considered separate DataObjects and are therefore not included in the value of this property." ;
          rdfs:domain nmo:Message ;
          rdfs:label "htmlMessageContent" ;
          rdfs:range xsd:string ;
          rdfs:subPropertyOf nie:htmlContent .

    nmo:sentDate
          a       rdf:Property ;
          rdfs:comment "Date when this message was sent." ;
          rdfs:domain nmo:Message ;
          rdfs:label "sentDate" ;
          rdfs:range xsd:dateTime ;
          rdfs:subPropertyOf dc:date , nie:contentCreated ;
          nrl:maxCardinality "1" .

    nmo:sender
          a       rdf:Property ;
          nao:deprecated true ;
          rdfs:comment "deprecated in favor of nmo:messageSender" ;
          rdfs:domain nmo:Message ;
          rdfs:label "sender" ;
          rdfs:range nco:Contact ;
          rdfs:subPropertyOf nmo:recipient .

    nmo:messageSender
          a       rdf:Property ;
          rdfs:comment "The person or agent submitting the message to the network, if other from the one given with the nmo:from property. Defined in RFC 822 sec. 4.4.2" ;
          rdfs:domain nmo:Message ;
          rdfs:label "sender" ;
          rdfs:range nco:ContactMedium ;
          rdfs:subPropertyOf nmo:messageRecipient ;
          nrl:maxCardinality 1 .

    nmo:headerName
          a       rdf:Property ;
          rdfs:comment "Name of the message header." ;
          rdfs:domain nmo:MessageHeader ;
          rdfs:label "headerName" ;
          rdfs:range xsd:string ;
          nrl:maxCardinality "1" .

    nmo:headerValue
          a       rdf:Property ;
          rdfs:comment "Value of the message header." ;
          rdfs:domain nmo:MessageHeader ;
          rdfs:label "headerValue" ;
          rdfs:range xsd:string ;
          nrl:maxCardinality "1" .

    nmo:hasAttachment
          a       rdf:Property ;
          rdfs:comment "Links a message with files that were sent as attachments." ;
          rdfs:domain nmo:Message ;
          rdfs:label "hasAttachment" ;
          rdfs:range nfo:Attachment ;
          rdfs:subPropertyOf nie:hasPart .
}

<http://www.semanticdesktop.org/ontologies/2007/03/22/nmo_metadata#> {<http://www.semanticdesktop.org/ontologies/2007/03/22/nmo_metadata#>
          a       nrl:GraphMetadata ;
          nrl:coreGraphMetadataFor
                  nmo: .

    nmo:  a       nrl:Ontology ;
          nao:creator <http://www.dfki.uni-kl.de/~mylka> ;
          nao:hasDefaultNamespace
                  "http://www.semanticdesktop.org/ontologies/2007/03/22/nmo#" ;
          nao:hasDefaultNamespaceAbbreviation
                  "nmo" ;
          nao:lastModified "2011-05-11T18:08:45.656Z" ;
          nao:status "Unstable" ;
          nao:updatable "0 " ;
          nao:version "0.11.0" ;
          nao:prefLabel "Nepomuk Message Ontology" ;
          nao:description "The Nepomuk Message Ontology extends the Nepomuk Information Element framework into the domain of messages. Kinds of messages covered by NMO include Emails and instant messages." .
}

