You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marmotta.apache.org by tk...@apache.org on 2014/03/20 15:24:23 UTC
[1/5] git commit: add squebi as default sparql interface
Repository: marmotta
Updated Branches:
refs/heads/develop 05d19ce76 -> e63160cf4
add squebi as default sparql interface
Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/db974e8f
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/db974e8f
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/db974e8f
Branch: refs/heads/develop
Commit: db974e8f3d72d365dcaccd1a2252e956b4c8230f
Parents: 7689d38
Author: tkurz <th...@gmail.com>
Authored: Wed Mar 19 23:49:02 2014 +0100
Committer: tkurz <th...@gmail.com>
Committed: Wed Mar 19 23:49:02 2014 +0100
----------------------------------------------------------------------
launchers/marmotta-webapp/pom.xml | 3 +-
platform/marmotta-sparql/pom.xml | 25 ++-
.../src/main/resources/kiwi-module.properties | 11 +-
.../src/main/resources/web/admin/bower.json | 7 +
.../src/main/resources/web/admin/snorql.html | 153 ------------------
.../src/main/resources/web/admin/squebi.html | 90 +++++++++++
.../src/main/resources/web/admin/squebi.js | 65 ++++++++
.../src/main/resources/web/admin/update.html | 161 -------------------
.../src/main/resources/web/style/sparql.css | 109 -------------
9 files changed, 189 insertions(+), 435 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/marmotta/blob/db974e8f/launchers/marmotta-webapp/pom.xml
----------------------------------------------------------------------
diff --git a/launchers/marmotta-webapp/pom.xml b/launchers/marmotta-webapp/pom.xml
index 8cb4150..3c20bcb 100644
--- a/launchers/marmotta-webapp/pom.xml
+++ b/launchers/marmotta-webapp/pom.xml
@@ -33,7 +33,8 @@
<description>Web Application bundle (WAR file) containing Apache Marmotta</description>
<properties>
- <marmotta.home>${java.io.tmpdir}${file.separator}marmotta</marmotta.home>
+ <!--<marmotta.home>${java.io.tmpdir}${file.separator}marmotta</marmotta.home>-->
+ <marmotta.home>/tmp/marmotta</marmotta.home>
<marmotta.context>/</marmotta.context>
<marmotta.port>8080</marmotta.port>
<marmotta.backend>kiwi</marmotta.backend>
http://git-wip-us.apache.org/repos/asf/marmotta/blob/db974e8f/platform/marmotta-sparql/pom.xml
----------------------------------------------------------------------
diff --git a/platform/marmotta-sparql/pom.xml b/platform/marmotta-sparql/pom.xml
index 56f21d3..4bd5aef 100644
--- a/platform/marmotta-sparql/pom.xml
+++ b/platform/marmotta-sparql/pom.xml
@@ -77,6 +77,27 @@
<plugins>
<plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <executable>bower</executable>
+ <arguments>
+ <argument>install</argument>
+ </arguments>
+ <workingDirectory>${basedir}/src/main/resources/web/admin
+ </workingDirectory>
+ </configuration>
+ </plugin>
+
+ <plugin>
<groupId>org.apache.marmotta</groupId>
<artifactId>buildinfo-maven-plugin</artifactId>
<configuration>
@@ -180,10 +201,6 @@
<artifactId>codemirror</artifactId>
</dependency>
<dependency>
- <groupId>org.apache.marmotta.webjars</groupId>
- <artifactId>snorql</artifactId>
- </dependency>
- <dependency>
<groupId>org.webjars</groupId>
<artifactId>sgvizler</artifactId>
<version>0.6</version>
http://git-wip-us.apache.org/repos/asf/marmotta/blob/db974e8f/platform/marmotta-sparql/src/main/resources/kiwi-module.properties
----------------------------------------------------------------------
diff --git a/platform/marmotta-sparql/src/main/resources/kiwi-module.properties b/platform/marmotta-sparql/src/main/resources/kiwi-module.properties
index ffdaa86..dd27f9f 100644
--- a/platform/marmotta-sparql/src/main/resources/kiwi-module.properties
+++ b/platform/marmotta-sparql/src/main/resources/kiwi-module.properties
@@ -35,11 +35,8 @@ adminpage.0.link=/admin/about.html
adminpage.1.title=Configuration
adminpage.1.link=/admin/configuration.html
-adminpage.2.title=Query Interface
-adminpage.2.link=/admin/snorql.html
+adminpage.2.title=Sparql Interface
+adminpage.2.link=/admin/squebi.html
-adminpage.3.title=Update Interface
-adminpage.3.link=/admin/update.html
-
-adminpage.4.title=Sgvizler
-adminpage.4.link=/admin/sgvizler.html
+adminpage.3.title=Sgvizler
+adminpage.3.link=/admin/sgvizler.html
http://git-wip-us.apache.org/repos/asf/marmotta/blob/db974e8f/platform/marmotta-sparql/src/main/resources/web/admin/bower.json
----------------------------------------------------------------------
diff --git a/platform/marmotta-sparql/src/main/resources/web/admin/bower.json b/platform/marmotta-sparql/src/main/resources/web/admin/bower.json
new file mode 100644
index 0000000..56448af
--- /dev/null
+++ b/platform/marmotta-sparql/src/main/resources/web/admin/bower.json
@@ -0,0 +1,7 @@
+{
+ "name": "SquebiMarmotta",
+ "version": "0.0.1",
+ "dependencies": {
+ "squebi":"0.0.1"
+ }
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/marmotta/blob/db974e8f/platform/marmotta-sparql/src/main/resources/web/admin/snorql.html
----------------------------------------------------------------------
diff --git a/platform/marmotta-sparql/src/main/resources/web/admin/snorql.html b/platform/marmotta-sparql/src/main/resources/web/admin/snorql.html
deleted file mode 100644
index 78b6e03..0000000
--- a/platform/marmotta-sparql/src/main/resources/web/admin/snorql.html
+++ /dev/null
@@ -1,153 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-
- 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.
-
--->
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <!--###BEGIN_HEAD###-->
- <title>Snorql: A SPARQL Explorer</title>
- <link rel="stylesheet" type="text/css" href="../../webjars/snorql/1.0/snorql.css" />
- <link rel="stylesheet" type="text/css" href="../../webjars/codemirror/3.16/lib/codemirror.css" />
- <style type="text/css">
- .CodeMirror {
- background-color: #fff;
- border: 1px solid #eee;
- height: auto;
- }
- .CodeMirror-scroll {
- overflow-y: hidden;
- overflow-x: auto;
- }
- #content .CodeMirror pre {
- border-style: none !important;
- }
- </style>
- <!--###END_HEAD###-->
-</head>
-
-<body>
-<!--###BEGIN_CONTENT###-->
-<h1>SPARQL Query Form</h1>
-
-<p id="title">Query</p>
-
-<div class="snorql">
-
- <div class="section" style="float: right; width: 8em">
- <h2 style="color:#464646;font-size:18px">Browse:</h2>
- <ul style="margin:10px 0 0;list-style:none;padding:0;font-size:12px; font-family: Courier;">
- <li><a class="graph-link" href="?browse=classes">Classes</a></li>
- <li><a class="graph-link" href="?browse=properties">Properties</a></li>
- <li id="browse-named-graphs-link"><a href="?browse=graphs">Named Graphs</a></li>
- </ul>
- </div>
-
- <div id="default-graph-section" class="section" style="margin-right: 12em">
- <h2 style="display: inline;color:#464646;font-size:18px">GRAPH:</h2>
- <p style="display: inline">
- Default graph.
- <a href="?browse=graphs">List named graphs</a>
- </p>
- </div>
-
- <div id="named-graph-section" class="section" style="margin-right: 12em">
- <h2 style="display: inline;font-size:18px;color:#464646;">GRAPH:</h2>
- <p style="display: inline">
- <span id="selected-named-graph">Named graph goes here</span>.
- <a href="javascript:snorql.switchToDefaultGraph()">Switch back to default graph</a>
- </p>
- </div>
-
- <div class="section">
- <pre id="prefixestext"></pre>
- <form id="queryform" action="#" method="get">
- <div>
- <input type="hidden" name="prefixes" value="" id="prefixes" />
- <input type="hidden" name="query" value="" id="query" />
- <input type="hidden" name="output" value="json" id="jsonoutput" disabled="disabled" />
- <input type="hidden" name="stylesheet" value="" id="stylesheet" disabled="disabled" />
- <input type="hidden" name="graph" value="" id="graph-uri" disabled="disabled" />
- </div>
- </form>
- <div>
- <textarea name="query" rows="9" cols="80" id="querytext"></textarea>
- <span style="color:#464646;">Results:</span>
- <select id="selectoutput" onchange="snorql.updateOutputMode()">
- <option selected="selected" value="browse">Browse</option>
- <option value="json">as JSON</option>
- <option value="xml">as XML</option>
- <option value="html">as HTML</option>
- <option value="csv">as CSV</option>
- </select>
- <span id="xsltcontainer"><span id="xsltinput">
- XSLT stylesheet URL:
- <input id="xsltstylesheet" type="text" value="snorql/xml-to-html.xsl" size="30" />
- </span></span>
- <input type="button" value="Go!" onclick="editor.save(); snorql.submitQuery()" />
- </div>
- </div>
-
- <div class="section">
- <div id="result"><span></span></div>
- </div>
-
- <!-- <div id="footer_snorql">Powered by <a id="poweredby" href="#">Snorql</a></div> -->
-
- <script type="text/javascript" src="../../webjars/snorql/1.0/snorql.js"></script>
- <script type="text/javascript" src="../../webjars/jquery/1.8.2/jquery.min.js"></script>
- <script type="text/javascript" src="../../webjars/codemirror/3.16/lib/codemirror.js"></script>
- <script type="text/javascript" src="../../webjars/codemirror/3.16/addon/hint/show-hint.js"></script>
- <script type="text/javascript" src="../../webjars/codemirror/3.16/mode/sparql/sparql.js"></script>
- <script type="text/javascript">
- jQuery.noConflict();
- </script>
-
- <script type="text/javascript">
- var editor;
- jQuery(document).ready(function(){
- jQuery("#querytext").addClass("editor_cm");
-
- snorql.start();
-
- editor = CodeMirror.fromTextArea(document.getElementById("querytext"),{
- lineNumbers : true,
- matchBrackets : true,
- tabMode: "indent",
- extraKeys: {"Ctrl-Space": "sparqlAutocomplete"},
- mode: "application/x-sparql-query",
- firstLineNumber: Object.keys(D2R_namespacePrefixes).length + 1
- });
-
- jQuery.getJSON("../../prefix", function(data) {
- var ns = {};
- jQuery.each(data, function(prefix, namespace) {
- ns[prefix] = namespace;
- });
- snorql.setNamespaces(ns);
- editor.setOption("firstLineNumber", Object.keys(ns).length + 1);
- });
-
- });
- </script>
-
-</div>
-<!--###END_CONTENT###-->
-</body>
-</html>
http://git-wip-us.apache.org/repos/asf/marmotta/blob/db974e8f/platform/marmotta-sparql/src/main/resources/web/admin/squebi.html
----------------------------------------------------------------------
diff --git a/platform/marmotta-sparql/src/main/resources/web/admin/squebi.html b/platform/marmotta-sparql/src/main/resources/web/admin/squebi.html
new file mode 100644
index 0000000..1c9e373
--- /dev/null
+++ b/platform/marmotta-sparql/src/main/resources/web/admin/squebi.html
@@ -0,0 +1,90 @@
+<!--
+
+ 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.
+
+-->
+<html>
+<head>
+ <!--###BEGIN_HEAD###-->
+ <title>Squebi - The SPARQL Interface</title>
+ <script data-main="squebi" src="bower_components/requirejs/require.js"></script>
+ <!--###END_HEAD###-->
+</head>
+<body>
+<!--###BEGIN_CONTENT###-->
+<div id="squebi_container" class="container">
+ <div ng-controller="SampleCtrl" class="header">
+ <div ng-show="showHint">
+ <div ng-click="showHint = false" class="hint-overlay"></div>
+ <div class="hint" style="{{h.style}}" ng-repeat="h in hints" ng-bind-html="h.trusted_content"></div>
+ </div>
+ <ul class="nav nav-pills pull-right">
+ <li class="menuitem"><a ng-show="hint" ng-click="showHints()">Hints</a></li>
+ <li id="samples" class="menuitem dropdown">
+ <a class="dropdown-toggle">
+ Samples
+ </a>
+ <ul class="dropdown-menu">
+ <li ng-repeat="sample in samples">
+ <a ng-click="selectSample(sample)">{{sample.name}}</a>
+ </li>
+ </ul>
+ </li>
+ <!--<li><a href="http://github.com/tkurz/sparql-mm" target="_blank">Repository</a></li>
+ <li><a href="mailto:thomas.kurz@salzburgresearch.at">Contact</a></li>-->
+ </ul>
+ </div>
+
+ <div style="margin-top:50px" ng-controller="QueryCtrl" class="jumbotron">
+ <div id="query-container">
+ <textarea id="input" ng-model="query" ui-codemirror="editorOptions"></textarea>
+ </div>
+ <a class="btn btn-lg btn-success btn-query" ng-click="triggerQuery()">
+ <i class="fa fa-play-circle"></i> Run
+ </a>
+ </div>
+
+ <div ng-controller="AlertCtrl">
+ <div class="alert ng-isolate-scope alert-success" ng-class="'alert-' + (alert.type || 'warning')" ng-repeat="alert in alerts">
+ <button type="button" class="close" ng-click="remove(alert)">x</button>
+ <div>
+ <h2 ng-show="alert.title">{{alert.title}}</h2>
+ <span>{{alert.msg}}</span>
+ </div>
+ </div>
+ </div>
+ <div ng-show="showResults" ng-controller="FormatCtrl">
+ <ul id="writers" class="nav nav-tabs">
+ <li ng-repeat="writer in writers" ng-class="getClass(writer)">
+ <a title="{{writer.description}}" ng-click="selectWriter($event,writer)" href="#">{{writer.label}}</a>
+ </li>
+ </ul>
+ </div>
+ <div ng-show="showResults" ng-controller="ResultCtrl" class="row result">
+ <div ng-show="!loader" ng-include src="template"></div>
+ <div class="loader" ng-show="loader">
+ <img src="bower_components/squebi/squebi/img/ajax-loader.gif">
+ </div>
+ </div>
+ <!--<div class="footer">
+ <p>© Salzburg Research 2014</p>
+ </div>-->
+
+</div>
+<!--###END_CONTENT###-->
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/marmotta/blob/db974e8f/platform/marmotta-sparql/src/main/resources/web/admin/squebi.js
----------------------------------------------------------------------
diff --git a/platform/marmotta-sparql/src/main/resources/web/admin/squebi.js b/platform/marmotta-sparql/src/main/resources/web/admin/squebi.js
new file mode 100644
index 0000000..efb26e9
--- /dev/null
+++ b/platform/marmotta-sparql/src/main/resources/web/admin/squebi.js
@@ -0,0 +1,65 @@
+requirejs.config({
+ paths: {
+ async : "bower_components/requirejs-plugins/src/async",
+ propertyParser : "bower_components/requirejs-plugins/src/propertyParser",
+ goog : "bower_components/requirejs-plugins/src/goog",
+ jquery : "bower_components/jquery/dist/jquery",
+ angular : "bower_components/angular/angular",
+ bootstrap : "bower_components/bootstrap/dist/js/bootstrap",
+ bootstrapUI : "bower_components/angular-bootstrap/ui-bootstrap",
+ codemirror : "bower_components/codemirror/lib/codemirror",
+ codemirrorSparql : "bower_components/codemirror/mode/sparql/sparql",
+ codemirrorUI : "bower_components/angular-ui-codemirror/ui-codemirror",
+ codemirrorHint : "bower_components/codemirror/addon/hint/show-hint",
+ _squebi : "bower_components/squebi/squebi/js/squebi",
+ squebiBrowse : "bower_components/squebi/squebi/js/writer/squebi.browse",
+ squebiJson : "bower_components/squebi/squebi/js/writer/squebi.json",
+ squebiXml : "bower_components/squebi/squebi/js/writer/squebi.xml",
+ squebiPie: "bower_components/squebi/squebi-writer/piechart/squebi.pie"
+ },
+ shim: {
+ 'goog': ['async','propertyParser'],
+ 'angular' : ['jquery'],
+ 'bootstrap' : ['jquery'],
+ 'bootstrapUI' : ['angular','bootstrap'],
+ 'codemirrorSparql' : ['codemirror'],
+ 'codemirrorUI' : ['codemirror','bootstrapUI'],
+ 'codemirrorHint' : ['codemirror'],
+ '_squebi' : ['codemirrorHint','codemirrorUI','codemirrorSparql','bootstrapUI'],
+ 'squebiBrowse' : ['_squebi'],
+ 'squebiJson' : ['_squebi'],
+ 'squebiXml' : ['_squebi'],
+ 'squebiPie' : ['_squebi']
+ },map: {
+ '*': {
+ 'css': 'bower_components/require-css/css'
+ }
+ }
+});
+
+require([
+ "css",
+ "squebiBrowse",
+ "squebiJson",
+ "squebiXml",
+ 'goog!visualization,1,packages:[corechart]',
+ "squebiPie",
+ "css!bower_components/squebi/squebi/css/flags",
+ "css!bower_components/bootstrap/dist/css/bootstrap",
+ "css!bower_components/codemirror/lib/codemirror",
+ "css!bower_components/codemirror/theme/neat",
+ "css!bower_components/codemirror/addon/hint/show-hint",
+ "css!bower_components/fontawesome/css/font-awesome",
+ "css!bower_components/squebi/squebi/css/style"
+], function() {
+ angular.element(document).ready(function($http,$rootScope) {
+ $http.get("bower_components/squebi/squebi/config.json",function(data) {
+ data = jQuery.parseJSON(data);
+ data.serviceURL.select = "../select";
+ data.serviceURL.update = "../update" ;
+ jQuery('#squebi_container').show();
+ squeby.constant('SQUEBY',data);
+ angular.bootstrap('#squebi_container', ['Squeby']);
+ });
+ });
+});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/marmotta/blob/db974e8f/platform/marmotta-sparql/src/main/resources/web/admin/update.html
----------------------------------------------------------------------
diff --git a/platform/marmotta-sparql/src/main/resources/web/admin/update.html b/platform/marmotta-sparql/src/main/resources/web/admin/update.html
deleted file mode 100644
index ed443db..0000000
--- a/platform/marmotta-sparql/src/main/resources/web/admin/update.html
+++ /dev/null
@@ -1,161 +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.
-
--->
-<html>
-<head>
- <!--###BEGIN_HEAD###-->
- <title>SPARQL Update</title>
- <link href="../style/sparql.css" rel="stylesheet" type="text/css" />
- <link href="../../webjars/codemirror/3.16/lib/codemirror.css" rel="stylesheet" type="text/css" />
- <style type="text/css">
- #refesh_box {
- display: inline-block;
- float: right;
- margin-top: 25px;
- background-color: white;
- margin-right: 7px;
- padding: 1px;
- border-radius: 3px;
- -webkit-border-radius: 3px;
- }
- .CodeMirror {
- border: 1px solid #eee;
- height: auto;
- }
- .CodeMirror-scroll {
- overflow-y: hidden;
- overflow-x: auto;
- }
- #content .CodeMirror pre {
- border-style: none !important;
- }
- </style>
- <!--###END_HEAD###-->
-</head>
-<body>
-<!--###BEGIN_CONTENT###-->
-
- <h1>SPARQL Update Form</h1>
-
- <form action="" method="get" id="form">
- <fieldset class="sparql">
- <legend>Query</legend>
- <p id="examples">
- Query examples:
- <a href="#update" id="example-insert">INSERT</a>,
- <a href="#update" id="example-delete">DELETE</a>,
- <a href="#update" id="example-delete-condition">DELETE with condition</a>
- </p>
- <p>
- <label for="update">Update Query text:</label>
- <textarea rows="40" cols="100" name="update" id="update">
-
-</textarea>
- </p>
- <p class="submit">
- <input type="submit" value="execute update query"/>
- </p>
- </fieldset>
- </form>
-
-<script type="text/javascript" src="../../webjars/jquery/1.8.2/jquery.min.js"></script>
-<script type="text/javascript" src="../../webjars/jquery-ui/1.10.3/ui/minified/jquery-ui.min.js"></script>
-<script type="text/javascript" src="../../webjars/codemirror/3.16/lib/codemirror.js"></script>
-<script type="text/javascript" src="../../webjars/codemirror/3.16/addon/hint/show-hint.js"></script>
-<script type="text/javascript" src="../../webjars/codemirror/3.16/mode/sparql/sparql.js"></script>
-
-<script type="text/javascript">
-
- $(document).ready(function() {
-
- var endpoint = _SERVER_URL + "sparql/update";
- var prefixes = {};
-
- function setQuery(query) {
- if ($("div#query-results").length) {
- $("div#query-results").remove();
- }
- var prefixesStr = ""; //TODO: cache
- for (var prefix in prefixes) {
- prefixesStr += "PREFIX " + prefix + ": <" + prefixes[prefix] + "> \n";
- }
- editor.setValue(prefixesStr + "\n" + query + "\n");
- }
-
- var editor = CodeMirror.fromTextArea(document.getElementById("update"), {
- mode: "application/x-sparql-query",
- lineNumbers: true,
- tabMode: "indent",
- matchBrackets: true
- });
-
- $("form#form").before('<p>Querying: <a href="' + endpoint + '">' + endpoint + '</a></p>');
-
- $.getJSON("../../prefix", function(data) {
- $.each(data, function(prefix, namespace) {
- prefixes[prefix] = namespace;
- });
- setQuery("# write your update query here!\n");
- });
-
- $("form#form").submit(function() {
- if ($("div#query-results").length) {
- $("div#query-results").remove();
- }
- $(this).after('<div id="query-results"><h3>Executing query... <img src="../../core/public/img/loader/lmf-loader_24.gif" /></h3></div>');
- var query = $("textarea#update").val();
- //$("html, body").animate({ scrollTop: $("div#query-results").offset().top }, 1000);
- $.ajax({
- type: "POST",
- url: endpoint,
- data: query,
- contentType: "application/sparql-update",
- processData: false,
- timeout: 30000,
- success: function(data) {
- $("div#query-results").html('<h3>Query successfully performed!</h3>');
- },
- error: function(data) {
- var json = jQuery.parseJSON(data.responseText);
- $("div#query-results").html('<h3>Error executing query "' + json.type + '":</h3><p class="error">' + json.message + '</p>');
- }
- });
- return false;
- });
-
- $("a#example-insert").click(function() {
- setQuery("# INSERT query example\n\nINSERT DATA { <s> <p> <o> }");
- });
-
- $("a#example-delete").click(function() {
- setQuery("# DELETE query example\n\nDELETE DATA { <s> <p> <o> }");
- });
-
- $("a#example-delete-condition").click(function() {
- setQuery("# DELETE query with condition example\n\nDELETE { ?s ?p ?o }\nWHERE { ?s ?p ?o ; rdfs:label 'Example' }");
- });
-
-
- });
-
- </script>
-
-<!--###END_CONTENT###-->
-</body>
-</html>
http://git-wip-us.apache.org/repos/asf/marmotta/blob/db974e8f/platform/marmotta-sparql/src/main/resources/web/style/sparql.css
----------------------------------------------------------------------
diff --git a/platform/marmotta-sparql/src/main/resources/web/style/sparql.css b/platform/marmotta-sparql/src/main/resources/web/style/sparql.css
deleted file mode 100644
index 30fdb2d..0000000
--- a/platform/marmotta-sparql/src/main/resources/web/style/sparql.css
+++ /dev/null
@@ -1,109 +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.
- */
-div#content {
- background-color: #ffffff;
- padding: 1em 1em 5em 1em;
- min-height: 1000px;
- height: auto !important;
- height: 1000px;
-}
-
-div#content form fieldset {
- background-color: #eeeeee;
- border: 2px solid #000000;
- border-radius: 5px;
- margin-top: 2em;
-}
-
-div#content form fieldset legend {
- background-color: #000000;
- color: #ffffff;
- font-weight: bold;
- padding: 0.6em auto 0.6em auto;
- font-family: arial;
- border-radius: 5px
-}
-
-div#content textarea#update {
- width: 80%;
-}
-
-div#content form fieldset p {
- vertical-align: top;
-}
-
-div#content form fieldset p.submit,div#content form fieldset p#examples {
- clear: both;
- text-align: right;
-}
-
-div#content form fieldset p#examples {
- font-size: 0.9em;
-}
-
-/* CSS Button Generator: http://www.cssbuttongenerator.com/ */
-div#content form fieldset p.submit input {
- background-color: #000000;
- -moz-border-radius: 6px;
- -webkit-border-radius: 6px;
- border-radius: 6px;
- border: 1px solid #dcdcdc;
- display: inline-block;
- color: #ffffff;
- font-family: arial;
- font-size: 15px;
- font-weight: bold;
- padding: 6px 24px;
- text-decoration: none;
-}
-
-div#content form fieldset p.submit input:hover {
- background-color: #cb1180;
-}
-
-div#content form fieldset p.submit input:active {
- position: relative;
- top: 1px;
-}
-
-div#content .CodeMirror {
- background-color: #ffffff;
-}
-
-div#content .CodeMirror-scroll {
- height: auto;
- overflow-y: hidden;
- overflow-x: auto;
-}
-
-div#content div.CodeMirror-gutter pre, div#content div.CodeMirror-lines pre {
- overflow: inherit;
-}
-
-div#content div#query-results {
- margin-top: 2em;
- min-height: 200px;
- padding: 2em;
-}
-
-div#content div#query-results p.error {
- border: solid 1px red;
- background-color: #FEF5F1;
- padding: 1em;
- border-radius: 5px
-}
[3/5] git commit: reverted tmp file change
Posted by tk...@apache.org.
reverted tmp file change
Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/555ea129
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/555ea129
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/555ea129
Branch: refs/heads/develop
Commit: 555ea129de84b401e916dc167a0fc0dc69857909
Parents: 85d75a1
Author: tkurz <th...@gmail.com>
Authored: Thu Mar 20 13:13:15 2014 +0100
Committer: tkurz <th...@gmail.com>
Committed: Thu Mar 20 13:13:15 2014 +0100
----------------------------------------------------------------------
launchers/marmotta-webapp/pom.xml | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/marmotta/blob/555ea129/launchers/marmotta-webapp/pom.xml
----------------------------------------------------------------------
diff --git a/launchers/marmotta-webapp/pom.xml b/launchers/marmotta-webapp/pom.xml
index 3c20bcb..8cb4150 100644
--- a/launchers/marmotta-webapp/pom.xml
+++ b/launchers/marmotta-webapp/pom.xml
@@ -33,8 +33,7 @@
<description>Web Application bundle (WAR file) containing Apache Marmotta</description>
<properties>
- <!--<marmotta.home>${java.io.tmpdir}${file.separator}marmotta</marmotta.home>-->
- <marmotta.home>/tmp/marmotta</marmotta.home>
+ <marmotta.home>${java.io.tmpdir}${file.separator}marmotta</marmotta.home>
<marmotta.context>/</marmotta.context>
<marmotta.port>8080</marmotta.port>
<marmotta.backend>kiwi</marmotta.backend>
[2/5] git commit: switch to new squebi version
Posted by tk...@apache.org.
switch to new squebi version
Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/85d75a14
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/85d75a14
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/85d75a14
Branch: refs/heads/develop
Commit: 85d75a14c83dccc0f3ae5eab5e48815971b876e3
Parents: db974e8
Author: tkurz <th...@gmail.com>
Authored: Thu Mar 20 10:50:43 2014 +0100
Committer: tkurz <th...@gmail.com>
Committed: Thu Mar 20 10:50:43 2014 +0100
----------------------------------------------------------------------
.../src/main/resources/web/admin/bower.json | 2 +-
.../src/main/resources/web/admin/squebi.html | 9 ++-
.../src/main/resources/web/admin/squebi.js | 65 --------------------
3 files changed, 9 insertions(+), 67 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/marmotta/blob/85d75a14/platform/marmotta-sparql/src/main/resources/web/admin/bower.json
----------------------------------------------------------------------
diff --git a/platform/marmotta-sparql/src/main/resources/web/admin/bower.json b/platform/marmotta-sparql/src/main/resources/web/admin/bower.json
index 56448af..b86d221 100644
--- a/platform/marmotta-sparql/src/main/resources/web/admin/bower.json
+++ b/platform/marmotta-sparql/src/main/resources/web/admin/bower.json
@@ -2,6 +2,6 @@
"name": "SquebiMarmotta",
"version": "0.0.1",
"dependencies": {
- "squebi":"0.0.1"
+ "squebi":"0.0.2"
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/marmotta/blob/85d75a14/platform/marmotta-sparql/src/main/resources/web/admin/squebi.html
----------------------------------------------------------------------
diff --git a/platform/marmotta-sparql/src/main/resources/web/admin/squebi.html b/platform/marmotta-sparql/src/main/resources/web/admin/squebi.html
index 1c9e373..d3f0827 100644
--- a/platform/marmotta-sparql/src/main/resources/web/admin/squebi.html
+++ b/platform/marmotta-sparql/src/main/resources/web/admin/squebi.html
@@ -21,7 +21,14 @@
<head>
<!--###BEGIN_HEAD###-->
<title>Squebi - The SPARQL Interface</title>
- <script data-main="squebi" src="bower_components/requirejs/require.js"></script>
+ <script type="text/javascript">
+ SQUEBI = {
+ selectService : "../select",
+ updateService : "../update",
+ app : "bower_components/squebi"
+ };
+ </script>
+ <script data-main="bower_components/squebi/main" src="bower_components/requirejs/require.js"></script>
<!--###END_HEAD###-->
</head>
<body>
http://git-wip-us.apache.org/repos/asf/marmotta/blob/85d75a14/platform/marmotta-sparql/src/main/resources/web/admin/squebi.js
----------------------------------------------------------------------
diff --git a/platform/marmotta-sparql/src/main/resources/web/admin/squebi.js b/platform/marmotta-sparql/src/main/resources/web/admin/squebi.js
deleted file mode 100644
index efb26e9..0000000
--- a/platform/marmotta-sparql/src/main/resources/web/admin/squebi.js
+++ /dev/null
@@ -1,65 +0,0 @@
-requirejs.config({
- paths: {
- async : "bower_components/requirejs-plugins/src/async",
- propertyParser : "bower_components/requirejs-plugins/src/propertyParser",
- goog : "bower_components/requirejs-plugins/src/goog",
- jquery : "bower_components/jquery/dist/jquery",
- angular : "bower_components/angular/angular",
- bootstrap : "bower_components/bootstrap/dist/js/bootstrap",
- bootstrapUI : "bower_components/angular-bootstrap/ui-bootstrap",
- codemirror : "bower_components/codemirror/lib/codemirror",
- codemirrorSparql : "bower_components/codemirror/mode/sparql/sparql",
- codemirrorUI : "bower_components/angular-ui-codemirror/ui-codemirror",
- codemirrorHint : "bower_components/codemirror/addon/hint/show-hint",
- _squebi : "bower_components/squebi/squebi/js/squebi",
- squebiBrowse : "bower_components/squebi/squebi/js/writer/squebi.browse",
- squebiJson : "bower_components/squebi/squebi/js/writer/squebi.json",
- squebiXml : "bower_components/squebi/squebi/js/writer/squebi.xml",
- squebiPie: "bower_components/squebi/squebi-writer/piechart/squebi.pie"
- },
- shim: {
- 'goog': ['async','propertyParser'],
- 'angular' : ['jquery'],
- 'bootstrap' : ['jquery'],
- 'bootstrapUI' : ['angular','bootstrap'],
- 'codemirrorSparql' : ['codemirror'],
- 'codemirrorUI' : ['codemirror','bootstrapUI'],
- 'codemirrorHint' : ['codemirror'],
- '_squebi' : ['codemirrorHint','codemirrorUI','codemirrorSparql','bootstrapUI'],
- 'squebiBrowse' : ['_squebi'],
- 'squebiJson' : ['_squebi'],
- 'squebiXml' : ['_squebi'],
- 'squebiPie' : ['_squebi']
- },map: {
- '*': {
- 'css': 'bower_components/require-css/css'
- }
- }
-});
-
-require([
- "css",
- "squebiBrowse",
- "squebiJson",
- "squebiXml",
- 'goog!visualization,1,packages:[corechart]',
- "squebiPie",
- "css!bower_components/squebi/squebi/css/flags",
- "css!bower_components/bootstrap/dist/css/bootstrap",
- "css!bower_components/codemirror/lib/codemirror",
- "css!bower_components/codemirror/theme/neat",
- "css!bower_components/codemirror/addon/hint/show-hint",
- "css!bower_components/fontawesome/css/font-awesome",
- "css!bower_components/squebi/squebi/css/style"
-], function() {
- angular.element(document).ready(function($http,$rootScope) {
- $http.get("bower_components/squebi/squebi/config.json",function(data) {
- data = jQuery.parseJSON(data);
- data.serviceURL.select = "../select";
- data.serviceURL.update = "../update" ;
- jQuery('#squebi_container').show();
- squeby.constant('SQUEBY',data);
- angular.bootstrap('#squebi_container', ['Squeby']);
- });
- });
-});
\ No newline at end of file
[4/5] git commit: Merge branch 'develop' of
https://git-wip-us.apache.org/repos/asf/marmotta into develop
Posted by tk...@apache.org.
Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/marmotta into develop
Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/600c2638
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/600c2638
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/600c2638
Branch: refs/heads/develop
Commit: 600c263852862d0531cc3b6e506f719683529745
Parents: 555ea12 05d19ce
Author: tkurz <th...@gmail.com>
Authored: Thu Mar 20 15:07:02 2014 +0100
Committer: tkurz <th...@gmail.com>
Committed: Thu Mar 20 15:07:02 2014 +0100
----------------------------------------------------------------------
.../marmotta-archetype-module/pom.xml | 10 +++
.../marmotta-archetype-webapp/pom.xml | 70 ++++++++++++++++++++
2 files changed, 80 insertions(+)
----------------------------------------------------------------------
[5/5] git commit: fixes bugs and set squebi to version 0.0.5
Posted by tk...@apache.org.
fixes bugs and set squebi to version 0.0.5
Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/e63160cf
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/e63160cf
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/e63160cf
Branch: refs/heads/develop
Commit: e63160cf45721128c0364c402d265b33ede406c2
Parents: 600c263
Author: tkurz <th...@gmail.com>
Authored: Thu Mar 20 15:20:54 2014 +0100
Committer: tkurz <th...@gmail.com>
Committed: Thu Mar 20 15:20:54 2014 +0100
----------------------------------------------------------------------
.../marmotta-sparql/src/main/resources/web/admin/bower.json | 2 +-
.../marmotta-sparql/src/main/resources/web/admin/squebi.html | 7 +++++--
2 files changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/marmotta/blob/e63160cf/platform/marmotta-sparql/src/main/resources/web/admin/bower.json
----------------------------------------------------------------------
diff --git a/platform/marmotta-sparql/src/main/resources/web/admin/bower.json b/platform/marmotta-sparql/src/main/resources/web/admin/bower.json
index b86d221..644c654 100644
--- a/platform/marmotta-sparql/src/main/resources/web/admin/bower.json
+++ b/platform/marmotta-sparql/src/main/resources/web/admin/bower.json
@@ -2,6 +2,6 @@
"name": "SquebiMarmotta",
"version": "0.0.1",
"dependencies": {
- "squebi":"0.0.2"
+ "squebi":"0.0.5"
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/marmotta/blob/e63160cf/platform/marmotta-sparql/src/main/resources/web/admin/squebi.html
----------------------------------------------------------------------
diff --git a/platform/marmotta-sparql/src/main/resources/web/admin/squebi.html b/platform/marmotta-sparql/src/main/resources/web/admin/squebi.html
index d3f0827..48d79c9 100644
--- a/platform/marmotta-sparql/src/main/resources/web/admin/squebi.html
+++ b/platform/marmotta-sparql/src/main/resources/web/admin/squebi.html
@@ -25,7 +25,10 @@
SQUEBI = {
selectService : "../select",
updateService : "../update",
- app : "bower_components/squebi"
+ app : "bower_components/squebi",
+ bower : "..",
+ hints : [],
+ container : '#squebi_container'
};
</script>
<script data-main="bower_components/squebi/main" src="bower_components/requirejs/require.js"></script>
@@ -33,7 +36,7 @@
</head>
<body>
<!--###BEGIN_CONTENT###-->
-<div id="squebi_container" class="container">
+<div style="display: none" id="squebi_container" class="container">
<div ng-controller="SampleCtrl" class="header">
<div ng-show="showHint">
<div ng-click="showHint = false" class="hint-overlay"></div>