# Copyright (c) 2024 T-Systems International GmbH
# Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) 
# Copyright (c) 2024 ZF Friedrichshafen AG 
# Copyright (c) 2024 Mercedes-Benz AG 
# Copyright (c) 2024 Contributors to the Catena-X Association
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.
#
# Unless required by applicable law or agreed to in writing, software
# 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.
#
# SPDX-License-Identifier: Apache-2.0

@prefix : <https://w3id.org/catenax/ontology/common#>.
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix cx-common: <https://w3id.org/catenax/ontology/common#> .
@prefix cx-core: <https://w3id.org/catenax/ontology/core#> .
@base <https://w3id.org/catenax/ontology/common#> .

<https://w3id.org/catenax/ontology/common> rdf:type owl:Ontology ;
                                           dc:contributor "[@drcgjung](https://github.com/drcgjung) , [@obalandi](https://github.com/obalandi)" ;
                                           dc:creator "[@ZazraltMagic](https://github.com/ZazraltMagic)" ;
                                           dc:date "2023-05-23"^^xsd:date ;
                                           dc:description "The common ontology describes the Dataspace connectors in detail. On the one hand, this includes the information from which Catena-X business partner the connectors are deployed. On the other hand, with which contracts which assets provide the connectors."@en ;
                                           dc:title "Common Ontology" ;
                                           owl:imports <file:core_ontology.ttl> ;
                                           owl:versionInfo "1.9.5" .

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

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


###  http://purl.org/dc/elements/1.1/date
dc:date rdf:type owl:AnnotationProperty .


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


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


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

###  https://w3id.org/catenax/ontology/common#hasDataspaceConnector
cx-common:hasDataspaceConnector rdf:type owl:ObjectProperty ;
                                rdfs:subPropertyOf owl:topObjectProperty ;
                                rdfs:domain cx-common:BusinessPartner ;
                                rdfs:range cx-common:DataspaceConnector ;
                                rdfs:comment "This property describes which connectors belong to which business partners."@en ;
                                rdfs:label "has Dataspace Connector"@en .


###  https://w3id.org/catenax/ontology/common#offers
cx-common:offers rdf:type owl:ObjectProperty ;
                 rdfs:subPropertyOf owl:topObjectProperty ;
                 rdfs:domain cx-common:DataspaceConnector ;
                 rdfs:range cx-common:Asset ;
                 rdfs:comment "This property refers to the offered assets."@en ;
                 rdfs:label "offers"@en .


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

###  https://w3id.org/catenax/ontology/common#contentType
cx-common:contentType rdf:type owl:DatatypeProperty ;
                      rdfs:subPropertyOf owl:topDataProperty ;
                      rdfs:domain cx-common:Asset ;
                      rdfs:range xsd:string ;
                      rdfs:comment "This property describes in which format the data will be output, i.e. XML or JSON."@en ;
                      rdfs:label "content type"@en .


###  https://w3id.org/catenax/ontology/common#description
cx-common:description rdf:type owl:DatatypeProperty ;
                      rdfs:subPropertyOf owl:topDataProperty ;
                      rdfs:domain cx-common:Asset ;
                      rdfs:range xsd:string ;
                      rdfs:comment "This property contains description of asset."@en ;
                      rdfs:label "description"@en .


###  https://w3id.org/catenax/ontology/common#id
cx-common:id rdf:type owl:DatatypeProperty ;
             rdfs:subPropertyOf owl:topDataProperty ;
             rdfs:domain cx-common:Asset ;
             rdfs:range xsd:string ;
             rdfs:comment "This property contains unique identifier of Bussiness Partner/Connector/Asset."@en ;
             rdfs:label "id"@en .


###  https://w3id.org/catenax/ontology/common#name
cx-common:name rdf:type owl:DatatypeProperty ;
               rdfs:subPropertyOf owl:topDataProperty ;
               rdfs:domain cx-common:Asset ;
               rdfs:range xsd:string ;
               rdfs:comment "This property contains name of asset."@en ;
               rdfs:label "name"@en .


###  https://w3id.org/catenax/ontology/common#version
cx-common:version rdf:type owl:DatatypeProperty ;
                  rdfs:subPropertyOf owl:topDataProperty ;
                  rdfs:domain cx-common:Asset ;
                  rdfs:range xsd:string ;
                  rdfs:comment "Version of the asset."@en ;
                  rdfs:label "version"@en .


###  https://w3id.org/catenax/ontology/common#implementsProtocol
cx-common:implementsProtocol rdf:type owl:DatatypeProperty ;
                   rdfs:subPropertyOf owl:topDataProperty ;
                   rdfs:domain cx-common:Asset ;
                   rdfs:range xsd:string ;
                   rdfs:comment "This property refers to the network protocol implemented by the asset."@en ;
                   rdfs:label "implements protocol"@en .

###  https://w3id.org/catenax/ontology/common#publishedUnderContract
cx-common:publishedUnderContract rdf:type owl:DatatypeProperty ;
                   rdfs:subPropertyOf owl:topDataProperty ;
                   rdfs:domain cx-common:Asset ;
                   rdfs:range xsd:string ;
                   rdfs:comment "This property refers to the contract associated with the asset."@en ;
                   rdfs:label "published under contract"@en . 

