@base             <https://w3id.org/oseg/ont/tsdc/core> .
@prefix tsdc:     <#> .
@prefix cc:       <http://creativecommons.org/ns#> .
@prefix dcat:     <http://www.w3.org/ns/dcat#> .
@prefix dcterms:  <http://purl.org/dc/terms/> .
@prefix osegprof: <https://w3id.org/oseg/ont/oseg-profiles#> .
@prefix owl:      <http://www.w3.org/2002/07/owl#> .
@prefix rdf:      <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs:     <http://www.w3.org/2000/01/rdf-schema#> .
@prefix schema:   <http://schema.org/> .
@prefix spdxt:    <http://spdx.org/rdf/terms#> .
@prefix spdxl:    <https://spdx.org/licenses/> .
@prefix vann:     <http://purl.org/vocab/vann/> .
@prefix xsd:      <http://www.w3.org/2001/XMLSchema#> .

<>
  a owl:Ontology ;
  vann:preferredNamespacePrefix "tsdc" ;
  vann:preferredNamespaceUri "https://w3id.org/oseg/ont/tsdc/core#" ;
  owl:versionInfo "0.2" ;
  owl:versionIRI <https://w3id.org/oseg/ont/0.2/tsdc/core> ;
  dcterms:title "Technology specific Documentation Criteria (TsDC)"@en ;
  dcterms:description "A modular standard modal for specification requirements for Open-Source-Hardware projects, associated with the DIN Open-Hardware Norm and Guideline."@en ;
  schema:comment '''
# SPDX-FileCopyrightText: 2020 - 2021 Martin Häuer <martin.haeuer@ose-germany.de>
# SPDX-FileCopyrightText: 2020 - 2022 Robin Vobruba <hoijui.quaero@gmail.com>
#
# SPDX-License-Identifier: GPL-3.0-or-later
''' ;
  schema:comment '''Regarding the use of `schema:domainIncludes`
and `schema:rangeIncludes` in this ontology:
Looking at the definitions for the RDFS version
of the two, `rdfs:domain` and `rdfs:range`:
* https://www.w3.org/TR/rdf-schema/#ch_domain
* https://www.w3.org/TR/rdf-schema/#ch_range
and as described in this StackOverflow answer:
<https://stackoverflow.com/a/74782257/586229>,
multiple objects for the two RDFS properties mean,
that *all of them* apply, simultaneously,
not *one of them*.
You may think of this as an `AND` coupling.
We want the *one of them* meaning though (`OR`).
The `schema:*` properties give us just that.'''@en ;
  dcterms:language <http://id.loc.gov/vocabulary/iso639-1/en> ;
  dcterms:created "2019-11-03Z"^^xsd:date ;
  dcterms:creator osegprof:martinHaeuer ;
  schema:creator osegprof:martinHaeuer ;
  dcterms:creator osegprof:robinVobruba ;
  schema:creator osegprof:robinVobruba ;
  dcterms:issued "2022-02-14Z"^^xsd:date ;
  dcterms:license "https://www.gnu.org/licenses/gpl-3.0.txt" ;
  cc:license "https://www.gnu.org/licenses/gpl-3.0.txt" ;
  spdxt:licenseDeclared spdxl:GPL-3.0-or-later ;
  dcterms:source "https://gitlab.com/OSEGermany/oh-tsdc/-/blob/master/oh-tsdc.ttl" ;
  schema:codeRepository "https://gitlab.com/OSEGermany/oh-tsdc/" ;
  dcat:keyword "TsDC", "hardware", "design", "open-source", "open-source-hardware" ;
  dcat:contactPoint "https://gitlab.com/OSEGermany/oh-tsdc/" ;
  .

tsdc:OHTsDC
  a owl:Class ;
  rdfs:label "Technology-specific Requirements for Open Source Hardware"@en ;
  rdfs:comment "Technology-specific Requirements for Open Source Hardware"@en ;
  .

tsdc:Component
  a owl:Class ;
  tsdc:isBelow tsdc:OHTsDC ;
  tsdc:id "COM" ;
  rdfs:label "Component"@en ;
  rdfs:comment "a tangible object of the OSH"@en ;
  .

