Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions shacl12-test-suite/tests/node-expr/manifest.ttl
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
a mf:Manifest ;
mf:include <constraints/manifest.ttl> ;
mf:include <shnex/manifest.ttl> ;
mf:include <shnex-sparql/manifest.ttl> ;
.
29 changes: 29 additions & 0 deletions shacl12-test-suite/tests/node-expr/shnex-sparql/abs.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
@prefix ex: <http://example.com/ns#> .
@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .
@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 shnex: <http://www.w3.org/ns/shacl-node-expr#> .
@prefix sht: <http://www.w3.org/ns/shacl-test#> .
@prefix sparql: <http://www.w3.org/ns/sparql#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<>
rdf:type mf:Manifest ;
mf:entries (
<abs-example>
) ;
.

<abs-example>
rdf:type sht:EvalNodeExpr ;
rdfs:label "Test of a sparql:abs expression based on the shnex-sparql:example" ;
mf:action [
sht:nodeExpr [
sparql:abs ( -42 ) ;
] ;
] ;
mf:result ( 42 ) ;
mf:status sht:approved ;
.
29 changes: 29 additions & 0 deletions shacl12-test-suite/tests/node-expr/shnex-sparql/bnode.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
@prefix ex: <http://example.com/ns#> .
@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .
@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 shnex: <http://www.w3.org/ns/shacl-node-expr#> .
@prefix sht: <http://www.w3.org/ns/shacl-test#> .
@prefix sparql: <http://www.w3.org/ns/sparql#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<>
rdf:type mf:Manifest ;
mf:entries (
<bnode-isBlank>
) ;
.

<bnode-isBlank>
rdf:type sht:EvalNodeExpr ;
rdfs:label "Test of a sparql:bnode expression, checking whether it produces a blank node" ;
mf:action [
sht:nodeExpr [
sparql:isBlank ( [ sparql:bnode () ] ) ;
] ;
] ;
mf:result ( true ) ;
mf:status sht:approved ;
.
29 changes: 29 additions & 0 deletions shacl12-test-suite/tests/node-expr/shnex-sparql/bound.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
@prefix ex: <http://example.com/ns#> .
@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .
@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 shnex: <http://www.w3.org/ns/shacl-node-expr#> .
@prefix sht: <http://www.w3.org/ns/shacl-test#> .
@prefix sparql: <http://www.w3.org/ns/sparql#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<>
rdf:type mf:Manifest ;
mf:entries (
<bound-example>
) ;
.

<bound-example>
rdf:type sht:EvalNodeExpr ;
rdfs:label "Test of a sparql:bound expression based on the shnex-sparql:example" ;
mf:action [
sht:nodeExpr [
sparql:bound ( [ shnex:var "var" ] ) ;
] ;
] ;
mf:result ( false ) ;
mf:status sht:approved ;
.
29 changes: 29 additions & 0 deletions shacl12-test-suite/tests/node-expr/shnex-sparql/ceil.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
@prefix ex: <http://example.com/ns#> .
@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .
@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 shnex: <http://www.w3.org/ns/shacl-node-expr#> .
@prefix sht: <http://www.w3.org/ns/shacl-test#> .
@prefix sparql: <http://www.w3.org/ns/sparql#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<>
rdf:type mf:Manifest ;
mf:entries (
<ceil-example>
) ;
.

<ceil-example>
rdf:type sht:EvalNodeExpr ;
rdfs:label "Test of a sparql:ceil expression based on the shnex-sparql:example" ;
mf:action [
sht:nodeExpr [
sparql:ceil ( 3.2 ) ;
] ;
] ;
mf:result ( 4.0 ) ;
mf:status sht:approved ;
.
29 changes: 29 additions & 0 deletions shacl12-test-suite/tests/node-expr/shnex-sparql/coalesce.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
@prefix ex: <http://example.com/ns#> .
@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .
@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 shnex: <http://www.w3.org/ns/shacl-node-expr#> .
@prefix sht: <http://www.w3.org/ns/shacl-test#> .
@prefix sparql: <http://www.w3.org/ns/sparql#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<>
rdf:type mf:Manifest ;
mf:entries (
<coalesce-example>
) ;
.

<coalesce-example>
rdf:type sht:EvalNodeExpr ;
rdfs:label "Test of a sparql:coalesce expression based on the shnex-sparql:example" ;
mf:action [
sht:nodeExpr [
sparql:coalesce ( [ shnex:var "optionalValue" ] "default" ) ;
] ;
] ;
mf:result ( "default" ) ;
mf:status sht:approved ;
.
29 changes: 29 additions & 0 deletions shacl12-test-suite/tests/node-expr/shnex-sparql/concat.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
@prefix ex: <http://example.com/ns#> .
@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .
@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 shnex: <http://www.w3.org/ns/shacl-node-expr#> .
@prefix sht: <http://www.w3.org/ns/shacl-test#> .
@prefix sparql: <http://www.w3.org/ns/sparql#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<>
rdf:type mf:Manifest ;
mf:entries (
<concat-example>
) ;
.

<concat-example>
rdf:type sht:EvalNodeExpr ;
rdfs:label "Test of a sparql:concat expression based on the shnex-sparql:example" ;
mf:action [
sht:nodeExpr [
sparql:concat ( "hello" " " "world" ) ;
] ;
] ;
mf:result ( "hello world" ) ;
mf:status sht:approved ;
.
29 changes: 29 additions & 0 deletions shacl12-test-suite/tests/node-expr/shnex-sparql/contains.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
@prefix ex: <http://example.com/ns#> .
@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .
@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 shnex: <http://www.w3.org/ns/shacl-node-expr#> .
@prefix sht: <http://www.w3.org/ns/shacl-test#> .
@prefix sparql: <http://www.w3.org/ns/sparql#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<>
rdf:type mf:Manifest ;
mf:entries (
<contains-example>
) ;
.

