@base <http://linkeddata.center/kees/v1> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix : <#> .
@prefix void: <http://rdfs.org/ns/void#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix llo: <http://lodlaundromat.org/ontology/> .
@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix prov: <http://www.w3.org/ns/prov#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix wv: <http://vocab.org/waiver/terms/norms> .

<>
    dc:creator "Enrico Fagnoni"@en ;
    dc:description <https://raw.githubusercontent.com/linkeddatacenter/kees/master/v1/images/uml.png>, "KEES ontology Defines few new terms used in KEES Language Application as defined in http://linkeddata.center/kees"@en ;
    dc:rights "The KEES ontology is available under the Creative Commons Attribution 4.0 Unported license; see http://creativecommons.org/licenses/by/4.0/. In a nutshell, you are free to copy, distribute and transmit the work; to remix/adapt the work (e.g. to import the ontology and create specializations of its elements), as long as you 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). Proper Attribution: Simply include the statement \"This work is based on the KEES ontology, developed by Enrico Fagnoni\" and link back to http:/linkeddata.center/kees/v1"@en ;
    dc:title "The KEES Vocabulary"@en ;
    dcterms:license <http://creativecommons.org/licenses/by/4.0/> ;
    a owl:Ontology ;
    rdfs:label "KEES Ontology"@en ;
    owl:versionInfo "V 1.2.3 Release 2019-01-22" ;
    foaf:homepage <.> .

:AccrualPolicy
    a owl:Class ;
    rdfs:comment """A KEES agent MUST recognize kees:modify and kees:create individuals as valid object for dct:accrualPolicy property in a kees:Plan. In case of inconsistencies or if no dct:accrualPolicy property is specified, the agent MUST choose kees:create.

If the accrual policy is kees:create, the named graph and all related metadata MUST be deleted and recreated BEFORE to execute accrual policies."""@en ;
    rdfs:label "AccrualPolicy"@en .

:KnowledgeBase
    a owl:Class ;
    rdfs:comment "A container of linked data with a purpose, that is a related set information that can be composed to provide answer to some questions."@en ;
    rdfs:label "KnowledgeBase"@en .

:KnowledgeBaseDescription
    a owl:Class ;
    rdfs:comment "A document describing a knowledge base configuration. A KEES Agent should be able to rebuild the whole knowlege graph just looking to the KEES configuration."@en ;
    rdfs:label "KnowledgeBaseDescription"@en .

:Plan
    a owl:Class ;
    rdfs:comment "A subclass of a prov:Plan. States a named graph accual activity plan"@en ;
    rdfs:label "Plan"@en ;
    rdfs:subClassOf [
        a owl:Restriction ;
        owl:onProperty :changes ;
        owl:someValuesFrom owl:Thing
    ], [
        a owl:Restriction ;
        owl:onClass :AccrualPolicy ;
        owl:onProperty :accrualPolicy ;
        owl:qualifiedCardinality "1"^^xsd:nonNegativeInteger
    ], [
        a owl:Restriction ;
        owl:cardinality "1"^^xsd:nonNegativeInteger ;
        owl:onProperty :builds
    ] .

:Question
    a owl:Class ;
    rdfs:comment "The Question represents the reason for the the knowledge base existence. In other words, the knoledge base exists to answer to questions. Question are natural language expressions that can be expressed as parametric SPARQL queries on a populated knowledge graph. The answer to a question can be a table of data, a structured document, a boolean or a translation of these in a natural language sentences."@en ;
    rdfs:label "Question"@en .

<#accrual:accrualPeriodicity>
    a owl:FunctionalProperty, owl:ObjectProperty ;
    rdfs:comment "The frequency with which data are added to a knowledge base."@en ;
    rdfs:domain :Plan ;
    rdfs:label "accrualPeriodicity"@en .

:accrualPolicy
    a owl:FunctionalProperty, owl:ObjectProperty ;
    rdfs:comment "The policy governing the addition of items to a collection."@en ;
    rdfs:domain :Plan ;
    rdfs:label "accrualPolicy"@en ;
    rdfs:range :AccrualPolicy .

:answerMethod
    a owl:ObjectProperty ;
    rdfs:comment "The method used to answer a question"@en ;
    rdfs:label "answerMethod"@en .

:answers
    a owl:FunctionalProperty, owl:ObjectProperty ;
    rdfs:comment "answer a question"@en ;
    rdfs:domain :KnowledgeBase ;
    rdfs:label "answers"@en ;
    rdfs:range :Question .

:append
    a :AccrualPolicy, owl:NamedIndividual ;
    rdfs:comment "An accrual policy where the data ar appended to existing named graphs"@en ;
    rdfs:label "update"@en .

:asserts
    a owl:FunctionalProperty, owl:ObjectProperty ;
    rdfs:comment "a reasoning that mus eval to true."@en ;
    rdfs:domain :Plan ;
    rdfs:label "asserts"@en .

