# Copyright 2016 ITEA 12004 SEAS Project.
# 
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# 
#      http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing,
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix max: <http://maxime-lefrancois.info/me#> .
@prefix vann: <http://purl.org/vocab/vann/> .
@prefix voaf: <http://purl.org/vocommons/voaf#> .
@prefix vs: <http://www.w3.org/2003/06/sw-vocab-status/ns#> .
@prefix dc: <http://purl.org/dc/terms/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/>.
@prefix cc: <http://creativecommons.org/ns#>.
@prefix az: <http://zimmer.aprilfoolsreview.com/antoine#> .
@prefix fn: <http://semweb.mmlab.be/ns/function#> .
@prefix lindt: <http://w3id.org/lindt/voc#> .

<http://w3id.org/lindt/voc#> a owl:Ontology, voaf:Vocabulary, foaf:Document;
  dc:title "The lindt Vocabulary "@en ;
  dc:description """The lindt (Linked Datatypes) vocabulary describes custom datatypes. 
This vocabulary may be used by RDF processors and SPARQL engines to recognize custom datatypes on the fly.


See also:

- [The Specification](spec.html)
- [The Ontology](index.ttl)
- [Some custom datatypes](custom_datatypes)

"""@en ;
  dc:issued "2016-04-22"^^xsd:date ;
  dc:modified  "2016-04-22T10:42:42+02:00"^^xsd:dateTime ;
  dc:modified  "2016-06-03T10:46:00+02:00"^^xsd:dateTime ;
  dc:modified "2016-04-22"^^xsd:date ;
  dc:creator max:, az:me ;
  vann:preferredNamespacePrefix "lindt" ;
  vann:preferredNamespaceUri <http://w3id.org/lindt/voc#> ;
  cc:license <https://www.apache.org/licenses/LICENSE-2.0> ;
  rdfs:seeAlso <https://w3id.org/lindt/spec.html> ;
  owl:imports <http://semweb.mmlab.be/ns/function> .

<http://w3id.org/lindt/voc.ttl>  a  foaf:Document;
    dc:creator  max:, az:me .


lindt:Datatype a owl:Class ;
  rdfs:subClassOf [ owl:onProperty lindt:implements ; owl:hasValue lindt:getIri ] ;
  rdfs:subClassOf [ owl:onProperty lindt:implements ; owl:hasValue lindt:getRecognisedDatatypes ] ;
  rdfs:subClassOf [ owl:onProperty lindt:implements ; owl:hasValue lindt:importLiteral ] ;
  rdfs:subClassOf [ owl:onProperty lindt:implements ; owl:hasValue lindt:exportLiteral ] ;
  rdfs:subClassOf [ owl:onProperty lindt:implements ; owl:hasValue lindt:getNormalForm ] ;
  rdfs:subClassOf [ owl:onProperty lindt:implements ; owl:hasValue lindt:isWellFormed ] ;
  rdfs:subClassOf [ owl:onProperty lindt:implements ; owl:hasValue lindt:recognisesDatatype ] ;
  rdfs:subClassOf [ owl:onProperty lindt:implements ; owl:hasValue lindt:isEqual ] ;
  rdfs:label "Datatype"@en ;
  rdfs:comment """The class of Linked Datatypes, that RDF processors and SPARQL engines should be able to recognize on the fly."""@en ;
  rdfs:subClassOf rdfs:Datatype ;
  vs:term_status "testing" ;
  rdfs:seeAlso <https://w3id.org/lindt/spec.html> ;
  rdfs:isDefinedBy <http://w3id.org/lindt/voc#> .

lindt:CompoundDatatype  a  owl:Class;
   rdfs:comment  "The class of datatypes that are composed of multiple values inside delimiting characters and separated by a certain string. For instance \"(0.234,846)\"^^my:pair."@en;
   rdfs:label  "compound datatype"@en;
   rdfs:subClassOf  lindt:Datatype ;
   vs:term_status "testing" ;
   rdfs:isDefinedBy <http://w3id.org/lindt/voc#> .

