From commits-return-20182-archive-asf-public=cust-asf.ponee.io@jena.apache.org Fri Sep 21 12:15:32 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id CF36C1807C5 for ; Fri, 21 Sep 2018 12:15:26 +0200 (CEST) Received: (qmail 9866 invoked by uid 500); 21 Sep 2018 10:15:16 -0000 Mailing-List: contact commits-help@jena.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jena.apache.org Delivered-To: mailing list commits@jena.apache.org Received: (qmail 8289 invoked by uid 99); 21 Sep 2018 10:15:14 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Sep 2018 10:15:14 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 428E1E10F0; Fri, 21 Sep 2018 10:15:13 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: andy@apache.org To: commits@jena.apache.org Date: Fri, 21 Sep 2018 10:16:10 -0000 Message-Id: <9b004c12b2f84bcfabdd2f1cf680a262@git.apache.org> In-Reply-To: <990a8f1763974f8b9df122c5883dd10e@git.apache.org> References: <990a8f1763974f8b9df122c5883dd10e@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [59/70] [abbrv] jena git commit: JENA-1597: Modules jena-fuseki-main and jena-fuseki-server http://git-wip-us.apache.org/repos/asf/jena/blob/7e6d03af/jena-fuseki2/jena-fuseki-basic/sparqler/log4j-foreground.properties ---------------------------------------------------------------------- diff --git a/jena-fuseki2/jena-fuseki-basic/sparqler/log4j-foreground.properties b/jena-fuseki2/jena-fuseki-basic/sparqler/log4j-foreground.properties deleted file mode 100755 index 802ee9e..0000000 --- a/jena-fuseki2/jena-fuseki-basic/sparqler/log4j-foreground.properties +++ /dev/null @@ -1,44 +0,0 @@ -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 http://git-wip-us.apache.org/repos/asf/jena/blob/7e6d03af/jena-fuseki2/jena-fuseki-basic/sparqler/log4j-server.properties ---------------------------------------------------------------------- diff --git a/jena-fuseki2/jena-fuseki-basic/sparqler/log4j-server.properties b/jena-fuseki2/jena-fuseki-basic/sparqler/log4j-server.properties deleted file mode 100755 index 1f575dd..0000000 --- a/jena-fuseki2/jena-fuseki-basic/sparqler/log4j-server.properties +++ /dev/null @@ -1,44 +0,0 @@ -#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 http://git-wip-us.apache.org/repos/asf/jena/blob/7e6d03af/jena-fuseki2/jena-fuseki-basic/sparqler/pages/D.nt ---------------------------------------------------------------------- diff --git a/jena-fuseki2/jena-fuseki-basic/sparqler/pages/D.nt b/jena-fuseki2/jena-fuseki-basic/sparqler/pages/D.nt deleted file mode 100644 index e69de29..0000000 http://git-wip-us.apache.org/repos/asf/jena/blob/7e6d03af/jena-fuseki2/jena-fuseki-basic/sparqler/pages/D.rdf ---------------------------------------------------------------------- diff --git a/jena-fuseki2/jena-fuseki-basic/sparqler/pages/D.rdf b/jena-fuseki2/jena-fuseki-basic/sparqler/pages/D.rdf deleted file mode 100644 index a67a21e..0000000 --- a/jena-fuseki2/jena-fuseki-basic/sparqler/pages/D.rdf +++ /dev/null @@ -1,8 +0,0 @@ - - - 123 - - http://git-wip-us.apache.org/repos/asf/jena/blob/7e6d03af/jena-fuseki2/jena-fuseki-basic/sparqler/pages/D.ttl ---------------------------------------------------------------------- diff --git a/jena-fuseki2/jena-fuseki-basic/sparqler/pages/D.ttl b/jena-fuseki2/jena-fuseki-basic/sparqler/pages/D.ttl deleted file mode 100644 index eca0eac..0000000 --- a/jena-fuseki2/jena-fuseki-basic/sparqler/pages/D.ttl +++ /dev/null @@ -1,3 +0,0 @@ -@prefix : . - -:s :q 123 . http://git-wip-us.apache.org/repos/asf/jena/blob/7e6d03af/jena-fuseki2/jena-fuseki-basic/sparqler/pages/crossdomain.xml ---------------------------------------------------------------------- diff --git a/jena-fuseki2/jena-fuseki-basic/sparqler/pages/crossdomain.xml b/jena-fuseki2/jena-fuseki-basic/sparqler/pages/crossdomain.xml deleted file mode 100755 index c1e814f..0000000 --- a/jena-fuseki2/jena-fuseki-basic/sparqler/pages/crossdomain.xml +++ /dev/null @@ -1,3 +0,0 @@ - - - http://git-wip-us.apache.org/repos/asf/jena/blob/7e6d03af/jena-fuseki2/jena-fuseki-basic/sparqler/pages/data-validator.html ---------------------------------------------------------------------- diff --git a/jena-fuseki2/jena-fuseki-basic/sparqler/pages/data-validator.html b/jena-fuseki2/jena-fuseki-basic/sparqler/pages/data-validator.html deleted file mode 100755 index adff56a..0000000 --- a/jena-fuseki2/jena-fuseki-basic/sparqler/pages/data-validator.html +++ /dev/null @@ -1,48 +0,0 @@ - - SPARQLer Data Validator - - - -

SPARQLer Data Validator

