# The modelling-process of ontologies and SHACL shapes is still under development. Ease-of-use functionalities, like the usage of linkML in order to automatically generate ontology and SHACL files from one single file, is currently under investigation. Nevertheless, it is still recommended to understand the basic principles and purpose of ontologies and SHACL.

### General concepts:

## Difference between SHACL and Ontology:
# Ontologies provide a conceptual framework for modeling knowledge.
# SHACL shapes specify constraints and rules for validating RDF data. 
# Ontologies define the semantics.
# SHACL shapes ensure data conforms to those semantics.

## Triples
# A SHACL Shape and an Ontology are denoted as RDF-graphs. RDF-graphs use triples (subject (s), predicate (p), object (o)) to describe components.
# Examples for triples:
# Apple hasColor green
# Apple(s) hasColor(p) green(o)

## URIs and IRIs
# In an ontology you use an URI-like denotation with a slightly extended set of characters, so called IRIs, to clearly identify resources for protocols, formats...
# Example for "Apple hasColor green":
# http://example.org/ontology/apple http://example.org/ontology/hasColor http://example.org/ontology/green

### Parts of this file:

## Prefix section
# You may use the prefix section to shorten the IRIs in your document to enhance readability.
# Example:
# @prefix exmpl: <http://example.org/ontology/> .
# exmpl:apple exmpl:hasColor exmpl:green
#
# The @base tag is used as a prefix whenever there is a relative path provided without a prefix.
# Example:
# @base <http://example.org/ontology/> .
# <apple> <hasColor> <green> => http://example.org/ontology/apple http://example.org/ontology/hasColor http://example.org/ontology/green

@base <https://w3id.org/gaia-x4plcaad/ontologies/description/v1/> .
@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 gx: <https://w3id.org/gaia-x/development#> .

## Content of an Ontology
# Every Ontology needs to be declared as an OWL-Ontology by including a triple
# Example:
# <https://github.com/ASCS-eV/ontology-management-base/tree/main/example/description_ontology#> rdf:type owl:Ontology .
# In this case <https://w3id.org/gaia-x4plcaad/ontologies/description/v1#> is the IRI for the ontology we are defining.

# We define that the ontology "https://w3id.org/gaia-x4plcaad/ontologies/description/v1" is an owl Ontology, this is required for the FC
<https://w3id.org/gaia-x4plcaad/ontologies/description/v1> rdf:type owl:Ontology ; # A semi-colon indicates that the next line als refers to the same subject as the predicate & object in this line
    # This is a purl specific predicate, you can name a contributor of the ontology
    <http://purl.org/dc/terms/contributor> "Max Mustermann" ;
    # This is a label-assignment for your ontology by using rdfs:label as the predicate and a literal as the object
    rdfs:label "An example Ontology for demonstration purposes."@en ;
    # This predicate indicates the used owl-Version of your ontology
    owl:versionIRI <https://w3id.org/gaia-x4plcaad/ontologies/description/v1> ;
    owl:versionInfo "v0.5" .

# The next line defines the class we want to create constraints for in the SHACL shape. The class is defined as being from type owl:Class
<ExampleServiceOffering> rdf:type owl:Class ;
    # The next lines also refer to the class <ExampleServiceOffering> (due to the semi-colons again)
    # We define <ExampleServiceOffering> as a subClassOf a gx:VirtualResource (https://w3id.org/gaia-x/development#VirtualResource)
    # VirtualResource has sh:closed false, allowing domain-specific properties to be added.
    rdfs:subClassOf gx:VirtualResource ;
    # In the next line we define a label again
    rdfs:label "Example Service Offering"@en ;
    # In the next line we add a comment to our class <ExampleServiceOffering>
    rdfs:comment "Describes an example Service Offering."@en .

# Whenever we use a property which is referencing another node, we need to specify its domain and range within the ontology
<belongsTo> rdf:type owl:ObjectProperty ;
    # In general terms, we use domain and range as follows: Domain Property Range. In our case: Domain belongsTo Range.
    # In our example we relate to another instance of the same class. The relation could also be made between different classes.
    # In this case we use the domain "ExampleServiceOffering", which means that this property is used to describe an ExampleServiceOffering
    rdfs:domain <ExampleServiceOffering> ;
    # In this case we use the range "ExampleServiceOffering", which means that the value of the property must be an ExampleServiceOffering
    rdfs:range <ExampleServiceOffering> .