###  https://w3id.org/catenax/ontology/common#satisfiesRole
cx-common:satisfiesRole rdf:type owl:DatatypeProperty ;
                   rdfs:subPropertyOf owl:topDataProperty ;
                   rdfs:domain cx-common:Asset ;
                   rdfs:range xsd:anyURI ;
                   rdfs:comment "Use Case Role IRI."@en ;
                   rdfs:label "satisfies role"@en . 


###  https://w3id.org/catenax/ontology/common#isFederated
cx-common:isFederated rdf:type owl:DatatypeProperty ;
                      rdfs:subPropertyOf owl:topDataProperty ;
                      rdfs:domain cx-common:Asset ;
                      rdfs:range xsd:boolean ;
                      rdfs:comment "If this property is set to true, it means that this connector will federate with other connectors."@en ;
                      rdfs:label "is federated"@en .

### http://www.w3.org/ns/shacl#shapesGraph
sh:shapesGraph rdf:type owl:DatatypeProperty;
               rdfs:domain cx-common:Asset ;
               rdfs:range xsd:anyURI ;
               rdfs:comment "This property refers to a SHACL expression in which the RDF data Contraints are defined. In particular, the structure of the identifiers."@en ;
               rdfs:label "shapes graph"@en .


###  https://w3id.org/catenax/ontology/common#url
cx-common:url rdf:type owl:DatatypeProperty ;
              rdfs:subPropertyOf owl:topDataProperty ;
              rdfs:domain cx-common:DataspaceConnector ;
              rdfs:range xsd:anyURI ;
               rdfs:comment "Uniform Resource Locator of SPARQL Endpoint."@en ;
               rdfs:label "url"@en .


###  https://w3id.org/catenax/ontology/common#AuthenticatedResource
cx-common:authenticatedResource rdf:type rdfs:DatatypeProperty;
                                rdfs:domain cx-common:Asset ;
                                rdfs:range xsd:anyURI ;
                                rdfs:comment "An resource that requires authentication."@en;
                                rdfs:label "Authenticated Resource"@en .


###  https://w3id.org/catenax/ontology/common#authenticationInformation
cx-common:authenticationInformation rdf:type owl:DatatypeProperty ;
              rdfs:comment "Base property for all authentication informations." ;
              rdfs:subPropertyOf owl:topDataProperty ;
              rdfs:domain cx-common:Asset ;
              rdfs:range xsd:string ;
              rdfs:label "authentication information"@en .


###  https://w3id.org/catenax/ontology/common#authenticationCode
cx-common:authenticationCode rdf:type owl:DatatypeProperty ;
                             rdfs:domain cx-common:Asset ;
                             rdfs:range xsd:string ;
                             rdfs:comment "An authentication code under which authentication information are transmitted." ;
                             rdfs:subPropertyOf cx-common:authenticationInformation ;
                             rdfs:label "authentication code"@en .

###  https://w3id.org/catenax/ontology/common#authenticationKey
cx-common:authenticationKey rdf:type owl:DatatypeProperty ;
                            rdfs:domain cx-common:Asset ;
                            rdfs:range xsd:string ;
                            rdfs:comment "An authentication key which encodes some authentication proof." ;
                            rdfs:subPropertyOf cx-common:authenticationInformation ;
                             rdfs:label "authentication key"@en .


###  https://w3id.org/catenax/ontology/common#SkillDistribution?run=provider
cx-common:distributionMode rdf:type owl:DatatypeProperty ;
                           rdfs:domain cx-common:Asset ;
                           rdfs:range xsd:string ;
                           rdfs:comment "The skill may only be invoked local to the computing environment of the provider."@en;
                           rdfs:label "Distribution Mode"@en .
                                      

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

###  https://w3id.org/catenax/ontology/core#Actor
cx-core:Actor rdf:type owl:Class .

###  https://w3id.org/catenax/ontology/common#Application
cx-common:Application rdf:type owl:Class ;
                rdfs:comment "An application defines a coded software that fulfills a specific purpose."@en ;
                rdfs:label "Application"@en .

###  https://w3id.org/catenax/ontology/common#Asset
cx-common:Asset rdf:type owl:Class ;
                rdfs:subClassOf cx-common:Application ;
                rdfs:comment "The Asset class describes the provision via a repository of a specific set of data for a specific purpose."@en ;
                rdfs:label "Asset"@en .


###  https://w3id.org/catenax/ontology/common#BusinessPartner
cx-common:BusinessPartner rdf:type owl:Class ;
                          rdfs:subClassOf cx-core:Actor ;
                          rdfs:comment "A Business Partner is a legal entity that is part of the Catena-X network or that stands in a relevant relation to a Catena-X Business Partner."@en ;
                          rdfs:label "Business Partner"@en .


###  https://w3id.org/catenax/ontology/common#DataspaceConnector
cx-common:DataspaceConnector rdf:type owl:Class ;
                             rdfs:subClassOf cx-common:Application ;
                             rdfs:comment "Dataspace Connector is an interface based on the Eclipse Dataspace Connector technology. A Dataspace Connector makes various assets available through contracts. A contract describes with which policy which asset can be provided."@en ;
                             rdfs:seeAlso <https://projects.eclipse.org/proposals/eclipse-dataspace-connector> ;
                             rdfs:label "Dataspace Connector"@en .