-
-
- -
-Input syntax: -Turtle -TriG -N-Triples -N-Quad -
- - -
-
-Parsing provided by Jena/RIOT. -Questions to -users@jena -(include full details of input). -
- - http://git-wip-us.apache.org/repos/asf/jena/blob/7e6d03af/jena-fuseki2/jena-fuseki-basic/sparqler/pages/doc.css ---------------------------------------------------------------------- diff --git a/jena-fuseki2/jena-fuseki-basic/sparqler/pages/doc.css b/jena-fuseki2/jena-fuseki-basic/sparqler/pages/doc.css deleted file mode 100755 index 4c86428..0000000 --- a/jena-fuseki2/jena-fuseki-basic/sparqler/pages/doc.css +++ /dev/null @@ -1,127 +0,0 @@ -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 http://git-wip-us.apache.org/repos/asf/jena/blob/7e6d03af/jena-fuseki2/jena-fuseki-basic/sparqler/pages/fuseki.css ---------------------------------------------------------------------- diff --git a/jena-fuseki2/jena-fuseki-basic/sparqler/pages/fuseki.css b/jena-fuseki2/jena-fuseki-basic/sparqler/pages/fuseki.css deleted file mode 100755 index e3e5763..0000000 --- a/jena-fuseki2/jena-fuseki-basic/sparqler/pages/fuseki.css +++ /dev/null @@ -1,148 +0,0 @@ -/** - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ -body { - font-family: Verdana, Arial, Helvetica, sans-serif ; - font-size: 10pt ; - line-height: 18pt ; - color: black; - background: white ; - margin: 0 ; -} - -textarea { background-color: #F0F0F0 ; } - -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 ; } -*/ - -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 http://git-wip-us.apache.org/repos/asf/jena/blob/7e6d03af/jena-fuseki2/jena-fuseki-basic/sparqler/pages/index.html ---------------------------------------------------------------------- diff --git a/jena-fuseki2/jena-fuseki-basic/sparqler/pages/index.html b/jena-fuseki2/jena-fuseki-basic/sparqler/pages/index.html deleted file mode 100755 index f301d1c..0000000 --- a/jena-fuseki2/jena-fuseki-basic/sparqler/pages/index.html +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - SPARQLer - An RDF Query Server - - - -

SPARQLer

- -

 

- -

Validators

- - -

Query forms

- - - -

SPARQL Services

- -

The general SPARQL query service is accessed directly using the SPARQL -protocol at /sparql

- -

Links to SPARQL 1.1 Specifications

- -

The full set of SPARQL specification is:

- - - -
- -

This server is running - Apache Jena Fuseki.

- - - http://git-wip-us.apache.org/repos/asf/jena/blob/7e6d03af/jena-fuseki2/jena-fuseki-basic/sparqler/pages/iri-validator.html ---------------------------------------------------------------------- diff --git a/jena-fuseki2/jena-fuseki-basic/sparqler/pages/iri-validator.html b/jena-fuseki2/jena-fuseki-basic/sparqler/pages/iri-validator.html deleted file mode 100755 index 164b8c6..0000000 --- a/jena-fuseki2/jena-fuseki-basic/sparqler/pages/iri-validator.html +++ /dev/null @@ -1,22 +0,0 @@ - - SPARQLer Query Validator - - - - - -

SPARQLer IRI Validator

- -
- -
-

- - - -

-
-
-
- - http://git-wip-us.apache.org/repos/asf/jena/blob/7e6d03af/jena-fuseki2/jena-fuseki-basic/sparqler/pages/query-validator.html ---------------------------------------------------------------------- diff --git a/jena-fuseki2/jena-fuseki-basic/sparqler/pages/query-validator.html b/jena-fuseki2/jena-fuseki-basic/sparqler/pages/query-validator.html deleted file mode 100755 index f910650..0000000 --- a/jena-fuseki2/jena-fuseki-basic/sparqler/pages/query-validator.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - SPARQLer Query Validator - - - - - -

SPARQLer Query Validator

- -
- -
-

- -
- Input syntax:
- SPARQL - SPARQL extended syntax -
-
-Output:
- SPARQL
- SPARQL algebra
- SPARQL algebra (quads)
- SPARQL algebra -(general optimizations)
- SPARQL algebra -(quads, general optimizations)
-
- Line numbers: - Yes - No -
- - - -

-
- -
-
- - http://git-wip-us.apache.org/repos/asf/jena/blob/7e6d03af/jena-fuseki2/jena-fuseki-basic/sparqler/pages/query.html ---------------------------------------------------------------------- diff --git a/jena-fuseki2/jena-fuseki-basic/sparqler/pages/query.html b/jena-fuseki2/jena-fuseki-basic/sparqler/pages/query.html deleted file mode 100755 index c8f2ad3..0000000 --- a/jena-fuseki2/jena-fuseki-basic/sparqler/pages/query.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - SPARQLer - - - - -

SPARQLer - An RDF Query Demo

-

Example queries (or edit and write your own!). All the text boxes invoke the same "books" service - they just get initialised with different examples.

-
- -
- -
-

SELECT - get variables (apply XSLT stylesheet)

-

-
- - Output: -
- XSLT style sheet (blank for none): - -
- - Force the accept header to text/plain regardless -
- - -

-
- -
- -
-

CONSTRUCT - return a graph

-

-
- -

-
-
-
- - http://git-wip-us.apache.org/repos/asf/jena/blob/7e6d03af/jena-fuseki2/jena-fuseki-basic/sparqler/pages/robots.txt ---------------------------------------------------------------------- diff --git a/jena-fuseki2/jena-fuseki-basic/sparqler/pages/robots.txt b/jena-fuseki2/jena-fuseki-basic/sparqler/pages/robots.txt deleted file mode 100755 index 1f53798..0000000 --- a/jena-fuseki2/jena-fuseki-basic/sparqler/pages/robots.txt +++ /dev/null @@ -1,2 +0,0 @@ -User-agent: * -Disallow: / http://git-wip-us.apache.org/repos/asf/jena/blob/7e6d03af/jena-fuseki2/jena-fuseki-basic/sparqler/pages/sparql.html ---------------------------------------------------------------------- diff --git a/jena-fuseki2/jena-fuseki-basic/sparqler/pages/sparql.html b/jena-fuseki2/jena-fuseki-basic/sparqler/pages/sparql.html deleted file mode 100755 index f043496..0000000 --- a/jena-fuseki2/jena-fuseki-basic/sparqler/pages/sparql.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - - SPARQLer - - - - -

SPARQLer - General purpose processor

- -
- -
-

General SPARQL query : input query, set any options and press "Get Results"

-

- -
- Target graph URI (or use FROM in the query) - -
- If no dataset is provided, the query will execute against an empty one.
- The query can contain use VALUES to set some variables. -
-
- Output: -
- XSLT style sheet (blank for none): - -
- - Force the accept header to text/plain regardless -
-
- - -

