@prefix : <http://w3id.org/rml/> .
@prefix cc: <http://creativecommons.org/ns#> .
@prefix dc: <http://purl.org/dc/terms/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix rr: <http://www.w3.org/ns/r2rml#> .
@prefix oldrml: <http://semweb.mmlab.be/ns/rml#> .
@prefix ql: <http://semweb.mmlab.be/ns/ql#> .
@prefix rml: <http://w3id.org/rml/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix vaem: <http://www.linkedmodel.org/schema/vaem#> .
@prefix vann: <http://purl.org/vocab/vann/> .
@base <http://w3id.org/rml/> .

<http://w3id.org/rml/io/bc> rdf:type owl:Ontology ;
                        dc:description "This module specifies the relationships established by the R2RML and previous RML vocabularies to the new RML-IO specification."@en ;
                        dc:created "2023-05-02" ;
                        dc:modified "2023-06-19" ;
                        dc:title "R2RML to RML alignment module for RML-IO"@en ;
                        dc:creator "Ana Iglesias Molina" ;
                        dc:license <http://purl.org/NET/rdflicense/cc-by4.0> ;
                        vann:preferredNamespaceUri "http://w3id.org/rml/io/bc" .

#################################################################
#    Annotation properties
#################################################################

###  http://creativecommons.org/ns#license
cc:license rdf:type owl:AnnotationProperty .

###  http://purl.org/dc/terms/license
dc:license rdf:type owl:AnnotationProperty .

###  http://purl.org/dc/terms/contributor
dc:contributor rdf:type owl:AnnotationProperty .


###  http://purl.org/dc/terms/creator
dc:creator rdf:type owl:AnnotationProperty .


###  http://purl.org/dc/terms/description
dc:description rdf:type owl:AnnotationProperty .


###  http://purl.org/dc/terms/issued
dc:issued rdf:type owl:AnnotationProperty .


###  http://purl.org/dc/terms/modified
dc:modified rdf:type owl:AnnotationProperty .


###  http://purl.org/dc/terms/publisher
dc:publisher rdf:type owl:AnnotationProperty .


###  http://purl.org/dc/terms/title
dc:title rdf:type owl:AnnotationProperty .


###  http://purl.org/vocab/vann/preferredNamespacePrefix
vann:preferredNamespacePrefix rdf:type owl:AnnotationProperty .


###  http://purl.org/vocab/vann/preferredNamespaceUri
vann:preferredNamespaceUri rdf:type owl:AnnotationProperty .


###  http://www.linkedmodel.org/schema/vaem#acronym
vaem:acronym rdf:type owl:AnnotationProperty .


###  http://xmlns.com/foaf/0.1/name
foaf:name rdf:type owl:AnnotationProperty .


#################################################################
#    Classes
#################################################################

oldrml:LogicalSource rdf:type owl:Class ;
                rdfs:comment "Denotes a logical source."@en ;
                rdfs:label "Logical Source"@en ;
                rdfs:isDefinedBy <http://semweb.mmlab.be/ns/rml#> ;
                owl:subClassOf rml:LogicalSource .

rr:LogicalTable rdf:type owl:Class ;
                rdfs:comment "Denotes a logical table."@en ;
                rdfs:label "Logical Table"@en ;
                rdfs:isDefinedBy <http://www.w3.org/ns/r2rml#> ;
                owl:subClassOf rml:LogicalSource .

oldrml:BaseSource rdf:type owl:Class ;
                rdfs:comment "Denotes a base source."@en ;
                rdfs:label "Base Source"@en ;
                rdfs:isDefinedBy <http://semweb.mmlab.be/ns/rml#> ;
                owl:subClassOf rml:LogicalSource .

rr:BaseTableOrView rdf:type owl:Class ;
                rdfs:comment "Denotes a base table or view."@en ;
                rdfs:label "Base Table Or View"@en ;
                rdfs:isDefinedBy <http://www.w3.org/ns/r2rml#> ;
                owl:subClassOf rml:LogicalSource .

rr:R2RMLView rdf:type owl:Class ;
                rdfs:comment "Denotes an R2RML view."@en ;
                rdfs:label "R2RML View"@en ;
                rdfs:isDefinedBy <http://www.w3.org/ns/r2rml#> ;
                owl:subClassOf rml:LogicalSource .


#################################################################
#    Object Properties
#################################################################

rr:sqlVersion rdf:type owl:ObjectProperty ;
                   rdfs:label "SQL version"@en ;
                   rdfs:isDefinedBy <http://www.w3.org/ns/r2rml#> ;
                   owl:subPropertyOf rml:referenceFormulation ;
                   rdfs:comment "An identifier for a SQL version."@en .

oldrml:source rdf:type rdf:Property ;
                   rdfs:label "source"@en ;
                   rdfs:isDefinedBy <http://semweb.mmlab.be/ns/rml#> ;
                   owl:subPropertyOf rml:source ;
                   rdfs:comment "Qualified name of the source data."@en .


#################################################################
#    Data properties
#################################################################

rr:tableName rdf:type owl:DatatypeProperty ;
                   rdfs:label "table name"@en ;
                   rdfs:isDefinedBy <http://www.w3.org/ns/r2rml#> ;
                   owl:subPropertyOf rml:iterator ;
                   rdfs:comment "Schema-qualified name of a table or view."@en .

rr:sqlQuery rdf:type owl:DatatypeProperty ;
                   rdfs:label "SQL query"@en ;
                   rdfs:isDefinedBy <http://www.w3.org/ns/r2rml#> ;
                   owl:subPropertyOf rml:iterator ;
                   rdfs:comment "A valid SQL query."@en .

oldrml:iterator rdf:type owl:DatatypeProperty ;
                   rdfs:label "iterator"@en ;
                   rdfs:isDefinedBy <http://www.w3.org/ns/r2rml#> ;
                   owl:subPropertyOf rml:iterator ;
                   rdfs:comment "an expression qualified according to the reference formulation specified for pointing to an extract of the source data."@en .



#################################################################
#    Named Individuals
#################################################################

ql:CSV rdf:type owl:NamedIndividual, oldrml:ReferenceFormulation ;
    rdfs:label   "CSV" ;
    rdfs:comment "Denotes that the CSV file's column names are used for referring to extracts of CSV resources."@en ;
    rdfs:isDefinedBy <http://semweb.mmlab.be/ns/ql#> ;
    dc:isReplacedBy rml:CSV .

ql:JSONPath rdf:type owl:NamedIndividual, oldrml:ReferenceFormulation ;
    rdfs:label   "JSONPath" ;
    rdfs:comment "Denotes the JSONPath reference formulation, used for referring to extracts of JSON sources."@en ;
    rdfs:isDefinedBy <http://semweb.mmlab.be/ns/ql#> ;
    dc:isReplacedBy rml:JSONPath .

ql:XPath rdf:type owl:NamedIndividual, oldrml:ReferenceFormulation ;
    rdfs:label   "JSONPath" ;
    rdfs:comment "Denotes the XPath reference formulation, used for referring to extracts of XML sources."@en ;
    rdfs:isDefinedBy <http://semweb.mmlab.be/ns/ql#> ;
    dc:isReplacedBy rml:XPath .

rr:SQL2008 rdf:type owl:NamedIndividual ;
    rdfs:label   "SQL 2008" ;
    rdfs:comment "Core SQL 2008"@en ;
    rdfs:isDefinedBy <http://www.w3.org/ns/r2rml#> ;
    dc:isReplacedBy rml:SQL2008Table, rml:SQL2008Query .