lindt:ListDatatype  a  owl:Class;
   rdfs:comment  "The class of datatypes where literals consist of a starting string, followed by a possibly empty list of values in a given datatype separated by a separating string, and finishing with an ending string. For instance \"{35,42,12000,14,-3,33}\"^^my:ListOfIntegers."@en;
   rdfs:label  "list datatype"@en;
   rdfs:subClassOf  lindt:CompoundDatatype ;
   vs:term_status "testing" ;
   rdfs:isDefinedBy <http://w3id.org/lindt/voc#> .

lindt:TupleDatatype  a  owl:Class;
   rdfs:comment  "The class of datatypes where literals consist of a starting string, followed by a sequence of values from a predefined list of datatypes. For instance \"(2013-10-09T11:14:22Z,129,metre)\"^^my:sensorData."@en;
   rdfs:label  "tuple datatype"@en;
   rdfs:subClassOf  lindt:CompoundDatatype ;
   vs:term_status "testing" ;
   rdfs:isDefinedBy <http://w3id.org/lindt/voc#> .

lindt:hasComponentType  a  owl:ObjectProperty ;
   rdfs:comment  "The datatype of the components of a list in this list datatype. For instance, the list datatype my:ListOfIntegers, having literals such as \"{35,42,12000,14,-3,33}\"^^my:ListOfIntegers, has component type xsd:integer."@en;
   rdfs:domain  lindt:ListDatatype;
   rdfs:label  "has component type"@en;
   rdfs:range  rdfs:Datatype ;
   vs:term_status "testing" ;
   rdfs:isDefinedBy <http://w3id.org/lindt/voc#> .

lindt:hasComponentTypes  a  rdf:Property;
   rdfs:comment  "The datatypes of the components of a tuple in this tuple datatype. For instance, the tuple datatype my:sensorData, having literals such as \"(2013-10-09T11:14:22Z,129,metre)\"^^my:sensorData, has component types (xsd:dateTime, xsd:integer, xsd:string)."@en;
   rdfs:domain  lindt:TupleDatatype;
   rdfs:label  "has component types"@en;
   rdfs:range  rdf:List ;
   vs:term_status "testing" ;
   rdfs:isDefinedBy <http://w3id.org/lindt/voc#> .

lindt:literalsEndWith  a  owl:DatatypeProperty , owl:FunctionalProperty ;
   rdfs:comment  "The string that must be present at the end of a literal of a compound datatype, when excluding the starting string. For instance \")\"."@en;
   rdfs:domain  lindt:CompoundDatatype;
   rdfs:label  "literals end with"@en;
   rdfs:range  xsd:string ;
   vs:term_status "testing" ;
   rdfs:isDefinedBy <http://w3id.org/lindt/voc#> .

lindt:literalsStartWith  a  owl:DatatypeProperty , owl:FunctionalProperty ;
   rdfs:comment  "The string that must be present at the beginning of a literal of a compound datatype. For instance \"(\"."@en;
   rdfs:domain  lindt:CompoundDatype;
   rdfs:label  "literals start with"@en;
   rdfs:range  xsd:string ;
   vs:term_status "testing" ;
   rdfs:isDefinedBy <http://w3id.org/lindt/voc#> .

lindt:separator  a  owl:DatatypeProperty , owl:FunctionalProperty ;
   rdfs:comment  "The string that must separate two values within a literal of a compound datatype. For instance \",\"."@en;
   rdfs:domain  lindt:CompoundDatatype;
   rdfs:label  "separator"@en;
   rdfs:range  xsd:string ;
   vs:term_status "testing" ;
   rdfs:isDefinedBy <http://w3id.org/lindt/voc#> .