tsdc:ManufacturingProcess
  a owl:Class ;
  tsdc:isBelow tsdc:OHTsDC ;
  tsdc:id "MAN" ;
  rdfs:label "Manufacturing Process"@en ;
  rdfs:comment "involved Process to Manufacture (also Assemble) the OSH"@en ;
  .

tsdc:PostProcessing
  a owl:Class ;
  tsdc:isBelow tsdc:OHTsDC ;
  tsdc:id "POST" ;
  rdfs:label "Post Processing"@en ;
  rdfs:comment "Post-Processing (e.g. painting, firmware installation) involved for the OSH"@en ;
  .

## Blocks -- the actual requirements

### Components

tsdc:PRT # TODO This identifier and others further down should be converted to human-readable higher-camel-case, but hten the krawler also needs to parse this ontology and build a mapping table from the id to this identifier
  a owl:Class ;
  tsdc:isBelow tsdc:Component ;
  tsdc:id "PRT" ;
  rdfs:label "Part"@en ;
  rdfs:comment "self-designed part"@en ;
  tsdc:requirementsURI "https://gitlab.com/OSEGermany/oh-tsdc/-/blob/master/OH-TsDC.md#generic" ;
  .

tsdc:ASM
  a owl:Class ;
  tsdc:isBelow tsdc:Component ;
  tsdc:id "ASM" ;
  rdfs:label "Assembly"@en ;
  rdfs:comment "Assembly including e.g. self-designed parts, standard and proprietary components"@en ;
  tsdc:requirementsURI "https://gitlab.com/OSEGermany/oh-tsdc/-/blob/master/OH-TsDC.md#assembly" ;
  .

tsdc:STD
  a owl:Class ;
  tsdc:isBelow tsdc:Component ;
  tsdc:id "CNC" ;
  rdfs:label "Standard Component"@en ;
  rdfs:comment "Component for which an official standard exists (e.g. most nuts & screws)"@en ;
  tsdc:requirementsURI "https://gitlab.com/OSEGermany/oh-tsdc/-/blob/master/OH-TsDC.md#standard-component" ;
  .

tsdc:BUY
  a owl:Class ;
  tsdc:isBelow tsdc:Component ;
  tsdc:id "BUY" ;
  rdfs:label "Part"@en ;
  rdfs:comment "Proprietary Component (e.g. microcontroller)"@en ;
  tsdc:requirementsURI "https://gitlab.com/OSEGermany/oh-tsdc/-/blob/master/OH-TsDC.md#proprietary-component" ;
  .

tsdc:OSH
  a owl:Class ;
  tsdc:isBelow tsdc:Component ;
  tsdc:id "OSH" ;
  rdfs:label "Open Source Hardware"@en ;
  rdfs:comment "reference to a single part or assembly that has been already published under a free/open license elsewhere"@en ;
  tsdc:requirementsURI "https://gitlab.com/OSEGermany/oh-tsdc/-/blob/master/OH-TsDC.md#open-source-hardware" ;
  .

### Manufacturing Processes

tsdc:3DP
  a owl:Class ;
  tsdc:isBelow tsdc:ManufacturingProcess ;
  tsdc:id "3DP" ;
  rdfs:label "3D Printing"@en ;
  rdfs:domain tsdc:PRT ; # FIXME Classes can not have a domain, only properties can. Maybe this should rather be "subClassOf", or a new property, specially created for this?
  tsdc:requirementsURI "https://gitlab.com/OSEGermany/oh-tsdc/-/blob/master/OH-TsDC.md#3d-printed" ;
  .

tsdc:CNC
  a owl:Class ;
  tsdc:isBelow tsdc:ManufacturingProcess ;
  tsdc:id "CNC" ;
  rdfs:label "Machining (not only CNC)"@en ;
  rdfs:domain tsdc:PRT ;
  tsdc:requirementsURI "https://gitlab.com/OSEGermany/oh-tsdc/-/blob/master/OH-TsDC.md#cnc-milled" ;
  .

