tests/cache/"+type+"/"+file+"\n";
7 | }
8 | return s;
9 | }
10 |
11 | function generateDownloads(manifestURI) {
12 | var output = document.getElementById("script");
13 | while (output.firstChild) {
14 | output.removeChild(output.firstChild);
15 | }
16 | var pos = manifestURI.lastIndexOf("/");
17 | for (pos--; pos>=0 && manifestURI.charAt(pos)!="/"; pos--);
18 | var baseURI = "http://rdfa.info/test-suite/rdfa1.1"+manifestURI.substring(pos);
19 | var type = manifestURI.substring(pos).substring(1);
20 | type = type.substring(0,type.indexOf("/"));
21 | console.log("Loading manifest from: "+manifestURI+", base: "+baseURI+", type: "+type);
22 | var requester = new XMLHttpRequest();
23 | requester.open("GET",manifestURI,false);
24 | requester.send(null);
25 | console.log("Parsing manifest...");
26 | var turtle = document.data.implementation.parse(requester.responseText,"text/turtle",{ baseURI: baseURI});
27 | //console.log(turtle.toString());
28 | var dataDoc = document.implementation.createDocument("http://www.w3.org/1999/xhtml","html",null);
29 | dataDoc.documentElement.setAttributeNS("http://www.w3.org/XML/1998/namespace","base",window.location.href);
30 | GreenTurtle.attach(dataDoc);
31 | console.log("Merging ...");
32 | dataDoc.data.merge(turtle,{prefixes: turtle.prefixes});
33 | console.log("Processing ...");
34 | var manifestSubject = dataDoc.data.getSubjects("rdf:type","mf:Manifest")[0];
35 | var currentSubject = dataDoc.data.getValues(manifestSubject,"mf:entries")[0];
36 | var script = "";
37 | var count = 0;
38 | while (currentSubject!="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil") {
39 | var entrySubject = dataDoc.data.getValues(currentSubject,"rdf:first")[0];
40 | var actionSubject = dataDoc.data.getValues(entrySubject,"mf:action")[0];
41 | script += download(type,dataDoc.data.getValues(actionSubject,"qt:data"));
42 | script += download(type,dataDoc.data.getValues(actionSubject,"qt:query"));
43 | count++;
44 | if (count>20) {
45 | output.appendChild(document.createTextNode(script));
46 | script = "";
47 | }
48 | currentSubject = dataDoc.data.getValues(currentSubject,"rdf:rest")[0];
49 | }
50 | output.appendChild(document.createTextNode(script));
51 | }
52 |
53 | window.addEventListener("load",function() {
54 | var go = document.getElementById("go").onclick = function() {
55 | generateDownloads(document.getElementById("source").value);
56 | };
57 |
58 | },false);
--------------------------------------------------------------------------------
/tests/harness/docs/generate-download.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Test Suite Download
6 |
7 |
8 |
9 |
10 |
11 |
12 | HTML5
13 | XHTML5
14 | HTML4
15 | XHTML1
16 | XML
17 |
18 | Generate
19 |
20 |
21 |
22 |
--------------------------------------------------------------------------------
/tests/harness/docs/index.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | RDFa Test Suite
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | HTML5
16 | XHTML5
17 | HTML4
18 | XHTML1
19 | XML
20 |
21 | Test
22 |
23 |
24 | Tests
25 |
26 | Test Parsed Outcome Details
27 |
28 | EARL
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/tests/harness/docs/test.css:
--------------------------------------------------------------------------------
1 | .pass {
2 | color: green;
3 | }
4 |
5 | .fail {
6 | color: red;
7 | }
8 |
9 | tr {
10 | vertical-align: top;
11 | }
12 |
13 | tr td {
14 | border-top: 1px solid rgb(200,200,200);
15 | }
--------------------------------------------------------------------------------
/tests/harness/make-cache.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | mkdir -p tests/cache/html5
3 | curl http://rdfa.info/test-suite/rdfa1.1/html5/manifest.ttl > tests/cache/html5/manifest.ttl
4 | mkdir -p tests/cache/xhtml5
5 | curl http://rdfa.info/test-suite/rdfa1.1/xhtml5/manifest.ttl > tests/cache/xhtml5/manifest.ttl
6 | mkdir -p tests/cache/html4
7 | curl http://rdfa.info/test-suite/rdfa1.1/html4/manifest.ttl > tests/cache/html4/manifest.ttl
8 | mkdir -p tests/cache/xhtml1
9 | curl http://rdfa.info/test-suite/rdfa1.1/xhtml1/manifest.ttl > tests/cache/xhtml1/manifest.ttl
10 | mkdir -p tests/cache/xml
11 | curl http://rdfa.info/test-suite/rdfa1.1/xml/manifest.ttl > tests/cache/xml/manifest.ttl
12 |
13 |
--------------------------------------------------------------------------------
/tests/harness/web.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/tests/jsonld/adhoc.js:
--------------------------------------------------------------------------------
1 | window.addEventListener("load",function() {
2 | document.getElementById("test").onclick = function() {
3 | jsonld = document.getElementById("jsonld").value;
4 | window.graph = new RDFaGraph();
5 | var processor = new GraphJSONLDProcessor(window.graph);
6 | processor.process(jsonld,{ baseURI: document.baseURI });
7 | }
8 | },false);
--------------------------------------------------------------------------------
/tests/jsonld/adhoc.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Adhoc Testing
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | Test
15 |
16 |
--------------------------------------------------------------------------------
/tests/jsonld/prague-1.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | XML Prague - Example 1
6 |
7 |
8 |
9 |
28 |
29 |
--------------------------------------------------------------------------------
/tests/jsonld/prague-2.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Hybridization - Person
6 |
7 |
8 |
9 |
21 |
22 |
23 |
24 |
25 | Alex Miłowski
26 |
27 |
28 | works at
29 |
30 | University of California, Berkeley 's
31 |
32 | School of Information
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/tests/other/callback.js:
--------------------------------------------------------------------------------
1 | CallbackProcessor.prototype = new RDFaProcessor();
2 | CallbackProcessor.prototype.constructor=RDFaProcessor;
3 | function CallbackProcessor() {
4 | RDFaProcessor.call(this);
5 | }
6 |
7 | CallbackProcessor.prototype.newSubjectOrigin = function(origin,subject) {
8 | console.log("New origin for "+subject);
9 | }
10 |
11 | CallbackProcessor.prototype.addTriple = function(origin,subject,predicate,object) {
12 | console.log("New triple: "+subject+", predicate "+predicate+", object "+object.value+", "+object.language+", "+object.type);
13 | }
14 |
15 | window.addEventListener("load",function() {
16 |
17 | var processor = new CallbackProcessor();
18 | processor.process(document);
19 |
20 | },false);
--------------------------------------------------------------------------------
/tests/other/callback.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Callback Test
6 |
7 |
8 |
9 |
10 |
11 | Alex Milowski
12 | alex@milowski.com
13 |
14 |
15 |
--------------------------------------------------------------------------------
/tests/other/chastk.xhtml:
--------------------------------------------------------------------------------
1 |
2 | Test from chastk
3 |
4 |
5 |
0
6 |
Accession Code (sample#)
7 |
Entity
8 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/tests/other/document-element-typeof-5-1.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Testing @typeof document element (5.1)
4 |
5 |
6 | Testing the typed resource resolving to the document base uri.
7 |
8 |
9 |
--------------------------------------------------------------------------------
/tests/other/embed-turtle.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Embed Turtle - HTML
5 |
6 |
10 |
11 |
12 | A label.
13 |
18 |
19 |
--------------------------------------------------------------------------------
/tests/other/embed-turtle.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Embed Turtle - XHTML
6 |
7 |
13 |
14 |
15 | A label.
16 |
21 |
22 |
--------------------------------------------------------------------------------
/tests/other/empty-property.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Empty Property
4 |
5 |
6 |
7 |
10 |
11 |
--------------------------------------------------------------------------------
/tests/other/event-rdfa-loaded.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | rdfa.loaded event
6 |
7 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/tests/other/ex-2.2-1.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Page 7
4 |
5 |
6 |
7 |
8 | ...
9 |
10 |
--------------------------------------------------------------------------------
/tests/other/ex-2.2-10.xhtml:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/tests/other/ex-2.2-11.xhtml:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/tests/other/ex-2.2-2.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 | My home-page
4 |
5 |
6 |
7 | ...
8 |
9 |
--------------------------------------------------------------------------------
/tests/other/ex-2.2-3.xhtml:
--------------------------------------------------------------------------------
1 |
6 |
7 | My home-page
8 |
9 |
10 |
11 | ...
12 |
13 |
--------------------------------------------------------------------------------
/tests/other/ex-2.2-4.xhtml:
--------------------------------------------------------------------------------
1 |
8 |
--------------------------------------------------------------------------------
/tests/other/ex-2.2-5.xhtml:
--------------------------------------------------------------------------------
1 |
5 | My Home Page
6 |
7 | My home-page
8 | Last modified: 16 September 2015
9 |
10 |
11 |
--------------------------------------------------------------------------------
/tests/other/ex-2.2-6.xhtml:
--------------------------------------------------------------------------------
1 |
6 | My Home Page
7 |
8 | My home-page
9 | Last modified: 16 September 2015 .
12 |
13 |
14 |
--------------------------------------------------------------------------------
/tests/other/ex-2.2-7.xhtml:
--------------------------------------------------------------------------------
1 |
6 |
7 | Books by Marco Pierre White
8 |
9 |
10 | I think White's book
11 | 'Canteen Cuisine '
13 | is well worth getting since although it's quite advanced stuff, he
14 | makes it pretty easy to follow. You might also like
15 | White's autobiography .
19 |
20 |
21 |
--------------------------------------------------------------------------------
/tests/other/ex-2.2-8.xhtml:
--------------------------------------------------------------------------------
1 |
6 |
7 | Books by Marco Pierre White
8 |
9 |
10 | I think White's book
11 | 'Canteen Cuisine '
13 | is well worth getting since although it's quite advanced stuff, he
14 | makes it pretty easy to follow. You might also like
15 | White's autobiography .
20 |
21 |
22 |
--------------------------------------------------------------------------------
/tests/other/ex-2.2-9.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Books by Marco Pierre White
4 |
5 |
6 | I think White's book
7 | 'Canteen Cuisine '
12 | is well worth getting since although it's quite advanced stuff, he
13 | makes it pretty easy to follow. You might also like
14 | White's autobiography .
19 |
20 |
21 |
--------------------------------------------------------------------------------
/tests/other/inlist-1.xhtml:
--------------------------------------------------------------------------------
1 |
2 | inlist-1
3 |
4 |
5 | "Semantic Annotation and Retrieval " by
6 | Ben Adida ,
8 | Mark Birbeck , and
10 | Ivan Herman .
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/tests/other/inlist-2.xhtml:
--------------------------------------------------------------------------------
1 |
2 | inlist-2
3 |
4 |
5 | "Semantic Annotation and Retrieval ", by
6 | Ben Adida ,
7 | Mark Birbeck , and
8 | Ivan Herman .
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/tests/other/inlist-3.xhtml:
--------------------------------------------------------------------------------
1 |
2 | inlist-3
3 |
4 |
5 | "Semantic Annotation and Retrieval ", by
6 | Ben Adida ,
7 | Mark Birbeck , and
8 | Ivan Herman .
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/tests/other/inlist-4.xhtml:
--------------------------------------------------------------------------------
1 |
2 | inlist-4
3 |
4 |
5 | "Semantic Annotation and Retrieval ", by
6 |
7 | Ben Adida ,
8 | Mark Birbeck , and
9 | Ivan Herman .
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/tests/other/invocation.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
Tour Info: Amy And The Red Foxies
9 |
10 |
11 | Kammgarn
12 |
13 |
14 |
Hey K-Town, Amy And The Red Foxies will rock Kammgarn in October.
15 | When:
16 |
15. Oct., 7:00 pm -
17 |
9:00 pm
18 |
19 | Category:
concert
20 |
21 |
22 |
--------------------------------------------------------------------------------
/tests/other/issue-3.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Test 0302: various types of tokens in @typeof
4 |
5 |
6 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/tests/other/lite-with-typeof.xhtml:
--------------------------------------------------------------------------------
1 |
2 | typeof test
3 |
4 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/tests/other/lite-without-typeof.xhtml:
--------------------------------------------------------------------------------
1 |
2 | typeof test
3 |
4 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/tests/other/microdata-invoke.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Microdata Test
5 |
6 |
7 |
13 |
14 |
15 |
18 |
21 |
22 |
Avatar
23 |
24 | Director: James Cameron (born August 16, 1954 )
25 |
26 |
Science fiction
27 |
Trailer
28 |
29 |
30 |
--------------------------------------------------------------------------------
/tests/other/microdata.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Microdata Test
5 |
10 |
11 |
12 |
15 |
18 |
19 |
Avatar
20 |
21 | Director: James Cameron (born August 16, 1954 )
22 |
23 |
Science fiction
24 |
Trailer
25 |
26 |
27 |
--------------------------------------------------------------------------------
/tests/other/no-resource-about-typeof-5-1.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Testing @typeof and @about=[]
4 |
5 |
6 | Alex Milowski
7 | When the @about resolves to nothing, the typed resource should be a blank node.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/tests/other/no-resource-about-typeof-5-2.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Testing @typeof and @about=[]
4 |
5 |
6 |
7 | Alex Milowski
8 |
9 | When the @about resolves to nothing, the typed resource should be a blank node.
10 |
11 |
12 |
--------------------------------------------------------------------------------
/tests/other/no-resource-href-11.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Testing @resource=[]
4 |
5 |
6 | The Foo Document
7 | When the @resource resolves to nothing, the href resource should be used.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/tests/other/no-resource-href-6.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Testing @resource=[]
4 |
5 |
6 | The Foo Document
7 | When the @resource resolves to nothing, the href resource should be used.
8 |
9 |
10 |
--------------------------------------------------------------------------------
/tests/other/origin.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Subject/Type Origins
6 |
7 |
8 |
9 |
10 | v1
11 |
12 |
13 | v2
14 |
15 |
16 | v3
17 |
18 |
19 | v4
20 |
21 |
22 | v5
23 |
24 |
25 |
--------------------------------------------------------------------------------
/tests/other/play-issue-10.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | RDFa 1.1 Primer .
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/tests/other/reattach.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Tests RDFa.attach(document,true)
4 |
5 |
15 |
16 |
17 |
18 | Alex Milowski
19 |
20 |
21 |
--------------------------------------------------------------------------------
/tests/other/relative-prefix.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Relative Prefix Test
6 |
7 |
8 |
9 | bar
10 |
11 |
--------------------------------------------------------------------------------
/tests/other/subject-1.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Subject Property Assignment
6 |
7 |
8 |
9 |
10 |
11 | Test Table
12 | foo
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/tests/other/subject-origin.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Subject Origin
6 |
7 |
8 |
9 |
10 |
one
11 |
two
12 |
three
13 |
14 |
15 |
--------------------------------------------------------------------------------
/tests/other/turtle-parser.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Turtle Parser
6 |
7 |
8 |
9 |
24 |
25 |
26 |
27 | Parse
28 |
29 |
--------------------------------------------------------------------------------
/tests/other/typed-property.xhtml:
--------------------------------------------------------------------------------
1 |
2 | Typed Property
3 |
4 |
5 |
6 | Fizzbit
7 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/tests/other/uri-test.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | URIREsolver
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/tests/other/vocab-typeof.xhtml:
--------------------------------------------------------------------------------
1 |
2 | vocab/typeof test
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/tests/server/lib/javax.servlet.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexmilowski/green-turtle/c3519525868e98b54fdc9029e2c39c2c18826505/tests/server/lib/javax.servlet.jar
--------------------------------------------------------------------------------
/tests/server/lib/not-yet-commons-ssl-0.3.12.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexmilowski/green-turtle/c3519525868e98b54fdc9029e2c39c2c18826505/tests/server/lib/not-yet-commons-ssl-0.3.12.jar
--------------------------------------------------------------------------------
/tests/server/lib/org.eclipse.jetty.ajp.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexmilowski/green-turtle/c3519525868e98b54fdc9029e2c39c2c18826505/tests/server/lib/org.eclipse.jetty.ajp.jar
--------------------------------------------------------------------------------
/tests/server/lib/org.eclipse.jetty.continuation.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexmilowski/green-turtle/c3519525868e98b54fdc9029e2c39c2c18826505/tests/server/lib/org.eclipse.jetty.continuation.jar
--------------------------------------------------------------------------------
/tests/server/lib/org.eclipse.jetty.http.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexmilowski/green-turtle/c3519525868e98b54fdc9029e2c39c2c18826505/tests/server/lib/org.eclipse.jetty.http.jar
--------------------------------------------------------------------------------
/tests/server/lib/org.eclipse.jetty.io.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexmilowski/green-turtle/c3519525868e98b54fdc9029e2c39c2c18826505/tests/server/lib/org.eclipse.jetty.io.jar
--------------------------------------------------------------------------------
/tests/server/lib/org.eclipse.jetty.server.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexmilowski/green-turtle/c3519525868e98b54fdc9029e2c39c2c18826505/tests/server/lib/org.eclipse.jetty.server.jar
--------------------------------------------------------------------------------
/tests/server/lib/org.eclipse.jetty.util.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexmilowski/green-turtle/c3519525868e98b54fdc9029e2c39c2c18826505/tests/server/lib/org.eclipse.jetty.util.jar
--------------------------------------------------------------------------------
/tests/server/lib/org.restlet.ext.jetty.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexmilowski/green-turtle/c3519525868e98b54fdc9029e2c39c2c18826505/tests/server/lib/org.restlet.ext.jetty.jar
--------------------------------------------------------------------------------
/tests/server/lib/org.restlet.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexmilowski/green-turtle/c3519525868e98b54fdc9029e2c39c2c18826505/tests/server/lib/org.restlet.jar
--------------------------------------------------------------------------------
/tests/server/server.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | d=`dirname $0`
3 | java -jar $d/xproclet-server.jar $*
4 |
--------------------------------------------------------------------------------
/tests/server/xproclet-server.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexmilowski/green-turtle/c3519525868e98b54fdc9029e2c39c2c18826505/tests/server/xproclet-server.jar
--------------------------------------------------------------------------------
/tests/sparql-service/build.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | Builds, tests, and runs the project sparql-service.
12 |
13 |
74 |
75 |
--------------------------------------------------------------------------------
/tests/sparql-service/lib/commons-codec-1.6.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexmilowski/green-turtle/c3519525868e98b54fdc9029e2c39c2c18826505/tests/sparql-service/lib/commons-codec-1.6.jar
--------------------------------------------------------------------------------
/tests/sparql-service/lib/httpclient-4.2.3.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexmilowski/green-turtle/c3519525868e98b54fdc9029e2c39c2c18826505/tests/sparql-service/lib/httpclient-4.2.3.jar
--------------------------------------------------------------------------------
/tests/sparql-service/lib/httpcore-4.2.2.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexmilowski/green-turtle/c3519525868e98b54fdc9029e2c39c2c18826505/tests/sparql-service/lib/httpcore-4.2.2.jar
--------------------------------------------------------------------------------
/tests/sparql-service/lib/jcl-over-slf4j-1.6.4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexmilowski/green-turtle/c3519525868e98b54fdc9029e2c39c2c18826505/tests/sparql-service/lib/jcl-over-slf4j-1.6.4.jar
--------------------------------------------------------------------------------
/tests/sparql-service/lib/jena-arq-2.10.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexmilowski/green-turtle/c3519525868e98b54fdc9029e2c39c2c18826505/tests/sparql-service/lib/jena-arq-2.10.1.jar
--------------------------------------------------------------------------------
/tests/sparql-service/lib/jena-core-2.10.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexmilowski/green-turtle/c3519525868e98b54fdc9029e2c39c2c18826505/tests/sparql-service/lib/jena-core-2.10.1.jar
--------------------------------------------------------------------------------
/tests/sparql-service/lib/jena-iri-0.9.6.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexmilowski/green-turtle/c3519525868e98b54fdc9029e2c39c2c18826505/tests/sparql-service/lib/jena-iri-0.9.6.jar
--------------------------------------------------------------------------------
/tests/sparql-service/lib/jena-tdb-0.10.1.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexmilowski/green-turtle/c3519525868e98b54fdc9029e2c39c2c18826505/tests/sparql-service/lib/jena-tdb-0.10.1.jar
--------------------------------------------------------------------------------
/tests/sparql-service/lib/log4j-1.2.16.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexmilowski/green-turtle/c3519525868e98b54fdc9029e2c39c2c18826505/tests/sparql-service/lib/log4j-1.2.16.jar
--------------------------------------------------------------------------------
/tests/sparql-service/lib/org.restlet.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexmilowski/green-turtle/c3519525868e98b54fdc9029e2c39c2c18826505/tests/sparql-service/lib/org.restlet.jar
--------------------------------------------------------------------------------
/tests/sparql-service/lib/slf4j-api-1.6.4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexmilowski/green-turtle/c3519525868e98b54fdc9029e2c39c2c18826505/tests/sparql-service/lib/slf4j-api-1.6.4.jar
--------------------------------------------------------------------------------
/tests/sparql-service/lib/slf4j-log4j12-1.6.4.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexmilowski/green-turtle/c3519525868e98b54fdc9029e2c39c2c18826505/tests/sparql-service/lib/slf4j-log4j12-1.6.4.jar
--------------------------------------------------------------------------------
/tests/sparql-service/lib/xercesImpl-2.11.0.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexmilowski/green-turtle/c3519525868e98b54fdc9029e2c39c2c18826505/tests/sparql-service/lib/xercesImpl-2.11.0.jar
--------------------------------------------------------------------------------
/tests/sparql-service/lib/xml-apis-1.4.01.jar:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alexmilowski/green-turtle/c3519525868e98b54fdc9029e2c39c2c18826505/tests/sparql-service/lib/xml-apis-1.4.01.jar
--------------------------------------------------------------------------------
/tests/sparql-service/nbproject/genfiles.properties:
--------------------------------------------------------------------------------
1 | build.xml.data.CRC32=3fc8d9a6
2 | build.xml.script.CRC32=8ce2323d
3 | build.xml.stylesheet.CRC32=28e38971@1.56.1.46
4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
6 | nbproject/build-impl.xml.data.CRC32=3fc8d9a6
7 | nbproject/build-impl.xml.script.CRC32=654caae2
8 | nbproject/build-impl.xml.stylesheet.CRC32=c6d2a60f@1.56.1.46
9 |
--------------------------------------------------------------------------------
/tests/sparql-service/nbproject/project.properties:
--------------------------------------------------------------------------------
1 | annotation.processing.enabled=true
2 | annotation.processing.enabled.in.editor=false
3 | annotation.processing.processors.list=
4 | annotation.processing.run.all.processors=true
5 | annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
6 | application.title=sparql-service
7 | application.vendor=alex
8 | build.classes.dir=${build.dir}/classes
9 | build.classes.excludes=**/*.java,**/*.form
10 | # This directory is removed when the project is cleaned:
11 | build.dir=build
12 | build.generated.dir=${build.dir}/generated
13 | build.generated.sources.dir=${build.dir}/generated-sources
14 | # Only compile against the classpath explicitly listed here:
15 | build.sysclasspath=ignore
16 | build.test.classes.dir=${build.dir}/test/classes
17 | build.test.results.dir=${build.dir}/test/results
18 | # Uncomment to specify the preferred debugger connection transport:
19 | #debug.transport=dt_socket
20 | debug.classpath=\
21 | ${run.classpath}
22 | debug.test.classpath=\
23 | ${run.test.classpath}
24 | # This directory is removed when the project is cleaned:
25 | dist.dir=dist
26 | dist.jar=${dist.dir}/sparql-service.jar
27 | dist.javadoc.dir=${dist.dir}/javadoc
28 | endorsed.classpath=
29 | excludes=
30 | file.reference.jena-arq-2.10.1.jar=lib/jena-arq-2.10.1.jar
31 | file.reference.jena-core-2.10.1.jar=lib/jena-core-2.10.1.jar
32 | file.reference.org.restlet.jar=lib/org.restlet.jar
33 | includes=**
34 | jar.compress=false
35 | javac.classpath=\
36 | ${file.reference.org.restlet.jar}:\
37 | ${file.reference.jena-core-2.10.1.jar}:\
38 | ${file.reference.jena-arq-2.10.1.jar}
39 | # Space-separated list of extra javac options
40 | javac.compilerargs=
41 | javac.deprecation=false
42 | javac.processorpath=\
43 | ${javac.classpath}
44 | javac.source=1.7
45 | javac.target=1.7
46 | javac.test.classpath=\
47 | ${javac.classpath}:\
48 | ${build.classes.dir}
49 | javac.test.processorpath=\
50 | ${javac.test.classpath}
51 | javadoc.additionalparam=
52 | javadoc.author=false
53 | javadoc.encoding=${source.encoding}
54 | javadoc.noindex=false
55 | javadoc.nonavbar=false
56 | javadoc.notree=false
57 | javadoc.private=false
58 | javadoc.splitindex=true
59 | javadoc.use=true
60 | javadoc.version=false
61 | javadoc.windowtitle=
62 | meta.inf.dir=${src.dir}/META-INF
63 | mkdist.disabled=true
64 | platform.active=default_platform
65 | run.classpath=\
66 | ${javac.classpath}:\
67 | ${build.classes.dir}
68 | # Space-separated list of JVM arguments used when running the project.
69 | # You may also define separate properties like run-sys-prop.name=value instead of -Dname=value.
70 | # To set system properties for unit tests define test-sys-prop.name=value:
71 | run.jvmargs=
72 | run.test.classpath=\
73 | ${javac.test.classpath}:\
74 | ${build.test.classes.dir}
75 | source.encoding=UTF-8
76 | src.dir=src
77 | test.src.dir=test
78 |
--------------------------------------------------------------------------------
/tests/sparql-service/nbproject/project.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | org.netbeans.modules.java.j2seproject
4 |
5 |
6 | sparql-service
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/tests/sparql-service/src/com/milowski/sparql/NewContextResource.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this template, choose Tools | Templates
3 | * and open the template in the editor.
4 | */
5 | package com.milowski.sparql;
6 |
7 | import com.hp.hpl.jena.query.Dataset;
8 | import com.hp.hpl.jena.query.DatasetFactory;
9 | import java.io.StringReader;
10 | import java.io.StringWriter;
11 | import java.util.Map;
12 | import java.util.TreeMap;
13 | import java.util.logging.Level;
14 | import org.apache.jena.riot.Lang;
15 | import org.apache.jena.riot.RDFDataMgr;
16 | import org.apache.jena.riot.RDFFormat;
17 | import org.apache.jena.riot.RDFWriterRegistry;
18 | import org.apache.jena.riot.WriterDatasetRIOT;
19 | import org.apache.jena.riot.WriterDatasetRIOTFactory;
20 | import org.apache.jena.riot.writer.NQuadsWriter;
21 | import org.restlet.data.MediaType;
22 | import org.restlet.data.Status;
23 | import org.restlet.representation.Representation;
24 | import org.restlet.representation.StringRepresentation;
25 | import org.restlet.resource.ServerResource;
26 |
27 | /**
28 | *
29 | * @author alex
30 | */
31 | public class NewContextResource extends ServerResource {
32 |
33 | static String escape(String v) {
34 | String parts [] = v.split("(?<=&<)|(?=&<)");
35 | StringBuilder sb = new StringBuilder();
36 | for (int i=0; i datasets = (Map)getContext().getAttributes().get("datasets");
49 | if (datasets==null) {
50 | datasets = new TreeMap();
51 | getContext().getAttributes().put("datasets",datasets);
52 | }
53 | try {
54 | String turtle = entity.getText();
55 | Dataset data = DatasetFactory.createMem();
56 | if (turtle!=null) {
57 | getContext().getLogger().info(turtle);
58 | RDFDataMgr.read(data, new StringReader(turtle), null,Lang.TURTLE);
59 | }
60 | StringWriter out = new StringWriter();
61 | if (RDFWriterRegistry.getWriterDatasetFactory(RDFFormat.TURTLE)==null) {
62 | WriterDatasetRIOTFactory factory = new WriterDatasetRIOTFactory() {
63 | public WriterDatasetRIOT create(RDFFormat format) {
64 | return new NQuadsWriter();
65 | }
66 | };
67 | RDFWriterRegistry.register(RDFFormat.TURTLE, factory);
68 | }
69 | RDFDataMgr.write(out, data, RDFFormat.TURTLE);
70 | getLogger().info("Parsed:\n"+out.toString());
71 | String id = System.currentTimeMillis()+"-"+((int)(Math.random()*10000));
72 | datasets.put(id,data);
73 | getResponse().setStatus(Status.SUCCESS_OK);
74 | return new StringRepresentation("", MediaType.APPLICATION_XML);
75 | } catch (org.apache.jena.riot.RiotException ex) {
76 | getLogger().log(Level.SEVERE,"Cannot parse turtle: "+ex.toString());
77 | getResponse().setStatus(Status.CLIENT_ERROR_BAD_REQUEST);
78 | return new StringRepresentation(""+escape(ex.toString())+" ", MediaType.APPLICATION_XML);
79 | } catch (Exception ex) {
80 | getLogger().log(Level.SEVERE,"Cannot parse incoming turtle.",ex);
81 | getResponse().setStatus(Status.CLIENT_ERROR_EXPECTATION_FAILED);
82 | return new StringRepresentation(" ", MediaType.APPLICATION_XML);
83 | }
84 | }
85 |
86 | }
87 |
--------------------------------------------------------------------------------
/tests/sparql-service/src/com/milowski/sparql/QueryContextResource.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this template, choose Tools | Templates
3 | * and open the template in the editor.
4 | */
5 | package com.milowski.sparql;
6 |
7 | import com.hp.hpl.jena.query.Dataset;
8 | import com.hp.hpl.jena.query.Query;
9 | import com.hp.hpl.jena.query.QueryExecution;
10 | import com.hp.hpl.jena.query.QueryExecutionFactory;
11 | import com.hp.hpl.jena.query.QueryFactory;
12 | import java.util.Map;
13 | import org.restlet.data.MediaType;
14 | import org.restlet.data.Status;
15 | import org.restlet.representation.Representation;
16 | import org.restlet.representation.StringRepresentation;
17 | import org.restlet.resource.ServerResource;
18 |
19 | /**
20 | *
21 | * @author alex
22 | */
23 | public class QueryContextResource extends ServerResource {
24 |
25 | public Representation post(Representation entity) {
26 | String id = getRequest().getAttributes().get("id").toString();
27 | getLogger().info("Query on "+id);
28 | Map datasets = (Map)getContext().getAttributes().get("datasets");
29 | if (datasets==null) {
30 | getResponse().setStatus(Status.CLIENT_ERROR_NOT_FOUND);
31 | return null;
32 | }
33 | Dataset data = datasets.remove(id);
34 | if (data==null) {
35 | getResponse().setStatus(Status.CLIENT_ERROR_NOT_FOUND);
36 | return null;
37 | }
38 |
39 | try {
40 | String queryString = entity.getText();
41 | getLogger().info("query:\n"+queryString);
42 | Query query = QueryFactory.create(queryString) ;
43 | QueryExecution qexec = QueryExecutionFactory.create(query, data) ;
44 | boolean result = qexec.execAsk() ;
45 | qexec.close() ;
46 | getResponse().setStatus(Status.SUCCESS_OK);
47 | return new StringRepresentation(""+(result ? "true" : "false")+" ", MediaType.APPLICATION_XML);
48 | } catch (Exception ex) {
49 | getResponse().setStatus(Status.CLIENT_ERROR_BAD_REQUEST);
50 | return new StringRepresentation(""+NewContextResource.escape(ex.toString())+" ", MediaType.APPLICATION_XML);
51 | }
52 | }
53 | }
54 |
--------------------------------------------------------------------------------
/tests/sparql-service/src/com/milowski/sparql/ServiceApplication.java:
--------------------------------------------------------------------------------
1 | /*
2 | * To change this template, choose Tools | Templates
3 | * and open the template in the editor.
4 | */
5 | package com.milowski.sparql;
6 |
7 | import org.restlet.Application;
8 | import org.restlet.Restlet;
9 | import org.restlet.routing.Router;
10 |
11 | /**
12 | *
13 | * @author alex
14 | */
15 | public class ServiceApplication extends Application {
16 |
17 | public Restlet createInboundRoot() {
18 | Router router = new Router(getContext());
19 | router.attach("/new",NewContextResource.class);
20 | return router;
21 | }
22 |
23 | }
24 |
--------------------------------------------------------------------------------
/tests/turtle/HYPHEN_MINUS_in_localName.nt:
--------------------------------------------------------------------------------
1 | .
2 |
--------------------------------------------------------------------------------
/tests/turtle/HYPHEN_MINUS_in_localName.ttl:
--------------------------------------------------------------------------------
1 | @prefix p: .
2 | p:s- .
3 |
--------------------------------------------------------------------------------
/tests/turtle/IRIREF_datatype.nt:
--------------------------------------------------------------------------------
1 | "1"^^ .
2 |
--------------------------------------------------------------------------------
/tests/turtle/IRIREF_datatype.ttl:
--------------------------------------------------------------------------------
1 | "1"^^ .
2 |
--------------------------------------------------------------------------------
/tests/turtle/IRI_spo.nt:
--------------------------------------------------------------------------------
1 | .
2 |
--------------------------------------------------------------------------------
/tests/turtle/IRI_subject.ttl:
--------------------------------------------------------------------------------
1 | .
2 |
--------------------------------------------------------------------------------
/tests/turtle/IRI_with_all_punctuation.nt:
--------------------------------------------------------------------------------
1 | .
2 |
--------------------------------------------------------------------------------
/tests/turtle/IRI_with_all_punctuation.ttl:
--------------------------------------------------------------------------------
1 | .
2 |
--------------------------------------------------------------------------------
/tests/turtle/IRI_with_eight_digit_numeric_escape.ttl:
--------------------------------------------------------------------------------
1 | .
2 |
--------------------------------------------------------------------------------
/tests/turtle/IRI_with_four_digit_numeric_escape.ttl:
--------------------------------------------------------------------------------
1 | .
2 |
--------------------------------------------------------------------------------
/tests/turtle/LITERAL1.nt:
--------------------------------------------------------------------------------
1 | "x" .
2 |
--------------------------------------------------------------------------------
/tests/turtle/LITERAL1.ttl:
--------------------------------------------------------------------------------
1 | 'x' .
2 |
--------------------------------------------------------------------------------
/tests/turtle/LITERAL1_all_controls.nt:
--------------------------------------------------------------------------------
1 | "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\u0008\t\u000B\u000C\u000E\u000F\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001A\u001B\u001C\u001D\u001E\u001F" .
2 |
--------------------------------------------------------------------------------
/tests/turtle/LITERAL1_all_controls.ttl:
--------------------------------------------------------------------------------
1 | ' ' .
2 |
--------------------------------------------------------------------------------
/tests/turtle/LITERAL1_all_punctuation.nt:
--------------------------------------------------------------------------------
1 | " !\"#$%&():;<=>?@[]^_`{|}~" .
2 |
--------------------------------------------------------------------------------
/tests/turtle/LITERAL1_all_punctuation.ttl:
--------------------------------------------------------------------------------
1 | ' !"#$%&():;<=>?@[]^_`{|}~' .
2 |
--------------------------------------------------------------------------------
/tests/turtle/LITERAL1_ascii_boundaries.nt:
--------------------------------------------------------------------------------
1 | "\u0000\t\u000B\u000C\u000E&([]\u007F" .
2 |
--------------------------------------------------------------------------------
/tests/turtle/LITERAL1_ascii_boundaries.ttl:
--------------------------------------------------------------------------------
1 | ' &([]' .
2 |
--------------------------------------------------------------------------------
/tests/turtle/LITERAL1_with_UTF8_boundaries.ttl:
--------------------------------------------------------------------------------
1 | '߿ࠀက쿿퀀�𐀀' .
2 |
--------------------------------------------------------------------------------
/tests/turtle/LITERAL2.ttl:
--------------------------------------------------------------------------------
1 | "x" .
2 |
--------------------------------------------------------------------------------
/tests/turtle/LITERAL2_ascii_boundaries.nt:
--------------------------------------------------------------------------------
1 | "\u0000\t\u000B\u000C\u000E!#[]\u007F" .
2 |
--------------------------------------------------------------------------------
/tests/turtle/LITERAL2_ascii_boundaries.ttl:
--------------------------------------------------------------------------------
1 | " !#[]" .
2 |
--------------------------------------------------------------------------------
/tests/turtle/LITERAL2_with_UTF8_boundaries.ttl:
--------------------------------------------------------------------------------
1 | "߿ࠀက쿿퀀�𐀀" .
2 |
--------------------------------------------------------------------------------
/tests/turtle/LITERAL_LONG1.ttl:
--------------------------------------------------------------------------------
1 | '''x''' .
2 |
--------------------------------------------------------------------------------
/tests/turtle/LITERAL_LONG1_ascii_boundaries.nt:
--------------------------------------------------------------------------------
1 | "\u0000&([]\u007F" .
2 |
--------------------------------------------------------------------------------
/tests/turtle/LITERAL_LONG1_ascii_boundaries.ttl:
--------------------------------------------------------------------------------
1 | ' &([]' .
2 |
--------------------------------------------------------------------------------
/tests/turtle/LITERAL_LONG1_with_1_squote.nt:
--------------------------------------------------------------------------------
1 | "x'y" .
2 |
--------------------------------------------------------------------------------
/tests/turtle/LITERAL_LONG1_with_1_squote.ttl:
--------------------------------------------------------------------------------
1 | '''x'y''' .
2 |
--------------------------------------------------------------------------------
/tests/turtle/LITERAL_LONG1_with_2_squotes.nt:
--------------------------------------------------------------------------------
1 | "x''y" .
2 |
--------------------------------------------------------------------------------
/tests/turtle/LITERAL_LONG1_with_2_squotes.ttl:
--------------------------------------------------------------------------------
1 | '''x''y''' .
2 |
--------------------------------------------------------------------------------
/tests/turtle/LITERAL_LONG1_with_UTF8_boundaries.ttl:
--------------------------------------------------------------------------------
1 | '''߿ࠀက쿿퀀�𐀀''' .
2 |
--------------------------------------------------------------------------------
/tests/turtle/LITERAL_LONG2.ttl:
--------------------------------------------------------------------------------
1 | """x""" .
2 |
--------------------------------------------------------------------------------
/tests/turtle/LITERAL_LONG2_ascii_boundaries.nt:
--------------------------------------------------------------------------------
1 | "\u0000!#[]\u007F" .
2 |
--------------------------------------------------------------------------------
/tests/turtle/LITERAL_LONG2_ascii_boundaries.ttl:
--------------------------------------------------------------------------------
1 | " !#[]" .
2 |
--------------------------------------------------------------------------------
/tests/turtle/LITERAL_LONG2_with_1_squote.nt:
--------------------------------------------------------------------------------
1 | "x\"y" .
2 |
--------------------------------------------------------------------------------
/tests/turtle/LITERAL_LONG2_with_1_squote.ttl:
--------------------------------------------------------------------------------
1 | """x"y""" .
2 |
--------------------------------------------------------------------------------
/tests/turtle/LITERAL_LONG2_with_2_squotes.nt:
--------------------------------------------------------------------------------
1 | "x\"\"y" .
2 |
--------------------------------------------------------------------------------
/tests/turtle/LITERAL_LONG2_with_2_squotes.ttl:
--------------------------------------------------------------------------------
1 | """x""y""" .
2 |
--------------------------------------------------------------------------------
/tests/turtle/LITERAL_LONG2_with_REVERSE_SOLIDUS.nt:
--------------------------------------------------------------------------------
1 | "test-\\" .
2 |
--------------------------------------------------------------------------------
/tests/turtle/LITERAL_LONG2_with_REVERSE_SOLIDUS.ttl:
--------------------------------------------------------------------------------
1 | @prefix : .
2 |
3 | :s :p1 """test-\\""" .
4 |
--------------------------------------------------------------------------------
/tests/turtle/LITERAL_LONG2_with_UTF8_boundaries.ttl:
--------------------------------------------------------------------------------
1 | """߿ࠀက쿿퀀�𐀀""" .
2 |
--------------------------------------------------------------------------------
/tests/turtle/LITERAL_with_UTF8_boundaries.nt:
--------------------------------------------------------------------------------
1 | "\u0080\u07FF\u0800\u0FFF\u1000\uCFFF\uD000\uD7FF\uE000\uFFFD\U00010000\U0003FFFD\U00040000\U000FFFFD\U00100000\U0010FFFD" .
2 |
--------------------------------------------------------------------------------
/tests/turtle/SPARQL_style_base.ttl:
--------------------------------------------------------------------------------
1 | BASE
2 | .
3 |
--------------------------------------------------------------------------------
/tests/turtle/SPARQL_style_prefix.ttl:
--------------------------------------------------------------------------------
1 | PREFIX p:
2 | p:s .
3 |
--------------------------------------------------------------------------------
/tests/turtle/anonymous_blank_node_object.ttl:
--------------------------------------------------------------------------------
1 | [] .
2 |
--------------------------------------------------------------------------------
/tests/turtle/anonymous_blank_node_subject.ttl:
--------------------------------------------------------------------------------
1 | [] .
2 |
--------------------------------------------------------------------------------
/tests/turtle/bareword_a_predicate.nt:
--------------------------------------------------------------------------------
1 | .
2 |
--------------------------------------------------------------------------------
/tests/turtle/bareword_a_predicate.ttl:
--------------------------------------------------------------------------------
1 | a .
2 |
--------------------------------------------------------------------------------
/tests/turtle/bareword_decimal.nt:
--------------------------------------------------------------------------------
1 | "1.0"^^ .
2 |
--------------------------------------------------------------------------------
/tests/turtle/bareword_decimal.ttl:
--------------------------------------------------------------------------------
1 | 1.0 .
2 |
--------------------------------------------------------------------------------
/tests/turtle/bareword_double.nt:
--------------------------------------------------------------------------------
1 | "1E0"^^ .
2 |
--------------------------------------------------------------------------------
/tests/turtle/bareword_double.ttl:
--------------------------------------------------------------------------------
1 | 1E0 .
2 |
--------------------------------------------------------------------------------
/tests/turtle/bareword_integer.ttl:
--------------------------------------------------------------------------------
1 | 1 .
2 |
--------------------------------------------------------------------------------
/tests/turtle/blankNodePropertyList_as_object.nt:
--------------------------------------------------------------------------------
1 | _:b1 .
2 | _:b1 .
3 |
--------------------------------------------------------------------------------
/tests/turtle/blankNodePropertyList_as_object.ttl:
--------------------------------------------------------------------------------
1 | [ ] .
2 |
--------------------------------------------------------------------------------
/tests/turtle/blankNodePropertyList_as_subject.nt:
--------------------------------------------------------------------------------
1 | _:b1 .
2 | _:b1 .
3 |
--------------------------------------------------------------------------------
/tests/turtle/blankNodePropertyList_as_subject.ttl:
--------------------------------------------------------------------------------
1 | [ ] .
2 |
--------------------------------------------------------------------------------
/tests/turtle/blankNodePropertyList_containing_collection.nt:
--------------------------------------------------------------------------------
1 | _:b1 _:el1 .
2 | _:el1 "1"^^ .
3 | _:el1 .
4 |
--------------------------------------------------------------------------------
/tests/turtle/blankNodePropertyList_containing_collection.ttl:
--------------------------------------------------------------------------------
1 | [ (1) ] .
2 |
--------------------------------------------------------------------------------
/tests/turtle/blankNodePropertyList_with_multiple_triples.nt:
--------------------------------------------------------------------------------
1 | _:b1 .
2 | _:b1 .
3 | _:b1 .
4 |
--------------------------------------------------------------------------------
/tests/turtle/blankNodePropertyList_with_multiple_triples.ttl:
--------------------------------------------------------------------------------
1 | [ ; ] .
2 |
--------------------------------------------------------------------------------
/tests/turtle/collection_object.nt:
--------------------------------------------------------------------------------
1 | _:el1 .
2 | _:el1 "1"^^ .
3 | _:el1 .
4 |
--------------------------------------------------------------------------------
/tests/turtle/collection_object.ttl:
--------------------------------------------------------------------------------
1 | (1) .
2 |
--------------------------------------------------------------------------------
/tests/turtle/collection_subject.nt:
--------------------------------------------------------------------------------
1 | _:el1 "1"^^ .
2 | _:el1 .
3 | _:el1 .
4 |
--------------------------------------------------------------------------------
/tests/turtle/collection_subject.ttl:
--------------------------------------------------------------------------------
1 | (1) .
2 |
--------------------------------------------------------------------------------
/tests/turtle/comment_following_PNAME_NS.nt:
--------------------------------------------------------------------------------
1 | .
2 |
--------------------------------------------------------------------------------
/tests/turtle/comment_following_PNAME_NS.ttl:
--------------------------------------------------------------------------------
1 | @prefix p: .
2 | p:#comment
3 | .
4 |
--------------------------------------------------------------------------------
/tests/turtle/comment_following_localName.ttl:
--------------------------------------------------------------------------------
1 | @prefix p: .
2 | p:o#comment
3 | .
4 |
--------------------------------------------------------------------------------
/tests/turtle/default_namespace_IRI.ttl:
--------------------------------------------------------------------------------
1 | @prefix : .
2 | :s .
3 |
--------------------------------------------------------------------------------
/tests/turtle/double_lower_case_e.nt:
--------------------------------------------------------------------------------
1 | "1e0"^^ .
2 |
--------------------------------------------------------------------------------
/tests/turtle/double_lower_case_e.ttl:
--------------------------------------------------------------------------------
1 | 1e0 .
2 |
--------------------------------------------------------------------------------
/tests/turtle/earl-prolog.ttl:
--------------------------------------------------------------------------------
1 | @prefix rdf: .
2 | @prefix rdfs: .
3 | @prefix dc: .
4 | @prefix doap: .
5 | @prefix foaf: .
6 | @prefix earl: .
7 | @prefix xsd: .
8 |
9 | <> foaf:primaryTopic ;
10 | dc:issued "{dateTime}"^^xsd:dateTime;
11 | foaf:maker .
12 |
13 | a foaf:Person, earl:Assertor;
14 | foaf:name "Alex Milowski";
15 | foaf:title "Implementor";
16 | foaf:homepage .
17 |
18 | a earl:Software, earl:TestSubject, doap:Project;
19 | doap:name "Green Turtle";
20 | doap:homepage ;
21 | doap:license ;
22 | doap:programming-language "Javascript";
23 | doap:implements ;
24 | doap:developer ;
25 | doap:maintainer ;
26 | doap:documenter ;
27 | doap:maker ;
28 | dc:title "Green Turtle" ;
29 | dc:description "Green Turtle support for parsing and load Turtle representations into graphs."@en ;
30 | dc:date "{date}"^^xsd:date ;
31 | dc:creator .
32 |
33 |
--------------------------------------------------------------------------------
/tests/turtle/empty_collection.nt:
--------------------------------------------------------------------------------
1 | .
2 |
--------------------------------------------------------------------------------
/tests/turtle/empty_collection.ttl:
--------------------------------------------------------------------------------
1 | () .
2 |
--------------------------------------------------------------------------------
/tests/turtle/first.nt:
--------------------------------------------------------------------------------
1 | _:outerEl1 .
2 | _:outerEl1 _:innerEl1 .
3 | _:innerEl1 "1"^^ .
4 | _:innerEl1 .
5 | _:outerEl1 _:outerEl2 .
6 | _:outerEl2 "2"^^ .
7 | _:outerEl2 .
8 |
--------------------------------------------------------------------------------
/tests/turtle/first.ttl:
--------------------------------------------------------------------------------
1 | ((1) 2) .
2 |
--------------------------------------------------------------------------------
/tests/turtle/generate-download.js:
--------------------------------------------------------------------------------
1 | window.addEventListener("load",function() {
2 | var output = document.getElementById("script");
3 | function download(files) {
4 | for (var i=0; i "+file+"\n"));
8 | }
9 | }
10 | var child = document.head.firstElementChild;
11 | while (child && child.localName!="link") {
12 | child = child.nextElementSibling;
13 | }
14 | var manifestURI = child.href;
15 | console.log("Loading manifest from: "+manifestURI);
16 | var requester = new XMLHttpRequest();
17 | requester.open("GET",manifestURI,false);
18 | requester.send(null);
19 | var turtle = document.data.implementation.parse(requester.responseText,"text/turtle",{ baseURI: "http://www.w3.org/2013/TurtleTests/manifest.ttl"});
20 | document.data.merge(turtle.subjects,{prefixes: turtle.prefixes, mergeBlankNodes: true});
21 | var manifestSubject = document.data.getSubjects("rdf:type","mf:Manifest")[0];
22 | var currentSubject = document.data.getValues(manifestSubject,"mf:entries")[0];
23 | while (currentSubject!="http://www.w3.org/1999/02/22-rdf-syntax-ns#nil") {
24 | var entrySubject = document.data.getValues(currentSubject,"rdf:first")[0];
25 | download(document.data.getValues(entrySubject,"mf:action"));
26 | download(document.data.getValues(entrySubject,"mf:result"));
27 | currentSubject = document.data.getValues(currentSubject,"rdf:rest")[0];
28 | }
29 | },false);
--------------------------------------------------------------------------------
/tests/turtle/generate-download.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Test Suite Download
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/tests/turtle/index.xhtml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Turtle Test Suite
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | Tests
17 |
18 | Test Type Parsed Outcome Details
19 |
20 | EARL
21 |
22 |
23 |
--------------------------------------------------------------------------------
/tests/turtle/labeled_blank_node_object.nt:
--------------------------------------------------------------------------------
1 | _:b1 .
2 |
--------------------------------------------------------------------------------
/tests/turtle/labeled_blank_node_object.ttl:
--------------------------------------------------------------------------------
1 | _:o .
2 |
--------------------------------------------------------------------------------
/tests/turtle/labeled_blank_node_subject.nt:
--------------------------------------------------------------------------------
1 | _:b1 .
2 |
--------------------------------------------------------------------------------
/tests/turtle/labeled_blank_node_subject.ttl:
--------------------------------------------------------------------------------
1 | _:s .
2 |
--------------------------------------------------------------------------------
/tests/turtle/labeled_blank_node_with_PN_CHARS_BASE_character_boundaries.ttl:
--------------------------------------------------------------------------------
1 | _:AZazÀÖØöø˿ͰͽͿ⁰Ⰰ、豈﷏ﷰ�𐀀 .
2 |
--------------------------------------------------------------------------------
/tests/turtle/labeled_blank_node_with_leading_digit.ttl:
--------------------------------------------------------------------------------
1 | _:0 .
2 |
--------------------------------------------------------------------------------
/tests/turtle/labeled_blank_node_with_leading_underscore.ttl:
--------------------------------------------------------------------------------
1 | _:_ .
2 |
--------------------------------------------------------------------------------
/tests/turtle/labeled_blank_node_with_non_leading_extras.ttl:
--------------------------------------------------------------------------------
1 | _:a·̀ͯ‿.⁀ .
2 |
--------------------------------------------------------------------------------
/tests/turtle/langtagged_LONG.ttl:
--------------------------------------------------------------------------------
1 | """chat"""@en .
2 |
--------------------------------------------------------------------------------
/tests/turtle/langtagged_LONG_with_subtag.nt:
--------------------------------------------------------------------------------
1 |