Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test-cases: add HTML view #29

Merged
merged 1 commit into from
Feb 4, 2025
Merged
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
66 changes: 66 additions & 0 deletions test-cases/RMLSTARTC001a/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
## RMLSTARTC001a

**Title**: quoted triple in subject, one source, blank node in quoted subject

**Description**: Tests the creation of a asserted quoted triple (with a blank node as subject) in the position of subject with data from one file

**Error expected?** No

**Input**
```
c1,c2,c3
b0,o,ABC
```

**Mapping**
```
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rml: <http://w3id.org/rml/> .
@prefix ex: <http://example/> .
@prefix : <http://example.org/> .
@base <http://example.org/> .

:firstTM a rml:AssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:reference "c1" ;
rml:termType rml:BlankNode
];
rml:predicateObjectMap [
rml:predicate ex:p ;
rml:objectMap [
rml:template "http://example/{c2}"
]
] .

:secondTM a rml:AssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:quotedTriplesMap :firstTM
];
rml:predicateObjectMap [
rml:predicate ex:q ;
rml:objectMap [
rml:reference "c3"
]
] .

```

**Output**
```
_:b0 <http://example/p> <http://example/o> .
<< _:b0 <http://example/p> <http://example/o> >> <http://example/q> "ABC" .

```

78 changes: 78 additions & 0 deletions test-cases/RMLSTARTC001b/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
## RMLSTARTC001b

**Title**: quoted triple in subject, two sources, blank node in quoted subject

**Description**: Tests the creation of a asserted quoted triple (with a blank node as subject) in the position of subject with data from two files

**Error expected?** No

**Input**
```
c1-1,c1-2,c1-3
b0,o,1

```

**Input 1**
```
c2-1,c2-2
ABC,1

```

**Mapping**
```
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rml: <http://w3id.org/rml/> .
@prefix ex: <http://example/> .
@prefix : <http://example.org/> .
@base <http://example.org/> .

:firstTM a rml:AssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data1.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:reference "c1-1" ;
rml:termType rml:BlankNode
];
rml:predicateObjectMap [
rml:predicate ex:p ;
rml:objectMap [
rml:template "http://example/{c1-2}"
]
] .

:secondTM a rml:AssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data2.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:quotedTriplesMap :firstTM ;
rml:joinCondition [
rml:child "c2-2" ;
rml:parent "c1-3" ;
];
];
rml:predicateObjectMap [
rml:predicate ex:q ;
rml:objectMap [
rml:reference "c2-1"
]
] .

```

**Output**
```
_:b0 <http://example/p> <http://example/o> .
<< _:b0 <http://example/p> <http://example/o> >> <http://example/q> "ABC" .

```

68 changes: 68 additions & 0 deletions test-cases/RMLSTARTC002a/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
## RMLSTARTC002a

**Title**: quoted triple in subject, one source, blank node in quoted object

**Description**: Tests the creation of a asserted quoted triple (with a blank node as object) in the position of subject with data from one file

**Error expected?** No

**Input**
```
c1,c2,c3
s,b1,456
```

**Mapping**
```
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rml: <http://w3id.org/rml/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix ex: <http://example/> .
@prefix : <http://example.org/> .
@base <http://example.org/> .

:firstTM a rml:AssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:template "http://example/{c1}"
];
rml:predicateObjectMap [
rml:predicate ex:p ;
rml:objectMap [
rml:reference "c2" ;
rml:termType rml:BlankNode
]
] .

:secondTM a rml:AssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:quotedTriplesMap :firstTM
];
rml:predicateObjectMap [
rml:predicate ex:q ;
rml:objectMap [
rml:reference "c3";
rml:datatype xsd:integer
]
] .

```

**Output**
```
<http://example/s> <http://example/p> _:b1 .
<< <http://example/s> <http://example/p> _:b1 >> <http://example/q> "456"^^<http://www.w3.org/2001/XMLSchema#integer> .

```

80 changes: 80 additions & 0 deletions test-cases/RMLSTARTC002b/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
## RMLSTARTC002b

**Title**: quoted triple in subject, two sources, blank node in quoted object

**Description**: Tests the creation of a asserted quoted triple (with a blank node as object) in the position of subject with data from two files

**Error expected?** No

**Input**
```
c1-1,c1-2,c1-3
s,b1,1

```

**Input 1**
```
c2-1,c2-2
456,1

```

**Mapping**
```
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rml: <http://w3id.org/rml/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix ex: <http://example/> .
@prefix : <http://example.org/> .
@base <http://example.org/> .

:firstTM a rml:AssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data1.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:template "http://example/{c1-1}"
];
rml:predicateObjectMap [
rml:predicate ex:p ;
rml:objectMap [
rml:reference "c1-2" ;
rml:termType rml:BlankNode
]
] .

:secondTM a rml:AssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data2.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:quotedTriplesMap :firstTM ;
rml:joinCondition [
rml:child "c2-2" ;
rml:parent "c1-3" ;
];
];
rml:predicateObjectMap [
rml:predicate ex:q ;
rml:objectMap [
rml:reference "c2-1";
rml:datatype xsd:integer
]
] .

```

**Output**
```
<http://example/s> <http://example/p> _:b1 .
<< <http://example/s> <http://example/p> _:b1 >> <http://example/q> "456"^^<http://www.w3.org/2001/XMLSchema#integer> .

```

85 changes: 85 additions & 0 deletions test-cases/RMLSTARTC003a/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
## RMLSTARTC003a

**Title**: two-level quoted triple in subject, one source

**Description**: Tests the creation of two-level recursiveness of asserted quoted triples as subjects with data from one file

**Error expected?** No

**Input**
```
c1,c2,c3,c4
s,o,z,1
```

**Mapping**
```
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rml: <http://w3id.org/rml/> .
@prefix ex: <http://example/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix : <http://example.org/> .
@base <http://example.org/> .

:firstTM a rml:AssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:template "http://example/{c1}"
];
rml:predicateObjectMap [
rml:predicate ex:p ;
rml:objectMap [
rml:template "http://example/{c2}"
]
] .

:secondTM a rml:AssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:quotedTriplesMap :firstTM
];
rml:predicateObjectMap [
rml:predicate ex:r ;
rml:objectMap [
rml:template "http://example/{c3}"
]
] .

:thirdTM a rml:AssertedTriplesMap ;
rml:logicalSource [
rml:source [ a rml:Source, rml:RelativePathSource;
rml:path "data.csv";
];
rml:referenceFormulation rml:CSV
];
rml:subjectMap [
rml:quotedTriplesMap :secondTM
];
rml:predicateObjectMap [
rml:predicate ex:q ;
rml:objectMap [
rml:reference "c4" ;
rml:datatype xsd:integer
]
] .

```

**Output**
```
<http://example/s> <http://example/p> <http://example/o> .
<< <http://example/s> <http://example/p> <http://example/o> >> <http://example/r> <http://example/z> .
<< << <http://example/s> <http://example/p> <http://example/o> >> <http://example/r> <http://example/z> >> <http://example/q> "1"^^<http://www.w3.org/2001/XMLSchema#integer> .

```

Loading