lindt:base a owl:ObjectProperty ;
   rdfs:label "base"@en ;
   rdfs:comment """Links a datatype to one of its base datatype: 
(1) the lexical space of the subject datatype includes the lexical space of the object datatype; 
(2) the lexical-to-value mapping of the subject extends the lexical-to-value mapping of the object;
(3) the ordering of lexical forms for the subject datatype extends the ordering of lexical forms of the object."""@en ;
  rdfs:domain lindt:Datatype ;
  rdfs:range lindt:Datatype ;
  vs:term_status "testing" ;
  rdfs:seeAlso <https://w3id.org/lindt/spec.html> ;
  rdfs:isDefinedBy <http://w3id.org/lindt/voc#> .  


lindt:implements a owl:ObjectProperty ;
  rdfs:label "implements"@en ;
  rdfs:comment """Links a datatype to the name of a function that the object representing this datatype should implement."""@en ;
  rdfs:domain lindt:Datatype ;
  rdfs:range lindt:Function ;
  vs:term_status "testing" ;
  rdfs:seeAlso <https://w3id.org/lindt/spec.html> ;
  rdfs:isDefinedBy <http://w3id.org/lindt/voc#> .   


lindt:Function a owl:Class ;
  rdfs:label "Function"@en ;
  rdfs:comment """The class of functions that objects representing lindt datatype implement."""@en ;
  rdfs:subClassOf fn:Function ;
  vs:term_status "testing" ;
  rdfs:seeAlso <https://w3id.org/lindt/spec.html> ;
  rdfs:isDefinedBy <http://w3id.org/lindt/voc#> .   

lindt:compare a lindt:Function ; 
  rdfs:label "compare"@en ;
  fn:name "compare" ;
  rdfs:comment """Answers if the value of literal with lexical form lexicalForm1 and this datatype is lower, equal, or greater than the value of literal with lexical form lexicalForm2 and datatype identified by IRI datatypeIri2."""@en ;
  fn:expects ( 
    [ a fn:Parameter ; fn:name "lexicalForm1" ; fn:type xsd:string ; fn:nullable false ; fn:required true ] 
    [ a fn:Parameter ; fn:name "lexicalForm2" ; fn:type xsd:string ; fn:nullable false ; fn:required true ] 
    [ a fn:Parameter ; fn:name "datatypeIri2" ; fn:type xsd:string ; fn:nullable false ; fn:required false ] 
  ) ;
  fn:outputs [ a fn:Output ; fn:type xsd:integer ] ;
  vs:term_status "testing" ;
  rdfs:seeAlso <https://w3id.org/lindt/spec.html> ;
  rdfs:isDefinedBy <http://w3id.org/lindt/voc#> .   

lindt:exportLiteral a lindt:Function ;
  rdfs:label "exportLiteral"@en ;
  fn:name "exportLiteral" ;
  rdfs:comment """Answers the lexical form of a literal with datatype identified by datatypeIri, with a value equal to that of a literal with lexical form lexicalForm and this datatype."""@en ;
  fn:expects ( 
    [ fn:name "lexicalForm" ; fn:type xsd:string ; fn:nullable false ; fn:required true ] 
    [ fn:name "datatypeIri" ; fn:type xsd:string ; fn:nullable false ; fn:required true ] 
  ) ;
  fn:outputs [ fn:type xsd:string ] ;
  vs:term_status "testing" ;
  rdfs:seeAlso <https://w3id.org/lindt/spec.html> ;
  rdfs:isDefinedBy <http://w3id.org/lindt/voc#> .   

lindt:getIri a lindt:Function ;
  rdfs:label "getIri"@en ;
  fn:name "getIri" ;
  rdfs:comment """Returns the IRI of this custom datatype."""@en ;
  fn:expects ( ) ;
  fn:outputs [ fn:type xsd:string ] ;
  vs:term_status "testing" ;
  rdfs:seeAlso <https://w3id.org/lindt/spec.html> ;
  rdfs:isDefinedBy <http://w3id.org/lindt/voc#> .   