-
-
- -
- - - http://git-wip-us.apache.org/repos/asf/jena/blob/7e6d03af/jena-fuseki2/jena-fuseki-basic/sparqler/pages/update-validator.html ---------------------------------------------------------------------- diff --git a/jena-fuseki2/jena-fuseki-basic/sparqler/pages/update-validator.html b/jena-fuseki2/jena-fuseki-basic/sparqler/pages/update-validator.html deleted file mode 100755 index 8ac9bbb..0000000 --- a/jena-fuseki2/jena-fuseki-basic/sparqler/pages/update-validator.html +++ /dev/null @@ -1,46 +0,0 @@ - - SPARQLer Update Validator - - - - - -

SPARQLer Update Validator

- -
- - -
- -
- Input syntax: - SPARQL - SPARQL extended syntax -
- - Line numbers: - Yes - No -
- - -
- -
-
- - http://git-wip-us.apache.org/repos/asf/jena/blob/7e6d03af/jena-fuseki2/jena-fuseki-basic/sparqler/pages/update.html ---------------------------------------------------------------------- diff --git a/jena-fuseki2/jena-fuseki-basic/sparqler/pages/update.html b/jena-fuseki2/jena-fuseki-basic/sparqler/pages/update.html deleted file mode 100755 index b390826..0000000 --- a/jena-fuseki2/jena-fuseki-basic/sparqler/pages/update.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - SPARQLer - - - - -

SPARQLer - SPARQL/Update processor

- -
- -
-

General SPARQL/update : input SPARQL/Update request

-

- - -

-
-
- -
- - - http://git-wip-us.apache.org/repos/asf/jena/blob/7e6d03af/jena-fuseki2/jena-fuseki-basic/sparqler/pages/validator.html ---------------------------------------------------------------------- diff --git a/jena-fuseki2/jena-fuseki-basic/sparqler/pages/validator.html b/jena-fuseki2/jena-fuseki-basic/sparqler/pages/validator.html deleted file mode 100755 index 638d5d1..0000000 --- a/jena-fuseki2/jena-fuseki-basic/sparqler/pages/validator.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - SPARQL Query Validator - - - - -

SPARQLer

- -

-The SPARQL query validator page has moved to -http://sparql.org/query-validator.html. -You should be redirected there in a few seconds. -

- -

Validators

- - -
- -

This server is running - Apache Jena Fuseki.

- - - http://git-wip-us.apache.org/repos/asf/jena/blob/7e6d03af/jena-fuseki2/jena-fuseki-basic/sparqler/pages/xml-to-html-links.xsl ---------------------------------------------------------------------- diff --git a/jena-fuseki2/jena-fuseki-basic/sparqler/pages/xml-to-html-links.xsl b/jena-fuseki2/jena-fuseki-basic/sparqler/pages/xml-to-html-links.xsl deleted file mode 100755 index 9e0a450..0000000 --- a/jena-fuseki2/jena-fuseki-basic/sparqler/pages/xml-to-html-links.xsl +++ /dev/null @@ -1,183 +0,0 @@ - - - - - - - - - - - - - -

Link to

-
- - -
-

Header

- -
-
- - -
-

ASK =>

-
-
- - - -
- - - - - - - - - - - - - - - -
-
-
- - - - - - - - - - - - - - - - - - - - - _: - - - - - - - - - SELECT%20%28%3C%3E%20AS%20%3Fsubject%29%20%3Fpredicate%20%3Fobject%20%7B%3C%3E%20%3Fpredicate%20%3Fobject%20%7D - < - - - - > - - - - - ""^^<> - - - - - "" - - - - - - SPARQLer Query Results - - - - - -

SPARQLer Query Results

- - - - - - - - - - - - - - - - - - - -
-
\ No newline at end of file http://git-wip-us.apache.org/repos/asf/jena/blob/7e6d03af/jena-fuseki2/jena-fuseki-basic/sparqler/pages/xml-to-html-plain.xsl ---------------------------------------------------------------------- diff --git a/jena-fuseki2/jena-fuseki-basic/sparqler/pages/xml-to-html-plain.xsl b/jena-fuseki2/jena-fuseki-basic/sparqler/pages/xml-to-html-plain.xsl deleted file mode 100755 index 1878ab0..0000000 --- a/jena-fuseki2/jena-fuseki-basic/sparqler/pages/xml-to-html-plain.xsl +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - - - - - - - - - -
-

Header

- -

Link to

-
-
-
- - -
- -

ASK =>

-
-
- - - -
- - - - - - - - - - - - - - - - - -
-
-
- - - - - - - - - - - - - - - - - - - - - _: - - - - - - < - - > - - - - " - - " - - - - - ^^<> - - - - @ - - - - - - - - SPARQLer Query Results - - - - - -

SPARQLer Query Results

- - - - - - - - - - - - - - - - - - - -
-
http://git-wip-us.apache.org/repos/asf/jena/blob/7e6d03af/jena-fuseki2/jena-fuseki-basic/sparqler/pages/xml-to-html.xsl ---------------------------------------------------------------------- diff --git a/jena-fuseki2/jena-fuseki-basic/sparqler/pages/xml-to-html.xsl b/jena-fuseki2/jena-fuseki-basic/sparqler/pages/xml-to-html.xsl deleted file mode 100755 index 1878ab0..0000000 --- a/jena-fuseki2/jena-fuseki-basic/sparqler/pages/xml-to-html.xsl +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - - - - - - - - - -
-

Header

- -

Link to

-
-
-
- - -
- -

ASK =>

-
-
- - - -
- - - - - - - - - - - - - - - - - -
-
-
- - - - - - - - - - - - - - - - - - - - - _: - - - - - - < - - > - - - - " - - " - - - - - ^^<> - - - - @ - - - - - - - - SPARQLer Query Results - - - - - -

SPARQLer Query Results

