@prefix inv: <https://github.com/DynamicalSystemsGroup/sysml-concept-reference/vocab#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix dct: <http://purl.org/dc/terms/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

inv:RecordShape a sh:NodeShape ; sh:targetClass inv:Record ;
    sh:nodeKind sh:IRI ;
    sh:property [ sh:path rdfs:label ; sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:string ] ;
    sh:property [ sh:path inv:qualifiedName ; sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:string ] ;
    sh:property [ sh:path dct:source ; sh:minCount 1 ; sh:nodeKind sh:IRI ] ;
    sh:property [ sh:path inv:sourceArtifact ; sh:minCount 1 ; sh:maxCount 1 ; sh:class inv:SourceArtifact ] ;
    sh:property [ sh:path inv:sourceLocator ; sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:string ] ;
    sh:property [ sh:path inv:coverage ; sh:minCount 1 ; sh:maxCount 1 ;
        sh:in ( inv:DeclaredPropertiesExtracted inv:ExtractedDeclaration inv:ReferenceOnly inv:NameOnly ) ] ;
    sh:property [ sh:path inv:evidenceStatus ; sh:hasValue inv:Extracted ] .

inv:ArtifactShape a sh:NodeShape ; sh:targetClass inv:SourceArtifact ;
    sh:property [ sh:path dct:source ; sh:minCount 1 ; sh:maxCount 1 ; sh:nodeKind sh:IRI ] ;
    sh:property [ sh:path inv:sha256 ; sh:minCount 1 ; sh:maxCount 1 ; sh:pattern "^[0-9a-f]{64}$" ] ;
    sh:property [ sh:path inv:retrievedOn ; sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:date ] .

inv:DetailedMetaclassShape a sh:NodeShape ; sh:targetSubjectsOf inv:isFocus ;
    sh:class inv:MetaclassRecord ;
    sh:property [ sh:path inv:isFocus ; sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:boolean ] ;
    sh:property [ sh:path dct:description ; sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:string ] ;
    sh:property [ sh:path inv:descriptionStatus ; sh:hasValue inv:EditorialSummary ] ;
    sh:property [ sh:path inv:notationStatus ; sh:minCount 1 ; sh:maxCount 1 ; sh:in ( inv:NotYetVerified ) ] ;
    sh:property [ sh:path inv:specializes ; sh:class inv:MetaclassRecord ] ;
    sh:property [ sh:path inv:declaresProperty ; sh:class inv:ExtractedPropertyRecord ] .

inv:PropertyShape a sh:NodeShape ; sh:targetClass inv:ExtractedPropertyRecord ;
    sh:property [ sh:path inv:declaredOn ; sh:minCount 1 ; sh:maxCount 1 ; sh:class inv:MetaclassRecord ] ;
    sh:property [ sh:path inv:valueType ; sh:minCount 1 ; sh:maxCount 1 ; sh:nodeKind sh:IRI ;
        sh:or ( [ sh:class inv:Record ] [ sh:class inv:ExternalTypeReference ] ) ] ;
    sh:property [ sh:path inv:subsets ; sh:class inv:PropertyRecord ] ;
    sh:property [ sh:path inv:redefines ; sh:class inv:PropertyRecord ] ;
    sh:property [ sh:path inv:lowerEncoding ; sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:string ] ;
    sh:property [ sh:path inv:upperEncoding ; sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:string ] ;
    sh:property [ sh:path inv:defaultEncoding ; sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:string ] .

inv:MechanismShape a sh:NodeShape ; sh:targetClass inv:Mechanism ;
    sh:property [ sh:path rdfs:label ; sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:string ] ;
    sh:property [ sh:path dct:description ; sh:minCount 1 ; sh:datatype xsd:string ] ;
    sh:property [ sh:path inv:evidence ; sh:minCount 1 ; sh:nodeKind sh:IRI ] ;
    sh:property [ sh:path inv:evidenceStatus ; sh:hasValue inv:EditorialSummary ] .

