SPARQLRule 未构建

SPARQLRule not constructing

我有一个带有 sh:SPARQLTargetsh:SPARQLRule 的 Nodeshape。我尝试 运行 Target 和 Rule 作为查询并都提供结果,但是当我使用 Apache Jena SHACL 处理器执行 Shapes 时,它不会构造任何三元组。我做错什么了吗?我没主意了。 这是我的节点形状:

iep:hasKG331
a rdf:Property, sh:NodeShape ;
sh:Target [
    a sh:SPARQLTarget ;
          sh:select """
            PREFIX express: <https://w3id.org/express#>
            PREFIX ifcowl: <http://standards.buildingsmart.org/IFC/DEV/IFC4/ADD1/OWL#>
            PREFIX rdf:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
            PREFIX iep: <https://www.inf.bi.rub.de/semweb/ns/ifc-enrichment-procedure/iep#>

            SELECT ?this
            WHERE {
                ?this rdf:type ifcowl:IfcWallStandardCase .
                ?relDefinesByProperties ifcowl:relatedObjects_IfcRelDefines ?this .
                ?relDefinesByProperties ifcowl:relatingPropertyDefinition_IfcRelDefinesByProperties ?pset .
                }
          """ ;

    ] ;
sh:rule [
    a sh:SPARQLRule ;
        sh:construct """
        PREFIX express: <https://w3id.org/express#>
        PREFIX ifcowl: <http://standards.buildingsmart.org/IFC/DEV/IFC4/ADD1/OWL#>
        PREFIX iep: <xxx/ifc-enrichment-procedure/iep#>

        CONSTRUCT {
            $this iep:hasKG iep:hasKG331 .
        }
        WHERE {
            ?relDBP ifcowl:relatedObjects_IfcRelDefines $this .
            ?relDBP ifcowl:relatingPropertyDefinition_IfcRelDefinesByProperties ?propSet .
            ?propSet ifcowl:hasProperties_IfcPropertySet ?psv1 .
            ?propSet ifcowl:hasProperties_IfcPropertySet ?psv2 .
            ?psv1 iep:isExternal true .
            ?psv2 iep:isLoadBearing true .
        }
    """ ;
] .

正如我提到的,当我将目标或规则作为单个查询执行时,我确实得到了结果,并且来自目标的焦点节点在规则中确实出现了 $this。 IRI iep:isExternaliep:isLoadBearing 在之前的步骤中被推断出来。我错过了什么吗?

不看细节,sh:Target需要sh:target小写t。所有 属性 个名称通常都是小写。