shacl sh:qualifiedValueShape 表达式缩写

Shacl sh:qualifiedValueShape expression abbreviation

假设我试图表达 Binding 必须有 exactly 1 partnerFunctionalClassexactly 1 partnerProtein.

不知这样够不够

resnet:Binding
  rdf:type owl:Class ;
  rdf:type sh:NodeShape ;
  rdfs:label "Binding" ;
  rdfs:subClassOf owl:Thing ;
  sh:property [
      sh:path resnet:partner ;
      sh:NodeKind sh:IRI ;
      sh:qualifiedMaxCount 1 ;
      sh:qualifiedMinCount 1 ;
      sh:qualifiedValueShape [
          sh:class resnet:FunctionalClass ;
        ] ;
    ] ;
  sh:property [
      sh:path resnet:partner ;
      sh:NodeKind sh:IRI ;
      sh:qualifiedMaxCount 1 ;
      sh:qualifiedMinCount 1 ;
      sh:qualifiedValueShape [
          sh:class resnet:Protein ;
        ] ;
    ] ;
.

或者我需要完整的仪式

resnet:Binding
  rdf:type owl:Class ;
  rdf:type sh:NodeShape ;
  rdfs:label "Binding" ;
  rdfs:subClassOf owl:Thing ;
  sh:property [
      sh:path resnet:partner ;
      sh:minCount 2 ;
      sh:maxCount 2 ;
    ] ;
  sh:property [
      sh:path resnet:partner ;
      sh:qualifiedMaxCount 1 ;
      sh:qualifiedMinCount 1 ;
      sh:qualifiedValueShape [
          sh:class resnet:FunctionalClass ;
        ] ;
    ] ;
  sh:property [
      sh:path resnet:partner ;
      sh:qualifiedMaxCount 1 ;
      sh:qualifiedMinCount 1 ;
      sh:qualifiedValueShape [
          sh:class resnet:Protein ;
        ] ;
    ] ;
.

我相信您需要第二种,因为某些伙伴既是 FunctionalClass 又是 Protein,即您可能只有一个值,但仍然满足第一种形状。

或者,这看起来像是 sh:qualifiedValueShapesDisjoint

的情况