:builds
    a owl:FunctionalProperty, owl:InverseFunctionalProperty, owl:ObjectProperty ;
    rdfs:comment "Relates to the target graph name. That contains metadata and data derived from a KEES agent activities."@en ;
    rdfs:domain :Plan ;
    rdfs:label "builds"@en ;
    rdfs:subPropertyOf owl:topObjectProperty .

:changes
    a owl:FunctionalProperty, owl:ObjectProperty ;
    rdfs:comment """Specifies that the referenced URI is changed by the KEES Plan execution. 
URI MUST be a graph name. The resource referenced by keees:builds property must always referenced also by this property."""@en ;
    rdfs:domain :Plan ;
    rdfs:label "changes"@en .

:destructor
    a owl:ObjectProperty ;
    rdfs:comment "Specifies a resource (normally a SPIN Update resource) that destroies all resouces created by constructor. If not specified by default, to destroy all resources  generated by constructod just drop all changed named graph referred from kees:changes property."@en ;
    rdfs:label "destructor"@en .

:from
    a owl:FunctionalProperty, owl:ObjectProperty ;
    rdfs:comment "Specify the constructor of a plan. A constructor can be a  data source or any resource that a KEES agent can understand (.e.g. a SPIN Construct ou Insert resource)"@en, "from"@en ;
    rdfs:domain :Plan .

:guard
    a owl:NamedIndividual ;
    rdfs:comment "A SPARQL service description feature that states that the RDF store supports KEES guard specifications"@en ;
    rdfs:label "guard"@en .

:planSequence
    a owl:FunctionalProperty, owl:ObjectProperty ;
    rdfs:comment """It is a shortcut to specify plan dependencies. 
For example:

ex:kb kees:workflow ( ex:plan1 ex:plan2)`
means that 
ex:plan2 kees:requires ex:plan1"""@en ;
    rdfs:domain :KnowledgeBase ;
    rdfs:label "workflow"@en .

:replace
    a :AccrualPolicy, owl:NamedIndividual ;
    rdfs:comment "An accrual policy where the named graph is re-created on data change"@en ;
    rdfs:isDefinedBy <:> ;
    rdfs:label "create"@en .

:requires
    a owl:FunctionalProperty, owl:ObjectProperty ;
    rdfs:comment "The referenced object must be interpreted as the :name of a named graph (  to be created or to be update). At least one kees:required named graph imust be  newer tha the target graph."@en ;
    rdfs:domain :Plan ;
    rdfs:label "requires"@en .

:sharableKnowledge
    a :KnowledgeBase, owl:NamedIndividual ;
    rdfs:comment "The default name for all  shared knowledge bases"@en ;
    rdfs:label "sharableKnowledge"@en .

:sparqlQueryAskOperation
    a rdfs:Datatype ;
    rdfs:comment "States the datatype of a literal string containing a sparql query ASK operation."@en ;
    rdfs:label "SPARQL  query ask operation"@en .

:sparqlQueryConstructOperation
    a rdfs:Datatype ;
    rdfs:comment "States the datatype of a literal string containing a sparql query CONSTRUCT operation."@en ;
    rdfs:label "SPARQL query construct operation"@en .

:sparqlQueryDescribeOperation
    a rdfs:Datatype ;
    rdfs:comment "States the datatype of a literal string containing a sparql query DESCRIBE operation"@en ;
    rdfs:label "SPARQL query describe operation"@en .

:sparqlQuerySelectOperation
    a rdfs:Datatype ;
    rdfs:comment "States the datatype of a literal string containing a sparql query SELECT operation."@en ;
    rdfs:label "SPARQL query select operation"@en .

:sparqlUpdateScript
    a rdfs:Datatype ;
    rdfs:comment "States the datatype of a literal string containing a sparql update scrirpt."@en ;
    rdfs:label "SPARQL update script"@en .

:trustGraphMetric
    a owl:NamedIndividual ;
    rdfs:comment "defines a metric that evaluate a trust value for a graph with a specific name. All can be used in graph quality observations."@en ;
    rdfs:label "trustGraphMetric"@en .

:workflow
    a owl:FunctionalProperty, owl:ObjectProperty ;
    rdfs:comment """relates to a RDF list of kees:Plan.  The list order determine the
plan execution."""@en ;
    rdfs:domain :KnowledgeBase ;
    rdfs:label "workflow"@en .

dc:contributor
    a owl:AnnotationProperty .

dc:creator
    a owl:AnnotationProperty .

dc:description
    a owl:AnnotationProperty .

dc:modifed
    a owl:AnnotationProperty .

dc:rights
    a owl:AnnotationProperty .

dc:subject
    a owl:AnnotationProperty .

dc:title
    a owl:AnnotationProperty .

dcterms:license
    a owl:AnnotationProperty .

xsd:success
    rdfs:label "has input"@en ;
    owl:priorVersion "task  processor input as a json structure."@en .

owl:deprecated
    a owl:AnnotationProperty .

foaf:homepage
    a owl:AnnotationProperty .

[]
    a owl:AllDifferent ;
    owl:distinctMembers (:append
        :replace
    ) .

