Index: src/main/resources/com/ncc/aif/restricted_hypothesis_aif.shacl IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- src/main/resources/com/ncc/aif/restricted_hypothesis_aif.shacl (revision c1b11026fd8cfb9bf8b641e7b4223c62801fd22b) +++ src/main/resources/com/ncc/aif/restricted_hypothesis_aif.shacl (date 1554338411000) @@ -128,17 +128,16 @@ #------------------------ aida:HypothesisClusterMembersSameAsBaseClass a sh:SPARQLConstraint ; - sh:message "All Clusters must be homogeneous by base class (Entity, Event, or Relation). Found {?prototype} in cluster {?cluster}" ; + sh:message "All Clusters must have homogeneous members by base class (Entity, Event, or Relation)" ; sh:select """ PREFIX rdf: PREFIX aida: - SELECT $this ?cluster ?prototype + SELECT $this (?member AS $value) WHERE { - $this aida:cluster ?cluster . - $this aida:clusterMember/rdf:type ?memberType . - ?cluster a aida:SameAsCluster . - ?cluster aida:prototype ?prototype . - ?prototype rdf:type ?prototypeType . + ?membership aida:cluster $this . + ?membership aida:clusterMember ?member . + ?member rdf:type ?memberType . + $this aida:prototype/rdf:type ?prototypeType . FILTER ( ?memberType != ?prototypeType ) } """ @@ -146,7 +145,7 @@ aida:HypothesisClusterMembersShape a sh:NodeShape ; - sh:targetClass aida:ClusterMembership ; + sh:targetClass aida:SameAsCluster; sh:sparql aida:HypothesisClusterMembersSameAsBaseClass . ########################