0

假设我试图表达一个Binding必须恰好有 1 个 合作伙伴FunctionalClass并且正好有 1 个 合作伙伴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: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 ;
        ] ;
    ] ;
.
4

1 回答 1

1

我相信对于某些合作伙伴既是功能类又是蛋白质的情况,您需要第二个,即您可能只有一个值并且仍然满足第一个形状。

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

于 2021-06-25T00:12:20.840 回答