- - - - - - - - - - - - - - - - - - - -
-
http://git-wip-us.apache.org/repos/asf/jena/blob/7e6d03af/jena-fuseki2/jena-fuseki-basic/sparqler/run-sparqler ---------------------------------------------------------------------- diff --git a/jena-fuseki2/jena-fuseki-basic/sparqler/run-sparqler b/jena-fuseki2/jena-fuseki-basic/sparqler/run-sparqler deleted file mode 100755 index b93943a..0000000 --- a/jena-fuseki2/jena-fuseki-basic/sparqler/run-sparqler +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/bash - - -## Configuration -SPARQLER_PAGES="${SPARQLER_PAGES:-pages/}" -SPARQLER_DATA="${SPARQLER_DATA:-file:data/books.ttl}" -SPARQLER_DS="${SPARQLER_DS:-/books}" - -## Development -FUSEKI_JAR1="$(echo ../target/jena-fuseki-basic-*-server.jar)" -## Deployment -FUSEKI_JAR2="fuseki-basic.jar" -## sparql.org -FUSEKI_JAR3="$(echo ../jena-fuseki-basic-*-server.jar)" - -# Choose which jar to run -[[ -e $FUSEKI_JAR3 ]] && FUSEKI_JAR=$FUSEKI_JAR3 -[[ -e $FUSEKI_JAR2 ]] && FUSEKI_JAR=$FUSEKI_JAR2 -[[ -e $FUSEKI_JAR1 ]] && FUSEKI_JAR=$FUSEKI_JAR1 - -if [ ! -e "$FUSEKI_JAR" ] -then - echo "Can't find the Fuseki jar file: $FUSEKI_JAR" 1>&2 - exit 1 -fi - -BACKGROUND=${BACKGROUND:-1} -if [ "$BACKGROUND" = 0 ] -then - LOGCONFIG=${LOGCONFIG:-file:log4j-foreground.properties} -else - LOGCONFIG=${LOGCONFIG:-file:log4j-server.properties} -fi - -export FUSEKI_LOG="-Dlog4j.configuration=${LOGCONFIG}" -export JVM_ARGS="${JVM_ARGS:--Xmx1200M}" - -## SPARQLER_ARGS="--base $SPARQLER_PAGES --file=$SPARQLER_DATA $SPARQLER_DS" -## -## if [[ $1 == "--help" ]] -## then -## echo "$0" -## echo "SPARQLER_PAGES = $SPARQLER_PAGES" -## echo "SPARQLER_DATA = $SPARQLER_DATA" -## echo "SPARQLER_DS = $SPARQLER_DS" -## exit 0 -## fi - -SPARQLER_ARGS="--sparqler $SPARQLER_PAGES" - -set -- - -if [ "$BACKGROUND" = 0 ] -then - # Run in the foreground - exec java $JVM_ARGS $FUSEKI_LOG -jar "$FUSEKI_JAR" $SPARQLER_ARGS -else - # Run in the background - # Linux / nohup - nohup java $JVM_ARGS $FUSEKI_LOG -jar "$FUSEKI_JAR" $SPARQLER_ARGS > nohup.log 2>&1 & - # Process ID ... of the script. - PROC=$! - echo "Server process = $PROC" -fi http://git-wip-us.apache.org/repos/asf/jena/blob/7e6d03af/jena-fuseki2/jena-fuseki-basic/src/main/java/org/apache/jena/fuseki/cmds/FusekiBasicCmd.java ---------------------------------------------------------------------- diff --git a/jena-fuseki2/jena-fuseki-basic/src/main/java/org/apache/jena/fuseki/cmds/FusekiBasicCmd.java b/jena-fuseki2/jena-fuseki-basic/src/main/java/org/apache/jena/fuseki/cmds/FusekiBasicCmd.java deleted file mode 100644 index 72f0879..0000000 --- a/jena-fuseki2/jena-fuseki-basic/src/main/java/org/apache/jena/fuseki/cmds/FusekiBasicCmd.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.jena.fuseki.cmds; - -import org.apache.jena.fuseki.system.FusekiLogging; - -/** Fuseki command that runs a Fuseki server without the admin UI, just SPARQL services. - *

- * Use {@code --conf=} for multiple datasets and specific service names. - *

