@prefix imf-m: <https://ns.imfid.org/imf-m/id/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<https://ns.imfid.org/imf-m/shapes/main> a owl:Ontology ;
    rdfs:label "IMF-M grammar (SHACL shapes)"@en ;
    owl:versionIRI <https://ns.imfid.org/imf-m/shapes/0.1.0/main> ;
    owl:versionInfo "0.1.0" .

<https://ns.imfid.org/imf-m/shapes/main#AspectElementShape> a sh:NodeShape ;
    sh:property [ sh:class imf-m:Aspect ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:path imf-m:hasAspect ],
        [ sh:datatype xsd:string ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:path skos:prefLabel ;
            sh:severity sh:Warning ] ;
    sh:targetClass imf-m:AspectElement .

<https://ns.imfid.org/imf-m/shapes/main#BlockShape> a sh:NodeShape ;
    sh:property [ sh:class imf-m:Block ;
            sh:path imf-m:fulfilledBy ],
        [ sh:class imf-m:Block ;
            sh:maxCount 1 ;
            sh:path imf-m:isPartOf ],
        [ sh:class imf-m:Block ;
            sh:path imf-m:hasPart ],
        [ sh:class imf-m:Terminal ;
            sh:path imf-m:hasTerminal ] ;
    sh:targetClass imf-m:Block .

<https://ns.imfid.org/imf-m/shapes/main#FunctionAspectElementShape> a sh:NodeShape ;
    sh:property [ sh:class imf-m:ProductAspectElement ;
            sh:maxCount 1 ;
            sh:path imf-m:fulfilledBy ],
        [ sh:class imf-m:FunctionAspectElement ;
            sh:path imf-m:intraAspectRelation ] ;
    sh:targetClass imf-m:FunctionAspectElement .

<https://ns.imfid.org/imf-m/shapes/main#InputTerminalShape> a sh:NodeShape ;
    sh:property [ sh:class imf-m:OutputTerminal ;
            sh:maxCount 1 ;
            sh:path [ sh:inversePath imf-m:isConnectedTo ] ] ;
    sh:targetClass imf-m:InputTerminal .

<https://ns.imfid.org/imf-m/shapes/main#InstalledAspectElementShape> a sh:NodeShape ;
    sh:property [ sh:class imf-m:InstalledAspectElement ;
            sh:path imf-m:intraAspectRelation ],
        [ sh:class imf-m:ProductAspectElement ;
            sh:maxCount 1 ;
            sh:path imf-m:fulfills ],
        [ sh:maxCount 0 ;
            sh:path imf-m:fulfilledBy ] ;
    sh:targetClass imf-m:InstalledAspectElement .

<https://ns.imfid.org/imf-m/shapes/main#InterfacePointShape> a sh:NodeShape ;
    sh:property [ sh:class imf-m:InputTerminal ;
            sh:maxCount 1 ;
            sh:path imf-m:theInput ],
        [ sh:maxCount 0 ;
            sh:path imf-m:fulfilledBy ],
        [ sh:class imf-m:OutputTerminal ;
            sh:maxCount 1 ;
            sh:path imf-m:theOutput ] ;
    sh:targetClass imf-m:InterfacePoint .

<https://ns.imfid.org/imf-m/shapes/main#LocationAspectElementShape> a sh:NodeShape ;
    sh:property [ sh:class imf-m:ProductAspectElement ;
            sh:maxCount 1 ;
            sh:path imf-m:fulfilledBy ],
        [ sh:class imf-m:LocationAspectElement ;
            sh:path imf-m:intraAspectRelation ] ;
    sh:targetClass imf-m:LocationAspectElement .

<https://ns.imfid.org/imf-m/shapes/main#OutputTerminalShape> a sh:NodeShape ;
    sh:property [ sh:class imf-m:InputTerminal ;
            sh:maxCount 1 ;
            sh:path imf-m:isConnectedTo ] ;
    sh:targetClass imf-m:OutputTerminal .

<https://ns.imfid.org/imf-m/shapes/main#ProductAspectElementShape> a sh:NodeShape ;
    sh:property [ sh:class imf-m:ProductAspectElement ;
            sh:path imf-m:intraAspectRelation ],
        [ sh:class imf-m:InstalledAspectElement ;
            sh:path imf-m:fulfilledBy ] ;
    sh:targetClass imf-m:ProductAspectElement .

<https://ns.imfid.org/imf-m/shapes/main#TerminalShape> a sh:NodeShape ;
    sh:property [ sh:class imf-m:Terminal ;
            sh:path imf-m:fulfilledBy ],
        [ sh:class imf-m:Block ;
            sh:maxCount 1 ;
            sh:minCount 1 ;
            sh:path [ sh:inversePath imf-m:hasTerminal ] ] ;
    sh:targetClass imf-m:Terminal .