lindt:getNormalForm a lindt:Function ;
  rdfs:label "getNormalForm"@en ;
  fn:name "getNormalForm" ;
  rdfs:comment """Answers the normalized lexical form of the literal with lexical form lexicalForm and this datatype."""@en ;
  fn:expects ( 
    [ fn:name "lexicalForm" ; fn:type xsd:string ; fn:nullable false ; fn:required true ] 
  ) ;
  fn:outputs [ fn:type xsd:string ] ;
  vs:term_status "testing" ;
  rdfs:seeAlso <https://w3id.org/lindt/spec.html> ;
  rdfs:isDefinedBy <http://w3id.org/lindt/voc#> .   

lindt:getRecognisedDatatypes a lindt:Function ;
  rdfs:label "getRecognisedDatatypes"@en ;
  fn:name "getRecognisedDatatypes" ;
  rdfs:comment """Answers an array of datatypes IRI this custom datatype recognises."""@en ;
  fn:expects ( ) ;
  fn:outputs [ fn:type lindt:stringListDatatype ] ;
  vs:term_status "testing" ;
  rdfs:seeAlso <https://w3id.org/lindt/spec.html> ;
  rdfs:isDefinedBy <http://w3id.org/lindt/voc#> .   

lindt:importLiteral a lindt:Function ;
  rdfs:label "importLiteral"@en ;
  fn:name "importLiteral" ;
  rdfs:comment """Answers the lexical form of a literal with this datatype, with a value equal to that of a literal with lexical form lexicalForm and datatype identified by datatypeIri."""@en ;
  fn:expects ( 
    [ fn:name "lexicalForm" ; fn:type xsd:string ; fn:nullable false ; fn:required true ] 
    [ fn:name "datatypeIri" ; fn:type xsd:string ; fn:nullable false ; fn:required true ] 
  ) ;
  fn:outputs [ fn:type xsd:string ] ;
  vs:term_status "testing" ;
  rdfs:seeAlso <https://w3id.org/lindt/spec.html> ;
  rdfs:isDefinedBy <http://w3id.org/lindt/voc#> .   

lindt:isEqual a lindt:Function ;
  rdfs:label "isEqual"@en ;
  fn:name "isEqual" ;
  rdfs:comment """Answers if literal with lexical form lexicalForm1 and this datatype has the same value as literal with lexical form lexicalForm2 and datatype identified by IRI datatypeIri2."""@en ;
  fn:expects ( 
    [ fn:name "lexicalForm1" ; fn:type xsd:string ; fn:nullable false ; fn:required true ] 
    [ fn:name "lexicalForm2" ; fn:type xsd:string ; fn:nullable false ; fn:required true ] 
    [ fn:name "datatypeIri2" ; fn:type xsd:string ; fn:nullable false ; fn:required false ] 
  ) ;
  fn:outputs [ fn:type xsd:boolean ] ;
  vs:term_status "testing" ;
  rdfs:seeAlso <https://w3id.org/lindt/spec.html> ;
  rdfs:isDefinedBy <http://w3id.org/lindt/voc#> .   

lindt:isWellFormed a lindt:Function ;
  rdfs:label "isWellFormed"@en ;
  fn:name "isWellFormed" ;
  rdfs:comment """Answers if this lexical form is well formed."""@en ;
  fn:expects ( 
    [ fn:name "lexicalForm" ; fn:type xsd:string ; fn:nullable false ; fn:required true ] 
  ) ;
  fn:outputs [ fn:type xsd:boolean ] ;
  vs:term_status "testing" ;
  rdfs:seeAlso <https://w3id.org/lindt/spec.html> ;
  rdfs:isDefinedBy <http://w3id.org/lindt/voc#> .   

lindt:recognisesDatatype a lindt:Function ;
  rdfs:label "recognisesDatatype"@en ;
  fn:name "recognisesDatatype" ;
  rdfs:comment """Answers if this custom datatype recognises the datatype with the given IRI."""@en ;
  fn:expects ( 
    [ fn:name "datatypeIri" ; fn:type xsd:string ; fn:nullable false ; fn:required true ] 
  ) ;
  fn:outputs [ fn:type xsd:boolean ] ;
  vs:term_status "testing" ;
  rdfs:seeAlso <https://w3id.org/lindt/spec.html> ;
  rdfs:isDefinedBy <http://w3id.org/lindt/voc#> .   