- * The command line dataset setup only supports a single dataset. - */ - -public class FusekiBasicCmd { - // This class wraps FusekiBasicMain so that it can take control of logging setup. - // It does not depend via inheritance on any Jena code - FusekiBasicMain does. - // Inheritance causes initialization in the super class first, before class - // initialization code in this class. - - static { FusekiLogging.setLogging(); } - - /** - * Build and run, a server based on command line syntax. This operation does not - * return. See {@link FusekiBasicMain#build} to build a server using command line - * syntax but not start it. - */ - static public void main(String... argv) { - FusekiBasicMain.innerMain(argv); - } -} http://git-wip-us.apache.org/repos/asf/jena/blob/7e6d03af/jena-fuseki2/jena-fuseki-basic/src/main/java/org/apache/jena/fuseki/cmds/FusekiBasicMain.java ---------------------------------------------------------------------- diff --git a/jena-fuseki2/jena-fuseki-basic/src/main/java/org/apache/jena/fuseki/cmds/FusekiBasicMain.java b/jena-fuseki2/jena-fuseki-basic/src/main/java/org/apache/jena/fuseki/cmds/FusekiBasicMain.java deleted file mode 100644 index f58c05c..0000000 --- a/jena-fuseki2/jena-fuseki-basic/src/main/java/org/apache/jena/fuseki/cmds/FusekiBasicMain.java +++ /dev/null @@ -1,498 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.jena.fuseki.cmds; - -import java.net.BindException; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - -import arq.cmdline.CmdARQ; -import arq.cmdline.ModAssembler; -import arq.cmdline.ModDatasetAssembler; -import jena.cmd.ArgDecl; -import jena.cmd.CmdException; -import org.apache.jena.assembler.exceptions.AssemblerException; -import org.apache.jena.atlas.lib.DateTimeUtils; -import org.apache.jena.atlas.lib.FileOps; -import org.apache.jena.atlas.logging.FmtLog; -import org.apache.jena.fuseki.Fuseki; -import org.apache.jena.fuseki.FusekiException; -import org.apache.jena.fuseki.embedded.FusekiServer; -import org.apache.jena.fuseki.server.DataAccessPoint; -import org.apache.jena.fuseki.server.DataAccessPointRegistry; -import org.apache.jena.fuseki.server.DataService; -import org.apache.jena.fuseki.servlets.SPARQL_QueryGeneral; -import org.apache.jena.fuseki.validation.DataValidator; -import org.apache.jena.fuseki.validation.IRIValidator; -import org.apache.jena.fuseki.validation.QueryValidator; -import org.apache.jena.fuseki.validation.UpdateValidator; -import org.apache.jena.query.ARQ; -import org.apache.jena.query.Dataset; -import org.apache.jena.riot.Lang; -import org.apache.jena.riot.RDFDataMgr; -import org.apache.jena.riot.RDFLanguages; -import org.apache.jena.sparql.core.DatasetGraphFactory; -import org.apache.jena.sys.JenaSystem; -import org.apache.jena.system.Txn; -import org.apache.jena.tdb.TDB; -import org.apache.jena.tdb.TDBFactory; -import org.apache.jena.tdb.transaction.TransactionManager; -import org.apache.jena.tdb2.DatabaseMgr; -import org.slf4j.Logger; - -public class FusekiBasicMain extends CmdARQ { - private static int defaultPort = 3030; - - private static ArgDecl argMem = new ArgDecl(ArgDecl.NoValue, "mem"); - private static ArgDecl argUpdate = new ArgDecl(ArgDecl.NoValue, "update", "allowUpdate"); - private static ArgDecl argFile = new ArgDecl(ArgDecl.HasValue, "file"); - - private static ArgDecl argTDB2mode = new ArgDecl(ArgDecl.NoValue, "tdb2"); - private static ArgDecl argMemTDB = new ArgDecl(ArgDecl.NoValue, "memtdb", "memTDB", "tdbmem"); - private static ArgDecl argTDB = new ArgDecl(ArgDecl.HasValue, "loc", "location", "tdb"); - - // No SPARQL dataset or services - private static ArgDecl argEmpty = new ArgDecl(ArgDecl.NoValue, "empty", "no-dataset"); - private static ArgDecl argPort = new ArgDecl(ArgDecl.HasValue, "port"); - private static ArgDecl argLocalhost = new ArgDecl(ArgDecl.NoValue, "localhost", "local"); - private static ArgDecl argTimeout = new ArgDecl(ArgDecl.HasValue, "timeout"); - private static ArgDecl argConfig = new ArgDecl(ArgDecl.HasValue, "config", "conf"); - private static ArgDecl argGZip = new ArgDecl(ArgDecl.HasValue, "gzip"); - private static ArgDecl argBase = new ArgDecl(ArgDecl.HasValue, "base", "files"); - private static ArgDecl argGeneralQuerySvc = new ArgDecl(ArgDecl.HasValue, "general"); - - // Same as --empty --validators --general=/sparql, --files=ARG - - private static ArgDecl argSparqler = new ArgDecl(ArgDecl.HasValue, "sparqler"); - - private static ArgDecl argValidators = new ArgDecl(ArgDecl.NoValue, "validators"); - // private static ModLocation modLocation = new ModLocation(); - private static ModDatasetAssembler modDataset = new ModDatasetAssembler(); - - private final ServerConfig serverConfig = new ServerConfig(); - private boolean useTDB2; - - /** Build, but do not start, a server based on command line syntax. */ - public static FusekiServer build(String... argv) { - FusekiBasicMain inner = new FusekiBasicMain(argv); - inner.process(); - return inner.buildServer(); - } - - static void innerMain(String... argv) { - JenaSystem.init(); - new FusekiBasicMain(argv).mainRun(); - } - - protected FusekiBasicMain(String... argv) { - super(argv); - - if ( false ) - // Consider ... - TransactionManager.QueueBatchSize = TransactionManager.QueueBatchSize / 2; - - getUsage().startCategory("Fuseki"); - addModule(modDataset); - add(argMem, "--mem", - "Create an in-memory, non-persistent dataset for the server"); - add(argFile, "--file=FILE", - "Create an in-memory, non-persistent dataset for the server, initialised with the contents of the file"); - add(argTDB2mode, "--tdb2", - "Create command line persistent datasets with TDB2"); - 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(argEmpty, "--empty", -// "Run with no datasets and services (validators only)"); - add(argEmpty); // Hidden for now. - add(argPort, "--port", - "Listen on this port number"); - add(argLocalhost, "--localhost", - "Listen only on the localhost interface"); - add(argTimeout, "--timeout=", - "Global timeout applied to queries (value in ms) -- format is X[,Y] "); - add(argUpdate, "--update", - "Allow updates (via SPARQL Update and SPARQL HTTP Update)"); - add(argConfig, "--config=", - "Use a configuration file to determine the services"); - add(argGZip, "--gzip=on|off", - "Enable GZip compression (HTTP Accept-Encoding) if request header set"); - add(argBase, "--base=DIR", - "Directory for static content"); - add(argSparqler, "--sparqler=DIR", - "Run with SPARQLer services Directory for static content"); - add(argValidators, "--validators", "Install validators"); - - super.modVersion.addClass(TDB.class); - super.modVersion.addClass(Fuseki.class); - } - - static String argUsage = "[--config=FILE] [--mem|--desc=AssemblerFile|--file=FILE] [--port PORT] /DatasetPathName"; - - @Override - protected String getSummary() { - return getCommandName() + " " + argUsage; - } - - @Override - protected void processModulesAndArgs() { - boolean allowEmpty = contains(argEmpty) || contains(argSparqler); - - // ---- Checking consistency - int numDefinitions = 0; - - if ( contains(argMem) ) - numDefinitions++; - if ( contains(argFile) ) - numDefinitions++; - if ( contains(ModAssembler.assemblerDescDecl) ) - numDefinitions++; - if ( contains(argTDB) ) - numDefinitions++; - if ( contains(argMemTDB) ) - numDefinitions++; - if ( contains(argConfig) ) - numDefinitions++; - - if ( numDefinitions == 0 && ! allowEmpty ) - throw new CmdException("No dataset specified on the command line."); - - if ( numDefinitions > 1 ) - throw new CmdException("Multiple ways providing a dataset. Only one of --mem, --file, --loc or --desc"); - - if ( numDefinitions > 0 && allowEmpty ) - throw new CmdException("Dataset provided but 'no dataset' flag given"); - - //---- check: Invalid: --conf + service name. - if ( contains(argConfig) ) { - if ( getPositional().size() != 0 ) - throw new CmdException("Can't have both a configutation file and a service name"); - } else if ( ! allowEmpty ) { - if ( getPositional().size() == 0 ) - throw new CmdException("Missing service name"); - if ( getPositional().size() > 1 ) - throw new CmdException("Multiple dataset path names given"); - serverConfig.datasetPath = DataAccessPoint.canonical(getPositionalArg(0)); - } - - serverConfig.datasetDescription = ""; - - // ---- check: Invalid: --update + --conf - if ( contains(argUpdate) && contains(argConfig) ) - throw new CmdException("--update and a configuration file does not make sense (control using the configuration file only)"); - boolean allowUpdate = contains(argUpdate); - serverConfig.allowUpdate = allowUpdate; - - // ---- Port - serverConfig.port = defaultPort; - - if ( contains(argPort) ) { - String portStr = getValue(argPort); - try { - int port = Integer.parseInt(portStr); - serverConfig.port = port; - } catch (NumberFormatException ex) { - throw new CmdException(argPort.getKeyName() + " : bad port number: " + portStr); - } - } - if ( contains(argLocalhost) ) - serverConfig.loopback = true; - - // ---- Dataset - // Only one of these is choose from the checking above. - - // Which TDB to use to create a command line TDB database. - useTDB2 = contains(argTDB2mode); - String tag = useTDB2 ? "TDB2" : "TDB"; - - if ( allowEmpty ) { - serverConfig.empty = true; - serverConfig.datasetDescription = "No dataset"; - } - - // Fuseki config file - if ( contains(argConfig) ) { - String file = getValue(argConfig); - if ( file.startsWith("file:") ) - file = file.substring("file:".length()); - - Path path = Paths.get(file); - if ( ! Files.exists(path) ) - throw new CmdException("File not found: "+file); - if ( Files.isDirectory(path) ) - throw new CmdException("Is a directory: "+file); - serverConfig.datasetDescription = "Configuration: "+path.toAbsolutePath(); - serverConfig.serverConfig = getValue(argConfig); - } - - // Ways to setup a dataset. - if ( contains(argMem) ) { - serverConfig.datasetDescription = "in-memory"; - // Only one setup should be called by the test above but to be safe - // and in case of future changes, clear the configuration. - serverConfig.dsg = DatasetGraphFactory.createTxnMem(); - // Always allow, else you can't do very much! - serverConfig.allowUpdate = true; - } - - if ( contains(argFile) ) { - String filename = getValue(argFile); - String pathname = filename; - if ( filename.startsWith("file:") ) - pathname = filename.substring("file:".length()); - - serverConfig.datasetDescription = "file:"+filename; - if ( !FileOps.exists(pathname) ) - throw new CmdException("File not found: " + filename); - serverConfig.dsg = DatasetGraphFactory.createTxnMem(); - - // INITIAL DATA. - Lang language = RDFLanguages.filenameToLang(filename); - if ( language == null ) - throw new CmdException("Can't guess language for file: " + filename); - Txn.executeWrite(serverConfig.dsg, ()->RDFDataMgr.read(serverConfig.dsg, filename)); - } - - if ( contains(argMemTDB) ) { - serverConfig.datasetDescription = tag+" dataset in-memory"; - serverConfig.dsg = - useTDB2 - ? DatabaseMgr.createDatasetGraph() - : TDBFactory.createDatasetGraph(); - serverConfig.allowUpdate = true; - } - - if ( contains(argTDB) ) { - String dir = getValue(argTDB); - serverConfig.datasetDescription = tag+" dataset: "+dir; - serverConfig.dsg = - useTDB2 - ? DatabaseMgr.connectDatasetGraph(dir) - : TDBFactory.createDatasetGraph(dir); - } - - if ( contains(ModAssembler.assemblerDescDecl) ) { - serverConfig.datasetDescription = "Assembler: "+ getValue(ModAssembler.assemblerDescDecl); - // Need to add service details. - Dataset ds = modDataset.createDataset(); - serverConfig.dsg = ds.asDatasetGraph(); - } - - // ---- Misc features. - if ( contains(argTimeout) ) { - String str = getValue(argTimeout); - ARQ.getContext().set(ARQ.queryTimeout, str); - } - - if ( contains(argSparqler) ) { - String filebase = getValue(argSparqler); - if ( ! FileOps.exists(filebase) ) - throw new CmdException("File area not found: "+filebase); - serverConfig.contentDirectory = filebase; - serverConfig.addGeneral = "/sparql"; - serverConfig.empty = true; - serverConfig.validators = true; - } - - if ( contains(argGeneralQuerySvc) ) { - String z = getValue(argGeneralQuerySvc); - if ( ! z.startsWith("/") ) - z = "/"+z; - serverConfig.addGeneral = z; - } - - if ( contains(argValidators) ) { - serverConfig.validators = true; - } - - if ( contains(argBase) ) { - // Static files. - String filebase = getValue(argBase); - if ( ! FileOps.exists(filebase) ) { - throw new CmdException("File area not found: "+filebase); - //FmtLog.warn(Fuseki.configLog, "File area not found: "+filebase); - } - serverConfig.contentDirectory = filebase; - } - -// if ( contains(argGZip) ) { -// if ( !hasValueOfTrue(argGZip) && !hasValueOfFalse(argGZip) ) -// throw new CmdException(argGZip.getNames().get(0) + ": Not understood: " + getValue(argGZip)); -// jettyServerConfig.enableCompression = super.hasValueOfTrue(argGZip); -// } - } - - @Override - protected void exec() { - try { - FusekiServer server = buildServer(serverConfig); - info(server, serverConfig); - try { - server.start(); - } catch (FusekiException ex) { - if ( ex.getCause() instanceof BindException ) { - Fuseki.serverLog.error("Failed to start server: "+ex.getCause().getMessage()+ ": port="+serverConfig.port) ; - System.exit(1); - } - throw ex; - } catch (Exception ex) { - throw new FusekiException("Failed to start server: " + ex.getMessage(), ex) ; - } - server.join(); - System.exit(0); - } - catch (AssemblerException ex) { - if ( ex.getCause() != null ) - System.err.println(ex.getCause().getMessage()); - else - System.err.println(ex.getMessage()); - } - } - - private FusekiServer buildServer() { - return buildServer(serverConfig); - } - - // ServerConfig -> Setup the builder. - private FusekiServer buildServer(ServerConfig serverConfig) { - FusekiServer.Builder builder = builder(); - return buildServer(builder, serverConfig); - } - - protected FusekiServer.Builder builder() { - return FusekiServer.create(); - } - - private static FusekiServer buildServer(FusekiServer.Builder builder, ServerConfig serverConfig) { - builder.port(serverConfig.port); - builder.loopback(serverConfig.loopback); - - if ( serverConfig.addGeneral != null ) - builder.addServlet(serverConfig.addGeneral, new SPARQL_QueryGeneral()); - - if ( serverConfig.validators ) { - // Validators. - builder.addServlet("/validate/query", new QueryValidator()); - builder.addServlet("/validate/update", new UpdateValidator()); - builder.addServlet("/validate/iri", new IRIValidator()); - builder.addServlet("/validate/data", new DataValidator()); - } - - if ( ! serverConfig.empty ) { - if ( serverConfig.serverConfig != null ) - // Config file. - builder.parseConfigFile(serverConfig.serverConfig); - else - // One dataset. - builder.add(serverConfig.datasetPath, serverConfig.dsg, serverConfig.allowUpdate); - } - - if ( serverConfig.contentDirectory != null ) - builder.staticFileBase(serverConfig.contentDirectory) ; - - return builder.build(); - } - - private void info(FusekiServer server, ServerConfig serverConfig) { - if ( super.isQuiet() ) - return; - - Logger log = Fuseki.serverLog; - - String version = Fuseki.VERSION; - String buildDate = Fuseki.BUILD_DATE ; - - if ( version != null && version.equals("${project.version}") ) - version = null ; - if ( buildDate != null && buildDate.equals("${build.time.xsd}") ) - buildDate = DateTimeUtils.nowAsXSDDateTimeString() ; - - String name = Fuseki.NAME; - name = name +" (basic server)"; - - if ( version != null ) { - if ( Fuseki.developmentMode && buildDate != null ) - FmtLog.info(log, "%s %s %s", name, version, buildDate) ; - else - FmtLog.info(log, "%s %s", name, version); - } - - // Dataset -> Endpoints - Map> mapDatasetEndpoints = description(DataAccessPointRegistry.get(server.getServletContext())); - - if ( serverConfig.empty ) { - FmtLog.info(log, "No SPARQL datasets services"); - } else { - if ( serverConfig.datasetPath == null && serverConfig.serverConfig == null ) - log.error("No dataset path nor server configuration file"); - } - - if ( serverConfig.datasetPath != null ) { - if ( mapDatasetEndpoints.size() != 1 ) - log.error("Expected only one dataset"); - List endpoints = mapDatasetEndpoints.get(serverConfig.datasetPath); - FmtLog.info(log, "Dataset Type = %s", serverConfig.datasetDescription); - FmtLog.info(log, "Path = %s; Services = %s", serverConfig.datasetPath, endpoints); - } - if ( serverConfig.serverConfig != null ) { - // May be many datasets and services. - FmtLog.info(log, "Configuration file %s", serverConfig.serverConfig); - mapDatasetEndpoints.forEach((path, endpoints)->{ - FmtLog.info(log, "Path = %s; Services = %s", path, endpoints); - }); - } - - if ( serverConfig.contentDirectory != null ) - FmtLog.info(log, "Static files = %s", serverConfig.contentDirectory); - - if ( super.isVerbose() ) - PlatformInfo.logDetailsVerbose(log); - else if ( !super.isQuiet() ) - PlatformInfo.logDetails(log); - } - - private static Map> description(DataAccessPointRegistry reg) { - Map> desc = new LinkedHashMap<>(); - reg.forEach((ds,dap)->{ - List endpoints = new ArrayList<>(); - desc.put(ds, endpoints); - DataService dSrv = dap.getDataService(); - dSrv.getOperations().forEach((op)->{ - dSrv.getEndpoints(op).forEach(ep-> { - String x = ep.getEndpoint(); - if ( x.isEmpty() ) - x = "quads"; - endpoints.add(x); - }); - }); - }); - return desc; - } - - @Override - protected String getCommandName() { - return "fuseki"; - } - } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/jena/blob/7e6d03af/jena-fuseki2/jena-fuseki-basic/src/main/java/org/apache/jena/fuseki/cmds/PlatformInfo.java ---------------------------------------------------------------------- diff --git a/jena-fuseki2/jena-fuseki-basic/src/main/java/org/apache/jena/fuseki/cmds/PlatformInfo.java b/jena-fuseki2/jena-fuseki-basic/src/main/java/org/apache/jena/fuseki/cmds/PlatformInfo.java deleted file mode 100644 index 6e87e1b..0000000 --- a/jena-fuseki2/jena-fuseki-basic/src/main/java/org/apache/jena/fuseki/cmds/PlatformInfo.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.jena.fuseki.cmds; - -import java.io.IOException; -import java.util.function.Function; - -import org.apache.jena.atlas.logging.FmtLog; -import org.slf4j.Logger; - -public class PlatformInfo { - - public static void main(String ...args) throws IOException { - long maxMem = Runtime.getRuntime().maxMemory(); - long totalMem = Runtime.getRuntime().totalMemory(); - long freeMem = Runtime.getRuntime().freeMemory(); - long usedMem = totalMem - freeMem; - Function f = PlatformInfo::strNumMixed; - - System.out.printf("max=%s total=%s used=%s free=%s\n", f.apply(maxMem), f.apply(totalMem), f.apply(usedMem), f.apply(freeMem)); - } - - /** Essential information about the runtime environment. */ - - public static void logDetails(Logger log) { - logDetails(log, " "); - } - - /** - * Essential information about the runtime environment - * @param log - * @param prefix String to add at the start of the log message. - */ - public static void logDetails(Logger log, String prefix) { - if ( prefix == null ) - prefix = ""; - long maxMem = Runtime.getRuntime().maxMemory(); - long totalMem = Runtime.getRuntime().totalMemory(); - long freeMem = Runtime.getRuntime().freeMemory(); - long usedMem = totalMem - freeMem; - Function f = PlatformInfo::strNum2; - - long pid = getProcessId(); - FmtLog.info(log, "%sMemory: %s", prefix, f.apply(maxMem)); - //FmtLog.info(log, "%sMemory: max=%s total=%s used=%s free=%s", prefix, f.apply(maxMem), f.apply(totalMem), f.apply(usedMem), f.apply(freeMem)); - FmtLog.info(log, "%sJava: %s", prefix, System.getProperty("java.version")); - FmtLog.info(log, "%sOS: %s %s %s", prefix, System.getProperty("os.name"), System.getProperty("os.version"), System.getProperty("os.arch")); - if ( pid != -1) - FmtLog.info(log, "%sPID: %s", prefix, pid); - } - - public static void logDetailsVerbose(Logger log) { - logDetails(log); - logOne(log, "java.vendor"); - logOne(log, "java.home"); - logOne(log, "java.runtime.version"); - logOne(log, "java.runtime.name"); - //logOne(log, "java.endorsed.dirs"); - logOne(log, "user.language"); - logOne(log, "user.timezone"); - logOne(log, "user.country"); - logOne(log, "user.dir"); - //logOne(log, "file.encoding"); - } - - private static void logOne(Logger log, String property) { - FmtLog.info(log, " %-20s = %s", property, System.getProperty(property)); - } - - /** Create a human-friendly string for a number based on Kilo/Mega/Giga/Tera (powers of 2) */ - public static String strNumMixed(long x) { - // https://en.wikipedia.org/wiki/Kibibyte - if ( x < 1024 ) - return Long.toString(x); - if ( x < 1024*1024 ) - return String.format("%.1fK", x/1024.0); - if ( x < 1024*1024*1024 ) - return String.format("%.1fM", x/(1024.0*1024)); - if ( x < 1024L*1024*1024*1024 ) - return String.format("%.1fG", x/(1024.0*1024*1024)); - return String.format("%.1fT", x/(1024.0*1024*1024*1024)); - } - - private static long getProcessId() { - // Java9 - //long pid = ProcessHandle.current().getPid(); - try { - String x = java.lang.management.ManagementFactory.getRuntimeMXBean().getName().split("@")[0]; - return Long.parseLong(x); - } catch (NumberFormatException ex) { return -1 ; } - } - - /** Create a human-friendly string for a number based on Kilo/Mega/Giga/Tera (powers of 10) */ - public static String strNum10(long x) { - if ( x < 1_000 ) - return Long.toString(x); - if ( x < 1_000_000 ) - return String.format("%.1fK", x/1000.0); - if ( x < 1_000_000_000 ) - return String.format("%.1fM", x/(1000.0*1000)); - if ( x < 1_000_000_000_000L ) - return String.format("%.1fG", x/(1000.0*1000*1000)); - return String.format("%.1fT", x/(1000.0*1000*1000*1000)); - } - - /** Create a human-friendly string for a number based on Kibi/Mebi/Gibi/Tebi (powers of 2) */ - public static String strNum2(long x) { - // https://en.wikipedia.org/wiki/Kibibyte - if ( x < 1024 ) - return Long.toString(x); - if ( x < 1024*1024 ) - return String.format("%.1f KiB", x/1024.0); - if ( x < 1024*1024*1024 ) - return String.format("%.1f MiB", x/(1024.0*1024)); - if ( x < 1024L*1024*1024*1024 ) - return String.format("%.1f GiB", x/(1024.0*1024*1024)); - return String.format("%.1fTiB", x/(1024.0*1024*1024*1024)); - } -} http://git-wip-us.apache.org/repos/asf/jena/blob/7e6d03af/jena-fuseki2/jena-fuseki-basic/src/main/java/org/apache/jena/fuseki/cmds/ServerConfig.java ---------------------------------------------------------------------- diff --git a/jena-fuseki2/jena-fuseki-basic/src/main/java/org/apache/jena/fuseki/cmds/ServerConfig.java b/jena-fuseki2/jena-fuseki-basic/src/main/java/org/apache/jena/fuseki/cmds/ServerConfig.java deleted file mode 100644 index aca05fb..0000000 --- a/jena-fuseki2/jena-fuseki-basic/src/main/java/org/apache/jena/fuseki/cmds/ServerConfig.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.apache.jena.fuseki.cmds; - -import org.apache.jena.sparql.core.DatasetGraph; - -/** Setup details (command line, config file) from command line processing. - * This is built by {@link FusekiBasicMain#exec}. - * This is processed by {@link FusekiBasicMain#buildServer}. - */ -class ServerConfig { - /** Server port */ - public int port; - /** Loopback */ - public boolean loopback = false; - /** The dataset name */ - public String datasetPath = null; - /** Allow update */ - public boolean allowUpdate = false; - - // This is set ... - public DatasetGraph dsg = null; - // ... or this. - public String serverConfig = null; - - /** No registered datasets without it being an error. */ - public boolean empty = false ; - /** General query processor servlet */ - public String addGeneral = null ; - - public boolean validators = false ; - /** An informative label */ - public String datasetDescription; - public String contentDirectory = null; -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/jena/blob/7e6d03af/jena-fuseki2/jena-fuseki-core/pom.xml ---------------------------------------------------------------------- diff --git a/jena-fuseki2/jena-fuseki-core/pom.xml b/jena-fuseki2/jena-fuseki-core/pom.xml index ab035b0..2f3dcbe 100644 --- a/jena-fuseki2/jena-fuseki-core/pom.xml +++ b/jena-fuseki2/jena-fuseki-core/pom.xml @@ -130,7 +130,7 @@ - + org.apache.maven.plugins maven-surefire-plugin