You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marmotta.apache.org by ss...@apache.org on 2013/11/05 12:13:57 UTC
[1/2] git commit: started with some experimental backends (not yet
working)
Updated Branches:
refs/heads/develop e45a7268d -> 8bf44fd17
started with some experimental backends (not yet working)
Project: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/commit/7d4d564b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/tree/7d4d564b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/diff/7d4d564b
Branch: refs/heads/develop
Commit: 7d4d564b1070c69d23929462554f7385ca1899ec
Parents: e45a726
Author: Sebastian Schaffert <ss...@apache.org>
Authored: Tue Nov 5 11:48:33 2013 +0100
Committer: Sebastian Schaffert <ss...@apache.org>
Committed: Tue Nov 5 11:48:33 2013 +0100
----------------------------------------------------------------------
parent/pom.xml | 15 ++
platform/backends/marmotta-backend-http/pom.xml | 159 +++++++++++++++++++
.../backend/http/HTTPStoreProvider.java | 103 ++++++++++++
.../src/main/resources/META-INF/beans.xml | 28 ++++
.../main/resources/config-defaults.properties | 24 +++
.../resources/config-descriptions.properties | 23 +++
.../src/main/resources/kiwi-module.properties | 38 +++++
.../src/main/resources/web/admin/about.html | 43 +++++
.../main/resources/web/admin/configuration.html | 53 +++++++
.../src/main/resources/kiwi-module.properties | 2 +-
.../backends/marmotta-backend-sparql/pom.xml | 159 +++++++++++++++++++
.../src/main/resources/META-INF/beans.xml | 28 ++++
.../main/resources/config-defaults.properties | 24 +++
.../resources/config-descriptions.properties | 23 +++
.../src/main/resources/kiwi-module.properties | 38 +++++
.../src/main/resources/web/admin/about.html | 43 +++++
.../main/resources/web/admin/configuration.html | 53 +++++++
platform/backends/pom.xml | 7 +
18 files changed, 862 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/7d4d564b/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index b18dc05..3216b28 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -1112,6 +1112,21 @@
</dependency>
<dependency>
<groupId>org.openrdf.sesame</groupId>
+ <artifactId>sesame-sail-federation</artifactId>
+ <version>${sesame.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openrdf.sesame</groupId>
+ <artifactId>sesame-repository-http</artifactId>
+ <version>${sesame.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openrdf.sesame</groupId>
+ <artifactId>sesame-repository-sparql</artifactId>
+ <version>${sesame.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.openrdf.sesame</groupId>
<artifactId>sesame-query</artifactId>
<version>${sesame.version}</version>
</dependency>
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/7d4d564b/platform/backends/marmotta-backend-http/pom.xml
----------------------------------------------------------------------
diff --git a/platform/backends/marmotta-backend-http/pom.xml b/platform/backends/marmotta-backend-http/pom.xml
new file mode 100644
index 0000000..0b074a3
--- /dev/null
+++ b/platform/backends/marmotta-backend-http/pom.xml
@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.marmotta</groupId>
+ <artifactId>marmotta-parent</artifactId>
+ <version>3.2.0-incubating-SNAPSHOT</version>
+ <relativePath>../../../parent</relativePath>
+ </parent>
+
+ <groupId>org.apache.marmotta</groupId>
+ <artifactId>marmotta-backend-http</artifactId>
+
+ <name>Apache Marmotta Platform: Sesame HTTP Backend</name>
+ <description>
+ This module provides an Apache Marmotta backend using a Sesame HTTP Repository. This is a suitable backend in
+ case you already have a running Sesame Repository Server and no advanced features like rule-based reasoning or
+ versioning are required.
+ </description>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin> <!-- generate JRebel Configuration -->
+ <groupId>org.zeroturnaround</groupId>
+ <artifactId>jrebel-maven-plugin</artifactId>
+ <version>1.1.3</version>
+ <executions>
+ <execution>
+ <id>generate-rebel-xml</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <relativePath>../../</relativePath>
+ <rootPath>$${rebel.root}</rootPath>
+ <classpath>
+ <resources>
+ <resource><!-- default resource --></resource>
+ <resource><directory>src/main/resources</directory></resource>
+ </resources>
+ </classpath>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.marmotta</groupId>
+ <artifactId>buildinfo-maven-plugin</artifactId>
+ <configuration>
+ <systemProperties>
+ <systemProperty>user.name</systemProperty>
+ <systemProperty>user.timezone</systemProperty>
+ <systemProperty>java.vm.vendor</systemProperty>
+ <systemProperty>java.vm.version</systemProperty>
+ <systemProperty>java.vm.name</systemProperty>
+ <systemProperty>java.runtime.version</systemProperty>
+ <systemProperty>os.name</systemProperty>
+ <systemProperty>os.version</systemProperty>
+ <systemProperty>os.arch</systemProperty>
+ </systemProperties>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>extract</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <executions>
+ <!--
+ <execution>
+ <id>aggregate</id>
+ <goals>
+ <goal>aggregate</goal>
+ </goals>
+ <phase>site</phase>
+ </execution>
+ -->
+ <execution>
+ <!-- configure how the REST API documentation will be produced -->
+ <id>restapi</id>
+ <configuration>
+ <doclet>com.lunatech.doclets.jax.jaxrs.JAXRSDoclet</doclet>
+
+ <name>REST API</name>
+ <description>REST API for LMF Webservices</description>
+
+ <outputDirectory>${project.build.outputDirectory}/doc</outputDirectory>
+ <reportOutputDirectory>${project.build.outputDirectory}/web/doc</reportOutputDirectory>
+ <destDir>rest</destDir>
+
+ <docletArtifact>
+ <groupId>com.lunatech.jax-doclets</groupId>
+ <artifactId>doclets</artifactId>
+ <version>0.10.0</version>
+ </docletArtifact>
+ <additionalparam>
+ -jaxrscontext {BASE}
+ -charset UTF-8
+ </additionalparam>
+
+ <!--
+ <stylesheetfile>${project.parent.basedir}/config/doc/doclet.css</stylesheetfile>
+ -->
+
+ <header><![CDATA[<!--###BEGIN_CONTENT###--><div class="javadoc">]]></header>
+ <footer><![CDATA[</div><!--###END_CONTENT###-->]]></footer>
+ <encoding>UTF-8</encoding>
+ <detectOfflineLinks>false</detectOfflineLinks>
+
+ <!-- For the project-reports page -->
+ </configuration>
+ <goals>
+ <goal>javadoc</goal>
+ </goals>
+ <phase>generate-resources</phase>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.marmotta</groupId>
+ <artifactId>marmotta-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.marmotta</groupId>
+ <artifactId>kiwi-transactions</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.openrdf.sesame</groupId>
+ <artifactId>sesame-sail-federation</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.openrdf.sesame</groupId>
+ <artifactId>sesame-repository-http</artifactId>
+ </dependency>
+ </dependencies>
+
+
+
+</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/7d4d564b/platform/backends/marmotta-backend-http/src/main/java/org/apache/marmotta/platform/backend/http/HTTPStoreProvider.java
----------------------------------------------------------------------
diff --git a/platform/backends/marmotta-backend-http/src/main/java/org/apache/marmotta/platform/backend/http/HTTPStoreProvider.java b/platform/backends/marmotta-backend-http/src/main/java/org/apache/marmotta/platform/backend/http/HTTPStoreProvider.java
new file mode 100644
index 0000000..c541c96
--- /dev/null
+++ b/platform/backends/marmotta-backend-http/src/main/java/org/apache/marmotta/platform/backend/http/HTTPStoreProvider.java
@@ -0,0 +1,103 @@
+/*
+ * 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.marmotta.platform.backend.http;
+
+import org.apache.marmotta.platform.core.api.config.ConfigurationService;
+import org.apache.marmotta.platform.core.api.triplestore.StoreProvider;
+import org.openrdf.repository.http.HTTPRepository;
+import org.openrdf.repository.sail.SailRepository;
+import org.openrdf.sail.NotifyingSail;
+import org.openrdf.sail.Sail;
+import org.openrdf.sail.federation.Federation;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+
+/**
+ * A triple store provider for Sesame HTTP repositories.
+ *
+ * @author Sebastian Schaffert (sschaffert@apache.org)
+ */
+@ApplicationScoped
+public class HTTPStoreProvider implements StoreProvider {
+
+ private static Logger log = LoggerFactory.getLogger(HTTPStoreProvider.class);
+
+ @Inject
+ private ConfigurationService configurationService;
+
+
+ private HTTPRepository httpRepository;
+
+ /**
+ * Create the repository using the sail given as argument. This method is needed because some backends
+ * use custom implementations of SailRepository.
+ *
+ * @param sail
+ * @return
+ */
+ @Override
+ public SailRepository createRepository(Sail sail) {
+ return new SailRepository(sail);
+ }
+
+ /**
+ * Create the store provided by this SailProvider
+ *
+ * @return a new instance of the store
+ */
+ @Override
+ public NotifyingSail createStore() {
+ String serverUrl = configurationService.getStringConfiguration("backend.http.url");
+ if(serverUrl == null) {
+ throw new IllegalStateException("no server URL defined for HTTP backend (property backend.http.url)");
+ }
+
+ log.info("creating new HTTP repository client for server at {}", serverUrl);
+
+ httpRepository = new HTTPRepository(serverUrl);
+
+ // TODO: would be better to implement a RepositorySail as NotifyingSail wrapper around a repository
+ Federation store = new Federation();
+ store.addMember(httpRepository);
+
+ return store;
+ }
+
+ /**
+ * Return the name of the provider. Used e.g. for displaying status information or logging.
+ *
+ * @return
+ */
+ @Override
+ public String getName() {
+ return "Memory Store";
+ }
+
+ /**
+ * Return true if this sail provider is enabled in the configuration.
+ *
+ * @return
+ */
+ @Override
+ public boolean isEnabled() {
+ return true;
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/7d4d564b/platform/backends/marmotta-backend-http/src/main/resources/META-INF/beans.xml
----------------------------------------------------------------------
diff --git a/platform/backends/marmotta-backend-http/src/main/resources/META-INF/beans.xml b/platform/backends/marmotta-backend-http/src/main/resources/META-INF/beans.xml
new file mode 100644
index 0000000..461858e
--- /dev/null
+++ b/platform/backends/marmotta-backend-http/src/main/resources/META-INF/beans.xml
@@ -0,0 +1,28 @@
+<?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.
+
+-->
+<beans
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
+
+</beans>
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/7d4d564b/platform/backends/marmotta-backend-http/src/main/resources/config-defaults.properties
----------------------------------------------------------------------
diff --git a/platform/backends/marmotta-backend-http/src/main/resources/config-defaults.properties b/platform/backends/marmotta-backend-http/src/main/resources/config-defaults.properties
new file mode 100644
index 0000000..ea5592e
--- /dev/null
+++ b/platform/backends/marmotta-backend-http/src/main/resources/config-defaults.properties
@@ -0,0 +1,24 @@
+#
+# 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.
+#
+
+
+###############################################################################
+# HTTP repository configuration
+###############################################################################
+
+backend.http.url = http://localhost:8080/openrdf-sesame
+
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/7d4d564b/platform/backends/marmotta-backend-http/src/main/resources/config-descriptions.properties
----------------------------------------------------------------------
diff --git a/platform/backends/marmotta-backend-http/src/main/resources/config-descriptions.properties b/platform/backends/marmotta-backend-http/src/main/resources/config-descriptions.properties
new file mode 100644
index 0000000..8124947
--- /dev/null
+++ b/platform/backends/marmotta-backend-http/src/main/resources/config-descriptions.properties
@@ -0,0 +1,23 @@
+#
+# 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.
+#
+
+###############################################################################
+# BigData storage configuration
+###############################################################################
+
+backend.http.url.description = URL of the Sesame HTTP repository to use with this storage backend
+backend.http.url.type = java.lang.String
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/7d4d564b/platform/backends/marmotta-backend-http/src/main/resources/kiwi-module.properties
----------------------------------------------------------------------
diff --git a/platform/backends/marmotta-backend-http/src/main/resources/kiwi-module.properties b/platform/backends/marmotta-backend-http/src/main/resources/kiwi-module.properties
new file mode 100644
index 0000000..f144f68
--- /dev/null
+++ b/platform/backends/marmotta-backend-http/src/main/resources/kiwi-module.properties
@@ -0,0 +1,38 @@
+#
+# 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.
+#
+
+name=Storage Backend: HTTP
+
+container=Generic
+container.weight = 10
+
+subtitle = Configure HTTP Backend
+weight = 10
+
+icon_small = /admin/img/config_small.png
+
+#do not change!!!
+baseurl=/storage-http
+
+adminpage.0.title=About
+adminpage.0.link=/admin/about.html
+
+adminpage.1.title=Configuration
+adminpage.1.link=/admin/configuration.html
+
+webservices=
+
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/7d4d564b/platform/backends/marmotta-backend-http/src/main/resources/web/admin/about.html
----------------------------------------------------------------------
diff --git a/platform/backends/marmotta-backend-http/src/main/resources/web/admin/about.html b/platform/backends/marmotta-backend-http/src/main/resources/web/admin/about.html
new file mode 100644
index 0000000..cb5651e
--- /dev/null
+++ b/platform/backends/marmotta-backend-http/src/main/resources/web/admin/about.html
@@ -0,0 +1,43 @@
+<!--
+ ~ 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>Storage Backend: BigData</title>
+ <!--###END_HEAD###-->
+</head>
+<body>
+<!--###BEGIN_CONTENT###-->
+<h1>Storage Backend: BigData</h1>
+
+<p>
+ This module provides an Apache Marmotta storage backend based on the <a href="http://www.systap.com/bigdata.htm">BigData</a>
+ triple store. BigData is a highly scalable, highly performant, highly concurrent triple store implementation that you can
+ use in cases where your volume of data is very high and/or you do not want/need to store your data in a relational database
+ as with the KiWi backend.
+</p>
+<p>
+ <strong>Note:</strong> The BigData triple store is licensed under
+ <a href="http://www.gnu.org/licenses/old-licenses/gpl-2.0.html">GNU General Public License (GPLv2)</a>. For you, this
+ means that you cannot distribute custom packages making use of this backend if you do not obtain a separate license from
+ Systap. For the same reason, the Apache Marmotta team also cannot offer pre-packaged distributions. However, if you
+ build the distribution for your own use, you are free to use the system without additional license requirements.
+</p>
+<!--###END_CONTENT###-->
+</body>
+</html>
+
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/7d4d564b/platform/backends/marmotta-backend-http/src/main/resources/web/admin/configuration.html
----------------------------------------------------------------------
diff --git a/platform/backends/marmotta-backend-http/src/main/resources/web/admin/configuration.html b/platform/backends/marmotta-backend-http/src/main/resources/web/admin/configuration.html
new file mode 100644
index 0000000..2631de0
--- /dev/null
+++ b/platform/backends/marmotta-backend-http/src/main/resources/web/admin/configuration.html
@@ -0,0 +1,53 @@
+<!--
+ ~ 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>
+<title>Storage Backend: BigData</title>
+<script type="text/javascript">
+ var _SERVER_URL = "http://localhost:8080/LMF/";
+</script>
+<!--###BEGIN_HEAD###-->
+ <script type="text/javascript" src="../../webjars/jquery/1.8.2/jquery.min.js"></script>
+ <script type="text/javascript" src="../../core/public/js/widgets/configurator/configurator.js"></script>
+ <link rel="stylesheet" href="style.css" />
+ <link type="text/css" rel="stylesheet" href="../../core/public/js/widgets/configurator/style.css">
+ <script type="text/javascript">
+ jQuery(document).ready(function(){
+ var options = {
+ url : _SERVER_URL,
+ container : "bigdata_configurator",
+ prefix : 'bigdata'
+ }
+ var configurator = new Configurator(options);
+ });
+ </script>
+<!--###END_HEAD###-->
+</head>
+<body>
+ <!--###BEGIN_CONTENT###-->
+ <h1>BigData Backend Configuration</h1>
+ <p>
+ Here you can configure options offered by the BigData triple store. Some documentation on these options is available
+ <a href="http://www.bigdata.com/bigdata/docs/api/com/bigdata/rdf/sail/BigdataSail.Options.html">at the BigData webpage</a><br />
+ The configuration currently contains:
+ </p>
+ <div id="bigdata_configurator">
+ <h4>Loading configurator</h4>
+ </div>
+ <!--###END_CONTENT###-->
+</body>
+</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/7d4d564b/platform/backends/marmotta-backend-memory/src/main/resources/kiwi-module.properties
----------------------------------------------------------------------
diff --git a/platform/backends/marmotta-backend-memory/src/main/resources/kiwi-module.properties b/platform/backends/marmotta-backend-memory/src/main/resources/kiwi-module.properties
index 95b3330..7eb0458 100644
--- a/platform/backends/marmotta-backend-memory/src/main/resources/kiwi-module.properties
+++ b/platform/backends/marmotta-backend-memory/src/main/resources/kiwi-module.properties
@@ -26,7 +26,7 @@ weight = 10
icon_small = /admin/img/config_small.png
#do not change!!!
-baseurl=/storage-native
+baseurl=/storage-memory
adminpage.0.title=About
adminpage.0.link=/admin/about.html
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/7d4d564b/platform/backends/marmotta-backend-sparql/pom.xml
----------------------------------------------------------------------
diff --git a/platform/backends/marmotta-backend-sparql/pom.xml b/platform/backends/marmotta-backend-sparql/pom.xml
new file mode 100644
index 0000000..3d00175
--- /dev/null
+++ b/platform/backends/marmotta-backend-sparql/pom.xml
@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.marmotta</groupId>
+ <artifactId>marmotta-parent</artifactId>
+ <version>3.2.0-incubating-SNAPSHOT</version>
+ <relativePath>../../../parent</relativePath>
+ </parent>
+
+ <groupId>org.apache.marmotta</groupId>
+ <artifactId>marmotta-backend-sparql</artifactId>
+
+ <name>Apache Marmotta Platform: Sesame SPARQL Backend</name>
+ <description>
+ This module provides an Apache Marmotta backend using a Sesame SPARQL Repository. This is a suitable backend in
+ case you already have a triple store with SPARQL endpoint and no advanced features like rule-based reasoning or
+ versioning are required.
+ </description>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin> <!-- generate JRebel Configuration -->
+ <groupId>org.zeroturnaround</groupId>
+ <artifactId>jrebel-maven-plugin</artifactId>
+ <version>1.1.3</version>
+ <executions>
+ <execution>
+ <id>generate-rebel-xml</id>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <relativePath>../../</relativePath>
+ <rootPath>$${rebel.root}</rootPath>
+ <classpath>
+ <resources>
+ <resource><!-- default resource --></resource>
+ <resource><directory>src/main/resources</directory></resource>
+ </resources>
+ </classpath>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.marmotta</groupId>
+ <artifactId>buildinfo-maven-plugin</artifactId>
+ <configuration>
+ <systemProperties>
+ <systemProperty>user.name</systemProperty>
+ <systemProperty>user.timezone</systemProperty>
+ <systemProperty>java.vm.vendor</systemProperty>
+ <systemProperty>java.vm.version</systemProperty>
+ <systemProperty>java.vm.name</systemProperty>
+ <systemProperty>java.runtime.version</systemProperty>
+ <systemProperty>os.name</systemProperty>
+ <systemProperty>os.version</systemProperty>
+ <systemProperty>os.arch</systemProperty>
+ </systemProperties>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>process-resources</phase>
+ <goals>
+ <goal>extract</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <executions>
+ <!--
+ <execution>
+ <id>aggregate</id>
+ <goals>
+ <goal>aggregate</goal>
+ </goals>
+ <phase>site</phase>
+ </execution>
+ -->
+ <execution>
+ <!-- configure how the REST API documentation will be produced -->
+ <id>restapi</id>
+ <configuration>
+ <doclet>com.lunatech.doclets.jax.jaxrs.JAXRSDoclet</doclet>
+
+ <name>REST API</name>
+ <description>REST API for LMF Webservices</description>
+
+ <outputDirectory>${project.build.outputDirectory}/doc</outputDirectory>
+ <reportOutputDirectory>${project.build.outputDirectory}/web/doc</reportOutputDirectory>
+ <destDir>rest</destDir>
+
+ <docletArtifact>
+ <groupId>com.lunatech.jax-doclets</groupId>
+ <artifactId>doclets</artifactId>
+ <version>0.10.0</version>
+ </docletArtifact>
+ <additionalparam>
+ -jaxrscontext {BASE}
+ -charset UTF-8
+ </additionalparam>
+
+ <!--
+ <stylesheetfile>${project.parent.basedir}/config/doc/doclet.css</stylesheetfile>
+ -->
+
+ <header><![CDATA[<!--###BEGIN_CONTENT###--><div class="javadoc">]]></header>
+ <footer><![CDATA[</div><!--###END_CONTENT###-->]]></footer>
+ <encoding>UTF-8</encoding>
+ <detectOfflineLinks>false</detectOfflineLinks>
+
+ <!-- For the project-reports page -->
+ </configuration>
+ <goals>
+ <goal>javadoc</goal>
+ </goals>
+ <phase>generate-resources</phase>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.marmotta</groupId>
+ <artifactId>marmotta-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.marmotta</groupId>
+ <artifactId>kiwi-transactions</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.openrdf.sesame</groupId>
+ <artifactId>sesame-sail-federation</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.openrdf.sesame</groupId>
+ <artifactId>sesame-repository-sparql</artifactId>
+ </dependency>
+ </dependencies>
+
+
+
+</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/7d4d564b/platform/backends/marmotta-backend-sparql/src/main/resources/META-INF/beans.xml
----------------------------------------------------------------------
diff --git a/platform/backends/marmotta-backend-sparql/src/main/resources/META-INF/beans.xml b/platform/backends/marmotta-backend-sparql/src/main/resources/META-INF/beans.xml
new file mode 100644
index 0000000..461858e
--- /dev/null
+++ b/platform/backends/marmotta-backend-sparql/src/main/resources/META-INF/beans.xml
@@ -0,0 +1,28 @@
+<?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.
+
+-->
+<beans
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="
+ http://java.sun.com/xml/ns/javaee
+ http://java.sun.com/xml/ns/javaee/beans_1_0.xsd">
+
+</beans>
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/7d4d564b/platform/backends/marmotta-backend-sparql/src/main/resources/config-defaults.properties
----------------------------------------------------------------------
diff --git a/platform/backends/marmotta-backend-sparql/src/main/resources/config-defaults.properties b/platform/backends/marmotta-backend-sparql/src/main/resources/config-defaults.properties
new file mode 100644
index 0000000..b9c3940
--- /dev/null
+++ b/platform/backends/marmotta-backend-sparql/src/main/resources/config-defaults.properties
@@ -0,0 +1,24 @@
+#
+# 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.
+#
+
+
+###############################################################################
+# SPARQL storage configuration
+###############################################################################
+
+backend.sparql.url = http://localhost:8080/sparql
+
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/7d4d564b/platform/backends/marmotta-backend-sparql/src/main/resources/config-descriptions.properties
----------------------------------------------------------------------
diff --git a/platform/backends/marmotta-backend-sparql/src/main/resources/config-descriptions.properties b/platform/backends/marmotta-backend-sparql/src/main/resources/config-descriptions.properties
new file mode 100644
index 0000000..c1428dd
--- /dev/null
+++ b/platform/backends/marmotta-backend-sparql/src/main/resources/config-descriptions.properties
@@ -0,0 +1,23 @@
+#
+# 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.
+#
+
+###############################################################################
+# SPARQL storage configuration
+###############################################################################
+
+backend.sparql.url.description = URL of the SPARQL endpoint to use with this storage backend
+backend.sparql.url.type = java.lang.String
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/7d4d564b/platform/backends/marmotta-backend-sparql/src/main/resources/kiwi-module.properties
----------------------------------------------------------------------
diff --git a/platform/backends/marmotta-backend-sparql/src/main/resources/kiwi-module.properties b/platform/backends/marmotta-backend-sparql/src/main/resources/kiwi-module.properties
new file mode 100644
index 0000000..cbaf305
--- /dev/null
+++ b/platform/backends/marmotta-backend-sparql/src/main/resources/kiwi-module.properties
@@ -0,0 +1,38 @@
+#
+# 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.
+#
+
+name=Storage Backend: SPARQL
+
+container=Generic
+container.weight = 10
+
+subtitle = Configure SPARQL Backend
+weight = 10
+
+icon_small = /admin/img/config_small.png
+
+#do not change!!!
+baseurl=/storage-sparql
+
+adminpage.0.title=About
+adminpage.0.link=/admin/about.html
+
+adminpage.1.title=Configuration
+adminpage.1.link=/admin/configuration.html
+
+webservices=
+
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/7d4d564b/platform/backends/marmotta-backend-sparql/src/main/resources/web/admin/about.html
----------------------------------------------------------------------
diff --git a/platform/backends/marmotta-backend-sparql/src/main/resources/web/admin/about.html b/platform/backends/marmotta-backend-sparql/src/main/resources/web/admin/about.html
new file mode 100644
index 0000000..cb5651e
--- /dev/null
+++ b/platform/backends/marmotta-backend-sparql/src/main/resources/web/admin/about.html
@@ -0,0 +1,43 @@
+<!--
+ ~ 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>Storage Backend: BigData</title>
+ <!--###END_HEAD###-->
+</head>
+<body>
+<!--###BEGIN_CONTENT###-->
+<h1>Storage Backend: BigData</h1>
+
+<p>
+ This module provides an Apache Marmotta storage backend based on the <a href="http://www.systap.com/bigdata.htm">BigData</a>
+ triple store. BigData is a highly scalable, highly performant, highly concurrent triple store implementation that you can
+ use in cases where your volume of data is very high and/or you do not want/need to store your data in a relational database
+ as with the KiWi backend.
+</p>
+<p>
+ <strong>Note:</strong> The BigData triple store is licensed under
+ <a href="http://www.gnu.org/licenses/old-licenses/gpl-2.0.html">GNU General Public License (GPLv2)</a>. For you, this
+ means that you cannot distribute custom packages making use of this backend if you do not obtain a separate license from
+ Systap. For the same reason, the Apache Marmotta team also cannot offer pre-packaged distributions. However, if you
+ build the distribution for your own use, you are free to use the system without additional license requirements.
+</p>
+<!--###END_CONTENT###-->
+</body>
+</html>
+
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/7d4d564b/platform/backends/marmotta-backend-sparql/src/main/resources/web/admin/configuration.html
----------------------------------------------------------------------
diff --git a/platform/backends/marmotta-backend-sparql/src/main/resources/web/admin/configuration.html b/platform/backends/marmotta-backend-sparql/src/main/resources/web/admin/configuration.html
new file mode 100644
index 0000000..2631de0
--- /dev/null
+++ b/platform/backends/marmotta-backend-sparql/src/main/resources/web/admin/configuration.html
@@ -0,0 +1,53 @@
+<!--
+ ~ 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>
+<title>Storage Backend: BigData</title>
+<script type="text/javascript">
+ var _SERVER_URL = "http://localhost:8080/LMF/";
+</script>
+<!--###BEGIN_HEAD###-->
+ <script type="text/javascript" src="../../webjars/jquery/1.8.2/jquery.min.js"></script>
+ <script type="text/javascript" src="../../core/public/js/widgets/configurator/configurator.js"></script>
+ <link rel="stylesheet" href="style.css" />
+ <link type="text/css" rel="stylesheet" href="../../core/public/js/widgets/configurator/style.css">
+ <script type="text/javascript">
+ jQuery(document).ready(function(){
+ var options = {
+ url : _SERVER_URL,
+ container : "bigdata_configurator",
+ prefix : 'bigdata'
+ }
+ var configurator = new Configurator(options);
+ });
+ </script>
+<!--###END_HEAD###-->
+</head>
+<body>
+ <!--###BEGIN_CONTENT###-->
+ <h1>BigData Backend Configuration</h1>
+ <p>
+ Here you can configure options offered by the BigData triple store. Some documentation on these options is available
+ <a href="http://www.bigdata.com/bigdata/docs/api/com/bigdata/rdf/sail/BigdataSail.Options.html">at the BigData webpage</a><br />
+ The configuration currently contains:
+ </p>
+ <div id="bigdata_configurator">
+ <h4>Loading configurator</h4>
+ </div>
+ <!--###END_CONTENT###-->
+</body>
+</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/7d4d564b/platform/backends/pom.xml
----------------------------------------------------------------------
diff --git a/platform/backends/pom.xml b/platform/backends/pom.xml
index 5a4c8ed..61aeb95 100644
--- a/platform/backends/pom.xml
+++ b/platform/backends/pom.xml
@@ -67,6 +67,13 @@
<module>marmotta-backend-bigdata</module>
</modules>
</profile>
+ <profile>
+ <id>experimental</id>
+ <modules>
+ <module>marmotta-backend-http</module>
+ <module>marmotta-backend-sparql</module>
+ </modules>
+ </profile>
</profiles>
</project>
[2/2] git commit: serious bug fix (resource leakage) in user service
Posted by ss...@apache.org.
serious bug fix (resource leakage) in user service
Project: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/commit/8bf44fd1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/tree/8bf44fd1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/diff/8bf44fd1
Branch: refs/heads/develop
Commit: 8bf44fd17c15332aefb2915bebbdda8f07096238
Parents: 7d4d564
Author: Sebastian Schaffert <ss...@apache.org>
Authored: Tue Nov 5 12:13:47 2013 +0100
Committer: Sebastian Schaffert <ss...@apache.org>
Committed: Tue Nov 5 12:13:47 2013 +0100
----------------------------------------------------------------------
.../marmotta/platform/user/webservices/UserWebService.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/8bf44fd1/platform/marmotta-user/src/main/java/org/apache/marmotta/platform/user/webservices/UserWebService.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-user/src/main/java/org/apache/marmotta/platform/user/webservices/UserWebService.java b/platform/marmotta-user/src/main/java/org/apache/marmotta/platform/user/webservices/UserWebService.java
index 1f4dcc3..c6c7c0c 100644
--- a/platform/marmotta-user/src/main/java/org/apache/marmotta/platform/user/webservices/UserWebService.java
+++ b/platform/marmotta-user/src/main/java/org/apache/marmotta/platform/user/webservices/UserWebService.java
@@ -17,14 +17,14 @@
*/
package org.apache.marmotta.platform.user.webservices;
-import org.apache.marmotta.platform.user.api.AccountService;
-import org.apache.marmotta.platform.user.model.UserAccount;
import org.apache.marmotta.commons.sesame.model.Namespaces;
import org.apache.marmotta.commons.sesame.repository.ResourceUtils;
import org.apache.marmotta.platform.core.api.config.ConfigurationService;
import org.apache.marmotta.platform.core.api.triplestore.SesameService;
import org.apache.marmotta.platform.core.api.user.UserService;
import org.apache.marmotta.platform.core.exception.security.AccessDeniedException;
+import org.apache.marmotta.platform.user.api.AccountService;
+import org.apache.marmotta.platform.user.model.UserAccount;
import org.openrdf.model.Literal;
import org.openrdf.model.Statement;
import org.openrdf.model.URI;
@@ -251,7 +251,7 @@ public class UserWebService {
return Response.seeOther(u).header("Accept", types).build();
} finally {
conn.commit();
- conn.commit();
+ conn.close();
}
} catch (URISyntaxException e) {
return Response.status(Status.BAD_REQUEST).entity(String.format("Invalid URI: %s", e.getMessage())).build();