Skip to content

Commit 355e735

Browse files
committed
Revert "fix: do not fail validation for target nodes that don't exist"
This reverts commit 48ad810. # Conflicts: # src/shapes-graph.js # test/data/data-shapes/custom/manifest.ttl # test/data/data-shapes/custom/targetNodeDoesNotExist.ttl
1 parent ca719e6 commit 355e735

File tree

4 files changed

+1
-42
lines changed

4 files changed

+1
-42
lines changed

src/shapes-graph.ts

+1-8
Original file line numberDiff line numberDiff line change
@@ -336,14 +336,7 @@ export class Shape {
336336
results.addAll(getInstancesOf(dataGraph.node(targetClass), ns))
337337
})
338338

339-
const targetNodes = this.shapeNodePointer.out(sh.targetNode).terms
340-
// Ensure the node exists in data graph before considering it as a validatable target node
341-
.filter((targetNode) => (
342-
dataGraph.dataset.match(targetNode).size > 0 ||
343-
dataGraph.dataset.match(null, targetNode).size > 0 ||
344-
dataGraph.dataset.match(null, null, targetNode).size > 0
345-
))
346-
results.addAll(targetNodes)
339+
results.addAll(this.shapeNodePointer.out(sh.targetNode).terms)
347340

348341
this.shapeNodePointer
349342
.out(sh.targetSubjectsOf)

test/data/data-shapes/custom/manifest.ttl

-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
mf:include <uniqueLang-false.ttl> ;
1010
mf:include <multiLevelInheritance.ttl> ;
1111
mf:include <multiLevelInheritanceWithImplicitTarget.ttl> ;
12-
mf:include <targetNodeDoesNotExist.ttl> ;
1312
mf:include <lessThan-moreTypes.ttl> ;
1413
mf:include <circularReferences.ttl> ;
1514
mf:include <and-minCount.ttl> ;

test/data/data-shapes/custom/targetNodeDoesNotExist-data.ttl

-1
This file was deleted.

test/data/data-shapes/custom/targetNodeDoesNotExist.ttl

-32
This file was deleted.

0 commit comments

Comments
 (0)