@prefix cc:    <http://creativecommons.org/ns#> .
@prefix owl:   <http://www.w3.org/2002/07/owl#> .
@prefix rdf:   <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix ottr:  <http://ns.ottr.xyz/0.4/> .
@prefix skos:  <http://www.w3.org/2004/02/skos/core#> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix rdfs:  <http://www.w3.org/2000/01/rdf-schema#> .
@prefix vann:  <http://purl.org/vocab/vann/> .
@prefix foaf:  <http://xmlns.com/foaf/0.1/> .
@prefix dc:    <http://purl.org/dc/elements/1.1/> .

ottr:default  a          owl:AnnotationProperty ;
        rdfs:domain      ottr:Parameter ;
        skos:definition  "Sets an optional default value of a parameter. The default value is used in case an argument value is unspecified or ottr:none." .

ottr:parameters  a       owl:AnnotationProperty ;
        rdfs:domain      ottr:Signature ;
        skos:definition  "Associates a signature with one required list of parameters." .

ottr:pattern  a          owl:AnnotationProperty ;
        rdfs:domain      ottr:Template ;
        rdfs:range       ottr:Instance ;
        skos:definition  "Associates a template with an optional set of pattern instances." .

ottr:zipMax  a           ottr:ExpansionModifier ;
        skos:definition  "zipMax is an expansion modifier which sets the list expansion operation to zip, extending smaller list to the lenght of the longest list by appending empty values." .

ottr:cross  a            ottr:ExpansionModifier ;
        skos:definition  "cross is an expansion modifier which sets the list expansion operation to cross product." .

ottr:Template  rdfs:subClassOf  ottr:Signature ;
        skos:definition  "A *template* is a signature that additionally specifies a pattern. The pattern, which is a set of instances, determines the result of the direct expansion (1-step expansion) of an instance of the template." .

ottr:variable  a         owl:AnnotationProperty ;
        rdfs:domain      ottr:Parameter ;
        skos:definition  "Sets the required variable of a parameter." .

ottr:none  a             owl:Thing ;
        skos:definition  "none is an individual which is used to designate a missing argument value." .

ottr:ExpansionModifier
        skos:definition  "An *expansion modifier* is a flag or marker that is used to alter the behaviour of expanding the marked instance" ;
        skos:note        "See also the instances of the class. Rename to InstanceModifier?" .

<http://spec.ottr.xyz/wOTTR/0.4/core-vocabulary>
        a                              owl:Ontology ;
        rdfs:label                     "Reasonable Ontology Templates (OTTR)" ;
        rdfs:seeAlso                   <http://spec.ottr.xyz/wOTTR/0.4/> ;
        cc:licence                     <https://creativecommons.org/licenses/by/4.0/> ;
        dc:abstract                    "Reasonable Ontology Templates (OTTR) is a language for representing ontology modelling patterns, and is designed to support interaction with OWL or RDF knowledge bases at a higher level of abstraction, using modelling patterns rather than OWL axioms or RDF triples. This includes: (1) building knowledge bases by instantiating templates; (2) retrieving information from the knowledge base by querying for instances of templates; communicating (presenting, transferring and visualising) the knowledge base as a set of template instances at different levels of abstraction; (3) and securing and improving the quality and sustainability of the knowledge base via structural and semantic analysis of the templates used to construct the knowledge base." ;
        dc:contributor                 <http://folk.uio.no/leifhka/> ;
        dc:creator                     <http://folk.uio.no/martige/foaf#me> ;
        dc:date                        "2019-03-28" ;
        dc:description                 "This ontology defines the RDF serialisation of Reasonable Ontology Templates (OTTR), called Web Reasonable Ontology Templates (wOTTR)." ;
        dc:title                       "Reasonable Ontology Templates (OTTR)" ;
        dcterms:bibliographicCitation  "Martin G. Skjæveland, Daniel P. Lupp, Leif Harald Karlsen, and Henrik Forssell. Practical Ontology Pattern Instantiation, Discovery, and Maintenance with Reasonable Ontology Templates In: Vrandečić D. et al. (eds) The Semantic Web—ISWC 2018. ISWC 2018. LNCS vol 11136. Springer. 2018." ;
        vann:preferredNamespacePrefix  "ottr" ;
        vann:preferredNamespaceURI     "http://ns.ottr.xyz/0.4/" ;
        owl:incompatibleWith           <http://ns.ottr.xyz/version/templates-core-0.3.owl> ;
        owl:priorVersion               <http://ns.ottr.xyz/version/templates-core-0.3.owl> ;
        owl:versionInfo                "0.4.0" ;
        foaf:logo                      "https://ottr.xyz/logo/wOTTR.jpg" .

