Skip to content
This repository has been archived by the owner on Feb 22, 2020. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Signed-off-by: Håvard Ottestad <[email protected]>
  • Loading branch information
hmottestad committed Mar 18, 2019
1 parent ae3ca64 commit 7c6cf29
Show file tree
Hide file tree
Showing 6 changed files with 113 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,23 +40,57 @@
@RunWith(Parameterized.class)
abstract public class AbstractShaclTest {

private static final List<String> testCasePaths = Stream.of("test-cases/complex/dcat", "test-cases/complex/foaf",
"test-cases/datatype/simple", "test-cases/datatype/targetNode", "test-cases/datatype/targetSubjectsOf",
"test-cases/datatype/targetSubjectsOfSingle", "test-cases/datatype/targetObjectsOf",
"test-cases/minLength/simple", "test-cases/maxLength/simple", "test-cases/pattern/simple",
"test-cases/pattern/multiple", "test-cases/languageIn/simple", "test-cases/nodeKind/simple",
"test-cases/minCount/simple", "test-cases/minCount/targetNode", "test-cases/maxCount/simple",
"test-cases/maxCount/targetNode", "test-cases/or/multiple", "test-cases/or/inheritance",
"test-cases/or/inheritance-deep", "test-cases/or/inheritance-deep-minCountMaxCount",
"test-cases/or/inheritanceNodeShape", "test-cases/or/datatype", "test-cases/or/datatypeTargetNode",
"test-cases/or/minCountMaxCount", "test-cases/or/maxCount", "test-cases/or/minCount",
"test-cases/or/nodeKindMinLength", "test-cases/or/implicitAnd", "test-cases/or/datatypeDifferentPaths",
"test-cases/minExclusive/simple", "test-cases/minExclusive/dateVsTime", "test-cases/maxExclusive/simple",
"test-cases/minInclusive/simple", "test-cases/maxInclusive/simple", "test-cases/implicitTargetClass/simple",
"test-cases/class/simple", "test-cases/class/subclass", "test-cases/class/targetNode",
"test-cases/class/multipleClass", "test-cases/or/class", "test-cases/or/datatype2",
"test-cases/or/minCountDifferentPath", "test-cases/deactivated/nodeshape", "test-cases/deactivated/or",
"test-cases/deactivated/propertyshape").distinct().collect(Collectors.toList());
private static final List<String> testCasePaths = Stream.of(
// "test-cases/complex/dcat",
// "test-cases/complex/foaf",
// "test-cases/datatype/simple",
// "test-cases/datatype/targetNode",
// "test-cases/datatype/targetSubjectsOf",
// "test-cases/datatype/targetSubjectsOfSingle",
// "test-cases/datatype/targetObjectsOf",
// "test-cases/minLength/simple",
// "test-cases/maxLength/simple",
// "test-cases/pattern/simple",
// "test-cases/pattern/multiple",
// "test-cases/languageIn/simple",
// "test-cases/nodeKind/simple",
"test-cases/nodeKind/validateTarget"
// "test-cases/minCount/simple",
// "test-cases/minCount/targetNode",
// "test-cases/maxCount/simple",
// "test-cases/maxCount/targetNode",
// "test-cases/or/multiple",
// "test-cases/or/inheritance",
// "test-cases/or/inheritance-deep",
// "test-cases/or/inheritance-deep-minCountMaxCount",
// "test-cases/or/inheritanceNodeShape",
// "test-cases/or/datatype",
// "test-cases/or/datatypeTargetNode",
// "test-cases/or/minCountMaxCount",
// "test-cases/or/maxCount",
// "test-cases/or/minCount",
// "test-cases/or/nodeKindMinLength",
// "test-cases/or/implicitAnd",
// "test-cases/or/datatypeDifferentPaths",
// "test-cases/minExclusive/simple",
// "test-cases/minExclusive/dateVsTime",
// "test-cases/maxExclusive/simple",
// "test-cases/minInclusive/simple",
// "test-cases/maxInclusive/simple",
// "test-cases/implicitTargetClass/simple",
// "test-cases/class/simple",
// "test-cases/class/subclass",
// "test-cases/class/targetNode",
// "test-cases/class/multipleClass",
// "test-cases/or/class",
// "test-cases/or/datatype2",
// "test-cases/or/minCountDifferentPath",
// "test-cases/deactivated/nodeshape",
// "test-cases/deactivated/or",
// "test-cases/deactivated/propertyshape"
)
.distinct()
.collect(Collectors.toList());

final String testCasePath;
final String path;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
PREFIX ex: <http://example.com/ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
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 xsd: <http://www.w3.org/2001/XMLSchema#>

INSERT DATA {

[] a ex:Person .


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@base <http://example.com/ns> .
@prefix ex: <http://example.com/ns#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@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 xsd: <http://www.w3.org/2001/XMLSchema#> .

ex:PersonShape
a sh:NodeShape ;
sh:targetClass ex:Person ;
sh:nodeKind sh:IRI .

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
PREFIX ex: <http://example.com/ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
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 xsd: <http://www.w3.org/2001/XMLSchema#>

INSERT DATA {

ex:validPerson1 a ex:Human.

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
PREFIX ex: <http://example.com/ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
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 xsd: <http://www.w3.org/2001/XMLSchema#>

INSERT DATA {

ex:validPerson1 a ex:Person.

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
PREFIX ex: <http://example.com/ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
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 xsd: <http://www.w3.org/2001/XMLSchema#>

INSERT DATA {

ex:validPerson1 a ex:Person.

}

0 comments on commit 7c6cf29

Please sign in to comment.