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 2018/09/21 10:16:02 UTC
[51/70] [abbrv] [partial] jena git commit: JENA-1597: separate
jena-fuseki-webapp module
JENA-1597: separate jena-fuseki-webapp module
Project: http://git-wip-us.apache.org/repos/asf/jena/repo
Commit: http://git-wip-us.apache.org/repos/asf/jena/commit/e8abcbb6
Tree: http://git-wip-us.apache.org/repos/asf/jena/tree/e8abcbb6
Diff: http://git-wip-us.apache.org/repos/asf/jena/diff/e8abcbb6
Branch: refs/heads/master
Commit: e8abcbb69352158410606b4614643a203f1e2a8d
Parents: cf08538
Author: Andy Seaborne <an...@apache.org>
Authored: Sat Sep 1 16:55:17 2018 +0100
Committer: Andy Seaborne <an...@apache.org>
Committed: Sat Sep 8 18:48:06 2018 +0100
----------------------------------------------------------------------
jena-fuseki2/jena-fuseki-core/fuseki-dev | 105 -
jena-fuseki2/jena-fuseki-core/pom.xml | 61 +-
.../java/org/apache/jena/fuseki/FusekiCmd.java | 28 -
.../fuseki/authz/AuthorizationFilter403.java | 59 -
.../apache/jena/fuseki/authz/DenyFilter.java | 33 -
.../jena/fuseki/authz/LocalhostFilter.java | 62 -
.../org/apache/jena/fuseki/build/Template.java | 70 -
.../jena/fuseki/build/TemplateFunctions.java | 86 -
.../org/apache/jena/fuseki/cmd/FusekiCmd.java | 377 -
.../org/apache/jena/fuseki/cmd/JettyFuseki.java | 325 -
.../java/org/apache/jena/fuseki/ctl/Backup.java | 131 -
.../apache/jena/fuseki/mgt/ActionBackup.java | 68 -
.../jena/fuseki/mgt/ActionBackupList.java | 95 -
.../apache/jena/fuseki/mgt/ActionDatasets.java | 511 -
.../org/apache/jena/fuseki/mgt/ActionLogs.java | 60 -
.../jena/fuseki/mgt/ActionServerStatus.java | 117 -
.../org/apache/jena/fuseki/mgt/DumpServlet.java | 300 -
.../apache/jena/fuseki/mgt/ServerMgtConst.java | 39 -
.../fuseki/server/DataAccessPointRegistry.java | 9 +-
.../apache/jena/fuseki/server/DataService.java | 3 +-
.../apache/jena/fuseki/webapp/FusekiEnv.java | 168 -
.../webapp/FusekiServerEnvironmentInit.java | 54 -
.../fuseki/webapp/FusekiServerListener.java | 107 -
.../apache/jena/fuseki/webapp/FusekiSystem.java | 459 -
.../fuseki/webapp/ShiroEnvironmentLoader.java | 163 -
.../apache/jena/fuseki/webapp/SystemState.java | 96 -
.../org/apache/jena/fuseki/webapp/config.ttl | 30 -
.../org/apache/jena/fuseki/webapp/shiro.ini | 37 -
.../jena/fuseki/webapp/templates/config-mem | 27 -
.../jena/fuseki/webapp/templates/config-service | 23 -
.../jena/fuseki/webapp/templates/config-tdb | 31 -
.../jena/fuseki/webapp/templates/config-tdb-dir | 30 -
.../jena/fuseki/webapp/templates/config-tdb-mem | 30 -
.../jena/fuseki/webapp/templates/config-tdb2 | 31 -
.../fuseki/webapp/templates/config-tdb2-dir | 30 -
.../fuseki/webapp/templates/config-tdb2-mem | 30 -
.../src/main/webapp/WEB-INF/web.xml | 326 -
.../src/main/webapp/admin-logs.html | 73 -
.../main/webapp/css/bootstrap-select.min.css | 7 -
.../src/main/webapp/css/bootstrap-theme.css.map | 1 -
.../src/main/webapp/css/bootstrap-theme.min.css | 7 -
.../src/main/webapp/css/bootstrap.css.map | 1 -
.../src/main/webapp/css/bootstrap.min.css | 7 -
.../src/main/webapp/css/codemirror.css | 301 -
.../src/main/webapp/css/codemirror.min.css | 1 -
.../src/main/webapp/css/font-awesome.min.css | 4 -
.../src/main/webapp/css/fui.css | 191 -
.../src/main/webapp/css/jquery.dataTables.css | 220 -
.../webapp/css/jquery.fileupload-noscript.css | 22 -
.../css/jquery.fileupload-ui-noscript.css | 17 -
.../main/webapp/css/jquery.fileupload-ui.css | 57 -
.../src/main/webapp/css/jquery.fileupload.css | 36 -
.../src/main/webapp/css/pivot.min.css | 1 -
.../src/main/webapp/css/qonsole.css | 172 -
.../src/main/webapp/css/yasqe.min.css | 1 -
.../src/main/webapp/css/yasr.min.css | 1 -
.../src/main/webapp/dataset.html | 247 -
.../src/main/webapp/documentation.html | 83 -
.../src/main/webapp/fonts/FontAwesome.otf | Bin 75188 -> 0 bytes
.../main/webapp/fonts/fontawesome-webfont.eot | Bin 72449 -> 0 bytes
.../main/webapp/fonts/fontawesome-webfont.svg | 504 -
.../main/webapp/fonts/fontawesome-webfont.ttf | Bin 141564 -> 0 bytes
.../main/webapp/fonts/fontawesome-webfont.woff | Bin 83760 -> 0 bytes
.../fonts/glyphicons-halflings-regular.eot | Bin 20335 -> 0 bytes
.../fonts/glyphicons-halflings-regular.svg | 229 -
.../fonts/glyphicons-halflings-regular.ttf | Bin 41280 -> 0 bytes
.../fonts/glyphicons-halflings-regular.woff | Bin 23320 -> 0 bytes
.../src/main/webapp/images/back_disabled.png | Bin 1361 -> 0 bytes
.../src/main/webapp/images/back_enabled.png | Bin 1379 -> 0 bytes
.../main/webapp/images/back_enabled_hover.png | Bin 1375 -> 0 bytes
.../src/main/webapp/images/favicon.ico | Bin 1085 -> 0 bytes
.../src/main/webapp/images/forward_disabled.png | Bin 1363 -> 0 bytes
.../src/main/webapp/images/forward_enabled.png | Bin 1380 -> 0 bytes
.../webapp/images/forward_enabled_hover.png | Bin 1379 -> 0 bytes
.../webapp/images/jena-logo-notext-small.png | Bin 2469 -> 0 bytes
.../src/main/webapp/images/sort_asc.png | Bin 1118 -> 0 bytes
.../main/webapp/images/sort_asc_disabled.png | Bin 1050 -> 0 bytes
.../src/main/webapp/images/sort_both.png | Bin 1136 -> 0 bytes
.../src/main/webapp/images/sort_desc.png | Bin 1127 -> 0 bytes
.../main/webapp/images/sort_desc_disabled.png | Bin 1045 -> 0 bytes
.../src/main/webapp/images/wait30.gif | Bin 6337 -> 0 bytes
.../jena-fuseki-core/src/main/webapp/index.html | 101 -
.../js/app/controllers/dataset-controller.js | 69 -
.../js/app/controllers/index-controller.js | 50 -
.../js/app/controllers/manage-controller.js | 39 -
.../js/app/controllers/query-controller.js | 72 -
.../js/app/controllers/upload-controller.js | 42 -
.../js/app/controllers/validation-controller.js | 38 -
.../src/main/webapp/js/app/fui.js | 33 -
.../src/main/webapp/js/app/main.dataset.js | 31 -
.../src/main/webapp/js/app/main.index.js | 24 -
.../src/main/webapp/js/app/main.manage.js | 27 -
.../src/main/webapp/js/app/main.validation.js | 24 -
.../main/webapp/js/app/models/dataset-stats.js | 102 -
.../src/main/webapp/js/app/models/dataset.js | 262 -
.../main/webapp/js/app/models/fuseki-server.js | 180 -
.../src/main/webapp/js/app/models/task.js | 105 -
.../webapp/js/app/models/validation-options.js | 85 -
.../src/main/webapp/js/app/qonsole-config.js | 27 -
.../main/webapp/js/app/services/ping-service.js | 54 -
.../js/app/services/validation-service.js | 98 -
.../webapp/js/app/templates/dataset-edit.tpl | 58 -
.../webapp/js/app/templates/dataset-info.tpl | 40 -
.../js/app/templates/dataset-management.tpl | 62 -
.../js/app/templates/dataset-selection-list.tpl | 22 -
.../js/app/templates/dataset-selector.tpl | 15 -
.../js/app/templates/dataset-simple-create.tpl | 85 -
.../webapp/js/app/templates/dataset-stats.tpl | 14 -
.../webapp/js/app/templates/file-upload.tpl | 46 -
.../webapp/js/app/templates/uploadable-file.tpl | 23 -
.../src/main/webapp/js/app/util/page-utils.js | 33 -
.../main/webapp/js/app/views/dataset-edit.js | 205 -
.../main/webapp/js/app/views/dataset-info.js | 76 -
.../webapp/js/app/views/dataset-management.js | 173 -
.../js/app/views/dataset-selection-list.js | 58 -
.../webapp/js/app/views/dataset-selector.js | 84 -
.../js/app/views/dataset-simple-create.js | 102 -
.../main/webapp/js/app/views/dataset-stats.js | 41 -
.../js/app/views/datasets-dropdown-list.js | 43 -
.../src/main/webapp/js/app/views/file-upload.js | 225 -
.../webapp/js/app/views/tabbed-view-manager.js | 63 -
.../main/webapp/js/app/views/uploadable-file.js | 39 -
.../webapp/js/app/views/validation-options.js | 54 -
.../src/main/webapp/js/common-config.js | 94 -
.../main/webapp/js/lib/addon/fold/brace-fold.js | 105 -
.../webapp/js/lib/addon/fold/comment-fold.js | 57 -
.../main/webapp/js/lib/addon/fold/foldcode.js | 145 -
.../main/webapp/js/lib/addon/fold/foldgutter.js | 134 -
.../main/webapp/js/lib/addon/fold/xml-fold.js | 181 -
.../src/main/webapp/js/lib/backbone-min.js | 2 -
.../src/main/webapp/js/lib/backbone.js | 1581 ---
.../main/webapp/js/lib/backbone.marionette.js | 2385 -----
.../main/webapp/js/lib/bootstrap-select.min.js | 8 -
.../src/main/webapp/js/lib/bootstrap.min.js | 6 -
.../src/main/webapp/js/lib/html5shiv.js | 8 -
.../src/main/webapp/js/lib/jquery-1.10.2.js | 9789 ------------------
.../src/main/webapp/js/lib/jquery-1.10.2.min.js | 6 -
.../src/main/webapp/js/lib/jquery-ui.min.js | 7 -
.../main/webapp/js/lib/jquery.dataTables.min.js | 157 -
.../src/main/webapp/js/lib/jquery.fileupload.js | 1426 ---
.../webapp/js/lib/jquery.fileupload.local.js | 1428 ---
.../src/main/webapp/js/lib/jquery.form.js | 1278 ---
.../webapp/js/lib/jquery.iframe-transport.js | 214 -
.../src/main/webapp/js/lib/jquery.ui.widget.js | 530 -
.../main/webapp/js/lib/jquery.xdomainrequest.js | 90 -
.../src/main/webapp/js/lib/lib/codemirror.js | 7638 --------------
.../webapp/js/lib/mode/javascript/javascript.js | 683 --
.../main/webapp/js/lib/mode/sparql/sparql.js | 160 -
.../main/webapp/js/lib/mode/turtle/turtle.js | 160 -
.../src/main/webapp/js/lib/mode/xml/xml.js | 384 -
.../src/main/webapp/js/lib/pivot.js | 1363 ---
.../src/main/webapp/js/lib/pivot.min.js | 2 -
.../src/main/webapp/js/lib/pivot.min.js.map | 1 -
.../src/main/webapp/js/lib/plugins/text.js | 386 -
.../src/main/webapp/js/lib/qonsole.js | 577 --
.../src/main/webapp/js/lib/refresh.sh | 21 -
.../src/main/webapp/js/lib/require.js | 2076 ----
.../src/main/webapp/js/lib/require.min.js | 36 -
.../src/main/webapp/js/lib/respond.min.js | 6 -
.../src/main/webapp/js/lib/sprintf-0.7-beta1.js | 183 -
.../src/main/webapp/js/lib/underscore.js | 1276 ---
.../src/main/webapp/js/lib/yasqe.min.js | 9 -
.../src/main/webapp/js/lib/yasqe.min.js.map | 1 -
.../src/main/webapp/js/lib/yasr.min.js | 8 -
.../src/main/webapp/js/lib/yasr.min.js.map | 1 -
.../src/main/webapp/manage.html | 110 -
.../src/main/webapp/services.html | 76 -
.../src/main/webapp/test/test-fuseki-config.ttl | 27 -
.../src/main/webapp/validate.html | 147 -
.../apache/jena/fuseki/AbstractFusekiTest.java | 51 -
.../test/java/org/apache/jena/fuseki/Dummy.java | 23 +
.../java/org/apache/jena/fuseki/FileSender.java | 87 -
.../java/org/apache/jena/fuseki/FusekiTest.java | 101 -
.../java/org/apache/jena/fuseki/ServerCtl.java | 304 -
.../java/org/apache/jena/fuseki/ServerTest.java | 42 -
.../java/org/apache/jena/fuseki/TS_Fuseki.java | 81 -
.../java/org/apache/jena/fuseki/TestAdmin.java | 514 -
.../org/apache/jena/fuseki/TestAdminAPI.java | 120 -
.../java/org/apache/jena/fuseki/TestAuth.java | 380 -
.../org/apache/jena/fuseki/TestBuilder.java | 68 -
.../jena/fuseki/TestDatasetAccessorHTTP.java | 318 -
.../fuseki/TestDatasetGraphAccessorHTTP.java | 40 -
.../org/apache/jena/fuseki/TestDatasetOps.java | 136 -
.../org/apache/jena/fuseki/TestFileUpload.java | 124 -
.../java/org/apache/jena/fuseki/TestHttpOp.java | 198 -
.../apache/jena/fuseki/TestHttpOperations.java | 131 -
.../org/apache/jena/fuseki/TestHttpOptions.java | 56 -
.../java/org/apache/jena/fuseki/TestQuery.java | 322 -
.../apache/jena/fuseki/TestSPARQLProtocol.java | 84 -
.../apache/jena/fuseki/TestServerReadOnly.java | 134 -
.../jena/fuseki/embedded/FusekiServer.java | 2 +-
jena-fuseki2/jena-fuseki-server/pom.xml | 2 +-
jena-fuseki2/jena-fuseki-war/pom.xml | 6 +-
jena-fuseki2/jena-fuseki-webapp/fuseki-dev | 105 +
jena-fuseki2/jena-fuseki-webapp/pom.xml | 198 +
.../fuseki/authz/AuthorizationFilter403.java | 59 +
.../apache/jena/fuseki/authz/DenyFilter.java | 33 +
.../jena/fuseki/authz/LocalhostFilter.java | 62 +
.../org/apache/jena/fuseki/cmd/FusekiCmd.java | 377 +
.../org/apache/jena/fuseki/cmd/JettyFuseki.java | 325 +
.../apache/jena/fuseki/mgt/ActionBackup.java | 67 +
.../jena/fuseki/mgt/ActionBackupList.java | 95 +
.../apache/jena/fuseki/mgt/ActionDatasets.java | 515 +
.../org/apache/jena/fuseki/mgt/ActionLogs.java | 60 +
.../jena/fuseki/mgt/ActionServerStatus.java | 117 +
.../java/org/apache/jena/fuseki/mgt/Backup.java | 131 +
.../org/apache/jena/fuseki/mgt/DumpServlet.java | 300 +
.../apache/jena/fuseki/mgt/ServerMgtConst.java | 39 +
.../org/apache/jena/fuseki/mgt/Template.java | 70 +
.../jena/fuseki/mgt/TemplateFunctions.java | 86 +
.../apache/jena/fuseki/webapp/FusekiEnv.java | 168 +
.../webapp/FusekiServerEnvironmentInit.java | 54 +
.../fuseki/webapp/FusekiServerListener.java | 107 +
.../apache/jena/fuseki/webapp/FusekiSystem.java | 472 +
.../fuseki/webapp/ShiroEnvironmentLoader.java | 163 +
.../apache/jena/fuseki/webapp/SystemState.java | 96 +
.../src/main/resources/META-INF/DEPENDENCIES | 24 +
.../src/main/resources/META-INF/LICENSE | 253 +
.../src/main/resources/META-INF/NOTICE | 16 +
.../apache/jena/fuseki/fuseki-properties.xml | 8 +
.../org/apache/jena/fuseki/log4j.properties | 40 +
.../org/apache/jena/fuseki/webapp/config.ttl | 30 +
.../org/apache/jena/fuseki/webapp/shiro.ini | 37 +
.../jena/fuseki/webapp/templates/config-mem | 27 +
.../jena/fuseki/webapp/templates/config-service | 23 +
.../jena/fuseki/webapp/templates/config-tdb | 31 +
.../jena/fuseki/webapp/templates/config-tdb-dir | 30 +
.../jena/fuseki/webapp/templates/config-tdb-mem | 30 +
.../jena/fuseki/webapp/templates/config-tdb2 | 31 +
.../fuseki/webapp/templates/config-tdb2-dir | 30 +
.../fuseki/webapp/templates/config-tdb2-mem | 30 +
.../src/main/webapp/WEB-INF/web.xml | 326 +
.../src/main/webapp/admin-logs.html | 73 +
.../main/webapp/css/bootstrap-select.min.css | 7 +
.../src/main/webapp/css/bootstrap-theme.css.map | 1 +
.../src/main/webapp/css/bootstrap-theme.min.css | 7 +
.../src/main/webapp/css/bootstrap.css.map | 1 +
.../src/main/webapp/css/bootstrap.min.css | 7 +
.../src/main/webapp/css/codemirror.css | 301 +
.../src/main/webapp/css/codemirror.min.css | 1 +
.../src/main/webapp/css/font-awesome.min.css | 4 +
.../src/main/webapp/css/fui.css | 191 +
.../src/main/webapp/css/jquery.dataTables.css | 220 +
.../webapp/css/jquery.fileupload-noscript.css | 22 +
.../css/jquery.fileupload-ui-noscript.css | 17 +
.../main/webapp/css/jquery.fileupload-ui.css | 57 +
.../src/main/webapp/css/jquery.fileupload.css | 36 +
.../src/main/webapp/css/pivot.min.css | 1 +
.../src/main/webapp/css/qonsole.css | 172 +
.../src/main/webapp/css/yasqe.min.css | 1 +
.../src/main/webapp/css/yasr.min.css | 1 +
.../src/main/webapp/dataset.html | 247 +
.../src/main/webapp/documentation.html | 83 +
.../src/main/webapp/fonts/FontAwesome.otf | Bin 0 -> 75188 bytes
.../main/webapp/fonts/fontawesome-webfont.eot | Bin 0 -> 72449 bytes
.../main/webapp/fonts/fontawesome-webfont.svg | 504 +
.../main/webapp/fonts/fontawesome-webfont.ttf | Bin 0 -> 141564 bytes
.../main/webapp/fonts/fontawesome-webfont.woff | Bin 0 -> 83760 bytes
.../fonts/glyphicons-halflings-regular.eot | Bin 0 -> 20335 bytes
.../fonts/glyphicons-halflings-regular.svg | 229 +
.../fonts/glyphicons-halflings-regular.ttf | Bin 0 -> 41280 bytes
.../fonts/glyphicons-halflings-regular.woff | Bin 0 -> 23320 bytes
.../src/main/webapp/images/back_disabled.png | Bin 0 -> 1361 bytes
.../src/main/webapp/images/back_enabled.png | Bin 0 -> 1379 bytes
.../main/webapp/images/back_enabled_hover.png | Bin 0 -> 1375 bytes
.../src/main/webapp/images/favicon.ico | Bin 0 -> 1085 bytes
.../src/main/webapp/images/forward_disabled.png | Bin 0 -> 1363 bytes
.../src/main/webapp/images/forward_enabled.png | Bin 0 -> 1380 bytes
.../webapp/images/forward_enabled_hover.png | Bin 0 -> 1379 bytes
.../webapp/images/jena-logo-notext-small.png | Bin 0 -> 2469 bytes
.../src/main/webapp/images/sort_asc.png | Bin 0 -> 1118 bytes
.../main/webapp/images/sort_asc_disabled.png | Bin 0 -> 1050 bytes
.../src/main/webapp/images/sort_both.png | Bin 0 -> 1136 bytes
.../src/main/webapp/images/sort_desc.png | Bin 0 -> 1127 bytes
.../main/webapp/images/sort_desc_disabled.png | Bin 0 -> 1045 bytes
.../src/main/webapp/images/wait30.gif | Bin 0 -> 6337 bytes
.../src/main/webapp/index.html | 101 +
.../js/app/controllers/dataset-controller.js | 69 +
.../js/app/controllers/index-controller.js | 50 +
.../js/app/controllers/manage-controller.js | 39 +
.../js/app/controllers/query-controller.js | 72 +
.../js/app/controllers/upload-controller.js | 42 +
.../js/app/controllers/validation-controller.js | 38 +
.../src/main/webapp/js/app/fui.js | 33 +
.../src/main/webapp/js/app/main.dataset.js | 31 +
.../src/main/webapp/js/app/main.index.js | 24 +
.../src/main/webapp/js/app/main.manage.js | 27 +
.../src/main/webapp/js/app/main.validation.js | 24 +
.../main/webapp/js/app/models/dataset-stats.js | 102 +
.../src/main/webapp/js/app/models/dataset.js | 262 +
.../main/webapp/js/app/models/fuseki-server.js | 180 +
.../src/main/webapp/js/app/models/task.js | 105 +
.../webapp/js/app/models/validation-options.js | 85 +
.../src/main/webapp/js/app/qonsole-config.js | 27 +
.../main/webapp/js/app/services/ping-service.js | 54 +
.../js/app/services/validation-service.js | 98 +
.../webapp/js/app/templates/dataset-edit.tpl | 58 +
.../webapp/js/app/templates/dataset-info.tpl | 40 +
.../js/app/templates/dataset-management.tpl | 62 +
.../js/app/templates/dataset-selection-list.tpl | 22 +
.../js/app/templates/dataset-selector.tpl | 15 +
.../js/app/templates/dataset-simple-create.tpl | 85 +
.../webapp/js/app/templates/dataset-stats.tpl | 14 +
.../webapp/js/app/templates/file-upload.tpl | 46 +
.../webapp/js/app/templates/uploadable-file.tpl | 23 +
.../src/main/webapp/js/app/util/page-utils.js | 33 +
.../main/webapp/js/app/views/dataset-edit.js | 205 +
.../main/webapp/js/app/views/dataset-info.js | 76 +
.../webapp/js/app/views/dataset-management.js | 173 +
.../js/app/views/dataset-selection-list.js | 58 +
.../webapp/js/app/views/dataset-selector.js | 84 +
.../js/app/views/dataset-simple-create.js | 102 +
.../main/webapp/js/app/views/dataset-stats.js | 41 +
.../js/app/views/datasets-dropdown-list.js | 43 +
.../src/main/webapp/js/app/views/file-upload.js | 225 +
.../webapp/js/app/views/tabbed-view-manager.js | 63 +
.../main/webapp/js/app/views/uploadable-file.js | 39 +
.../webapp/js/app/views/validation-options.js | 54 +
.../src/main/webapp/js/common-config.js | 94 +
.../main/webapp/js/lib/addon/fold/brace-fold.js | 105 +
.../webapp/js/lib/addon/fold/comment-fold.js | 57 +
.../main/webapp/js/lib/addon/fold/foldcode.js | 145 +
.../main/webapp/js/lib/addon/fold/foldgutter.js | 134 +
.../main/webapp/js/lib/addon/fold/xml-fold.js | 181 +
.../src/main/webapp/js/lib/backbone-min.js | 2 +
.../src/main/webapp/js/lib/backbone.js | 1581 +++
.../main/webapp/js/lib/backbone.marionette.js | 2385 +++++
.../main/webapp/js/lib/bootstrap-select.min.js | 8 +
.../src/main/webapp/js/lib/bootstrap.min.js | 6 +
.../src/main/webapp/js/lib/html5shiv.js | 8 +
.../src/main/webapp/js/lib/jquery-1.10.2.js | 9789 ++++++++++++++++++
.../src/main/webapp/js/lib/jquery-1.10.2.min.js | 6 +
.../src/main/webapp/js/lib/jquery-ui.min.js | 7 +
.../main/webapp/js/lib/jquery.dataTables.min.js | 157 +
.../src/main/webapp/js/lib/jquery.fileupload.js | 1426 +++
.../webapp/js/lib/jquery.fileupload.local.js | 1428 +++
.../src/main/webapp/js/lib/jquery.form.js | 1278 +++
.../webapp/js/lib/jquery.iframe-transport.js | 214 +
.../src/main/webapp/js/lib/jquery.ui.widget.js | 530 +
.../main/webapp/js/lib/jquery.xdomainrequest.js | 90 +
.../src/main/webapp/js/lib/lib/codemirror.js | 7638 ++++++++++++++
.../webapp/js/lib/mode/javascript/javascript.js | 683 ++
.../main/webapp/js/lib/mode/sparql/sparql.js | 160 +
.../main/webapp/js/lib/mode/turtle/turtle.js | 160 +
.../src/main/webapp/js/lib/mode/xml/xml.js | 384 +
.../src/main/webapp/js/lib/pivot.js | 1363 +++
.../src/main/webapp/js/lib/pivot.min.js | 2 +
.../src/main/webapp/js/lib/pivot.min.js.map | 1 +
.../src/main/webapp/js/lib/plugins/text.js | 386 +
.../src/main/webapp/js/lib/qonsole.js | 577 ++
.../src/main/webapp/js/lib/refresh.sh | 21 +
.../src/main/webapp/js/lib/require.js | 2076 ++++
.../src/main/webapp/js/lib/require.min.js | 36 +
.../src/main/webapp/js/lib/respond.min.js | 6 +
.../src/main/webapp/js/lib/sprintf-0.7-beta1.js | 183 +
.../src/main/webapp/js/lib/underscore.js | 1276 +++
.../src/main/webapp/js/lib/yasqe.min.js | 9 +
.../src/main/webapp/js/lib/yasqe.min.js.map | 1 +
.../src/main/webapp/js/lib/yasr.min.js | 8 +
.../src/main/webapp/js/lib/yasr.min.js.map | 1 +
.../src/main/webapp/manage.html | 110 +
.../src/main/webapp/services.html | 76 +
.../src/main/webapp/test/test-fuseki-config.ttl | 27 +
.../src/main/webapp/validate.html | 147 +
.../apache/jena/fuseki/AbstractFusekiTest.java | 51 +
.../java/org/apache/jena/fuseki/FileSender.java | 87 +
.../java/org/apache/jena/fuseki/FusekiTest.java | 101 +
.../java/org/apache/jena/fuseki/ServerCtl.java | 304 +
.../java/org/apache/jena/fuseki/ServerTest.java | 42 +
.../java/org/apache/jena/fuseki/TS_Fuseki.java | 81 +
.../java/org/apache/jena/fuseki/TestAdmin.java | 514 +
.../org/apache/jena/fuseki/TestAdminAPI.java | 120 +
.../java/org/apache/jena/fuseki/TestAuth.java | 380 +
.../org/apache/jena/fuseki/TestBuilder.java | 68 +
.../jena/fuseki/TestDatasetAccessorHTTP.java | 318 +
.../fuseki/TestDatasetGraphAccessorHTTP.java | 40 +
.../org/apache/jena/fuseki/TestDatasetOps.java | 136 +
.../org/apache/jena/fuseki/TestFileUpload.java | 124 +
.../java/org/apache/jena/fuseki/TestHttpOp.java | 198 +
.../apache/jena/fuseki/TestHttpOperations.java | 131 +
.../org/apache/jena/fuseki/TestHttpOptions.java | 56 +
.../java/org/apache/jena/fuseki/TestQuery.java | 322 +
.../apache/jena/fuseki/TestSPARQLProtocol.java | 84 +
.../apache/jena/fuseki/TestServerReadOnly.java | 134 +
.../jena-fuseki-webapp/testing/config-ds-1.ttl | 15 +
.../testing/config-ds-bad-name-1.ttl | 15 +
.../testing/config-ds-bad-name-2.ttl | 15 +
.../testing/config-ds-bad-name-3.ttl | 15 +
.../testing/config-ds-bad-name-4.ttl | 15 +
jena-fuseki2/pom.xml | 1 +
390 files changed, 48240 insertions(+), 47665 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/jena/blob/e8abcbb6/jena-fuseki2/jena-fuseki-core/fuseki-dev
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/fuseki-dev b/jena-fuseki2/jena-fuseki-core/fuseki-dev
deleted file mode 100755
index 365a33a..0000000
--- a/jena-fuseki2/jena-fuseki-core/fuseki-dev
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/usr/bin/env bash
-
-# 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.
-
-## Run Fuseki, include development code if it looks like it's available.
-
-function check_dir() {
- local NAME="$1"
- local DIR="$2"
- if [ ! -e "$DIR" ]
- then
- echo "$NAME: '$DIR' does not exist" 1>&2
- exit 1
- fi
- if [ ! -d "$DIR" ]
- then
- echo "$NAME: '$DIR' exists but is not a directory" 1>&2
- exit 1
- fi
-}
-
-export FUSEKI_HOME="${FUSEKI_HOME:-$PWD}"
-check_dir "FUSEKI_HOME" "$FUSEKI_HOME"
-
-export FUSEKI_BASE="${FUSEKI_BASE:-$FUSEKI_HOME/run}"
-check_dir "FUSEKI_BASE" "$FUSEKI_BASE"
-
-CPF="$FUSEKI_HOME/fuseki.classpath"
-if [ ! -e "$CPF" ]; then
- echo "Need to create Fuseki classpath file"
- echo "Ensure maven is upto date with the latest snapshots and then run"
- echo -e "( cd $FUSEKI_HOME ; \n mvn dependency:build-classpath -Dmdep.outputFile=fuseki.classpath )"
- exit 1
-fi
-CP="$(cat $CPF)"
-
-# Add development directories.
-if [ -e "$FUSEKI_HOME/classes" ]
-then
- CP="$FUSEKI_HOME/classes:$CP"
-elif [ -e "$FUSEKI_HOME/target/classes" ]
-then
- CP="$FUSEKI_HOME/target/classes:$CP"
-fi
-
-# Prepend any development directories here
-DEVDIRS="jena-core jena-tdb jena-arq jena-text"
-for X in $DEVDIRS
-do
- CPX="$FUSEKI_HOME/../../$X/target/classes"
- if [ -e "$CPX" ]
- then
- CP="$CPX:$CP"
- fi
-done
-
-## echo "$CP"
-## exit
-
-FUSEKI_LOG="" #${FUSEKI_LOG:-}
-
-if [ -z "$JAVA" ]
-then
- if [ -z "$JAVA_HOME" ]
- then
- JAVA=$(which java)
- else
- JAVA=$JAVA_HOME/bin/java
- fi
-fi
-
-if [ -z "$JAVA" ]
-then
- (
- echo "Cannot find a Java JDK."
- echo "Please set either set JAVA or JAVA_HOME and put java (>=1.8) in your PATH."
- ) 1>&2
- exit 1
-fi
-
-JVM_ARGS=${JVM_ARGS:--Xmx1200M}
-
-# Debug assistence
-## echo "++++ Classpath:"
-## echo "$(echo $CP | sed -e "s/:/\n/g")"
-## exit
-
-exec "$JAVA" -cp "$CP" $JVM_ARGS $FUSEKI_LOG org.apache.jena.fuseki.cmd.FusekiCmd "$@"
-
-# Run as war file.
-# java -jar jetty-runner.jar fuseki-server.war
http://git-wip-us.apache.org/repos/asf/jena/blob/e8abcbb6/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 f49d4b5..bd2ac3f 100644
--- a/jena-fuseki2/jena-fuseki-core/pom.xml
+++ b/jena-fuseki2/jena-fuseki-core/pom.xml
@@ -40,9 +40,8 @@
<dependency>
<groupId>org.apache.jena</groupId>
- <artifactId>jena-cmds</artifactId>
+ <artifactId>jena-text</artifactId>
<version>3.9.0-SNAPSHOT</version>
- <type>pom</type>
</dependency>
<dependency>
@@ -52,18 +51,10 @@
<dependency>
<groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-webapp</artifactId>
+ <artifactId>jetty-servlet</artifactId>
<version>${ver.jetty}</version>
</dependency>
- <!--
- <dependency>
- <groupId>org.eclipse.jetty</groupId>
- <artifactId>jetty-runner</artifactId>
- <version>${ver.jetty}</version>
- </dependency>
- -->
-
<!-- Jetty's useful servlets, inc compression -->
<dependency>
<groupId>org.eclipse.jetty</groupId>
@@ -71,32 +62,6 @@
<version>${ver.jetty}</version>
</dependency>
- <!-- Text and spatial -->
- <dependency>
- <groupId>org.apache.jena</groupId>
- <artifactId>jena-text</artifactId>
- <version>3.9.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.jena</groupId>
- <artifactId>jena-spatial</artifactId>
- <version>3.9.0-SNAPSHOT</version>
- </dependency>
-
- <!-- Apache Shiro -->
- <dependency>
- <groupId>org.apache.shiro</groupId>
- <artifactId>shiro-core</artifactId>
- <version>${ver.shiro}</version>
- </dependency>
-
- <dependency>
- <groupId>org.apache.shiro</groupId>
- <artifactId>shiro-web</artifactId>
- <version>${ver.shiro}</version>
- </dependency>
-
<!-- Logging : Needed because the Fuseki command line manages logging -->
<dependency>
<groupId>org.slf4j</groupId>
@@ -115,23 +80,6 @@
<optional>true</optional>
</dependency>
- <!-- Testing -->
- <dependency>
- <groupId>org.apache.jena</groupId>
- <artifactId>jena-arq</artifactId>
- <version>3.9.0-SNAPSHOT</version>
- <classifier>tests</classifier>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>org.apache.jena</groupId>
- <artifactId>jena-base</artifactId>
- <version>3.9.0-SNAPSHOT</version>
- <classifier>tests</classifier>
- <scope>test</scope>
- </dependency>
-
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
@@ -178,13 +126,12 @@
</executions>
</plugin>
+ <!-- Testing is done in jena-fuseki-webapp and jena-fuseki-embedded -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <includes>
- <include>**/TS_*.java</include>
- </includes>
+ <skipTests>true</skipTests>
</configuration>
</plugin>
http://git-wip-us.apache.org/repos/asf/jena/blob/e8abcbb6/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/FusekiCmd.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/FusekiCmd.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/FusekiCmd.java
deleted file mode 100644
index f3ed119..0000000
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/FusekiCmd.java
+++ /dev/null
@@ -1,28 +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;
-
-public class FusekiCmd {
- public static void main(String[] args) {
- // Must NOT use any logging. The command processor sets that up.
- System.err.println("Deprecated: Use org.apache.jena.fuseki.cmd.FusekiCmd") ;
- org.apache.jena.fuseki.cmd.FusekiCmd.main(args);
- }
-}
-
http://git-wip-us.apache.org/repos/asf/jena/blob/e8abcbb6/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/authz/AuthorizationFilter403.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/authz/AuthorizationFilter403.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/authz/AuthorizationFilter403.java
deleted file mode 100644
index ca4cd2e..0000000
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/authz/AuthorizationFilter403.java
+++ /dev/null
@@ -1,59 +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.authz;
-
-import java.io.IOException ;
-
-import javax.servlet.ServletRequest ;
-import javax.servlet.ServletResponse ;
-import javax.servlet.http.HttpServletResponse ;
-
-import org.apache.jena.web.HttpSC ;
-import org.apache.shiro.web.filter.authz.AuthorizationFilter ;
-import org.apache.shiro.web.util.WebUtils ;
-
-/** Specialise AuthorizationFilter to yield HTTP 403 on access denied */
-public abstract class AuthorizationFilter403 extends AuthorizationFilter
-{
- private String message ;
-
- protected AuthorizationFilter403(String text) { setMessage(text) ; }
- protected AuthorizationFilter403() { this(null) ; }
-
- /** Set the message used in HTTP 403 responses */
- public void setMessage(String msg) { message = msg ; }
-
- public String getMessage() { return message ; }
-
- @Override
- protected boolean onAccessDenied(ServletRequest request, ServletResponse response) throws IOException {
- HttpServletResponse httpResponse ;
- try { httpResponse = WebUtils.toHttp(response); }
- catch (ClassCastException ex) {
- // Not a HTTP Servlet operation
- return super.onAccessDenied(request, response) ;
- }
- if ( message == null )
- httpResponse.sendError(HttpSC.FORBIDDEN_403) ;
- else
- httpResponse.sendError(HttpSC.FORBIDDEN_403, message) ;
- return false ; // No further processing.
- }
-}
-
http://git-wip-us.apache.org/repos/asf/jena/blob/e8abcbb6/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/authz/DenyFilter.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/authz/DenyFilter.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/authz/DenyFilter.java
deleted file mode 100644
index aac7ecd..0000000
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/authz/DenyFilter.java
+++ /dev/null
@@ -1,33 +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.authz;
-
-import javax.servlet.ServletRequest ;
-import javax.servlet.ServletResponse ;
-
-/** An authorization filter that always denies access and sends back HTTP 403 */
-public class DenyFilter extends AuthorizationFilter403 {
-
- public DenyFilter() { super("Access denied") ; }
-
- @Override
- protected boolean isAccessAllowed(ServletRequest request, ServletResponse response, Object mappedValue) {
- return false ;
- }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/e8abcbb6/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/authz/LocalhostFilter.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/authz/LocalhostFilter.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/authz/LocalhostFilter.java
deleted file mode 100644
index 71de761..0000000
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/authz/LocalhostFilter.java
+++ /dev/null
@@ -1,62 +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.authz;
-
-import javax.servlet.ServletRequest ;
-import javax.servlet.ServletResponse ;
-
-import org.apache.shiro.web.filter.authz.PortFilter ;
-
-/**
- * A Filter that can allow or deny access based on whether the
- * the host that sent the request is the loopback address (AKA localhost).
- * Use of the external IP address of the local machine does not permit access,
- * only the loopback interface is authorized.
- * Responds with HTTP 403 on any denied request.
- *
- * Example:
- * <pre>
- * [main]
- * localhost=org.apache.jena.fuseki.authz.LocalhostFilter
- * ...
- * [urls]
- * /LocalFilesForLocalPeople/** = localhost
- * </pre>
- * @see PortFilter
- */
-
-public class LocalhostFilter extends AuthorizationFilter403 {
-
- private static final String message = "Access denied : only localhost access allowed" ;
-
- public LocalhostFilter() { super(message); }
-
- private static String LOCALHOST_IpV6 = "0:0:0:0:0:0:0:1" ;
- private static String LOCALHOST_IpV4 = "127.0.0.1" ; // Strictly, 127.*.*.*
-
- @Override
- protected boolean isAccessAllowed(ServletRequest request, ServletResponse response, Object mappedValue) throws Exception {
- String remoteAddr = request.getRemoteAddr() ;
- if ( LOCALHOST_IpV6.equals(remoteAddr) || LOCALHOST_IpV4.equals(remoteAddr) )
- return true ;
- return false ;
- }
-}
-
-
http://git-wip-us.apache.org/repos/asf/jena/blob/e8abcbb6/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/Template.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/Template.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/Template.java
deleted file mode 100644
index d5057e1..0000000
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/Template.java
+++ /dev/null
@@ -1,70 +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.build;
-
-import java.nio.file.Path ;
-
-import org.apache.jena.fuseki.webapp.FusekiEnv;
-
-public class Template
-{
- public static Path getPath(String templateName) {
- return FusekiEnv.FUSEKI_BASE.resolve(templateName) ;
- }
-
- public static final String templateDir = "templates" ;
-
- // These are used by the command line start up.
- public static final String templateServiceFN = templateDir+"/config-service" ; // Dummy used by dataset-less service.
-
- // TDB1 - for backwards compatibility, the files are called "tdb"
- public static final String templateTDB1_FN = templateDir+"/config-tdb" ;
- public static final String templateTDB1_MemFN = templateDir+"/config-tdb-mem" ;
- public static final String templateTDB1_DirFN = templateDir+"/config-tdb-dir" ;
- public static final String templateTDB1_DirReadFN = templateDir+"/config-tdb-dir-read-only" ;
-
- public static final String templateTDB2_FN = templateDir+"/config-tdb2" ;
- public static final String templateTDB2_MemFN = templateDir+"/config-tdb2-mem" ;
- public static final String templateTDB2_DirFN = templateDir+"/config-tdb2-dir" ;
- public static final String templateTDB2_DirReadFN = templateDir+"/config-tdb2-dir-read-only" ;
-
-
- public static final String templateTIM_MemFN = templateDir+"/config-mem" ;
-
- // Template may be in a resources area of a jar file so you can't do a directory listing.
- public static final String[] templateNames = {
- templateTIM_MemFN,
- templateServiceFN,
-
- templateTDB1_FN ,
- templateTDB1_MemFN ,
- templateTDB1_DirFN ,
- //templateTDB1_DirReadFN,
-
- templateTDB2_FN ,
- templateTDB2_MemFN ,
- templateTDB2_DirFN ,
- //templateTDB2_DirReadFN
- } ;
-
- public static final String NAME = "NAME" ;
- public static final String DATA = "DATA" ;
- public static final String DIR = "DIR" ;
-}
-
http://git-wip-us.apache.org/repos/asf/jena/blob/e8abcbb6/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/TemplateFunctions.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/TemplateFunctions.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/TemplateFunctions.java
deleted file mode 100644
index 8b124ee..0000000
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/build/TemplateFunctions.java
+++ /dev/null
@@ -1,86 +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.build;
-
-import java.io.IOException ;
-import java.io.InputStream ;
-import java.util.Map ;
-import java.util.Map.Entry ;
-
-import org.apache.jena.atlas.io.IO ;
-import org.apache.jena.fuseki.Fuseki ;
-import org.apache.jena.riot.Lang ;
-import org.apache.jena.util.FileUtils ;
-
-public class TemplateFunctions
-{
- /** Read in a template from a file, substitute for {NAME} and return the string. */
- public static String templateFile(String templateName, Map<String, String> params, Lang lang) {
- String templateFilename = Template.getPath(templateName).toString() ;
- String template ;
- try { template = FileUtils.readWholeFileAsUTF8(templateFilename) ; }
- catch (IOException ex) {
- Fuseki.serverLog.error("File not found: "+templateFilename);
- IO.exception(ex); return null ;
- }
- return templateString(template, params, lang) ;
- }
-
- /** Read a template file, substitute for {NAME} and return the model. */
- public static String templateResource(String resourceName, Map<String, String> params, Lang lang) {
- String template ;
- try {
- InputStream in = TemplateFunctions.class.getClassLoader().getResourceAsStream(resourceName) ;
- if ( in == null )
- Fuseki.serverLog.error("Resource not found: "+resourceName);
- template = FileUtils.readWholeFileAsUTF8(in) ;
- }
- catch (IOException ex) {
- Fuseki.serverLog.error("Error reading resource: "+resourceName);
- IO.exception(ex); return null ;
- }
- return templateString(template, params, lang) ;
- }
-
- /** Create a template from a String */
- public static String templateString(String template, Map<String, String> params, Lang lang) {
- for ( Entry<String, String> e : params.entrySet() ) {
- // Literal string replacement.
- // If using .replaceAll, need to use Match.quoteReplacement on the value.
- String x = e.getValue() ;
- String k = "{"+e.getKey()+"}" ;
-
- if ( lang != null ) {
- if ( Lang.TTL.equals(lang) ||
- Lang.TRIG.equals(lang) ||
- Lang.NT.equals(lang) ||
- Lang.NQ.equals(lang) ||
- Lang.JSONLD.equals(lang) ||
- Lang.RDFJSON.equals(lang)
- ) {
- // Make safe for a RDF language ""-string - especially MS Windows \ path separators.
- x = x.replace("\\", "\\\\") ;
- x = x.replace("\"", "\\\"") ;
- }
- }
- template = template.replace(k, x) ;
- }
- return template ;
- }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/e8abcbb6/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/cmd/FusekiCmd.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/cmd/FusekiCmd.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/cmd/FusekiCmd.java
deleted file mode 100644
index e2957b8..0000000
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/cmd/FusekiCmd.java
+++ /dev/null
@@ -1,377 +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.cmd ;
-
-import java.nio.file.Files ;
-import java.nio.file.Path ;
-
-import arq.cmdline.CmdARQ ;
-import arq.cmdline.ModDatasetAssembler ;
-import jena.cmd.ArgDecl ;
-import jena.cmd.CmdException ;
-import jena.cmd.TerminationException;
-import org.apache.jena.atlas.lib.FileOps ;
-import org.apache.jena.fuseki.Fuseki ;
-import org.apache.jena.fuseki.FusekiException;
-import org.apache.jena.fuseki.build.Template ;
-import org.apache.jena.fuseki.jetty.JettyServerConfig ;
-import org.apache.jena.fuseki.server.FusekiInitialConfig ;
-import org.apache.jena.fuseki.system.FusekiLogging;
-import org.apache.jena.fuseki.webapp.FusekiEnv;
-import org.apache.jena.fuseki.webapp.FusekiServerListener;
-import org.apache.jena.fuseki.webapp.FusekiSystem;
-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.sys.Names ;
-import org.slf4j.Logger ;
-
-/**
- * Handles the fuseki command, used to start a Fuseki server.
- */
-public class FusekiCmd {
- // This allows us to set logging before calling FusekiCmdInner
- // FusekiCmdInner inherits from CmdMain which statically sets logging.
- // By java classloading, super class statics run before the
- // statics of a class are run.
-
- static {
- FusekiEnv.mode = FusekiEnv.INIT.STANDALONE;
- FusekiEnv.setEnvironment();
- FusekiLogging.setLogging(FusekiEnv.FUSEKI_BASE);
- }
-
- static public void main(String... argv) {
- FusekiCmdInner.innerMain(argv);
- }
-
- static class FusekiCmdInner extends CmdARQ {
- // --mgt. --mgtPort :: Legacy.
- private static ArgDecl argMgt = new ArgDecl(ArgDecl.NoValue, "mgt") ;
- private static ArgDecl argMgtPort = new ArgDecl(ArgDecl.HasValue, "mgtPort", "mgtport") ;
-
- // --home :: Legacy - do not use.
- private static ArgDecl argHome = new ArgDecl(ArgDecl.HasValue, "home") ;
- // --pages :: Legacy - do not use.
- private static ArgDecl argPages = new ArgDecl(ArgDecl.HasValue, "pages") ;
-
- private static ArgDecl argMem = new ArgDecl(ArgDecl.NoValue, "mem") ;
- // This does not apply to empty in-memory setups.
- 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") ;
- 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 argFusekiConfig = new ArgDecl(ArgDecl.HasValue, "config", "conf") ;
- private static ArgDecl argJettyConfig = new ArgDecl(ArgDecl.HasValue, "jetty-config") ;
- private static ArgDecl argGZip = new ArgDecl(ArgDecl.HasValue, "gzip") ;
-
- // Deprecated. Use shiro.
- private static ArgDecl argBasicAuth = new ArgDecl(ArgDecl.HasValue, "basic-auth") ;
-
- // private static ModLocation modLocation = new ModLocation() ;
- private static ModDatasetAssembler modDataset = new ModDatasetAssembler() ;
-
- static public void innerMain(String... argv) {
- JenaSystem.init() ;
- // Do explicitly so it happens after subsystem initialization.
- Fuseki.init() ;
- new FusekiCmdInner(argv).mainRun() ;
- }
-
- private JettyServerConfig jettyServerConfig = new JettyServerConfig() ;
- {
- jettyServerConfig.port = 3030 ;
- jettyServerConfig.contextPath = "/" ;
- jettyServerConfig.jettyConfigFile = null ;
- jettyServerConfig.enableCompression = true ;
- jettyServerConfig.verboseLogging = false ;
- }
-
- private final FusekiInitialConfig cmdLineConfig = new FusekiInitialConfig() ;
- private boolean useTDB2;
-
- public FusekiCmdInner(String... argv) {
- super(argv) ;
-
- 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(argPort, "--port",
- "Listen on this port number") ;
- // Set via jetty config file.
- 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(argFusekiConfig, "--config=",
- "Use a configuration file to determine the services") ;
- add(argJettyConfig, "--jetty-config=FILE",
- "Set up the server (not services) with a Jetty XML file") ;
- add(argBasicAuth) ;
- add(argPages) ;
- add(argMgt) ; // Legacy
- add(argMgtPort) ; // Legacy
- add(argGZip, "--gzip=on|off",
- "Enable GZip compression (HTTP Accept-Encoding) if request header set") ;
-
- 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() {
- if ( super.isVerbose() || super.isDebug() ) {
- jettyServerConfig.verboseLogging = true ;
- // Output is still at level INFO (currently)
- }
- cmdLineConfig.quiet = super.isQuiet();
- cmdLineConfig.verbose = super.isVerbose();
-
- // Any final tinkering with FUSEKI_HOME and FUSEKI_BASE, e.g. arguments like --home, --base, then ....
- FusekiEnv.resetEnvironment() ;
-
- Logger log = Fuseki.serverLog ;
-
- if ( contains(argFusekiConfig) ) {
- cmdLineConfig.fusekiCmdLineConfigFile = getValue(argFusekiConfig) ;
- cmdLineConfig.datasetDescription = "Configuration: "+cmdLineConfig.fusekiCmdLineConfigFile;
- }
-
- ArgDecl assemblerDescDecl = new ArgDecl(ArgDecl.HasValue, "desc", "dataset") ;
-
- // ---- Datasets
- // Check one and only way is defined.
- int x = 0 ;
-
- if ( contains(argMem) )
- x++ ;
- if ( contains(argFile) )
- x++ ;
- if ( contains(assemblerDescDecl) )
- x++ ;
- if ( contains(argTDB) )
- x++ ;
- if ( contains(argMemTDB) )
- x++ ;
-
- if ( cmdLineConfig.fusekiCmdLineConfigFile != null ) {
- if ( x >= 1 )
- throw new CmdException("Dataset specified on the command line but a configuration file also given.") ;
- } else {
- // No configuration file. 0 or 1 legal.
- if ( x > 1 )
- throw new CmdException("Multiple ways providing a dataset. Only one of --mem, --file, --loc or --desc") ;
- }
-
- boolean cmdlineConfigPresent = ( x != 0 ) ;
- if ( cmdlineConfigPresent && getPositional().size() == 0 )
- throw new CmdException("Missing service name") ;
-
- if ( cmdLineConfig.fusekiCmdLineConfigFile != null && getPositional().size() > 0 )
- throw new CmdException("Service name will come from --conf; no command line service name allowed") ;
-
-
- if ( !cmdlineConfigPresent && getPositional().size() > 0 )
- throw new CmdException("Service name given but no configuration argument to match (e.g. --mem, --loc/--tdb, --file)") ;
-
- if ( cmdlineConfigPresent && getPositional().size() > 1 )
- throw new CmdException("Multiple dataset path names given") ;
-
- if ( ! cmdlineConfigPresent && cmdLineConfig.fusekiCmdLineConfigFile == null ) {
- // Turn command line argument into an absolute file name.
- FusekiEnv.setEnvironment();
- Path cfg = FusekiEnv.FUSEKI_BASE.resolve(FusekiSystem.DFT_CONFIG).toAbsolutePath() ;
- if ( Files.exists(cfg) )
- cmdLineConfig.fusekiServerConfigFile = cfg.toString() ;
- }
-
- // Which TDB to use to create a command line TDB database.
- useTDB2 = contains(argTDB2mode);
-
- cmdLineConfig.allowUpdate = contains(argUpdate) ;
-
- if ( contains(argMem) ) {
- log.info("Dataset: in-memory") ;
- cmdLineConfig.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.
- cmdLineConfig.reset();
- cmdLineConfig.argTemplateFile = Template.templateTIM_MemFN ;
- // Always allow.
- cmdLineConfig.allowUpdate = true ;
- }
-
- if ( contains(argFile) ) {
- String filename = getValue(argFile) ;
- log.info("Dataset: in-memory: load file: " + filename) ;
- String pathname = filename;
- if ( filename.startsWith("file:") )
- pathname = filename.substring("file:".length());
- if ( !FileOps.exists(filename) )
- throw new CmdException("File not found: " + filename) ;
- cmdLineConfig.datasetDescription = "file: "+filename;
- // Directly populate the dataset.
- cmdLineConfig.reset();
- cmdLineConfig.dsg = DatasetGraphFactory.createTxnMem() ;
- Lang language = RDFLanguages.filenameToLang(filename) ;
- if ( language == null )
- throw new CmdException("Can't guess language for file: " + filename) ;
- Txn.executeWrite(cmdLineConfig.dsg, ()->RDFDataMgr.read(cmdLineConfig.dsg, filename)) ;
- }
-
- if ( contains(argMemTDB) ) {
- //log.info("TDB dataset: in-memory") ;
- cmdLineConfig.reset();
- cmdLineConfig.argTemplateFile = useTDB2 ? Template.templateTDB2_MemFN : Template.templateTDB1_MemFN ;
- cmdLineConfig.params.put(Template.DIR, Names.memName) ;
- // Always allow.
- cmdLineConfig.allowUpdate = true ;
- cmdLineConfig.datasetDescription = useTDB2 ? "TDB2 dataset (in-memory)" : "TDB dataset (in-memory)";
- }
-
- if ( contains(argTDB) ) {
- cmdLineConfig.reset();
- cmdLineConfig.argTemplateFile =
- useTDB2 ? Template.templateTDB2_DirFN : Template.templateTDB1_DirFN;
- String dir = getValue(argTDB) ;
- cmdLineConfig.params.put(Template.DIR, dir) ;
- cmdLineConfig.datasetDescription = useTDB2 ? "TDB2 dataset: "+dir : "TDB dataset: "+dir;
- }
-
- // Otherwise
- if ( contains(assemblerDescDecl) ) {
- log.info("Dataset from assembler") ;
- cmdLineConfig.datasetDescription = "Assembler: "+ modDataset.getAssemblerFile();
- // Need to add service details.
- Dataset ds = modDataset.createDataset() ;
- //cmdLineDataset.dsg = ds.asDatasetGraph() ;
- }
-
- if ( cmdlineConfigPresent ) {
- cmdLineConfig.datasetPath = getPositionalArg(0) ;
- if ( cmdLineConfig.datasetPath.length() > 0 && !cmdLineConfig.datasetPath.startsWith("/") )
- throw new CmdException("Dataset path name must begin with a /: " + cmdLineConfig.datasetPath) ;
- if ( ! cmdLineConfig.allowUpdate )
- Fuseki.serverLog.info("Running in read-only mode for "+cmdLineConfig.datasetPath) ;
- // Include the dataset name as NAME for any templates.
- cmdLineConfig.params.put(Template.NAME, cmdLineConfig.datasetPath) ;
- }
-
- // ---- Jetty server
- if ( contains(argBasicAuth) )
- Fuseki.configLog.warn("--basic-auth ignored: Use Apache Shiro security - see shiro.ini") ;
-
- if ( contains(argPort) ) {
- String portStr = getValue(argPort) ;
- try {
- jettyServerConfig.port = Integer.parseInt(portStr) ;
- } catch (NumberFormatException ex) {
- throw new CmdException(argPort.getKeyName() + " : bad port number: " + portStr) ;
- }
- }
-
- if ( contains(argMgt) )
- Fuseki.configLog.warn("Fuseki v2: Management functions are always enabled. --mgt not needed.") ;
-
- if ( contains(argMgtPort) )
- Fuseki.configLog.warn("Fuseki v2: Management functions are always on the same port as the server. --mgtPort ignored.") ;
-
- if ( contains(argLocalhost) )
- jettyServerConfig.loopback = true ;
-
- if ( contains(argTimeout) ) {
- String str = getValue(argTimeout) ;
- ARQ.getContext().set(ARQ.queryTimeout, str) ;
- }
-
- if ( contains(argJettyConfig) ) {
- jettyServerConfig.jettyConfigFile = getValue(argJettyConfig) ;
- if ( !FileOps.exists(jettyServerConfig.jettyConfigFile) )
- throw new CmdException("No such file: " + jettyServerConfig.jettyConfigFile) ;
- }
-
- if ( contains(argBasicAuth) )
- Fuseki.configLog.warn("--basic-auth ignored (use Shiro setup instead)") ;
-
- if ( contains(argHome) )
- Fuseki.configLog.warn("--home ignored (use enviroment variables $FUSEKI_HOME and $FUSEKI_BASE)") ;
-
- if ( contains(argPages) )
- Fuseki.configLog.warn("--pages ignored (enviroment variables $FUSEKI_HOME to provide the webapp)") ;
-
- 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 {
- runFuseki(cmdLineConfig, jettyServerConfig) ;
- } catch (FusekiException ex) {
- throw new TerminationException(1) ;
- }
- }
-
- @Override
- protected String getCommandName() {
- return "fuseki" ;
- }
- }
-
- /** Configure and run a Fuseki server - this function does not return except for error starting up*/
- public static void runFuseki(FusekiInitialConfig serverConfig, JettyServerConfig jettyConfig) {
- FusekiServerListener.initialSetup = serverConfig ;
- JettyFuseki.initializeServer(jettyConfig) ;
- JettyFuseki.instance.start() ;
- JettyFuseki.instance.join() ;
- }
-
-
-}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/jena/blob/e8abcbb6/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/cmd/JettyFuseki.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/cmd/JettyFuseki.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/cmd/JettyFuseki.java
deleted file mode 100644
index 29608d0..0000000
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/cmd/JettyFuseki.java
+++ /dev/null
@@ -1,325 +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.cmd ;
-
-import static java.lang.String.format ;
-import static org.apache.jena.fuseki.Fuseki.serverLog ;
-
-import java.io.FileInputStream ;
-
-import javax.servlet.ServletContext ;
-
-import org.apache.jena.atlas.lib.DateTimeUtils ;
-import org.apache.jena.atlas.lib.FileOps ;
-import org.apache.jena.fuseki.Fuseki ;
-import org.apache.jena.fuseki.FusekiException ;
-import org.apache.jena.fuseki.jetty.FusekiErrorHandler;
-import org.apache.jena.fuseki.jetty.JettyServerConfig;
-import org.apache.jena.fuseki.server.DataAccessPointRegistry ;
-import org.apache.jena.fuseki.webapp.FusekiEnv;
-import org.eclipse.jetty.security.* ;
-import org.eclipse.jetty.security.authentication.BasicAuthenticator ;
-import org.eclipse.jetty.server.HttpConnectionFactory ;
-import org.eclipse.jetty.server.Server ;
-import org.eclipse.jetty.server.ServerConnector ;
-import org.eclipse.jetty.server.handler.AllowSymLinkAliasChecker ;
-import org.eclipse.jetty.server.handler.ContextHandler ;
-import org.eclipse.jetty.server.handler.gzip.GzipHandler ;
-import org.eclipse.jetty.servlet.ServletContextHandler ;
-import org.eclipse.jetty.util.security.Constraint ;
-import org.eclipse.jetty.webapp.WebAppContext ;
-import org.eclipse.jetty.xml.XmlConfiguration ;
-
-/** Standalone full server, not run as a WAR file.
- * Used in testing and development.
- *
- * SPARQLServer is the Jena server instance which wraps/utilizes
- * {@link org.eclipse.jetty.server.Server}. This class provides
- * immediate access to the {@link org.eclipse.jetty.server.Server#start()} and
- * {@link org.eclipse.jetty.server.Server#stop()} commands as well as obtaining
- * instances of the server and server configuration. Finally we can obtain
- * instances of {@link org.apache.jena.fuseki.jetty.JettyServerConfig}.
- */
-public class JettyFuseki {
- // Jetty specific.
- // This class is becoming less important - it now sets up a Jetty server for in-process use
- // either for the command line in development
- // and in testing but not direct webapp deployments.
- static { Fuseki.init() ; }
-
- public static JettyFuseki instance = null ;
-
- private ServerConnector serverConnector = null ;
- // If a separate ...
- private ServerConnector mgtConnector = null ;
-
- private JettyServerConfig serverConfig ;
-
- // The jetty server.
-
- private Server server = null ;
- private ServletContext servletContext = null ;
-
- // webapp setup - standard maven layout
- public static String contextpath = "/" ;
- // Standalone jar
- public static final String resourceBase1 = "webapp" ;
- // Development
- public static final String resourceBase2 = "src/main/webapp" ;
-
- /**
- * Default setup which requires a {@link org.apache.jena.fuseki.jetty.JettyServerConfig}
- * object as input. We use this config to pass in the command line arguments for dataset,
- * name etc.
- * @param config
- */
-
- public static void initializeServer(JettyServerConfig config) {
- instance = new JettyFuseki(config) ;
- }
-
- private JettyFuseki(JettyServerConfig config) {
- this.serverConfig = config ;
- buildServerWebapp(serverConfig.contextPath, serverConfig.jettyConfigFile) ;
- if ( mgtConnector == null )
- mgtConnector = serverConnector ;
-
- if ( config.enableCompression ) {
- GzipHandler gzipHandler = new GzipHandler();
- gzipHandler.setHandler(server.getHandler());
- server.setHandler(gzipHandler);
- }
- }
-
- /**
- * Initialize the {@link JettyFuseki} instance.
- */
- public void start() {
-
- 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() ;
-
- if ( version != null ) {
- if ( Fuseki.developmentMode && buildDate != null )
- serverLog.info(format("%s %s %s", Fuseki.NAME, version, buildDate)) ;
- else
- serverLog.info(format("%s %s", Fuseki.NAME, version)) ;
- }
- // This does not get set usefully for Jetty as we use it.
- // String jettyVersion = org.eclipse.jetty.server.Server.getVersion() ;
- // serverLog.info(format("Jetty %s",jettyVersion)) ;
-
- String host = serverConnector.getHost() ;
- if ( host != null )
- serverLog.info("Incoming connections limited to " + host) ;
-
- try {
- server.start() ;
- } catch (java.net.BindException ex) {
- serverLog.error("SPARQLServer (port="+serverConnector.getPort()+"): Failed to start server: " + ex.getMessage()) ;
- throw new FusekiException("BindException: port="+serverConnector.getPort()+": Failed to start server: " + ex.getMessage(), ex) ;
- } catch (Exception ex) {
- serverLog.error("SPARQLServer: Failed to start server: " + ex.getMessage(), ex) ;
- throw new FusekiException("Failed to start server: " + ex.getMessage(), ex) ;
- }
- String now = DateTimeUtils.nowAsString() ;
- serverLog.info(format("Started %s on port %d", now, serverConnector.getPort())) ;
- }
-
- /**
- * Sync with the {@link JettyFuseki} instance.
- * Returns only if the server exits cleanly
- */
- public void join() {
- try {
- server.join() ;
- } catch (InterruptedException ex) { }
- }
-
- /**
- * Stop the {@link JettyFuseki} instance.
- */
- public void stop() {
- String now = DateTimeUtils.nowAsString() ;
- serverLog.info(format("Stopped %s on port %d", now, serverConnector.getPort())) ;
- try {
- server.stop() ;
- } catch (Exception ex) {
- Fuseki.serverLog.warn("SPARQLServer: Exception while stopping server: " + ex.getMessage(), ex) ;
- }
- }
-
- public static WebAppContext createWebApp(String contextPath) {
- FusekiEnv.setEnvironment();
- WebAppContext webapp = new WebAppContext();
- webapp.getServletContext().getContextHandler().setMaxFormContentSize(10 * 1000 * 1000) ;
-
- // Hunt for the webapp for the standalone jar (or development system).
- // Note that Path FUSEKI_HOME is not initialized until the webapp starts
- // so it is not available here.
-
- String resourceBase3 = null ;
- String resourceBase4 = null ;
- if ( FusekiEnv.FUSEKI_HOME != null ) {
- String HOME = FusekiEnv.FUSEKI_HOME.toString() ;
- resourceBase3 = HOME+"/"+resourceBase1 ;
- resourceBase4 = HOME+"/"+resourceBase2 ;
- }
-
- String resourceBase = tryResourceBase(resourceBase1, null) ;
- resourceBase = tryResourceBase(resourceBase2, resourceBase) ;
- resourceBase = tryResourceBase(resourceBase3, resourceBase) ;
- resourceBase = tryResourceBase(resourceBase4, resourceBase) ;
-
- if ( resourceBase == null ) {
- if ( resourceBase3 == null )
- Fuseki.serverLog.error("Can't find resourceBase (tried "+resourceBase1+" and "+resourceBase2+")") ;
- else
- Fuseki.serverLog.error("Can't find resourceBase (tried "+resourceBase1+", "+resourceBase2+", "+resourceBase3+" and "+resourceBase4+")") ;
- Fuseki.serverLog.error("Failed to start") ;
- throw new FusekiException("Failed to start") ;
- }
-
- webapp.setDescriptor(resourceBase+"/WEB-INF/web.xml");
- webapp.setResourceBase(resourceBase);
- webapp.setContextPath(contextPath);
-
- //-- Jetty setup for the ServletContext logger.
- // The name of the Jetty-allocated slf4j/log4j logger is
- // the display name or, if null, the context path name.
- // It is set, without checking for a previous call of setLogger in "doStart"
- // which happens during server startup.
- // This the name of the ServletContext logger as well
- webapp.setDisplayName(Fuseki.servletRequestLogName);
- webapp.setParentLoaderPriority(true); // Normal Java classloader behaviour.
- webapp.setErrorHandler(new FusekiErrorHandler()) ;
- return webapp ;
- }
-
- public static String getenv(String name) {
- String x = System.getenv(name) ;
- if ( x == null )
- x = System.getProperty(name) ;
- return x ;
- }
-
- public DataAccessPointRegistry getDataAccessPointRegistry() {
- return DataAccessPointRegistry.get(servletContext) ;
- }
-
- private static String tryResourceBase(String maybeResourceBase, String currentResourceBase) {
- if ( currentResourceBase != null )
- return currentResourceBase ;
- if ( maybeResourceBase != null && FileOps.exists(maybeResourceBase) )
- return maybeResourceBase ;
- return currentResourceBase ;
- }
-
- private void buildServerWebapp(String contextPath, String jettyConfig) {
- if ( jettyConfig != null )
- // --jetty-config=jetty-fuseki.xml
- // for detailed configuration of the server using Jetty features.
- configServer(jettyConfig) ;
- else
- defaultServerConfig(serverConfig.port, serverConfig.loopback) ;
-
- WebAppContext webapp = createWebApp(contextPath) ;
- if ( false /*enable symbolic links */ ) {
- // See http://www.eclipse.org/jetty/documentation/current/serving-aliased-files.html
- // Record what would be needed:
- // 1 - Allow all symbolic links without checking
- webapp.addAliasCheck(new ContextHandler.ApproveAliases());
- // 2 - Check links are to valid resources. But default for Unix?
- webapp.addAliasCheck(new AllowSymLinkAliasChecker()) ;
- }
- servletContext = webapp.getServletContext() ;
- server.setHandler(webapp) ;
- // Replaced by Shiro.
- if ( jettyConfig == null && serverConfig.authConfigFile != null )
- security(webapp, serverConfig.authConfigFile) ;
- }
-
- // This is now provided by Shiro.
- private static void security(ServletContextHandler context, String authfile) {
- Constraint constraint = new Constraint() ;
- constraint.setName(Constraint.__BASIC_AUTH) ;
- constraint.setRoles(new String[]{"fuseki"}) ;
- constraint.setAuthenticate(true) ;
-
- ConstraintMapping mapping = new ConstraintMapping() ;
- mapping.setConstraint(constraint) ;
- mapping.setPathSpec("/*") ;
-
- IdentityService identService = new DefaultIdentityService() ;
-
- ConstraintSecurityHandler securityHandler = new ConstraintSecurityHandler() ;
- securityHandler.addConstraintMapping(mapping) ;
- securityHandler.setIdentityService(identService) ;
-
- HashLoginService loginService = new HashLoginService("Fuseki Authentication", authfile) ;
- loginService.setIdentityService(identService) ;
-
- securityHandler.setLoginService(loginService) ;
- securityHandler.setAuthenticator(new BasicAuthenticator()) ;
-
- context.setSecurityHandler(securityHandler) ;
-
- serverLog.debug("Basic Auth Configuration = " + authfile) ;
- }
-
- private void configServer(String jettyConfig) {
- try {
- serverLog.info("Jetty server config file = " + jettyConfig) ;
- server = new Server() ;
- XmlConfiguration configuration = new XmlConfiguration(new FileInputStream(jettyConfig)) ;
- configuration.configure(server) ;
- serverConnector = (ServerConnector)server.getConnectors()[0] ;
- } catch (Exception ex) {
- serverLog.error("SPARQLServer: Failed to configure server: " + ex.getMessage(), ex) ;
- throw new FusekiException("Failed to configure a server using configuration file '" + jettyConfig + "'") ;
- }
- }
-
- private void defaultServerConfig(int port, boolean loopback) {
- server = new Server() ;
- HttpConnectionFactory f1 = new HttpConnectionFactory() ;
- // Some people do try very large operations ... really, should use POST.
- f1.getHttpConfiguration().setRequestHeaderSize(512 * 1024);
- f1.getHttpConfiguration().setOutputBufferSize(5 * 1024 * 1024) ;
- // Do not add "Server: Jetty(....) when not a development system.
- if ( ! Fuseki.outputJettyServerHeader )
- f1.getHttpConfiguration().setSendServerVersion(false) ;
-
- // https is better done with a Jetty configuration file
- // because there are several things to configure.
- // See "examples/fuseki-jetty-https.xml"
-
- ServerConnector connector = new ServerConnector(server, f1) ;
- connector.setPort(port) ;
- server.addConnector(connector);
- if ( loopback )
- connector.setHost("localhost");
- serverConnector = connector ;
- }
-}
http://git-wip-us.apache.org/repos/asf/jena/blob/e8abcbb6/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/ctl/Backup.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/ctl/Backup.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/ctl/Backup.java
deleted file mode 100644
index 4bf9496..0000000
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/ctl/Backup.java
+++ /dev/null
@@ -1,131 +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.ctl;
-
-import java.io.* ;
-import java.util.Collections;
-import java.util.Set ;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.zip.GZIPOutputStream ;
-
-import org.apache.jena.atlas.io.IO ;
-import org.apache.jena.atlas.lib.DateTimeUtils ;
-import org.apache.jena.atlas.logging.Log ;
-import org.apache.jena.fuseki.Fuseki ;
-import org.apache.jena.fuseki.FusekiException ;
-import org.apache.jena.fuseki.webapp.FusekiSystem;
-import org.apache.jena.query.ReadWrite ;
-import org.apache.jena.riot.Lang ;
-import org.apache.jena.riot.RDFDataMgr ;
-import org.apache.jena.sparql.core.DatasetGraph ;
-import org.apache.jena.sparql.core.Transactional ;
-import org.apache.jena.sparql.core.TransactionalNull ;
-
-/** Perform a backup */
-public class Backup
-{
- public static String chooseFileName(String dsName) {
- // Without the "/" - ie. a relative name.
- String ds = dsName ;
- if ( ds.startsWith("/") )
- ds = ds.substring(1) ;
- if ( ds.contains("/") ) {
- Fuseki.adminLog.warn("Dataset name: weird format: "+dsName) ;
- // Some kind of fixup
- ds = ds.replace("/", "_") ;
- }
-
- String timestamp = DateTimeUtils.nowAsString("yyyy-MM-dd_HH-mm-ss") ;
- String filename = ds + "_" + timestamp ;
- filename = FusekiSystem.dirBackups.resolve(filename).toString() ;
- return filename ;
- }
-
- // Record of all backups so we don't attempt to backup the
- // same dataset multiple times at the same time.
- private static Set<DatasetGraph> activeBackups = Collections.newSetFromMap(new ConcurrentHashMap<>());
-
- /** Perform a backup.
- * A backup is a dump of the dataset in compressed N-Quads, done inside a transaction.
- */
- public static void backup(Transactional transactional, DatasetGraph dsg, String backupfile) {
- if ( transactional == null )
- transactional = new TransactionalNull() ;
- transactional.begin(ReadWrite.READ);
- try {
- Backup.backup(dsg, backupfile) ;
- } catch (Exception ex) {
- Log.warn(Fuseki.serverLog, "Exception in backup", ex);
- }
- finally {
- transactional.end() ;
- }
- }
-
- /** Perform a backup.
- *
- * @see #backup(Transactional, DatasetGraph, String)
- */
- private static void backup(DatasetGraph dsg, String backupfile) {
- if ( !backupfile.endsWith(".nq") )
- backupfile = backupfile + ".nq" ;
-
- // Per backup source lock.
- synchronized(activeBackups) {
- // Atomically check-and-set
- if ( activeBackups.contains(dsg) )
- Log.warn(Fuseki.serverLog, "Backup already in progress") ;
- activeBackups.add(dsg) ;
- }
-
- OutputStream out = null ;
- try {
-
- if ( true ) {
- // This seems to achive about the same as "gzip -6"
- // It's not too expensive in elapsed time but it's not
- // zero cost. GZip, large buffer.
- out = new FileOutputStream(backupfile + ".gz") ;
- out = new GZIPOutputStream(out, 8 * 1024) ;
- out = new BufferedOutputStream(out) ;
- } else {
- out = new FileOutputStream(backupfile) ;
- out = new BufferedOutputStream(out) ;
- }
- RDFDataMgr.write(out, dsg, Lang.NQUADS) ;
- out.close() ;
- out = null ;
- } catch (FileNotFoundException e) {
- Log.warn(Fuseki.serverLog, "File not found: " + backupfile) ;
- throw new FusekiException("File not found: " + backupfile) ;
- } catch (IOException e) {
- IO.exception(e) ;
- } finally {
- try {
- if ( out != null )
- out.close() ;
- } catch (IOException e) { /* ignore */}
- // Remove lock.
- synchronized(activeBackups) {
- activeBackups.remove(dsg) ;
- }
- }
- }
-}
-
http://git-wip-us.apache.org/repos/asf/jena/blob/e8abcbb6/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionBackup.java
----------------------------------------------------------------------
diff --git a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionBackup.java b/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionBackup.java
deleted file mode 100644
index 55ab7d7..0000000
--- a/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/mgt/ActionBackup.java
+++ /dev/null
@@ -1,68 +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.mgt;
-
-import static java.lang.String.format ;
-
-import org.apache.jena.fuseki.ctl.ActionAsyncTask;
-import org.apache.jena.fuseki.ctl.Backup;
-import org.apache.jena.fuseki.ctl.TaskBase;
-import org.apache.jena.fuseki.servlets.HttpAction ;
-import org.apache.jena.fuseki.servlets.ServletOps ;
-import org.slf4j.Logger ;
-import org.slf4j.LoggerFactory ;
-
-public class ActionBackup extends ActionAsyncTask
-{
- public ActionBackup() { super() ; }
-
- @Override
- protected Runnable createRunnable(HttpAction action) {
- String name = action.getDatasetName() ;
- if ( name == null ) {
- action.log.error("Null for dataset name in item request") ;
- ServletOps.errorOccurred("Null for dataset name in item request");
- return null ;
- }
-
- action.log.info(format("[%d] Backup dataset %s", action.id, name)) ;
- return new BackupTask(action) ;
- }
-
- static class BackupTask extends TaskBase {
- static private Logger log = LoggerFactory.getLogger("Backup") ;
-
- public BackupTask(HttpAction action) {
- super(action) ;
- }
-
- @Override
- public void run() {
- try {
- String backupFilename = Backup.chooseFileName(datasetName) ;
- log.info(format("[%d] >>>> Start backup %s -> %s", actionId, datasetName, backupFilename)) ;
- Backup.backup(transactional, dataset, backupFilename) ;
- log.info(format("[%d] <<<< Finish backup %s -> %s", actionId, datasetName, backupFilename)) ;
- } catch (Exception ex) {
- log.info(format("[%d] **** Exception in backup", actionId), ex) ;
- }
- }
- }
-}
-
\ No newline at end of file