inv:ApplicationShape a sh:NodeShape ; sh:targetClass inv:MechanismApplication ;
    sh:property [ sh:path inv:concept ; sh:minCount 1 ; sh:maxCount 1 ; sh:class inv:MetaclassRecord ] ;
    sh:property [ sh:path inv:mechanism ; sh:minCount 1 ; sh:maxCount 1 ; sh:class inv:Mechanism ] ;
    sh:property [ sh:path inv:applicability ; sh:minCount 1 ; sh:maxCount 1 ; sh:in ( inv:Applies inv:Restricted ) ] ;
    sh:property [ sh:path dct:description ; sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:string ] ;
    sh:property [ sh:path inv:evidence ; sh:minCount 1 ; sh:nodeKind sh:IRI ] ;
    sh:property [ sh:path inv:evidenceStatus ; sh:hasValue inv:EditorialSummary ] .

inv:NormalizedPropertyShape a sh:NodeShape ; sh:targetClass inv:ExtractedPropertyRecord ;
    sh:property [ sh:path inv:normalizationDetail ; sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:string ] ;
    sh:property [ sh:path inv:lowerBound ; sh:maxCount 1 ; sh:datatype xsd:integer ; sh:minInclusive 0 ] ;
    sh:property [ sh:path inv:upperBound ; sh:maxCount 1 ; sh:datatype xsd:string ; sh:pattern "^([0-9]+|\\*)$" ] ;
    sh:property [ sh:path inv:normalizationSource ; sh:minCount 1 ; sh:nodeKind sh:IRI ] ;
    sh:property [ sh:path inv:defaultStatus ; sh:minCount 1 ; sh:maxCount 1 ; sh:in ( inv:NoDeclaredDefault inv:DecodedLiteral inv:UnspecifiedLiteralValue inv:UnsupportedExpression ) ] ;
    sh:or (
        [ sh:property [ sh:path inv:defaultStatus ; sh:hasValue inv:DecodedLiteral ] ; sh:property [ sh:path inv:declaredDefault ; sh:minCount 1 ; sh:maxCount 1 ; sh:nodeKind sh:Literal ] ]
        [ sh:property [ sh:path inv:defaultStatus ; sh:in ( inv:NoDeclaredDefault inv:UnspecifiedLiteralValue inv:UnsupportedExpression ) ] ; sh:property [ sh:path inv:declaredDefault ; sh:maxCount 0 ] ]
    ) .

inv:ResolutionShape a sh:NodeShape ; sh:targetClass inv:RedefinitionResolution ;
    sh:property [ sh:path inv:forConcept ; sh:minCount 1 ; sh:maxCount 1 ; sh:class inv:MetaclassRecord ] ;
    sh:property [ sh:path inv:replacedDeclaration ; sh:minCount 1 ; sh:maxCount 1 ; sh:class inv:PropertyRecord ] ;
    sh:property [ sh:path inv:replacementDeclaration ; sh:minCount 1 ; sh:class inv:ExtractedPropertyRecord ] .

inv:EffectivePropertyShape a sh:NodeShape ; sh:targetSubjectsOf inv:effectiveProperty ;
    sh:property [ sh:path inv:effectiveProperty ; sh:class inv:ExtractedPropertyRecord ] ;
    sh:property [ sh:path inv:propertyResolutionStatus ; sh:minCount 1 ; sh:maxCount 1 ; sh:in ( inv:ExplicitRedefinitionsResolved inv:HasNameConflicts ) ] ;
    sh:property [ sh:path inv:inheritanceEvidence ; sh:minCount 1 ; sh:nodeKind sh:IRI ] .

inv:EvidenceLocationShape a sh:NodeShape ; sh:targetClass inv:EvidenceLocation ;
    sh:property [ sh:path inv:sourceArtifact ; sh:minCount 1 ; sh:maxCount 1 ; sh:class inv:SourceArtifact ] ;
    sh:property [ sh:path inv:sourceLocator ; sh:minCount 1 ; sh:datatype xsd:string ] ;
    sh:property [ sh:path inv:pdfPage ; sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:integer ; sh:minInclusive 1 ] ;
    sh:property [ sh:path inv:printedPage ; sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:integer ; sh:minInclusive 1 ] .