<contains-example>
rdf:type sht:EvalNodeExpr ;
rdfs:label "Test of a sparql:contains expression based on the shnex-sparql:example" ;
mf:action [
sht:nodeExpr [
sparql:contains ( "hello world" "lo wo" ) ;
] ;
] ;
mf:result ( true ) ;
mf:status sht:approved ;
.
29 changes: 29 additions & 0 deletions shacl12-test-suite/tests/node-expr/shnex-sparql/datatype.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
@prefix ex: <http://example.com/ns#> .
@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .
@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 shnex: <http://www.w3.org/ns/shacl-node-expr#> .
@prefix sht: <http://www.w3.org/ns/shacl-test#> .
@prefix sparql: <http://www.w3.org/ns/sparql#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<>
rdf:type mf:Manifest ;
mf:entries (
<datatype-example>
) ;
.

<datatype-example>
rdf:type sht:EvalNodeExpr ;
rdfs:label "Test of a sparql:datatype expression based on the shnex-sparql:example" ;
mf:action [
sht:nodeExpr [
sparql:datatype ( "42"^^xsd:integer ) ;
] ;
] ;
mf:result ( xsd:integer ) ;
mf:status sht:approved ;
.
29 changes: 29 additions & 0 deletions shacl12-test-suite/tests/node-expr/shnex-sparql/day.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
@prefix ex: <http://example.com/ns#> .
@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .
@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 shnex: <http://www.w3.org/ns/shacl-node-expr#> .
@prefix sht: <http://www.w3.org/ns/shacl-test#> .
@prefix sparql: <http://www.w3.org/ns/sparql#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<>
rdf:type mf:Manifest ;
mf:entries (
<day-example>
) ;
.

<day-example>
rdf:type sht:EvalNodeExpr ;
rdfs:label "Test of a sparql:day expression based on the shnex-sparql:example" ;
mf:action [
sht:nodeExpr [
sparql:day ( "2023-12-25T10:30:00"^^xsd:dateTime ) ;
] ;
] ;
mf:result ( 25 ) ;
mf:status sht:approved ;
.
29 changes: 29 additions & 0 deletions shacl12-test-suite/tests/node-expr/shnex-sparql/divide.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
@prefix ex: <http://example.com/ns#> .
@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .
@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 shnex: <http://www.w3.org/ns/shacl-node-expr#> .
@prefix sht: <http://www.w3.org/ns/shacl-test#> .
@prefix sparql: <http://www.w3.org/ns/sparql#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<>
rdf:type mf:Manifest ;
mf:entries (
<divide-example>
) ;
.

<divide-example>
rdf:type sht:EvalNodeExpr ;
rdfs:label "Test of a sparql:divide expression based on the shnex-sparql:example" ;
mf:action [
sht:nodeExpr [
sparql:divide ( 84 2 ) ;
] ;
] ;
mf:result ( 42.0 ) ;
mf:status sht:approved ;
.
29 changes: 29 additions & 0 deletions shacl12-test-suite/tests/node-expr/shnex-sparql/encode.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
@prefix ex: <http://example.com/ns#> .
@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .
@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 shnex: <http://www.w3.org/ns/shacl-node-expr#> .
@prefix sht: <http://www.w3.org/ns/shacl-test#> .
@prefix sparql: <http://www.w3.org/ns/sparql#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<>
rdf:type mf:Manifest ;
mf:entries (
<encode-example>
) ;
.

<encode-example>
rdf:type sht:EvalNodeExpr ;
rdfs:label "Test of a sparql:encode expression based on the shnex-sparql:example" ;
mf:action [
sht:nodeExpr [
sparql:encode ( "hello world" ) ;
] ;
] ;
mf:result ( "hello%20world" ) ;
mf:status sht:approved ;
.
29 changes: 29 additions & 0 deletions shacl12-test-suite/tests/node-expr/shnex-sparql/equals.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
@prefix ex: <http://example.com/ns#> .
@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .
@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 shnex: <http://www.w3.org/ns/shacl-node-expr#> .
@prefix sht: <http://www.w3.org/ns/shacl-test#> .
@prefix sparql: <http://www.w3.org/ns/sparql#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<>
rdf:type mf:Manifest ;
mf:entries (
<equals-example>
) ;
.

<equals-example>
rdf:type sht:EvalNodeExpr ;
rdfs:label "Test of a sparql:equals expression based on the shnex-sparql:example" ;
mf:action [
sht:nodeExpr [
sparql:equals ( "hello" "hello" ) ;
] ;
] ;
mf:result ( true ) ;
mf:status sht:approved ;
.
29 changes: 29 additions & 0 deletions shacl12-test-suite/tests/node-expr/shnex-sparql/floor.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
@prefix ex: <http://example.com/ns#> .
@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .
@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 shnex: <http://www.w3.org/ns/shacl-node-expr#> .
@prefix sht: <http://www.w3.org/ns/shacl-test#> .
@prefix sparql: <http://www.w3.org/ns/sparql#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<>
rdf:type mf:Manifest ;
mf:entries (
<floor-example>
) ;
.

<floor-example>
rdf:type sht:EvalNodeExpr ;
rdfs:label "Test of a sparql:floor expression based on the shnex-sparql:example" ;
mf:action [
sht:nodeExpr [
sparql:floor ( 3.8 ) ;
] ;
] ;
mf:result ( 3.0 ) ;
mf:status sht:approved ;
.
Loading
Loading