-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ issue #10] Added 4 SPARQL integration tests with data from
- Loading branch information
agazzarini
committed
Aug 21, 2014
1 parent
a64b96f
commit 3177a0d
Showing
15 changed files
with
233 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
...s/src/test/java/org/gazzax/labs/jena/nosql/fwk/w3c/Ch2_1_WritingSimpleQueries_ITCase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package org.gazzax.labs.jena.nosql.fwk.w3c; | ||
|
||
import org.gazzax.labs.jena.nosql.fwk.SparqlIntegrationTestCase; | ||
|
||
/** | ||
* SPARQL Integration test with examples taken from http://www.w3.org/TR/sparql11-query | ||
* | ||
* @see http://www.w3.org/TR/sparql11-query/#WritingSimpleQueries | ||
* @author Andrea Gazzarini | ||
* @since 1.0 | ||
*/ | ||
public class Ch2_1_WritingSimpleQueries_ITCase extends SparqlIntegrationTestCase { | ||
|
||
@Override | ||
protected String testFilename() { | ||
return "chapter_2.1_ex1"; | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
...-tests/src/test/java/org/gazzax/labs/jena/nosql/fwk/w3c/Ch2_2_MultipleMatches_ITCase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package org.gazzax.labs.jena.nosql.fwk.w3c; | ||
|
||
import org.gazzax.labs.jena.nosql.fwk.SparqlIntegrationTestCase; | ||
|
||
/** | ||
* SPARQL Integration test with examples taken from http://www.w3.org/TR/sparql11-query | ||
* | ||
* @see http://www.w3.org/TR/sparql11-query/#MultipleMatches | ||
* @author Andrea Gazzarini | ||
* @since 1.0 | ||
*/ | ||
public class Ch2_2_MultipleMatches_ITCase extends SparqlIntegrationTestCase { | ||
@Override | ||
protected String testFilename() { | ||
return "chapter_2.2_ex1"; | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
...ts/src/test/java/org/gazzax/labs/jena/nosql/fwk/w3c/Ch2_3_MatchingRDFLiterals_ITCase.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package org.gazzax.labs.jena.nosql.fwk.w3c; | ||
|
||
import org.gazzax.labs.jena.nosql.fwk.SparqlIntegrationTestCase; | ||
import org.junit.Test; | ||
|
||
/** | ||
* SPARQL Integration test with examples taken from http://www.w3.org/TR/sparql11-query | ||
* | ||
* @see http://www.w3.org/TR/sparql11-query/#matchingRDFLiterals | ||
* @author Andrea Gazzarini | ||
* @since 1.0 | ||
*/ | ||
public class Ch2_3_MatchingRDFLiterals_ITCase extends SparqlIntegrationTestCase { | ||
@Override | ||
protected String testFilename() { | ||
return "chapter_2.3_ex1"; | ||
} | ||
|
||
/** | ||
* Executes the 2nd test of the chapter. | ||
* | ||
* @throws Exception hopefully never, otherwise the test fails. | ||
*/ | ||
@Test | ||
public void example2() throws Exception { | ||
executeTestWithFile("chapter_2.3_ex2"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> | ||
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false"> | ||
<appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender"> | ||
<layout class="org.apache.log4j.PatternLayout"> | ||
<param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c] %m%n" /> | ||
</layout> | ||
</appender> | ||
<category name="org.gazzax"> | ||
<priority value="DEBUG"/> | ||
</category> | ||
<category name="org.apache.cassandra.service"> | ||
<priority value="ERROR"/> | ||
</category> | ||
<category name="com"> | ||
<priority value="ERROR"/> | ||
</category> | ||
<root> | ||
<priority value="ERROR"/> | ||
<appender-ref ref="CONSOLE"/> | ||
</root> | ||
</log4j:configuration> |
7 changes: 7 additions & 0 deletions
7
jena-nosql-integration-tests/src/test/resources/w3c/chapter_2.2_ex1.rq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
PREFIX foaf: <http://xmlns.com/foaf/0.1/> | ||
SELECT ?name ?mbox | ||
WHERE | ||
{ | ||
?x foaf:name ?name . | ||
?x foaf:mbox ?mbox | ||
} |
6 changes: 6 additions & 0 deletions
6
jena-nosql-integration-tests/src/test/resources/w3c/chapter_2.2_ex1.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
---------------------------------------------------- | ||
| name | mbox | | ||
==================================================== | ||
| "Johnny Lee Outlaw" | <mailto:jlow@example.com> | | ||
| "Peter Goodguy" | <mailto:peter@example.org> | | ||
---------------------------------------------------- |
7 changes: 7 additions & 0 deletions
7
jena-nosql-integration-tests/src/test/resources/w3c/chapter_2.2_ex1.ttl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
@prefix foaf: <http://xmlns.com/foaf/0.1/> . | ||
|
||
_:a foaf:name "Johnny Lee Outlaw" . | ||
_:a foaf:mbox <mailto:[email protected]> . | ||
_:b foaf:name "Peter Goodguy" . | ||
_:b foaf:mbox <mailto:[email protected]> . | ||
_:c foaf:mbox <mailto:[email protected]> . |
6 changes: 6 additions & 0 deletions
6
jena-nosql-integration-tests/src/test/resources/w3c/chapter_2.3_ex1.rq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
PREFIX dt: <http://example.org/datatype#> | ||
PREFIX ns: <http://example.org/ns#> | ||
PREFIX : <http://example.org/ns#> | ||
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> | ||
|
||
SELECT ?v WHERE { ?v ?p "cat" } |
4 changes: 4 additions & 0 deletions
4
jena-nosql-integration-tests/src/test/resources/w3c/chapter_2.3_ex1.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
----- | ||
| v | | ||
===== | ||
----- |
8 changes: 8 additions & 0 deletions
8
jena-nosql-integration-tests/src/test/resources/w3c/chapter_2.3_ex1.ttl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
@prefix dt: <http://example.org/datatype#> . | ||
@prefix ns: <http://example.org/ns#> . | ||
@prefix : <http://example.org/ns#> . | ||
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . | ||
|
||
:x ns:p "cat"@en . | ||
:y ns:p "42"^^xsd:integer . | ||
:z ns:p "abc"^^dt:specialDatatype . |
6 changes: 6 additions & 0 deletions
6
jena-nosql-integration-tests/src/test/resources/w3c/chapter_2.3_ex2.rq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
PREFIX dt: <http://example.org/datatype#> | ||
PREFIX ns: <http://example.org/ns#> | ||
PREFIX : <http://example.org/ns#> | ||
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> | ||
|
||
SELECT ?v WHERE { ?v ?p "cat"@en } |
5 changes: 5 additions & 0 deletions
5
jena-nosql-integration-tests/src/test/resources/w3c/chapter_2.3_ex2.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
------ | ||
| v | | ||
====== | ||
| :x | | ||
------ |