inv:ProfileShape a sh:NodeShape ; sh:targetClass inv:ConceptProfile ;
    sh:property [ sh:path inv:concept ; sh:minCount 1 ; sh:maxCount 1 ; sh:class inv:MetaclassRecord ] ;
    sh:property [ sh:path inv:profileStatus ; sh:hasValue inv:DraftSourceChecked ] ;
    sh:property [ sh:path dct:description ; sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:string ] ;
    sh:property [ sh:path inv:learningPoint ; sh:minCount 1 ; sh:datatype xsd:string ] ;
    sh:property [ sh:path inv:evidence ; sh:minCount 1 ; sh:class inv:EvidenceLocation ] ;
    sh:property [ sh:path inv:hasExample ; sh:minCount 1 ; sh:class inv:Example ] ;
    sh:property [ sh:path inv:hasNotation ; sh:minCount 1 ; sh:class inv:Notation ] ;
    sh:property [ sh:path inv:hasRelationship ; sh:minCount 1 ; sh:class inv:ConceptRelationship ] .

inv:ExampleShape a sh:NodeShape ; sh:targetClass inv:Example ;
    sh:property [ sh:path inv:code ; sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:string ] ;
    sh:property [ sh:path inv:verificationStatus ; sh:hasValue inv:SourceReviewedNotExecuted ] ;
    sh:property [ sh:path inv:evidence ; sh:minCount 1 ; sh:class inv:EvidenceLocation ] .

inv:RelationshipShape a sh:NodeShape ; sh:targetClass inv:ConceptRelationship ;
    sh:property [ sh:path inv:fromConcept ; sh:minCount 1 ; sh:maxCount 1 ; sh:class inv:MetaclassRecord ] ;
    sh:property [ sh:path inv:toConcept ; sh:minCount 1 ; sh:maxCount 1 ; sh:class inv:MetaclassRecord ] ;
    sh:property [ sh:path inv:relationKind ; sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:string ] ;
    sh:property [ sh:path inv:condition ; sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:string ] ;
    sh:property [ sh:path inv:evidence ; sh:minCount 1 ; sh:class inv:EvidenceLocation ] .

inv:NotationShape a sh:NodeShape ; sh:targetClass inv:Notation ;
    sh:property [ sh:path inv:concept ; sh:minCount 1 ; sh:maxCount 1 ; sh:class inv:MetaclassRecord ] ;
    sh:property [ sh:path inv:context ; sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:string ] ;
    sh:property [ sh:path inv:verificationStatus ; sh:hasValue inv:RepresentativeNotationVisuallyChecked ] ;
    sh:property [ sh:path inv:depictionStatus ; sh:minCount 1 ; sh:maxCount 1 ; sh:in ( inv:OriginalRedraw inv:SourceDescriptionOnly ) ] ;
    sh:property [ sh:path inv:evidence ; sh:minCount 1 ; sh:class inv:EvidenceLocation ] .

inv:NotationSectionShape a sh:NodeShape ;
    sh:targetClass inv:NotationSection ;
    sh:property [ sh:path rdfs:label ; sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:string ] ;
    sh:property [ sh:path dct:source ; sh:minCount 1 ; sh:nodeKind sh:IRI ] ;
    sh:property [ sh:path inv:sourceArtifact ; sh:minCount 1 ; sh:class inv:SourceArtifact ] .

inv:NotationSourceTableShape a sh:NodeShape ;
    sh:targetClass inv:NotationSourceTable ;
    sh:property [ sh:path inv:tableNumber ; sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:integer ] ;
    sh:property [ sh:path inv:sourceRole ; sh:minCount 1 ; sh:maxCount 1 ; sh:in (inv:RepresentativeNotation inv:SemanticDependency inv:DiagramExample) ] ;
    sh:property [ sh:path dct:source ; sh:minCount 1 ; sh:nodeKind sh:IRI ] .