lindt:add a lindt:Function ;
  rdfs:label "add"@en ;
  fn:name "add" ;
  rdfs:comment """A function to programmatically add two literals."""@en ;
  fn:expects ( 
    [ fn:name "lexicalForm1" ; fn:type xsd:string ; fn:nullable false ; fn:required true ] 
    [ fn:name "lexicalForm2" ; fn:type xsd:string ; fn:nullable false ; fn:required true ] 
    [ fn:name "datatypeIri2" ; fn:type xsd:string ; fn:nullable false ; fn:required false ] 
  ) ;
  fn:outputs [ fn:type xsd:string ] ;
  vs:term_status "testing" ;
  rdfs:seeAlso <https://w3id.org/lindt/spec.html> ;
  rdfs:isDefinedBy <http://w3id.org/lindt/voc#> .   

lindt:substract a lindt:Function ;
  rdfs:label "substract"@en ;
  fn:name "substract" ;
  rdfs:comment """A function to programmatically substract two literals."""@en ;
  fn:expects ( 
    [ fn:name "lexicalForm1" ; fn:type xsd:string ; fn:nullable false ; fn:required true ] 
    [ fn:name "lexicalForm2" ; fn:type xsd:string ; fn:nullable false ; fn:required true ] 
    [ fn:name "datatypeIri2" ; fn:type xsd:string ; fn:nullable false ; fn:required false ] 
  ) ;
  fn:outputs [ fn:type xsd:string ] ;
  vs:term_status "testing" ;
  rdfs:seeAlso <https://w3id.org/lindt/spec.html> ;
  rdfs:isDefinedBy <http://w3id.org/lindt/voc#> .   

lindt:additiveIdentity a lindt:Function ;
  rdfs:label "additiveIdentity"@en ;
  fn:name "additiveIdentity" ;
  rdfs:comment """A function to programmatically get the neutral literal for function lindt:add."""@en ;
  fn:expects (  ) ;
  fn:outputs [ fn:type xsd:string ] ;
  vs:term_status "testing" ;
  rdfs:seeAlso <https://w3id.org/lindt/spec.html> ;
  rdfs:isDefinedBy <http://w3id.org/lindt/voc#> .   

lindt:multiply a lindt:Function ;
  rdfs:label "multiply"@en ;
  fn:name "multiply" ;
  rdfs:comment """A function to programmatically multiply two literals."""@en ;
  fn:expects ( 
    [ fn:name "lexicalForm1" ; fn:type xsd:string ; fn:nullable false ; fn:required true ] 
    [ fn:name "lexicalForm2" ; fn:type xsd:string ; fn:nullable false ; fn:required true ] 
    [ fn:name "datatypeIri2" ; fn:type xsd:string ; fn:nullable false ; fn:required false ] 
  ) ;
  fn:outputs [ fn:type xsd:string ] ;
  vs:term_status "testing" ;
  rdfs:seeAlso <https://w3id.org/lindt/spec.html> ;
  rdfs:isDefinedBy <http://w3id.org/lindt/voc#> .   

lindt:divide a lindt:Function ;
  rdfs:label "divide"@en ;
  fn:name "divide" ;
  rdfs:comment """A function to programmatically divide two literals."""@en ;
  fn:expects ( 
    [ fn:name "lexicalForm1" ; fn:type xsd:string ; fn:nullable false ; fn:required true ] 
    [ fn:name "lexicalForm2" ; fn:type xsd:string ; fn:nullable false ; fn:required true ] 
    [ fn:name "datatypeIri2" ; fn:type xsd:string ; fn:nullable false ; fn:required false ] 
  ) ;
  fn:outputs [ fn:type xsd:string ] ;
  vs:term_status "testing" ;
  rdfs:seeAlso <https://w3id.org/lindt/spec.html> ;
  rdfs:isDefinedBy <http://w3id.org/lindt/voc#> .   

