#
# Copyright (c) 2011-2012 Ivan Cukic <ivan.cukic@kde.org>
# Copyright (c) 2010-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 xsd:     <http://www.w3.org/2001/XMLSchema#> .
@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .

@prefix nao:     <http://www.semanticdesktop.org/ontologies/2007/08/15/nao#> .
@prefix nrl:     <http://www.semanticdesktop.org/ontologies/2007/08/15/nrl#> .
@prefix nfo:     <http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#> .

@prefix kao:    <http://nepomuk.kde.org/ontologies/2012/02/29/kao#> .

kao: {
    kao:Activity
          a rdfs:Class ;
          rdfs:subClassOf rdfs:Resource ;
          rdfs:label "activity" ;
          rdfs:comment "An abstract concept to handle various user's activities." .

    kao:usedActivity
          a rdf:Property ;
          rdfs:label "used activity" ;
          rdfs:comment "The activity that was active when resource was created. This is mostly used for graphs or resource events." ;
          rdfs:domain rdfs:Resource ;
          rdfs:range kao:Activity ;
          nrl:maxCardinality 1 ;
          nao:userVisible false .

    kao:activityIdentifier
          a rdf:Property ;
          rdfs:subPropertyOf nao:identifier ;
          rdfs:label "activity identifier" ;
          rdfs:comment "The unique ID of the activity as used outside of Nepomuk. This is a UUID. Anything else can be considered invalid." ;
          rdfs:domain kao:Activity ;
          rdfs:range xsd:string ;
          nrl:cardinality 1 ;
          nao:userVisible false .

    kao:ResourceScoreCache
          a rdfs:Class ;
          rdfs:subClassOf rdfs:Resource ;
          rdfs:label "Resource score cache" ;
          rdfs:comment "For storing the automatically calculated score based on the usage statistics" ;
          nao:userVisible false .

    kao:targettedResource
          a rdf:Property ;
          rdfs:comment "Resource for which the score is calculated." ;
          rdfs:domain kao:ResourceScoreCache ;
          rdfs:label "resource" ;
          rdfs:range rdfs:Resource ;
          nrl:maxCardinality "1" .

    kao:initiatingAgent
          a rdf:Property ;
          rdfs:comment "Relates the score to the agent initiating the events." ;
          rdfs:domain kao:ResourceScoreCache ;
          rdfs:label "involved agent" ;
          rdfs:range nao:Agent ;
          nrl:maxCardinality "1" .

    kao:cachedScore
          a rdf:Property ;
          rdfs:subPropertyOf nao:score ;
          rdfs:comment "The automatically calculated score" ;
          rdfs:domain kao:ResourceScoreCache ;
          rdfs:label "calculated score" ;
          rdfs:range xsd:float ;
          nrl:maxCardinality "1" .
}

<http://nepomuk.kde.org/ontologies/2012/02/29/kao/metadata> {
    <http://nepomuk.kde.org/ontologies/2012/02/29/kao/metadata>
          a       nrl:GraphMetadata ;
          nrl:coreGraphMetadataFor kao: .

    kao:
          a       nrl:Ontology , nrl:DocumentGraph ;
          nao:prefLabel "KDE Activities Ontology" ;
          nao:hasDefaultNamespace "http://nepomuk.kde.org/ontologies/2012/02/29/kao#" ;
          nao:hasDefaultNamespaceAbbreviation "kao" ;
          nao:lastModified "2012-03-31T20:32:00Z" ;
          nao:serializationLanguage "TriG" ;
          nao:status "Unstable" ;
          nrl:updatable "0" ;
          nao:version "3" .
}