inv:NotationSourceUnitShape a sh:NodeShape ;
    sh:targetClass inv:GraphicalProductionOccurrence, inv:NotationSourceCell ;
    sh:property [ sh:path rdfs:label ; sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:string ] ;
    sh:property [ sh:path inv:inNotationSection ; sh:minCount 1 ; sh:maxCount 1 ; sh:class inv:NotationSection ] ;
    sh:property [ sh:path inv:sourceArtifact ; sh:minCount 1 ; sh:maxCount 1 ; sh:class inv:SourceArtifact ] ;
    sh:property [ sh:path inv:pdfPage ; sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:integer ; sh:minInclusive 1 ] ;
    sh:property [ sh:path dct:source ; sh:minCount 1 ; sh:nodeKind sh:IRI ] .

inv:GraphicalProductionShape a sh:NodeShape ;
    sh:targetClass inv:GraphicalProductionOccurrence ;
    sh:property [ sh:path inv:productionOperator ; sh:minCount 1 ; sh:maxCount 1 ; sh:in ("=" "=|" "|=") ] ;
    sh:property [ sh:path inv:indexStatus ; sh:hasValue inv:TextIndexed ] ;
    sh:property [ sh:path inv:spacedBarAfterEquals ; sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:boolean ] .

inv:NotationSourceCellShape a sh:NodeShape ;
    sh:targetClass inv:NotationSourceCell ;
    sh:property [ sh:path inv:inSourceTable ; sh:minCount 1 ; sh:maxCount 1 ; sh:class inv:NotationSourceTable ] ;
    sh:property [ sh:path inv:indexStatus ; sh:hasValue inv:GridLabelIndexed ] ;
    sh:property [ sh:path inv:labelCellBounds ; sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:string ] .

inv:NotationReviewShape a sh:NodeShape ;
    sh:targetSubjectsOf inv:supportingSourceCell ;
    sh:targetSubjectsOf inv:coverageClaim ;
    sh:class inv:Notation ;
    sh:property [ sh:path inv:coverageClaim ; sh:hasValue inv:RepresentativeOnly ; sh:maxCount 1 ] ;
    sh:property [ sh:path inv:supportingProduction ; sh:minCount 1 ; sh:class inv:GraphicalProductionOccurrence ] ;
    sh:property [ sh:path inv:supportingSourceCell ; sh:class inv:NotationSourceCell ] ;
    sh:property [ sh:path inv:geometry ; sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:string ] ;
    sh:property [ sh:path inv:lineStyle ; sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:string ] ;
    sh:property [ sh:path inv:labelRule ; sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:string ] ;
    sh:property [ sh:path inv:compartmentRule ; sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:string ] ;
    sh:property [ sh:path inv:attachmentRule ; sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:string ] ;
    sh:property [ sh:path inv:condition ; sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:string ] ;
    sh:property [ sh:path inv:alternativeRule ; sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:string ] ;
    sh:property [ sh:path inv:representedKinds ; sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:string ] .

inv:SharedNotationRuleShape a sh:NodeShape ;
    sh:targetClass inv:SharedNotationRule ;
    sh:property [ sh:path rdfs:label ; sh:minCount 1 ; sh:maxCount 1 ] ;
    sh:property [ sh:path dct:description ; sh:minCount 1 ; sh:maxCount 1 ] ;
    sh:property [ sh:path dct:source ; sh:minCount 1 ; sh:nodeKind sh:IRI ] ;
    sh:property [ sh:path inv:sourceArtifact ; sh:minCount 1 ; sh:maxCount 1 ; sh:class inv:SourceArtifact ] ;
    sh:property [ sh:path inv:supportingProduction ; sh:class inv:GraphicalProductionOccurrence ] .

