0

对于递归形状,有没有办法限制 SHACL 验证器的 Jena api 中的递归量?例如下面的形状。

@prefix shape: <http://example.org/shape/> .
@prefix person: <http://example.org/shape/Person#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix sh: <http://www.w3.org/ns/shacl#> .
@prefix schema: <http://schema.org/> .

shape:Person
    a rdfs:Class, sh:NodeShape ;
    rdfs:label "Person" ;
    rdfs:subClassOf rdfs:Resource ;
    sh:targetClass shape:Person ;
    sh:ignoredProperties ( rdf:type ) ;
    sh:closed true ;    
    sh:property [
          sh:path person:knows ;
          sh:name "knows" ;
          sh:class shape:Person ;
          sh:nodeKind sh:IRI ;
      ] ;
.

是否可以只验证“知道”属性 1 或 2 并让它通过更深的关系?

4

0 回答 0