ottr:modifier  a  owl:AnnotationProperty .

ottr:Parameter  skos:definition  "A *parameter* specifies the variable terms or resources of a pattern and the permissible values for the corresponding instance arguments." .

ottr:Instance  skos:definition  "An *instance* is an instantiation of a signature, template or base template. The instance must refer to a signature and provide arguments that match the corresponding parameters of the signature." .

ottr:ArgumentModifier
        skos:definition  "An *argument modifier* is a flag or marker that is used to identify the argument that play a special role in modified expansions. See also ExpansionModifier." ;
        skos:note        "See also the instances of the class." .

ottr:value  a            owl:AnnotationProperty ;
        rdfs:domain      ottr:Argument ;
        skos:definition  "Associates an argument with its argument value." .

ottr:optional  a         ottr:ParameterModifier ;
        skos:definition  "optional is a parameter modifier which makes the value none a permissible instance argument value for this parameter." .

ottr:Argument  skos:definition  "An *argument* specifies an input value for a given instance." .

ottr:nonBlank  a         ottr:ParameterModifier ;
        skos:definition  "nonBlank is a parameter modifier which makes blank nodes illegal instance argument values for this parameter." .

ottr:annotation  a       owl:AnnotationProperty ;
        rdfs:domain      ottr:Signature ;
        rdfs:range       ottr:Instance ;
        skos:definition  "Associates a signature with an optional set of annotation instances." .

ottr:listExpand  a       ottr:ArgumentModifier ;
        skos:definition  "listExpand is an argument modifier that selects arguments for list expansion." .

ottr:BaseTemplate  rdfs:subClassOf  ottr:Signature ;
        skos:definition  "A *base template* is a signature with no pattern. The expansion of an instance of a base template is the instance itself." .

ottr:values  a           owl:AnnotationProperty ;
        rdfs:domain      ottr:Instance ;
        skos:definition  "Associates an instance with a list of argument values" .

ottr:Triple  a           ottr:BaseTemplate ;
        ottr:parameters  ( [ ottr:type      ottr:IRI ;
                             ottr:variable  [] 
                           ]
                           [ ottr:modifier  ottr:nonBlank ;
                             ottr:type      ottr:IRI ;
                             ottr:variable  [] 
                           ]
                           [ ottr:type      rdfs:Resource ;
                             ottr:variable  [] 
                           ]
                         ) .

ottr:arguments  a        owl:AnnotationProperty ;
        rdfs:domain      ottr:Instance ;
        skos:definition  "Associates an instance with a list of arguments." .

ottr:type  a             owl:AnnotationProperty ;
        rdfs:domain      ottr:Parameter ;
        skos:definition  "Sets an optional type of a parameter. A missing type implicitly sets the type to the most general type." .

ottr:Signature  skos:definition  "A *signature* specifies the permissible input for instances. It does this through its list of parameters. The IRI of the signature is a unique name that its instances must reference." .

ottr:zipMin  a           ottr:ExpansionModifier ;
        skos:definition  "zipMin is an expansion modifier which sets the list expansion operation to zip with the shortest list as length." .

ottr:ParameterModifier
        skos:definition  "A *parameter modifier* is a flag or marker that is set on a parameter to alter the permissible corresponding argument values and/or the behaviour of expanding instances." ;
        skos:note        "See also the instances of the class." .

ottr:of  a               owl:AnnotationProperty ;
        rdfs:domain      ottr:Instance ;
        rdfs:range       ottr:Signature ;
        skos:definition  "Associates an instance with its required signature." .