inv:SVGShapeAssetShape a sh:NodeShape ;
    sh:targetClass inv:SVGShapeAsset ;
    sh:property [ sh:path rdfs:label ; sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:string ] ;
    sh:property [ sh:path inv:asset ; sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:string ] ;
    sh:property [ sh:path inv:sha256 ; sh:minCount 1 ; sh:maxCount 1 ; sh:pattern "^[a-f0-9]{64}$" ] ;
    sh:property [ sh:path dct:source ; sh:minCount 1 ; sh:nodeKind sh:IRI ] ;
    sh:property [ sh:path dct:license ; sh:minCount 1 ; sh:maxCount 1 ; sh:nodeKind sh:IRI ] ;
    sh:property [ sh:path inv:caveat ; sh:minCount 1 ; sh:datatype xsd:string ] ;
    sh:property [ sh:path inv:sourceArtifact ; sh:minCount 1 ; sh:maxCount 1 ; sh:class inv:SourceArtifact ] ;
    sh:property [ sh:path inv:realizesProduction ; sh:minCount 1 ; sh:class inv:GraphicalProductionOccurrence ] ;
    sh:property [ sh:path inv:relatedNotation ; sh:class inv:Notation ] .

inv:SourceUnitAuditShape a sh:NodeShape ; sh:targetClass inv:SourceUnitAudit ;
    sh:property [ sh:path inv:auditsUnit ; sh:minCount 1 ; sh:maxCount 1 ; sh:or ( [ sh:class inv:NotationSourceCell ] [ sh:class inv:GraphicalProductionOccurrence ] ) ] ;
    sh:property [ sh:path inv:reviewStatus ; sh:hasValue inv:LocalAlternativesAudited ; sh:maxCount 1 ] ;
    sh:property [ sh:path inv:sourceArtifact ; sh:minCount 1 ; sh:maxCount 1 ; sh:class inv:SourceArtifact ] ;
    sh:property [ sh:path dct:source ; sh:minCount 1 ; sh:nodeKind sh:IRI ] ;
    sh:property [ sh:path inv:hasAlternative ; sh:minCount 1 ; sh:class inv:NotationAlternative ] .

inv:NotationAlternativeShape a sh:NodeShape ; sh:targetClass inv:NotationAlternative ;
    sh:property [ sh:path inv:geometry ; sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:string ] ;
    sh:property [ sh:path inv:lineStyle ; sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:string ] ;
    sh:property [ sh:path inv:labelRule ; sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:string ] ;
    sh:property [ sh:path inv:condition ; sh:minCount 1 ; sh:maxCount 1 ; sh:datatype xsd:string ] ;
    sh:property [ sh:path inv:renderingStatus ; sh:minCount 1 ; sh:maxCount 1 ; sh:in (inv:RepresentativeAsset inv:PartialRendering inv:DeferredRendering) ] ;
    sh:or (
      [ sh:property [ sh:path inv:renderingStatus ; sh:hasValue inv:DeferredRendering ] ;
        sh:property [ sh:path inv:deferredReason ; sh:minCount 1 ; sh:datatype xsd:string ] ;
        sh:property [ sh:path inv:representedByAsset ; sh:maxCount 0 ] ]
      [ sh:property [ sh:path inv:renderingStatus ; sh:hasValue inv:RepresentativeAsset ] ;
        sh:property [ sh:path inv:representedByAsset ; sh:minCount 1 ; sh:class inv:SVGShapeAsset ] ;
        sh:property [ sh:path inv:representationScope ; sh:minCount 1 ; sh:datatype xsd:string ] ;
        sh:property [ sh:path inv:deferredReason ; sh:maxCount 0 ] ]
      [ sh:property [ sh:path inv:renderingStatus ; sh:hasValue inv:PartialRendering ] ;
        sh:property [ sh:path inv:representedByAsset ; sh:minCount 1 ; sh:class inv:SVGShapeAsset ] ;
        sh:property [ sh:path inv:representationScope ; sh:minCount 1 ; sh:datatype xsd:string ] ;
        sh:property [ sh:path inv:deferredReason ; sh:minCount 1 ; sh:datatype xsd:string ] ]
    ) .