lindt:multiplicativeIdentity a lindt:Function ;
  rdfs:label "multiplicativeIdentity"@en ;
  fn:name "getNormalForm" ;
  rdfs:comment """A function to programmatically get the neutral literal for function lindt:multiply."""@en ;
  fn:expects ( ) ;
  fn:outputs [ fn:type xsd:string ] ;
  vs:term_status "testing" ;
  rdfs:seeAlso <https://w3id.org/lindt/spec.html> ;
  rdfs:isDefinedBy <http://w3id.org/lindt/voc#> .   


lindt:TotallyOrdered a owl:Class ;
  rdfs:subClassOf lindt:Datatype ;
  rdfs:subClassOf [ owl:onProperty lindt:implements ; owl:hasValue lindt:compare ] ;
  rdfs:subClassOf [ owl:onProperty lindt:implements ; owl:hasValue lindt:substract ] ;
  rdfs:subClassOf [ owl:onProperty lindt:implements ; owl:hasValue lindt:additiveIdentity ] ;
  rdfs:label "TotallyOrdered"@en ;
  rdfs:comment """The class of datatypes that are totally ordered. The Javascript object representing this datatype should implement function compare(lexicalForm1:string, lexicalForm2:string):string, to compare two literals with this datatype."""@en ;
  vs:term_status "testing" ;
  rdfs:isDefinedBy <http://w3id.org/lindt/voc#> .   

lindt:Group a owl:Class ;
  rdfs:subClassOf lindt:Datatype ;
  rdfs:subClassOf [ owl:onProperty lindt:implements ; owl:hasValue lindt:add ] ;
  rdfs:subClassOf [ owl:onProperty lindt:implements ; owl:hasValue lindt:substract ] ;
  rdfs:subClassOf [ owl:onProperty lindt:implements ; owl:hasValue lindt:additiveIdentity ] ;
  rdfs:label "Group"@en ;
  rdfs:comment """The class of datatypes that are algebraic groups. The Javascript object representing this datatype should implement functions add(lexicalForm1:string, lexicalForm2:string):string and substract(lexicalForm1:string, lexicalForm2:string):string to add and substract two literals with this datatype. It should also implement function additiveIdentity():string to retrieve the additive identity element."""@en ;
  vs:term_status "testing" ;
  rdfs:isDefinedBy <http://w3id.org/lindt/voc#> .   

lindt:Ring a owl:Class ;
  rdfs:subClassOf lindt:Datatype ;
  rdfs:subClassOf [ owl:onProperty lindt:implements ; owl:hasValue lindt:multiply ] ;
  rdfs:subClassOf [ owl:onProperty lindt:implements ; owl:hasValue lindt:divide ] ;
  rdfs:subClassOf [ owl:onProperty lindt:implements ; owl:hasValue lindt:multiplicativeIdentity ] ;
  rdfs:label "Ring"@en ;
  rdfs:comment """The class of datatypes that are algebraic rings, which are also algebraic groups. The Javascript object representing this datatype should implement functions add, substract, and additiveIdentity as specified by class lindt:Group. Furthermore, it should also implement functions multiply(lexicalForm1:string, lexicalForm2:string):string and divide(lexicalForm1:string, lexicalForm2:string):string to multiply and divide two literals with this datatype. It should also implement function multiplicativeIdentity():string to retrieve the multiplicative identity element."""@en ;
  vs:term_status "testing" ;
  rdfs:isDefinedBy <http://w3id.org/lindt/voc#> .   


lindt:stringListDatatype a lindt:ListDatatype ;
  rdfs:label "stringListDatatype"@en ;
  rdfs:comment "a list of strings, starting with \"(\", separated by \",\", and ending with \")\""@en ;
  lindt:literalsStartWith "(" ;
  lindt:literalsEndsWith ")" ;
  lindt:separator "," ;
  vs:term_status "testing" ;
  rdfs:isDefinedBy <http://w3id.org/lindt/voc#> .