tsdc:LAS
  a owl:Class ;
  tsdc:isBelow tsdc:ManufacturingProcess ;
  tsdc:id "LAS" ;
  rdfs:label "Laser Cutting"@en ;
  rdfs:domain tsdc:PRT ;
  tsdc:requirementsURI "https://gitlab.com/OSEGermany/oh-tsdc/-/blob/master/OH-TsDC.md#laser-cutted" ;
  .

tsdc:MEC
  a owl:Class ;
  tsdc:isBelow tsdc:ManufacturingProcess ;
  tsdc:id "MEC" ;
  rdfs:label "Mechanical Assembly"@en ;
  rdfs:domain tsdc:ASM ;
  tsdc:requirementsURI "https://gitlab.com/OSEGermany/oh-tsdc/-/blob/master/OH-TsDC.md#mechanical" ;
  .

tsdc:WEL
  a owl:Class ;
  tsdc:isBelow tsdc:ManufacturingProcess ;
  tsdc:id "WEL" ;
  rdfs:label "Welding"@en ;
  rdfs:domain tsdc:ASM ;
  tsdc:requirementsURI "https://gitlab.com/OSEGermany/oh-tsdc/-/blob/master/OH-TsDC.md#welded" ;
  .

tsdc:PCB
  a owl:Class ;
  tsdc:isBelow tsdc:ManufacturingProcess ;
  tsdc:id "PCB" ;
  rdfs:label "PCB"@en ;
  rdfs:comment "Printed Circuit Board"@en ;
  rdfs:domain tsdc:ASM ;
  tsdc:requirementsURI "https://gitlab.com/OSEGermany/oh-tsdc/-/blob/master/OH-TsDC.md#printed-circuit-board" ;
  .

tsdc:CIR
  a owl:Class ;
  tsdc:isBelow tsdc:ManufacturingProcess ;
  tsdc:id "CIR" ;
  rdfs:label "Electronic Circuitry"@en ;
  rdfs:comment "not to be mistaken by PCBs"@en ;
  rdfs:domain tsdc:ASM ;
  tsdc:requirementsURI "https://gitlab.com/OSEGermany/oh-tsdc/-/blob/master/OH-TsDC.md#electronic-circuitry" ;
  .

tsdc:COT
  a owl:Class ;
  tsdc:isBelow tsdc:PostProcessing ;
  tsdc:id "COT" ;
  rdfs:label "Coating"@en ;
  rdfs:comment "involves painting etc."@en ;
  schema:domainIncludes
    tsdc:ASM,
    tsdc:PRT ;
  tsdc:requirementsURI "https://gitlab.com/OSEGermany/oh-tsdc/-/blob/master/OH-TsDC.md#post-processing" ;
# TODO fix URL
  .

tsdc:CMP
  a owl:Class ;
  tsdc:isBelow tsdc:PostProcessing ;
  tsdc:id "CMP" ;
  rdfs:label "Change Material Properties"@en ;
  rdfs:comment "soft annealing, hardening etc."@en ;
  schema:domainIncludes
    tsdc:ASM,
    tsdc:PRT ;
  tsdc:requirementsURI "https://gitlab.com/OSEGermany/oh-tsdc/-/blob/master/OH-TsDC.md#post-processing" ;
# TODO fix URL
  .

# Properties

tsdc:requirementsURI
  a owl:DatatypeProperty ;
  rdfs:label "Requirements"@en ;
  rdfs:comment "URI for the section (in the OH-TsDC document) stating corresponding requirements"@en ;
  rdfs:range xsd:anyURI ;
  rdfs:domain tsdc:OHTsDC ;
  .

tsdc:id
  a owl:DatatypeProperty ;
  rdfs:label "TsDC ID"@en ;
  rdfs:comment "This is used as unambiguous identifier whenever (technical) documents refer to a specific TsDC"@en ;
  rdfs:range xsd:string ;
  rdfs:domain tsdc:OHTsDC ;
  .

tsdc:isBelow
  a owl:ObjectProperty ;
  rdfs:subPropertyOf rdfs:subClassOf ;
  rdfs:comment '''
    In addition to marking a class as rdfs:subClassOf an other,
    it also defines that other class as the main super-class,
    which might be used for visualizing a strictly hierarchical version of the class-structure.'''@en ;
  rdfs:domain tsdc:OHTsDC ;
  rdfs:cardinality 1 ;
  .
