@prefix af-p: <http://purl.allotrope.org/ontologies/process#> .
@prefix af-r: <http://purl.allotrope.org/ontologies/result#> .
@prefix af-s: <http://purl.allotrope.org/shape/> .
@prefix af-x: <http://purl.allotrope.org/ontologies/property#> .
@prefix bfo: <http://purl.obolibrary.org/obo/BFO> .
@prefix dct: <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 rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix ro: <http://purl.obolibrary.org/obo/RO> .
@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#> .

af-s:AFS_0000463 a sh:NodeShape ;
    rdfs:isDefinedBy <http://purl.allotrope.org/shapes/adm/sqd-ms/CR/2024/12/sqd-ms-process.shapes> ;
    skos:prefLabel "SQD-MS process shape" ;
    sh:and ( af-s:AFS_0000001 ) ;
    sh:message "An SQD-MS process SHOULD have exactly 1 spectrometer." ;
    sh:property [ sh:message "An SQD-MS process SHOULD have as a participant exactly 1 single quadropole mass spectrometer." ;
            sh:path ro:_0000057 ;
            sh:qualifiedMaxCount 1 ;
            sh:qualifiedMinCount 1 ;
            sh:qualifiedValueShape af-s:AFS_0000466 ;
            sh:qualifiedValueShapesDisjoint true ;
            sh:severity sh:Warning ] ;
    sh:severity sh:Warning ;
    sh:targetClass af-p:AFP_0003747 .

af-s:AFS_0000527 a sh:NodeShape ;
    rdfs:isDefinedBy <http://purl.allotrope.org/shapes/adm/sqd-ms/CR/2024/12/sqd-ms-process.shapes> ;
    skos:prefLabel "SQD-MS process with ID shape" ;
    sh:and ( af-s:AFS_0000001 af-s:AFS_0000465 ) ;
    sh:message "An SQD-MS process SHOULD be identified by an ID." ;
    sh:severity sh:Warning ;
    sh:targetClass af-p:AFP_0001109 .

af-s:AFS_0000530 a sh:NodeShape ;
    rdfs:isDefinedBy <http://purl.allotrope.org/shapes/adm/sqd-ms/CR/2024/12/sqd-ms-process.shapes> ;
    skos:prefLabel "SQD-MS process shape" ;
    sh:and ( af-s:AFS_0000001 ) ;
    sh:message "An SQD-MS process CAN have subprocesses of ionization, monitoring, data processing, mass analysis and mass spectrometry scan. It CAN be part of a sequence." ;
    sh:property [ sh:message "An SQD-MS process CAN have ionization as subprocess." ;
            sh:path bfo:_0000117 ;
            sh:qualifiedMinCount 0 ;
            sh:qualifiedValueShape [ sh:class af-p:AFP_0001993 ] ;
            sh:qualifiedValueShapesDisjoint true ],
        [ sh:message "An SQD-MS process CAN have monitoring as subprocess that SHOULD conform to shape of chromatography monitoring." ;
            sh:path bfo:_0000117 ;
            sh:qualifiedMinCount 0 ;
            sh:qualifiedValueShape [ sh:class af-p:AFP_0003681 ] ;
            sh:qualifiedValueShapesDisjoint true ],
        [ sh:message "An SQD-MS process CAN have chromatography data processing as subprocess that SHOULD conform to detailed constraints." ;
            sh:path bfo:_0000117 ;
            sh:qualifiedMinCount 0 ;
            sh:qualifiedValueShape af-s:AFS_0000467 ;
            sh:qualifiedValueShapesDisjoint true ],
        [ sh:message "An SQD-MS process CAN have selected ion monitoring as subprocess that SHOULD have exactly 1 selected ion chromatogram as data output." ;
            sh:path bfo:_0000117 ;
            sh:qualifiedMinCount 0 ;
            sh:qualifiedValueShape [ sh:class af-p:AFP_0002437 ;
                    sh:message "It MUST be selected ion monitoring that SHOULD have exactly 1 selected ion chromatogram as data output." ;
                    sh:property [ sh:path af-x:AFX_0000544 ;
                            sh:qualifiedMaxCount 1 ;
                            sh:qualifiedMinCount 1 ;
                            sh:qualifiedValueShape [ sh:class af-r:AFR_0000035 ;
                                    sh:message "It MUST be a selected ion chromatogram." ] ;
                            sh:qualifiedValueShapesDisjoint true ;
                            sh:severity sh:Warning ] ] ;
            sh:qualifiedValueShapesDisjoint true ],
        [ sh:message "An SQD-MS process CAN have a mass spectrometry scan as subprocess that SHOULD have exactly 1 result as data output AND MUST conform to detailed constraints." ;
            sh:path bfo:_0000117 ;
            sh:qualifiedMinCount 0 ;
            sh:qualifiedValueShape [ sh:and ( af-s:AFS_0000490 [ sh:class af-p:AFP_0002515 ;
                                sh:message "It MUST be mass spectrometry scan that SHOULD have exactly 1 result as output." ;
                                sh:property [ sh:path af-x:AFX_0000544 ;
                                        sh:qualifiedMaxCount 1 ;
                                        sh:qualifiedMinCount 1 ;
                                        sh:qualifiedValueShape [ sh:class af-r:AFR_0000761 ;
                                                sh:message "It MUST be a result." ] ;
                                        sh:qualifiedValueShapesDisjoint true ;
                                        sh:severity sh:Warning ] ] ) ;
                    sh:message "It MUST be mass spectrometry scan that SHOULD have exactly 1 result as output." ] ;
            sh:qualifiedValueShapesDisjoint true ] ;
    sh:targetClass af-p:AFP_0003747 .

<http://purl.allotrope.org/shapes/adm/sqd-ms/CR/2024/12/sqd-ms-process.shapes> a owl:Ontology ;
    dct:description "Main module of the Allotrope SQD-MS Process Shape library." ;
    dct:license <http://purl.allotrope.org/voc/creative-commons-attribution-license> ;
    dct:publisher <http://www.allotrope.org> ;
    dct:rights <http://purl.allotrope.org/voc/attribution>,
        <http://purl.allotrope.org/voc/copyright> ;
    dct:title "Allotrope SQD-MS Process Shape Library (CR/2024/12)" ;
    owl:imports <http://purl.allotrope.org/shapes/adm/core/REC/2021/12/prefix.shacl>,
        <http://purl.allotrope.org/shapes/adm/core/REC/2022/06/common.shapes>,
        <http://purl.allotrope.org/shapes/adm/sqd-ms/CR/2024/12/sqd-ms-data-processing.shapes>,
        sh: ;
    owl:priorVersion <http://purl.allotrope.org/shapes/adm/sqd-ms/CR/2020/09/sqd-ms-process.shapes> ;
    owl:versionIRI <http://purl.allotrope.org/shapes/adm/sqd-ms/CR/2024/12/sqd-ms-process.shapes> ;
    owl:versionInfo "CR/2024/12" ;
    skos:prefLabel "SQD-MS process shapes" .

