Skip to content

Commit

Permalink
Fix #634
Browse files Browse the repository at this point in the history
  • Loading branch information
tfrancart committed Sep 29, 2024
1 parent f6dada5 commit e54627f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ export class SHACLSpecificationEntity extends SHACLSpecificationEntry implements
}

/**
* @returns all properties available on this node shape, including inherited properties from superclasses
* @returns all (non-deactivated) properties available on this node shape, including inherited properties from superclasses
*/
getProperties(): string[] {
var items: string[] = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,12 @@ export class SHACLSpecificationProvider extends BaseRDFReader implements ISparna
return !that.graph.hasTriple(node, SH.DEACTIVATED, factory.literal("true", XSD.BOOLEAN))
});

// remove from the initial list the NodeShapes that are connected to only deactivated properties
// by checking the lenght of the list of properties we can make sure of that
dedupNodeShapes = dedupNodeShapes.filter(node => {
return (this.getEntity(node.value) as SHACLSpecificationEntity).getProperties().length > 0;
});

var items: SHACLSpecificationEntity[] = [];
for (const aNode of dedupNodeShapes) {
items.push((this.getEntity(aNode.value) as SHACLSpecificationEntity));
Expand Down

0 comments on commit e54627f

Please sign in to comment.