You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jena.apache.org by an...@apache.org on 2012/02/13 22:56:39 UTC
svn commit: r1243705 - in /incubator/jena/Jena2/Fuseki/trunk: ./ DemoServer/
DemoServer/Data/ DemoServer/demo-pages/ pages-publish/ pages-update/
src-dev/dev/ src/main/java/org/apache/jena/fuseki/
src/main/java/org/apache/jena/fuseki/server/ src/main/j...
Author: andy
Date: Mon Feb 13 21:56:38 2012
New Revision: 1243705
URL: http://svn.apache.org/viewvc?rev=1243705&view=rev
Log:
Post SPARQLer demo server to Fuseki.
Added:
incubator/jena/Jena2/Fuseki/trunk/DemoServer/
incubator/jena/Jena2/Fuseki/trunk/DemoServer/Data/
incubator/jena/Jena2/Fuseki/trunk/DemoServer/Data/books.ttl
incubator/jena/Jena2/Fuseki/trunk/DemoServer/Data/empty.nt
incubator/jena/Jena2/Fuseki/trunk/DemoServer/README
incubator/jena/Jena2/Fuseki/trunk/DemoServer/config.ttl
incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/
incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/crossdomain.xml
incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/data-validator.html
incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/doc.css
incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/fuseki.css
incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/index.html
incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/iri-validator.html
incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/query-validator.html
incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/query.html
incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/robots.txt
incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/sparql.html
incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/update-validator.html
incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/update.html
incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/xml-to-html.xsl
incubator/jena/Jena2/Fuseki/trunk/DemoServer/log4j-foreground.properties
incubator/jena/Jena2/Fuseki/trunk/DemoServer/log4j-server.properties
incubator/jena/Jena2/Fuseki/trunk/DemoServer/runserver (with props)
incubator/jena/Jena2/Fuseki/trunk/pages-publish/sparql.html
Removed:
incubator/jena/Jena2/Fuseki/trunk/pages-update/xml-to-html-2.xsl
Modified:
incubator/jena/Jena2/Fuseki/trunk/fuseki
incubator/jena/Jena2/Fuseki/trunk/pages-update/sparql.html
incubator/jena/Jena2/Fuseki/trunk/src-dev/dev/RunFuseki.java
incubator/jena/Jena2/Fuseki/trunk/src/main/java/org/apache/jena/fuseki/FusekiCmd.java
incubator/jena/Jena2/Fuseki/trunk/src/main/java/org/apache/jena/fuseki/server/SPARQLServer.java
incubator/jena/Jena2/Fuseki/trunk/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_QueryGeneral.java
incubator/jena/Jena2/Fuseki/trunk/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_ServletBase.java
Added: incubator/jena/Jena2/Fuseki/trunk/DemoServer/Data/books.ttl
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/Fuseki/trunk/DemoServer/Data/books.ttl?rev=1243705&view=auto
==============================================================================
--- incubator/jena/Jena2/Fuseki/trunk/DemoServer/Data/books.ttl (added)
+++ incubator/jena/Jena2/Fuseki/trunk/DemoServer/Data/books.ttl Mon Feb 13 21:56:38 2012
@@ -0,0 +1,46 @@
+@prefix dc: <http://purl.org/dc/elements/1.1/> .
+@prefix vcard: <http://www.w3.org/2001/vcard-rdf/3.0#> .
+@prefix ns: <http://example.org/ns#> .
+
+@prefix : <http://example.org/book/> .
+
+# A small dataset for usage examples of Joseki
+# This data is intentionaly irregular (e.g. different ways to
+# record the book creator) as if the information is either an
+# aggregation or was created at different times.
+
+:book1
+ dc:title "Harry Potter and the Philosopher's Stone" ;
+ dc:creator "J.K. Rowling" ;
+ .
+
+:book2
+ dc:title "Harry Potter and the Chamber of Secrets" ;
+ dc:creator _:a .
+
+:book3
+ dc:title "Harry Potter and the Prisoner Of Azkaban" ;
+ dc:creator _:a .
+
+:book4
+ dc:title "Harry Potter and the Goblet of Fire" .
+
+:book5
+ dc:title "Harry Potter and the Order of the Phoenix";
+ dc:creator "J.K. Rowling" ;
+ .
+
+:book6
+ dc:title "Harry Potter and the Half-Blood Prince";
+ dc:creator "J.K. Rowling" .
+
+:book7
+ dc:title "Harry Potter and the Deathly Hallows" ;
+ dc:creator "J.K. Rowling" .
+_:a
+ vcard:FN "J.K. Rowling" ;
+ vcard:N
+ [ vcard:Family "Rowling" ;
+ vcard:Given "Joanna"
+ ]
+ .
Added: incubator/jena/Jena2/Fuseki/trunk/DemoServer/Data/empty.nt
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/Fuseki/trunk/DemoServer/Data/empty.nt?rev=1243705&view=auto
==============================================================================
--- incubator/jena/Jena2/Fuseki/trunk/DemoServer/Data/empty.nt (added)
+++ incubator/jena/Jena2/Fuseki/trunk/DemoServer/Data/empty.nt Mon Feb 13 21:56:38 2012
@@ -0,0 +1 @@
+# This is empty (except for this line!).
Added: incubator/jena/Jena2/Fuseki/trunk/DemoServer/README
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/Fuseki/trunk/DemoServer/README?rev=1243705&view=auto
==============================================================================
--- incubator/jena/Jena2/Fuseki/trunk/DemoServer/README (added)
+++ incubator/jena/Jena2/Fuseki/trunk/DemoServer/README Mon Feb 13 21:56:38 2012
@@ -0,0 +1,6 @@
+Run:
+runserver
+
+[
+fuseki --pages demo-pages --config config.ttl
+]
Added: incubator/jena/Jena2/Fuseki/trunk/DemoServer/config.ttl
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/Fuseki/trunk/DemoServer/config.ttl?rev=1243705&view=auto
==============================================================================
--- incubator/jena/Jena2/Fuseki/trunk/DemoServer/config.ttl (added)
+++ incubator/jena/Jena2/Fuseki/trunk/DemoServer/config.ttl Mon Feb 13 21:56:38 2012
@@ -0,0 +1,41 @@
+@prefix : <#> .
+@prefix fuseki: <http://jena.apache.org/fuseki#> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix tdb: <http://jena.hpl.hp.com/2008/tdb#> .
+@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
+
+[] rdf:type fuseki:Server ;
+ # Timeout - server-wide default: 10s,60s
+ ja:context [ ja:cxtName "arq:queryTimeout" ; ja:cxtValue "10000,60000" ] ;
+
+ fuseki:services (
+ <#service1>
+ ) .
+
+# Custom code.
+
+## ---------------------------------------------------------------
+
+<#service1> rdf:type fuseki:Service ;
+ fuseki:name "books" ; # http://host:port/books
+ fuseki:serviceQuery "query" ; # SPARQL query service
+ fuseki:serviceQuery "sparql" ; # SPARQL query service
+ fuseki:serviceReadGraphStore "data" ;
+ # A separate read-only graph store endpoint:
+ fuseki:serviceReadGraphStore "get" ;
+ fuseki:dataset <#books> ;
+ .
+
+<#emptyDataset> rdf:type ja:RDFDataset .
+
+## ---------------------------------------------------------------
+
+<#books> rdf:type ja:RDFDataset ;
+ rdfs:label "Books" ;
+ ja:defaultGraph
+ [ rdfs:label "books.ttl" ;
+ a ja:MemoryModel ;
+ ja:content [ja:externalContent <file:Data/books.ttl> ] ;
+ ] ;
+ .
Added: incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/crossdomain.xml
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/crossdomain.xml?rev=1243705&view=auto
==============================================================================
--- incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/crossdomain.xml (added)
+++ incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/crossdomain.xml Mon Feb 13 21:56:38 2012
@@ -0,0 +1,3 @@
+<cross-domain-policy>
+<allow-access-from domain="*"/>
+</cross-domain-policy>
Added: incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/data-validator.html
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/data-validator.html?rev=1243705&view=auto
==============================================================================
--- incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/data-validator.html (added)
+++ incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/data-validator.html Mon Feb 13 21:56:38 2012
@@ -0,0 +1,48 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head><title>SPARQLer Data Validator</title>
+ <link rel="stylesheet" type="text/css" href="fuseki.css" />
+ </head>
+ <body>
+ <h1>SPARQLer Data Validator</h1>
+ <div class="moreindent">
+ <form action="validate/data" method="post" accept-charset="UTF-8" >
+ <textarea name="data" cols="70" rows="30">
+# Prefixes for Turtle or TriG - these can be edited or removed.
+@base <http://example.org/base/> .
+@prefix : <http://example.org/> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix owl: <http://www.w3.org/2002/07/owl#> .
+
+
+</textarea>
+<br/>
+Input syntax:
+<input type="radio" name="languageSyntax" value="Turtle" checked="checked"/>Turtle
+<input type="radio" name="languageSyntax" value="TriG"/>TriG
+<input type="radio" name="languageSyntax" value="N-Triples"/>N-Triples
+<input type="radio" name="languageSyntax" value="N-Quads"/>N-Quad
+ <br/>
+ <!--
+Output syntax:
+ <input type="checkbox" name="outputFormat" value="sparql" checked="checked"/>SPARQL
+ <input type="checkbox" name="outputFormat" value="algebra"/>SPARQL algebra
+ <input type="checkbox" name="outputFormat" value="quads"/>SPARQL algebra (quads)
+ <br/>
+
+ Line numbers:
+ <input type="radio" name="linenumbers" value="true" checked="checked"/>Yes
+ <input type="radio" name="linenumbers" value="false"/>No
+ <br/>
+ -->
+ <input type="submit" value="Validate RDF Data" />
+ </form>
+ <hr/>
+Parsing provided by <a href="http://incubator.apache.org/jena/documentation/io/riot.html">Jena/RIOT</a>.
+Questions to
+<href="mailto:jena-users@incubator.apache.org?s=[Data Validator]: ">jena-users</a>
+(include full details of input).
+ </div>
+ </body>
+</html>
Added: incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/doc.css
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/doc.css?rev=1243705&view=auto
==============================================================================
--- incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/doc.css (added)
+++ incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/doc.css Mon Feb 13 21:56:38 2012
@@ -0,0 +1,127 @@
+body {
+ font-family: Verdana, Arial, Helvetica, sans-serif ;
+ font-size: 10pt ;
+ line-height: 18pt ;
+ color: black;
+ background: white ;
+ margin: 0 ;
+}
+
+p { margin-left: 2% ; margin-right: 2% ; }
+
+/* Makes lists a little tighter
+li { line-height: 14pt ; }
+*/
+
+table {
+ font-family: Verdana, Arial, sans-serif ;
+ font-size: 10pt ;
+ border-collapse: collapse;
+ border: 1px solid black ;
+ cellspacing: 0 ;
+ cellpadding: 0
+}
+
+td {
+ border: 1px solid #808080 ;
+ empty-cells: show;
+ padding: 5 ;
+ spacing: 0 ;
+ vertical-align:top;
+ text-align:center
+}
+
+
+th {
+ border: 1px solid #808080 ;
+ empty-cells: show;
+ padding: 5 ;
+ vertical-align:top;
+ text-align:center
+}
+
+.box
+{ margin-left : 5% ;
+ margin-right : 5% ;
+ border: solid ;
+ border-width: thin;
+ background-color: #F0F0F0;
+ padding: 2mm;
+ page-break-inside: avoid ;
+}
+
+.noindent { margin-left: -5% ; margin-right: -5%; }
+.moreindent { margin-left: 5% ; margin-right: 5%; }
+
+
+/* Use this for the document title as displayed on the page at the top. */
+
+
+h1 {
+ text-align:center ;
+ font-size: 14pt;
+ line-height: 24pt ;
+ font-weight: bold;
+ color:#000;
+ background:#CADFF4;
+ padding: 0 ;
+ margin: 0 ;
+ padding-left: 1ex;
+ padding-right: 1ex;
+ text-align:center;
+}
+
+h2 {
+ font-size: 12pt;
+ line-height: 16pt ;
+ font-size: 110%;
+ font-weight: bold;
+ color: #003399;
+ background:#CADFF4;
+ margin-bottom:5px;
+ padding-left: 1ex;
+ padding-right: 1ex;
+}
+
+h3, h4, h5 {
+ font-size: 100%;
+ font-weight: bold;
+ margin-bottom:3px;
+}
+
+ul { list-style-type: disc }
+dt { font-weight: bold }
+
+/* Change background/foreground colour on hover */
+
+A:link { color: rgb(0, 0, 255) } /* for unvisited links */
+A:hover { color: rgb(255, 0, 0) } /* when mouse is over link */
+
+/* No extra space between paragraphs : inherits from body */
+pre {
+ font-family: monospace;
+ font-size: 10pt ;
+ line-height: 14pt ;
+ margin-top: 1 ;
+ margin-bottom: 1 ;
+ margin-left: 5ex ;
+ }
+
+/* Some general utility definitions */
+.centered {
+ text-align: center;
+}
+
+.caption {
+ text-align: center;
+ font-size: smaller;
+}
+
+code {
+ font-size: 10pt;
+}
+
+.footnote {
+ font-size: smaller;
+ border-top: thin solid gray;
+}
\ No newline at end of file
Added: incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/fuseki.css
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/fuseki.css?rev=1243705&view=auto
==============================================================================
--- incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/fuseki.css (added)
+++ incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/fuseki.css Mon Feb 13 21:56:38 2012
@@ -0,0 +1,132 @@
+body {
+ font-family: Verdana, Arial, Helvetica, sans-serif ;
+ font-size: 10pt ;
+ line-height: 18pt ;
+ color: black;
+ background: white ;
+ margin: 0 ;
+}
+
+p { margin-left: 2% ; margin-right: 2% ; }
+
+.warning { color: #FF0000 ; }
+.error { color: #FF0000 ; font-weight: bold; }
+
+/* Makes lists a little tighter
+li { line-height: 14pt ; }
+*/
+
+textarea { background-color: #F0F0F0 }
+
+table {
+ font-family: Verdana, Arial, sans-serif ;
+ font-size: 10pt ;
+ border-collapse: collapse;
+ border: 1px solid black ;
+ cellspacing: 0 ;
+ cellpadding: 0
+}
+
+td {
+ border: 1px solid #808080 ;
+ empty-cells: show;
+ padding: 5 ;
+ spacing: 0 ;
+ vertical-align:top;
+ text-align:center
+}
+
+
+th {
+ border: 1px solid #808080 ;
+ empty-cells: show;
+ padding: 5 ;
+ vertical-align:top;
+ text-align:center
+}
+
+.box
+{ margin-left : 5% ;
+ margin-right : 5% ;
+ border: solid ;
+ border-width: thin;
+ background-color: #F0F0F0;
+ padding: 2mm;
+ page-break-inside: avoid ;
+}
+
+.noindent { margin-left: -5% ; margin-right: -5%; }
+.moreindent { margin-left: 5% ; margin-right: 5%; }
+
+
+/* Use this for the document title as displayed on the page at the top. */
+
+
+h1 {
+ text-align:center ;
+ font-size: 14pt;
+ line-height: 24pt ;
+ font-weight: bold;
+ color:#000;
+ background:#CADFF4;
+ padding: 0 ;
+ margin: 0 ;
+ padding-left: 1ex;
+ padding-right: 1ex;
+ text-align:center;
+}
+
+h2 {
+ font-size: 12pt;
+ line-height: 16pt ;
+ font-size: 110%;
+ font-weight: bold;
+ color: #003399;
+ background:#CADFF4;
+ margin-bottom:5px;
+ padding-left: 1ex;
+ padding-right: 1ex;
+}
+
+h3, h4, h5 {
+ font-size: 100%;
+ font-weight: bold;
+ margin-bottom:3px;
+}
+
+ul { list-style-type: disc }
+dt { font-weight: bold }
+
+/* Change background/foreground colour on hover */
+
+A:link { color: rgb(0, 0, 255) } /* for unvisited links */
+A:hover { color: rgb(255, 0, 0) } /* when mouse is over link */
+
+/* No extra space between paragraphs : inherits from body */
+pre {
+ font-family: monospace;
+ font-size: 10pt ;
+ line-height: 14pt ;
+ margin-top: 1 ;
+ margin-bottom: 1 ;
+ margin-left: 5ex ;
+ }
+
+/* Some general utility definitions */
+.centered {
+ text-align: center;
+}
+
+.caption {
+ text-align: center;
+ font-size: smaller;
+}
+
+code {
+ font-size: 10pt;
+}
+
+.footnote {
+ font-size: smaller;
+ border-top: thin solid gray;
+}
\ No newline at end of file
Added: incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/index.html
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/index.html?rev=1243705&view=auto
==============================================================================
--- incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/index.html (added)
+++ incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/index.html Mon Feb 13 21:56:38 2012
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <title>SPARQLer - An RDF Query Server</title>
+ <link rel="stylesheet" type="text/css" href="fuseki.css" />
+ </head>
+<body>
+ <h1>SPARQLer</h1>
+
+ <p> </p>
+
+ <h2>Query forms</h2>
+
+ <ul>
+ <li><a href="query.html">Form for SPARQL queries on a small books database</a></li>
+ <li><a href="sparql.html">General purpose SPARQL processor</a></li>
+ </ul>
+
+ <h2>Validators</h2>
+ <ul>
+ <li><a href="query-validator.html">SPARQL query validator</a></li>
+ <li><a href="update-validator.html">SPARQL update validator</a></li>
+ <li><a href="data-validator.html">RDF data validator</a></li>
+ </ul>
+
+ <h2>SPARQL Services</h2>
+
+ <p>The forms above use the following services,
+ which may be accessed directly using the SPARQL protocol:</p>
+
+ <ul>
+ <li><code>sparql</code> : a general purpose SPARQL processor
+ that processes graphs from the web.</li>
+ <li><code>books</code> : a SPARQL processor that answers
+ queries on small books database only.</li>
+ </ul>
+
+ <hr/>
+
+ <p>The full set of SPARQL specification is:</p>
+
+ <ul>
+ <li><a href="http://www.w3.org/TR/sparql11-query/"
+ >SPARQL Query language</a></li>
+ <li><a href="http://www.w3.org/TR/sparql11-update/"
+ >SPARQL Update</a></li>
+ <li><a href="http://www.w3.org/TR/sparql11-protocol/"
+ >SPARQL Protocol</a></li>
+ <li><a href="http://www.w3.org/TR/sparql11-http-rdf-update/"
+ >SPARQL Graph Store Protocol</a></li>
+ <li>SPARQL Result formats
+ <ul>
+ <li><a href="http://www.w3.org/TR//sparql11-results-json/"
+ >SPARQL Query Results JSON Format</a></li>
+ <li><a href="http://www.w3.org/TR/sparql11-results-csv-tsv/"
+ >SPARQL Query Results CSV and TSV Formats</a></li>
+ <li><a href="http://www.w3.org/TR/rdf-sparql-XMLres/"
+ >SPARQL Query Results XML Format</a></li>
+ </ul>
+ <li><a href="http://www.w3.org/TR/sparql11-service-description/"
+ >SPARQL Service Description</a></li>
+ <li><a href="http://www.w3.org/TR/sparql11-federated-query/"
+ >SPARQL Federated Query</a></li>
+ <li><a href="http://www.w3.org/TR/sparql11-entailment/"
+ >SPARQL Entailment Regimes</a></li>
+ </ul>
+
+ <hr/>
+
+ <p>This server is running
+ <a href="http://incubator.apache.org/jena/documentation/serving_data/index.html"
+ >Apache Jena Fuseki</a>.</p>
+
+</body>
+</html>
Added: incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/iri-validator.html
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/iri-validator.html?rev=1243705&view=auto
==============================================================================
--- incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/iri-validator.html (added)
+++ incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/iri-validator.html Mon Feb 13 21:56:38 2012
@@ -0,0 +1,22 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head><title>SPARQLer Query Validator</title>
+
+ <link rel="stylesheet" type="text/css" href="fuseki.css" />
+
+ </head>
+ <body>
+ <h1>SPARQLer IRI Validator</h1>
+
+ <div class="moreindent">
+
+ <form action="validate/iri" accept-charset="UTF-8">
+ <p>
+ <textarea name="iri" cols="70" rows="2"></textarea>
+
+ <input type="submit" value="Validate IRI" />
+ </p>
+ </form>
+ <hr/>
+ </div>
+ </body>
+</html>
Added: incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/query-validator.html
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/query-validator.html?rev=1243705&view=auto
==============================================================================
--- incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/query-validator.html (added)
+++ incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/query-validator.html Mon Feb 13 21:56:38 2012
@@ -0,0 +1,50 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head><title>SPARQLer Query Validator</title>
+
+ <link rel="stylesheet" type="text/css" href="fuseki.css" />
+
+ </head>
+ <body>
+ <h1>SPARQLer Query Validator</h1>
+
+ <div class="moreindent">
+
+ <form action="validate/query" method="post" accept-charset="UTF-8">
+ <p>
+ <textarea name="query" cols="70" rows="30">
+PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
+PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+PREFIX owl: <http://www.w3.org/2002/07/owl#>
+PREFIX fn: <http://www.w3.org/2005/xpath-functions#>
+PREFIX apf: <http://jena.hpl.hp.com/ARQ/property#>
+PREFIX dc: <http://purl.org/dc/elements/1.1/>
+
+SELECT ?book ?title
+WHERE
+ { ?book dc:title ?title }</textarea>
+<br/>
+ Input syntax:
+ <input type="radio" name="languageSyntax" value="SPARQL" checked="checked"/>SPARQL
+ <input type="radio" name="languageSyntax" value="ARQ"/>SPARQL extended syntax
+ <br/>
+Output syntax:
+ <input type="checkbox" name="outputFormat" value="sparql" checked="checked"/>SPARQL
+ <input type="checkbox" name="outputFormat" value="algebra"/>SPARQL algebra
+ <input type="checkbox" name="outputFormat" value="quads"/>SPARQL algebra (quads)
+ <br/>
+
+ Line numbers:
+ <input type="radio" name="linenumbers" value="true" checked="checked"/>Yes
+ <input type="radio" name="linenumbers" value="false"/>No
+ <br/>
+
+
+ <input type="submit" value="Validate SPARQL Query" />
+ </p>
+ </form>
+
+ <hr/>
+ </div>
+ </body>
+</html>
Added: incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/query.html
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/query.html?rev=1243705&view=auto
==============================================================================
--- incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/query.html (added)
+++ incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/query.html Mon Feb 13 21:56:38 2012
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head><title>SPARQLer</title>
+ <link rel="stylesheet" type="text/css" href="fuseki.css" />
+ </head>
+
+ <body>
+ <h1>SPARQLer - An RDF Query Demo</h1>
+ <p>Example queries (or edit and write your own!). All the text boxes invoke the same "books" service - they just get initialised with different examples.</p>
+ <hr/>
+
+ <div class="moreindent">
+
+ <form action="books/sparql" method="get">
+ <p>SELECT - get variables (apply XSLT stylesheet)</p>
+ <p><textarea name="query" cols="70" rows="15">
+PREFIX books: <http://example.org/book/>
+PREFIX dc: <http://purl.org/dc/elements/1.1/>
+SELECT ?book ?title
+WHERE
+ { ?book dc:title ?title }</textarea>
+ <br/>
+
+ Output: <select name="output">
+ <option value="json">JSON</option>
+ <option value="xml">XML</option>
+ <option value="text">Text</option>
+ <option value="csv">CSV</option>
+ <option value="tsv">TSV</option>
+ </select>
+ <br/>
+ XSLT style sheet (blank for none):
+ <input name="stylesheet" size="20" value="/xml-to-html.xsl" />
+ <br/>
+ <input type="checkbox" name="force-accept" value="text/plain"/>
+ Force the accept header to <tt>text/plain</tt> regardless
+ <br/>
+
+ <input type="submit" value="Get Results" />
+ </p>
+ </form>
+
+ <hr/>
+
+ <form action="books/sparql">
+ <p>CONSTRUCT - return a graph</p>
+ <p><textarea name="query" cols="70" rows="10">
+PREFIX dc: <http://purl.org/dc/elements/1.1/>
+CONSTRUCT { $book dc:title $title }
+WHERE
+ { $book dc:title $title }
+ </textarea>
+ <br/>
+ <input type="submit" value="Get Results" />
+ </p>
+ </form>
+ <hr/>
+ </div>
+ </body>
+</html>
Added: incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/robots.txt
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/robots.txt?rev=1243705&view=auto
==============================================================================
--- incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/robots.txt (added)
+++ incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/robots.txt Mon Feb 13 21:56:38 2012
@@ -0,0 +1,2 @@
+User-agent: *
+Disallow: /
Added: incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/sparql.html
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/sparql.html?rev=1243705&view=auto
==============================================================================
--- incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/sparql.html (added)
+++ incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/sparql.html Mon Feb 13 21:56:38 2012
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head><title>SPARQLer</title>
+ <link rel="stylesheet" type="text/css" href="/fuseki.css" />
+ </head>
+
+ <body>
+ <h1>SPARQLer - General purpose processor</h1>
+
+ <div class="moreindent">
+
+ <form action="sparql" method="get">
+ <p>General SPARQL query : input query, set any options and press "Get Results"</p>
+ <p>
+ <textarea style="background-color: #F0F0F0;" name="query" cols="70" rows="20"></textarea>
+ <br/>
+ Target graph URI (or use <code>FROM</code> in the query)
+ <input name="default-graph-uri" size="25" value="" />
+ <br/>
+
+ Output: <select name="output">
+ <option value="json">JSON</option>
+ <option value="xml">XML</option>
+ <option value="text">Text</option>
+ <option value="csv">CSV</option>
+ <option value="tsv">TSV</option>
+ </select>
+ <br/>
+ XSLT style sheet (blank for none):
+ <input name="stylesheet" size="20" value="/xml-to-html.xsl" />
+ <br/>
+ <input type="checkbox" name="force-accept" value="text/plain"/>
+ Force the accept header to <tt>text/plain</tt> regardless
+ <br/>
+ <input type="submit" value="Get Results" />
+ </p>
+ </form>
+ </div>
+
+ <hr/>
+
+ </body>
+</html>
Added: incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/update-validator.html
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/update-validator.html?rev=1243705&view=auto
==============================================================================
--- incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/update-validator.html (added)
+++ incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/update-validator.html Mon Feb 13 21:56:38 2012
@@ -0,0 +1,46 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head><title>SPARQLer Update Validator</title>
+
+ <link rel="stylesheet" type="text/css" href="fuseki.css" />
+
+ </head>
+ <body>
+ <h1>SPARQLer Update Validator</h1>
+
+ <div class="moreindent">
+
+
+ <form action="validate/update" method="post" accept-charset="UTF-8">
+ <textarea name="update" cols="70" rows="30">
+PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
+PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
+PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+PREFIX owl: <http://www.w3.org/2002/07/owl#>
+PREFIX fn: <http://www.w3.org/2005/xpath-functions#>
+PREFIX apf: <http://jena.hpl.hp.com/ARQ/property#>
+
+</textarea>
+<br/>
+ Input syntax:
+ <input type="radio" name="languageSyntax" value="SPARQL" checked="checked"/>SPARQL
+ <input type="radio" name="languageSyntax" value="ARQ"/>SPARQL extended syntax
+ <br/>
+<!--
+Output syntax:
+ <input type="checkbox" name="outputFormat" value="sparql" checked="checked"/>SPARQL
+ <input type="checkbox" name="outputFormat" value="algebra"/>SPARQL algebra
+ <input type="checkbox" name="outputFormat" value="quads"/>SPARQL algebra (quads)
+ <br/>
+-->
+ Line numbers:
+ <input type="radio" name="linenumbers" value="true" checked="checked"/>Yes
+ <input type="radio" name="linenumbers" value="false"/>No
+ <br/>
+
+ <input type="submit" value="Validate SPARQL Update" />
+ </form>
+
+ <hr/>
+ </div>
+ </body>
+</html>
Added: incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/update.html
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/update.html?rev=1243705&view=auto
==============================================================================
--- incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/update.html (added)
+++ incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/update.html Mon Feb 13 21:56:38 2012
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head><title>SPARQLer</title>
+ <link rel="stylesheet" type="text/css" href="fuseki.css" />
+ </head>
+
+ <body>
+ <h1>SPARQLer - SPARQL/Update processor</h1>
+
+ <div class="moreindent">
+
+ <form action="update/service" method="post">
+ <p>General SPARQL/update : input SPARQL/Update request</p>
+ <p>
+ <textarea style="background-color: #F0F0F0;" name="update" cols="70" rows="20"></textarea>
+ <input type="submit" value="Perform update" />
+ </p>
+ </form>
+ </div>
+
+ <hr/>
+
+ </body>
+</html>
Added: incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/xml-to-html.xsl
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/xml-to-html.xsl?rev=1243705&view=auto
==============================================================================
--- incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/xml-to-html.xsl (added)
+++ incubator/jena/Jena2/Fuseki/trunk/DemoServer/demo-pages/xml-to-html.xsl Mon Feb 13 21:56:38 2012
@@ -0,0 +1,188 @@
+<?xml version="1.0"?>
+
+<!--
+
+XSLT script to format SPARQL Query Results XML Format into xhtml
+
+Copyright é 2004, 2005 World Wide Web Consortium, (Massachusetts
+Institute of Technology, European Research Consortium for
+Informatics and Mathematics, Keio University). All Rights
+Reserved. This work is distributed under the W3Cî Software
+License [1] in the hope that it will be useful, but WITHOUT ANY
+WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE.
+
+[1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+
+Version 1 : Dave Beckett (DAWG)
+Version 2 : Jeen Broekstra (DAWG)
+Customization for SPARQler: Andy Seaborne
+Fix:
+
+> - <xsl:for-each select="//res:head/res:variable">
+> + <xsl:for-each select="/res:sparql/res:head/res:variable">
+
+-->
+
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:res="http://www.w3.org/2005/sparql-results#"
+ exclude-result-prefixes="res xsl">
+
+ <!--
+ <xsl:output
+ method="html"
+ media-type="text/html"
+ doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"
+ indent="yes"
+ encoding="UTF-8"/>
+ -->
+
+ <!-- or this? -->
+
+ <xsl:output
+ method="xml"
+ indent="yes"
+ encoding="UTF-8"
+ doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
+ doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
+ omit-xml-declaration="no" />
+
+ <xsl:template match="res:link">
+ <p>Link to <xsl:value-of select="@href"/></p>
+ </xsl:template>
+
+ <xsl:template name="header">
+ <div>
+ <h2>Header</h2>
+ <!-- replaced by Bob D with the following line and the preceding template rule
+ <xsl:for-each select="res:head/res:link">
+ <p>Link to <xsl:value-of select="@href"/></p>
+ </xsl:for-each> -->
+ <xsl:apply-templates select="res:head/res:link"/>
+ </div>
+ </xsl:template>
+
+ <xsl:template name="boolean-result">
+ <div>
+ <!--
+ <h2>Boolean Result</h2>
+ -->
+ <p>ASK => <xsl:value-of select="res:boolean"/></p>
+ </div>
+ </xsl:template>
+
+
+ <xsl:template name="vb-result">
+ <div>
+ <!--
+ <h2>Variable Bindings Result</h2>
+ <p>Ordered: <xsl:value-of select="res:results/@ordered"/></p>
+ <p>Distinct: <xsl:value-of select="res:results/@distinct"/></p>
+ -->
+
+ <table>
+ <xsl:text>
+ </xsl:text>
+ <tr>
+ <xsl:for-each select="res:head/res:variable">
+ <th><xsl:value-of select="@name"/></th>
+ </xsl:for-each>
+ </tr>
+ <xsl:text>
+ </xsl:text>
+ <xsl:for-each select="res:results/res:result">
+ <tr>
+ <xsl:apply-templates select="."/>
+ </tr>
+ </xsl:for-each>
+ </table>
+ </div>
+ </xsl:template>
+
+ <xsl:template match="res:result">
+ <xsl:variable name="current" select="."/>
+ <xsl:for-each select="/res:sparql/res:head/res:variable">
+ <xsl:variable name="name" select="@name"/>
+ <td>
+ <xsl:choose>
+ <xsl:when test="$current/res:binding[@name=$name]">
+ <!-- apply template for the correct value type (bnode, uri, literal) -->
+ <xsl:apply-templates select="$current/res:binding[@name=$name]"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- no binding available for this variable in this solution -->
+ </xsl:otherwise>
+ </xsl:choose>
+ </td>
+ </xsl:for-each>
+ </xsl:template>
+
+ <xsl:template match="res:bnode">
+ <xsl:text>_:</xsl:text>
+ <xsl:value-of select="text()"/>
+ </xsl:template>
+
+ <xsl:template match="res:uri">
+ <!-- Roughly: SELECT ($uri AS ?subject) ?predicate ?object { $uri ?predicate ?object } -->
+ <xsl:variable name="query">SELECT%20%28%3C<xsl:value-of select="."/>%3E%20AS%20%3Fsubject%29%20%3Fpredicate%20%3Fobject%20%7B%3C<xsl:value-of select="."/>%3E%20%3Fpredicate%20%3Fobject%20%7D</xsl:variable>
+ <xsl:text><</xsl:text>
+ <a href="?query={$query}&output=xml&stylesheet=%2Fxml-to-html-2.xsl">
+ <xsl:value-of select="."/>
+ </a>
+ <xsl:text>></xsl:text>
+ </xsl:template>
+
+ <xsl:template match="res:literal[@datatype]">
+ <!-- datatyped literal value -->
+ "<xsl:value-of select="."/>"^^<<xsl:value-of select="@datatype"/>>
+ </xsl:template>
+
+ <xsl:template match="res:literal[@lang]">
+ <!-- datatyped literal value -->
+ "<xsl:value-of select="."/>"<xsl:value-of select="@xml:lang"/>
+ </xsl:template>
+
+ <xsl:template match="res:sparql">
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+ <head>
+ <title>SPARQLer Query Results</title>
+ <style>
+ <![CDATA[
+ h1 { font-size: 150% ; }
+ h2 { font-size: 125% ; }
+ table { border-collapse: collapse ; border: 1px solid black ; }
+ td, th
+ { border: 1px solid black ;
+ padding-left:0.5em; padding-right: 0.5em;
+ padding-top:0.2ex ; padding-bottom:0.2ex
+ }
+ ]]>
+ </style>
+ </head>
+ <body>
+
+
+ <h1>SPARQLer Query Results</h1>
+
+ <xsl:if test="res:head/res:link">
+ <xsl:call-template name="header"/>
+ </xsl:if>
+
+ <xsl:choose>
+ <xsl:when test="res:boolean">
+ <xsl:call-template name="boolean-result" />
+ </xsl:when>
+
+ <xsl:when test="res:results">
+ <xsl:call-template name="vb-result" />
+ </xsl:when>
+
+ </xsl:choose>
+
+
+ </body>
+ </html>
+ </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file
Added: incubator/jena/Jena2/Fuseki/trunk/DemoServer/log4j-foreground.properties
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/Fuseki/trunk/DemoServer/log4j-foreground.properties?rev=1243705&view=auto
==============================================================================
--- incubator/jena/Jena2/Fuseki/trunk/DemoServer/log4j-foreground.properties (added)
+++ incubator/jena/Jena2/Fuseki/trunk/DemoServer/log4j-foreground.properties Mon Feb 13 21:56:38 2012
@@ -0,0 +1,44 @@
+log4j.rootLogger=INFO, stdlog
+#log4j.rootLogger=INFO, fileout
+
+log4j.appender.stdlog=org.apache.log4j.ConsoleAppender
+## log4j.appender.stdlog.target=System.err
+log4j.appender.stdlog.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdlog.layout.ConversionPattern=%d{HH:mm:ss} %-5p %-20c{1} :: %m%n
+
+# File logging, with roll over.
+log4j.appender.FusekiFileLog=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.FusekiFileLog.DatePattern='.'yyyy-MM-dd
+log4j.appender.FusekiFileLog.File=fuseki-log
+log4j.appender.FusekiFileLog.layout=org.apache.log4j.PatternLayout
+log4j.appender.FusekiFileLog.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss}%d{HH:mm:ss} %-5p %-20c{1} :: %m%n
+
+# File logging - one file.
+log4j.appender.fileout=org.apache.log4j.FileAppender
+log4j.appender.fileout.File=log.joseki
+log4j.appender.fileout.layout=org.apache.log4j.PatternLayout
+log4j.appender.fileout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %-20c{1} :: %m%n
+
+# Jetty - Fuseki catches Jetty errors and reports them.
+log4j.logger.org.eclipse.jetty=FATAL
+
+## # Execution logging
+## log4j.logger.com.hp.hpl.jena.arq.info=INFO
+## log4j.logger.com.hp.hpl.jena.arq.exec=INFO
+
+# Everything else in Jena
+log4j.logger.com.hp.hpl.jena=WARN
+log4j.logger.org.apache.jena=WARN
+log4j.logger.org.openjena=WARN
+log4j.logger.org.openjena.riot=WARN
+
+# Joseki server
+log4j.logger.org.joseki=INFO
+
+# Fuseki
+# Server log.
+log4j.logger.org.apache.jena.fuseki.Server=INFO
+# Request log.
+log4j.logger.org.apache.jena.fuseki.Fuseki=INFO
+# Internal logs
+log4j.logger.org.apache.jena.fuseki=INFO
Added: incubator/jena/Jena2/Fuseki/trunk/DemoServer/log4j-server.properties
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/Fuseki/trunk/DemoServer/log4j-server.properties?rev=1243705&view=auto
==============================================================================
--- incubator/jena/Jena2/Fuseki/trunk/DemoServer/log4j-server.properties (added)
+++ incubator/jena/Jena2/Fuseki/trunk/DemoServer/log4j-server.properties Mon Feb 13 21:56:38 2012
@@ -0,0 +1,44 @@
+#log4j.rootLogger=INFO, stdlog
+log4j.rootLogger=INFO, fileout
+
+log4j.appender.stdlog=org.apache.log4j.ConsoleAppender
+## log4j.appender.stdlog.target=System.err
+log4j.appender.stdlog.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdlog.layout.ConversionPattern=%d{HH:mm:ss} %-5p %-20c{1} :: %m%n
+
+# File logging, with roll over.
+log4j.appender.FusekiFileLog=org.apache.log4j.DailyRollingFileAppender
+log4j.appender.FusekiFileLog.DatePattern='.'yyyy-MM-dd
+log4j.appender.FusekiFileLog.File=fuseki.log
+log4j.appender.FusekiFileLog.layout=org.apache.log4j.PatternLayout
+log4j.appender.FusekiFileLog.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss}%d{HH:mm:ss} %-5p %-20c{1} :: %m%n
+
+# File logging - one file.
+log4j.appender.fileout=org.apache.log4j.FileAppender
+log4j.appender.fileout.File=log.fuseki
+log4j.appender.fileout.layout=org.apache.log4j.PatternLayout
+log4j.appender.fileout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %-20c{1} :: %m%n
+
+# Jetty - Fuseki catches Jetty errors and reports them.
+log4j.logger.org.eclipse.jetty=FATAL
+
+## # Execution logging
+## log4j.logger.com.hp.hpl.jena.arq.info=INFO
+## log4j.logger.com.hp.hpl.jena.arq.exec=INFO
+
+# Everything else in Jena
+log4j.logger.com.hp.hpl.jena=WARN
+log4j.logger.org.apache.jena=WARN
+log4j.logger.org.openjena=WARN
+log4j.logger.org.openjena.riot=WARN
+
+# Joseki server
+log4j.logger.org.joseki=INFO
+
+# Fuseki
+# Server log.
+log4j.logger.org.apache.jena.fuseki.Server=INFO
+# Request log.
+log4j.logger.org.apache.jena.fuseki.Fuseki=INFO
+# Internal logs
+log4j.logger.org.apache.jena.fuseki=INFO
Added: incubator/jena/Jena2/Fuseki/trunk/DemoServer/runserver
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/Fuseki/trunk/DemoServer/runserver?rev=1243705&view=auto
==============================================================================
--- incubator/jena/Jena2/Fuseki/trunk/DemoServer/runserver (added)
+++ incubator/jena/Jena2/Fuseki/trunk/DemoServer/runserver Mon Feb 13 21:56:38 2012
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+export FUSEKIROOT="$PWD"
+
+BACKGROUND=${BACKGROUND:-1}
+if [ "$BACKGROUND" = 0 ]
+then
+ LOGCONFIG=${LOGCONFIG:-file:log4j-foreground.properties}
+else
+ LOGCONFIG=${LOGCONFIG:-file:log4j-server.properties}
+fi
+
+LOG1="-Dlog4j.configuration=${LOGCONFIG}"
+LOG2="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger"
+export FUSEKI_LOG="$LOG1 $LOG2"
+
+if [ "$BACKGROUND" = 0 ]
+then
+ # Run in the foreground
+ exec fuseki --pages=demo-pages --config config.ttl
+else
+ # Run in the background
+ # Linux / nohup
+ nohup fuseki --pages=demo-pages --config config.ttl > nohup.log 2>&1 &
+ # Process ID ... of the script.
+ ## PROC=$!
+ ## echo "Server process = $PROC"
+fi
Propchange: incubator/jena/Jena2/Fuseki/trunk/DemoServer/runserver
------------------------------------------------------------------------------
svn:executable = *
Modified: incubator/jena/Jena2/Fuseki/trunk/fuseki
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/Fuseki/trunk/fuseki?rev=1243705&r1=1243704&r2=1243705&view=diff
==============================================================================
--- incubator/jena/Jena2/Fuseki/trunk/fuseki (original)
+++ incubator/jena/Jena2/Fuseki/trunk/fuseki Mon Feb 13 21:56:38 2012
@@ -1,8 +1,9 @@
#!/bin/bash
## Run in development area.
-##Look for file names and make absolute before doing a cd.
+## Look for file names and make absolute before doing a cd.
## Or use --fuseki_home= to find the HTML files
+## Or --pages=
export FUSEKI_HOME=${FUSEKI_HOME:-$HOME/Projects/Fuseki}
if [ ! -e $FUSEKI_HOME ]
@@ -36,8 +37,10 @@ then
CP="$FUSEKI_HOME/classes:$CP"
fi
+FUSEKI_LOG=${FUSEKI_LOG:-} # -D-Dlog4j.configuration=file:log4j.properties
JVM_ARGS="-Xmx1200M"
#JVM_ARGS="$JVM_ARGS -XX:MaxDirectMemorySize=1G"
+
# Cope with the
-exec java -cp "$CP" $JVM_ARGS org.apache.jena.fuseki.FusekiCmd --home="$FUSEKI_HOME" "$@"
+exec java -cp "$CP" $JVM_ARGS $FUSEKI_LOG org.apache.jena.fuseki.FusekiCmd --home="$FUSEKI_HOME" "$@"
Added: incubator/jena/Jena2/Fuseki/trunk/pages-publish/sparql.html
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/Fuseki/trunk/pages-publish/sparql.html?rev=1243705&view=auto
==============================================================================
--- incubator/jena/Jena2/Fuseki/trunk/pages-publish/sparql.html (added)
+++ incubator/jena/Jena2/Fuseki/trunk/pages-publish/sparql.html Mon Feb 13 21:56:38 2012
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head><title>SPARQLer</title>
+ <link rel="stylesheet" type="text/css" href="/fuseki.css" />
+ </head>
+
+ <body>
+ <h1>SPARQLer - General purpose processor</h1>
+
+ <div class="moreindent">
+
+ <form action="sparql" method="get">
+ <p>General SPARQL query : input query, set any options and press "Get Results"</p>
+ <p>
+ <textarea style="background-color: #F0F0F0;" name="query" cols="70" rows="20"></textarea>
+ <br/>
+ Target graph URI (or use <code>FROM</code> in the query)
+ <input name="default-graph-uri" size="25" value="" />
+ <br/>
+
+ Output: <select name="output">
+ <option value="json">JSON</option>
+ <option value="xml">XML</option>
+ <option value="text">Text</option>
+ <option value="csv">CSV</option>
+ <option value="tsv">TSV</option>
+ </select>
+ <br/>
+ XSLT style sheet (blank for none):
+ <input name="stylesheet" size="20" value="/xml-to-html.xsl" />
+ <br/>
+ <input type="checkbox" name="force-accept" value="text/plain"/>
+ Force the accept header to <tt>text/plain</tt> regardless
+ <br/>
+ <input type="submit" value="Get Results" />
+ </p>
+ </form>
+ </div>
+
+ <hr/>
+
+ </body>
+</html>
Modified: incubator/jena/Jena2/Fuseki/trunk/pages-update/sparql.html
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/Fuseki/trunk/pages-update/sparql.html?rev=1243705&r1=1243704&r2=1243705&view=diff
==============================================================================
--- incubator/jena/Jena2/Fuseki/trunk/pages-update/sparql.html (original)
+++ incubator/jena/Jena2/Fuseki/trunk/pages-update/sparql.html Mon Feb 13 21:56:38 2012
@@ -20,15 +20,21 @@
Target graph URI (or use <code>FROM</code> in the query)
<input name="default-graph-uri" size="25" value="" />
<br/>
- Output XML: <input type="radio" name="output" value="xml" checked/>
- with XSLT style sheet (leave blank for none):
- <input name="stylesheet" size="25" value="/xml-to-html.xsl" /> <br/>
- or JSON output: <input type="radio" name="output" value="json"/> <br/>
- or text output: <input type="radio" name="output" value="text"/> <br/>
- or CSV output: <input type="radio" name="output" value="csv"/> <br/>
- or TSV output: <input type="radio" name="output" value="tsv"/> <br/>
- Force the accept header to <tt>text/plain</tt> regardless
- <input type="checkbox" name="force-accept" value="text/plain"/> <br/>
+
+ Output: <select name="output">
+ <option value="json">JSON</option>
+ <option value="xml">XML</option>
+ <option value="text">Text</option>
+ <option value="csv">CSV</option>
+ <option value="tsv">TSV</option>
+ </select>
+ <br/>
+ XSLT style sheet (blank for none):
+ <input name="stylesheet" size="20" value="/xml-to-html.xsl" />
+ <br/>
+ <input type="checkbox" name="force-accept" value="text/plain"/>
+ Force the accept header to <tt>text/plain</tt> regardless
+ <br/>
<input type="submit" value="Get Results" />
</p>
</form>
Modified: incubator/jena/Jena2/Fuseki/trunk/src-dev/dev/RunFuseki.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/Fuseki/trunk/src-dev/dev/RunFuseki.java?rev=1243705&r1=1243704&r2=1243705&view=diff
==============================================================================
--- incubator/jena/Jena2/Fuseki/trunk/src-dev/dev/RunFuseki.java (original)
+++ incubator/jena/Jena2/Fuseki/trunk/src-dev/dev/RunFuseki.java Mon Feb 13 21:56:38 2012
@@ -24,18 +24,10 @@ public class RunFuseki
{
public static void main(String[] args) throws Exception
{
+ FusekiCmd.main("--config=config.ttl") ; System.exit(0) ;
main1() ;
- //main2() ;
}
-
- private static void main2()
- {
- FusekiCmd.main("--config=config.ttl") ;
- System.exit(0) ;
- }
-
-
private static void main1() throws Exception
{
FusekiCmd.main(
@@ -50,8 +42,9 @@ public class RunFuseki
//"--mem",
//"--loc=DB",
"--file=D.ttl",
- "--gzip=no",
- //"--desc=desc.ttl",
+ //"--gzip=no",
+ //"--desc=desc.ttl",
+ //--pages=
"/ds"
) ;
System.exit(0) ;
Modified: incubator/jena/Jena2/Fuseki/trunk/src/main/java/org/apache/jena/fuseki/FusekiCmd.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/Fuseki/trunk/src/main/java/org/apache/jena/fuseki/FusekiCmd.java?rev=1243705&r1=1243704&r2=1243705&view=diff
==============================================================================
--- incubator/jena/Jena2/Fuseki/trunk/src/main/java/org/apache/jena/fuseki/FusekiCmd.java (original)
+++ incubator/jena/Jena2/Fuseki/trunk/src/main/java/org/apache/jena/fuseki/FusekiCmd.java Mon Feb 13 21:56:38 2012
@@ -84,7 +84,8 @@ public class FusekiCmd extends CmdARQ
private static ArgDecl argJettyConfig = new ArgDecl(ArgDecl.HasValue, "jetty-config") ;
private static ArgDecl argGZip = new ArgDecl(ArgDecl.HasValue, "gzip") ;
- private static ArgDecl argHome = new ArgDecl(ArgDecl.HasValue, "home") ;
+ private static ArgDecl argHome = new ArgDecl(ArgDecl.HasValue, "home") ;
+ private static ArgDecl argPages = new ArgDecl(ArgDecl.HasValue, "pages") ;
//private static ModLocation modLocation = new ModLocation() ;
private static ModDatasetAssembler modDataset = new ModDatasetAssembler() ;
@@ -112,6 +113,7 @@ public class FusekiCmd extends CmdARQ
private boolean enableCompression = true ;
private String jettyConfigFile = null ;
private String homeDir = null ;
+ private String pagesDir ;
public FusekiCmd(String...argv)
{
@@ -123,6 +125,7 @@ public class FusekiCmd extends CmdARQ
add(argTDB, "--loc=DIR", "Use an existing TDB database (or create if does not exist)") ;
add(argMemTDB, "--memTDB", "Create an in-memory, non-persistent dataset using TDB (testing only)") ;
add(argPort, "--port", "Listen on this port number") ;
+ add(argPages, "--pages=DIR", "Set of pages to serve as static content") ;
// Set via jetty config file.
//add(argHost, "--host=name or IP", "Listen on a particular interface (e.g. localhost)") ;
add(argTimeout, "--timeout", "Global timeout applied to queries (value in ms) -- format is X[,Y] ") ;
@@ -304,6 +307,12 @@ public class FusekiCmd extends CmdARQ
homeDir = args.get(args.size()-1) ;
}
+ if ( contains(argPages) )
+ {
+ List<String> args = super.getValues(argPages) ;
+ pagesDir = args.get(args.size()-1) ;
+ }
+
if ( contains(argGZip) )
{
if ( ! hasValueOfTrue(argGZip) && ! hasValueOfFalse(argGZip) )
@@ -333,9 +342,12 @@ public class FusekiCmd extends CmdARQ
homeDir = sort_out_dir(homeDir) ;
- String pagesDir = homeDir+Fuseki.PagesAll ;
- if ( ! FileOps.exists(pagesDir) )
- Fuseki.configLog.warn("No such directory for static content: "+pagesDir) ;
+ String staticContentDir = pagesDir ;
+ if ( staticContentDir == null )
+ staticContentDir = homeDir+Fuseki.PagesAll ;
+
+ if ( ! FileOps.exists(staticContentDir) )
+ Fuseki.configLog.warn("No such directory for static content: "+staticContentDir) ;
if ( jettyConfigFile != null )
Fuseki.configLog.info("Jetty configuration: "+jettyConfigFile) ;
@@ -352,7 +364,7 @@ public class FusekiCmd extends CmdARQ
// TODO Get from parsing config file.
serverConfig.port = port ;
- serverConfig.pages = pagesDir ;
+ serverConfig.pages = staticContentDir ;
serverConfig.mgtPort = mgtPort ;
serverConfig.pagesPort = port ;
serverConfig.enableCompression = enableCompression ;
Modified: incubator/jena/Jena2/Fuseki/trunk/src/main/java/org/apache/jena/fuseki/server/SPARQLServer.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/Fuseki/trunk/src/main/java/org/apache/jena/fuseki/server/SPARQLServer.java?rev=1243705&r1=1243704&r2=1243705&view=diff
==============================================================================
--- incubator/jena/Jena2/Fuseki/trunk/src/main/java/org/apache/jena/fuseki/server/SPARQLServer.java (original)
+++ incubator/jena/Jena2/Fuseki/trunk/src/main/java/org/apache/jena/fuseki/server/SPARQLServer.java Mon Feb 13 21:56:38 2012
@@ -202,9 +202,8 @@ public class SPARQLServer
if ( installManager || installServices )
{
- String [] files = { "fuseki.html" } ;
+ String [] files = { "fuseki.html", "index.html" } ;
context.setWelcomeFiles(files) ;
- // if this is /* then don't see *.jsp. Why?
addContent(context, "/", serverConfig.pages) ;
}
Modified: incubator/jena/Jena2/Fuseki/trunk/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_QueryGeneral.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/Fuseki/trunk/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_QueryGeneral.java?rev=1243705&r1=1243704&r2=1243705&view=diff
==============================================================================
--- incubator/jena/Jena2/Fuseki/trunk/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_QueryGeneral.java (original)
+++ incubator/jena/Jena2/Fuseki/trunk/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_QueryGeneral.java Mon Feb 13 21:56:38 2012
@@ -56,7 +56,9 @@ public class SPARQL_QueryGeneral extends
@Override
protected void validateQuery(HttpActionQuery action, Query query)
- { }
+ {
+ // One or the other,
+ }
@Override
protected String mapRequestToDataset(String uri)
Modified: incubator/jena/Jena2/Fuseki/trunk/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_ServletBase.java
URL: http://svn.apache.org/viewvc/incubator/jena/Jena2/Fuseki/trunk/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_ServletBase.java?rev=1243705&r1=1243704&r2=1243705&view=diff
==============================================================================
--- incubator/jena/Jena2/Fuseki/trunk/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_ServletBase.java (original)
+++ incubator/jena/Jena2/Fuseki/trunk/src/main/java/org/apache/jena/fuseki/servlets/SPARQL_ServletBase.java Mon Feb 13 21:56:38 2012
@@ -36,11 +36,13 @@ import org.apache.jena.fuseki.server.Dat
import com.hp.hpl.jena.query.ARQ ;
import com.hp.hpl.jena.query.QueryCancelledException ;
import com.hp.hpl.jena.sparql.core.DatasetGraph ;
+import com.hp.hpl.jena.sparql.core.DatasetGraphFactory ;
+import com.hp.hpl.jena.tdb.migrate.DatasetGraphReadOnly ;
public abstract class SPARQL_ServletBase extends ServletBase
{
private final PlainRequestFlag queryStringHandling ;
-
+ private static DatasetGraph dummyDSG = new DatasetGraphReadOnly(DatasetGraphFactory.createMemFixed()) ;
// Flag for whether a request (no query string) is handled as a regular operation or
// routed to special handler.
protected enum PlainRequestFlag { REGULAR, DIFFERENT }
@@ -84,6 +86,9 @@ public abstract class SPARQL_ServletBase
}
dsg = desc.dataset ;
}
+ else
+ // Dummy dsg.
+ dsg = dummyDSG ;
perform(id, dsg, request, response) ;
//serverlog.info(String.format("[%d] 200 Success", id)) ;
} catch (QueryCancelledException ex)
@@ -104,7 +109,7 @@ public abstract class SPARQL_ServletBase
catch (Throwable ex)
{ // This should not happen.
//ex.printStackTrace(System.err) ;
- log.warn(format("[%d] RC = %d : %s", id, HttpSC.INTERNAL_SERVER_ERROR_500, ex.getMessage(), ex)) ;
+ log.warn(format("[%d] RC = %d : %s", id, HttpSC.INTERNAL_SERVER_ERROR_500, ex.getMessage()), ex) ;
responseSendError(response, HttpSC.INTERNAL_SERVER_ERROR_500, ex.getMessage()) ;
}