You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marmotta.apache.org by ja...@apache.org on 2014/03/17 12:04:46 UTC

[01/40] git commit: MARMOTTA-428: added OSGI metadata to some pom.xml files

Repository: marmotta
Updated Branches:
  refs/heads/ldp 673ddc35d -> b8d367a96


MARMOTTA-428: added OSGI metadata to some pom.xml files


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/a110dcd3
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/a110dcd3
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/a110dcd3

Branch: refs/heads/ldp
Commit: a110dcd37ba0746b11644be58d29801a49193a8f
Parents: e26b3ce
Author: Rupert Westenthaler <ru...@gmail.com>
Authored: Mon Feb 3 13:36:32 2014 +0100
Committer: Rupert Westenthaler <ru...@gmail.com>
Committed: Mon Feb 3 13:36:32 2014 +0100

----------------------------------------------------------------------
 libraries/kiwi/pom.xml                  | 12 ++++++++++--
 libraries/ldcache/ldcache-api/pom.xml   | 15 +++++++++++++++
 libraries/ldcache/pom.xml               | 10 ++++++++++
 libraries/ldclient/ldclient-api/pom.xml | 25 +++++++++++++++++++++++++
 libraries/ldclient/pom.xml              | 10 ++++++++++
 libraries/ldpath/ldpath-api/pom.xml     | 16 ++++------------
 libraries/ldpath/pom.xml                | 11 +++++++++++
 parent/pom.xml                          | 17 ++++++++++++++---
 8 files changed, 99 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/a110dcd3/libraries/kiwi/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/kiwi/pom.xml b/libraries/kiwi/pom.xml
index d4c382a..9e7aa42 100644
--- a/libraries/kiwi/pom.xml
+++ b/libraries/kiwi/pom.xml
@@ -77,7 +77,16 @@
                         <rootPath>$${rebel.root}</rootPath>
                     </configuration>
                 </plugin>
-
+                <plugin>
+                  <groupId>org.apache.felix</groupId>
+                  <artifactId>maven-bundle-plugin</artifactId>
+                  <inherited>true</inherited>
+                  <configuration>
+                    <instructions>
+                      <Bundle-Category>Apache Marmotta KiWi Triplestore</Bundle-Category>
+                    </instructions>
+                  </configuration>
+                </plugin>
             </plugins>
         </pluginManagement>
         <plugins>
@@ -85,7 +94,6 @@
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-surefire-plugin</artifactId>
             </plugin>
-
         </plugins>
     </build>
 

http://git-wip-us.apache.org/repos/asf/marmotta/blob/a110dcd3/libraries/ldcache/ldcache-api/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/ldcache/ldcache-api/pom.xml b/libraries/ldcache/ldcache-api/pom.xml
index 9a16779..b3acd34 100644
--- a/libraries/ldcache/ldcache-api/pom.xml
+++ b/libraries/ldcache/ldcache-api/pom.xml
@@ -27,6 +27,7 @@
 
     <artifactId>ldcache-api</artifactId>
     <name>LDCache: API</name>
+    <packaging>bundle</packaging>
 
     <description>
         Interfaces and Data Model for the Linked Data Caching component.
@@ -52,6 +53,20 @@
                         <rootPath>$${rebel.root}</rootPath>
                     </configuration>
                 </plugin>
+                <plugin>
+              	    <groupId>org.apache.felix</groupId>
+              		<artifactId>maven-bundle-plugin</artifactId>
+              		<inherited>true</inherited>
+              		<configuration>
+                		<instructions>
+                  			<Export-Package>
+                  				org.apache.marmotta.ldcache.api;version=${project.version},
+                  				org.apache.marmotta.ldcache.model;version=${project.version}
+                  			</Export-Package>
+                		</instructions>
+              		</configuration>
+                </plugin>
+                
             </plugins>
         </pluginManagement>
     </build>

http://git-wip-us.apache.org/repos/asf/marmotta/blob/a110dcd3/libraries/ldcache/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/ldcache/pom.xml b/libraries/ldcache/pom.xml
index b6435a1..d2a4d8e 100644
--- a/libraries/ldcache/pom.xml
+++ b/libraries/ldcache/pom.xml
@@ -49,6 +49,16 @@
                     <skip>true</skip>
                 </configuration>
             </plugin>
+            <plugin>
+              <groupId>org.apache.felix</groupId>
+              <artifactId>maven-bundle-plugin</artifactId>
+              <inherited>true</inherited>
+              <configuration>
+                <instructions>
+                  <Bundle-Category>Apache Marmotta Linked Data Caching</Bundle-Category>
+                </instructions>
+              </configuration>
+            </plugin>
         </plugins>
     </build>
 

http://git-wip-us.apache.org/repos/asf/marmotta/blob/a110dcd3/libraries/ldclient/ldclient-api/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/ldclient/ldclient-api/pom.xml b/libraries/ldclient/ldclient-api/pom.xml
index e54ea3d..bec955f 100644
--- a/libraries/ldclient/ldclient-api/pom.xml
+++ b/libraries/ldclient/ldclient-api/pom.xml
@@ -27,6 +27,31 @@
 
     <artifactId>ldclient-api</artifactId>
     <name>LDClient: API</name>
+    <description>
+        Interfaces and Data Model for the Linked Data Client component.
+    </description>
+    <packaging>bundle</packaging>
+
+    <build>
+        <pluginManagement>
+            <plugins>
+                <plugin>
+                    <groupId>org.apache.felix</groupId>
+                    <artifactId>maven-bundle-plugin</artifactId>
+                    <inherited>true</inherited>
+                    <configuration>
+                        <instructions>
+                            <Export-Package>
+                                org.apache.marmotta.ldlient.api.*;version=${project.version},
+                                org.apache.marmotta.ldcache.exception;version=${project.version},
+                                org.apache.marmotta.ldcache.model;version=${project.version}
+                            </Export-Package>
+                        </instructions>
+                    </configuration>
+                </plugin>
+            </plugins>
+        </pluginManagement>
+    </build>
 
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/marmotta/blob/a110dcd3/libraries/ldclient/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/ldclient/pom.xml b/libraries/ldclient/pom.xml
index da449b2..14bad12 100644
--- a/libraries/ldclient/pom.xml
+++ b/libraries/ldclient/pom.xml
@@ -70,6 +70,16 @@
                     <skip>true</skip>
                 </configuration>
             </plugin>
+            <plugin>
+              <groupId>org.apache.felix</groupId>
+              <artifactId>maven-bundle-plugin</artifactId>
+              <inherited>true</inherited>
+              <configuration>
+                <instructions>
+                  <Bundle-Category>Apache Marmotta Linked Data Client</Bundle-Category>
+                </instructions>
+              </configuration>
+            </plugin>
         </plugins>
     </build>
 

http://git-wip-us.apache.org/repos/asf/marmotta/blob/a110dcd3/libraries/ldpath/ldpath-api/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-api/pom.xml b/libraries/ldpath/ldpath-api/pom.xml
index e5cd5fa..4aa36fb 100644
--- a/libraries/ldpath/ldpath-api/pom.xml
+++ b/libraries/ldpath/ldpath-api/pom.xml
@@ -27,6 +27,9 @@
 
     <name>LDPath API</name>
     <artifactId>ldpath-api</artifactId>
+    <description>
+        Interfaces and Data Model for the Linked Data Path component.
+    </description>
     <packaging>bundle</packaging>
 
 
@@ -59,20 +62,9 @@
                 <extensions>true</extensions>
                 <configuration>
                     <instructions>
-                        <Bundle-Name>LDPath API</Bundle-Name>
-                        <Bundle-DocURL>http://wiki.apache.org/marmotta/LDPath</Bundle-DocURL>
                         <Bundle-Vendor>Apache Software Foundation</Bundle-Vendor>
-                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
-                        <_versionpolicy>$${version;===;${@}}</_versionpolicy>
-                        <!-- Enable this for including your enhancement chain configuration -->
-                        <!-- <Install-Path>config</Install-Path> -->
 						<Export-Package>
-                            org.apache.marmotta.ldpath.api;version=${project.version},
-                            org.apache.marmotta.ldpath.api.backend;version=${project.version},
-                            org.apache.marmotta.ldpath.api.functions;version=${project.version},
-                            org.apache.marmotta.ldpath.api.selectors;version=${project.version},
-                            org.apache.marmotta.ldpath.api.tests;version=${project.version},
-                            org.apache.marmotta.ldpath.api.transformers;version=${project.version}
+                            org.apache.marmotta.ldpath.api.*;version=${project.version}
                         </Export-Package>
                      </instructions>
                 </configuration>

http://git-wip-us.apache.org/repos/asf/marmotta/blob/a110dcd3/libraries/ldpath/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/ldpath/pom.xml b/libraries/ldpath/pom.xml
index 18b9c48..3676590 100644
--- a/libraries/ldpath/pom.xml
+++ b/libraries/ldpath/pom.xml
@@ -59,6 +59,17 @@
                     <skip>true</skip>
                 </configuration>
             </plugin>
+            <plugin>
+              <groupId>org.apache.felix</groupId>
+              <artifactId>maven-bundle-plugin</artifactId>
+              <inherited>true</inherited>
+              <configuration>
+                <instructions>
+                  <Bundle-Category>Apache Marmotta LDPath</Bundle-Category>
+                  <Bundle-DocURL>http://wiki.apache.org/marmotta/LDPath</Bundle-DocURL>
+                </instructions>
+              </configuration>
+            </plugin>
         </plugins>
     </build>
 

http://git-wip-us.apache.org/repos/asf/marmotta/blob/a110dcd3/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 33d783d..6e4a15a 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -511,9 +511,20 @@
                     -->
                 </plugin>
                 <plugin>
-                	<groupId>org.apache.felix</groupId>
-                	<artifactId>maven-bundle-plugin</artifactId>
-                	<version>2.3.7</version>
+                  <groupId>org.apache.felix</groupId>
+                  <artifactId>maven-bundle-plugin</artifactId>
+                  <version>2.3.7</version>
+                  <inherited>true</inherited>
+                  <configuration>
+                    <instructions>
+                      <Bundle-DocURL>http://marmotta.apache.org</Bundle-DocURL>
+                      <Bundle-Vendor>Apache Marmotta</Bundle-Vendor>
+                      <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
+                      <_versionpolicy>$${version;===;${@}}</_versionpolicy>
+                      <_provider-policy>[$(version;===;$(@)),$(version;=+;$(@)))</_provider-policy>
+                      <_consumer-policy>[$(version;===;$(@)),$(version;+;$(@)))</_consumer-policy>
+                    </instructions>
+                  </configuration>
                 </plugin>
                 <plugin>
                 	<groupId>org.apache.felix</groupId>


[17/40] git commit: MARMOTTA-431: fixed missing arch in the .deb file

Posted by ja...@apache.org.
MARMOTTA-431: fixed missing arch in the .deb file


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/37701d5e
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/37701d5e
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/37701d5e

Branch: refs/heads/ldp
Commit: 37701d5ee80d0719121c083bbc1ca472a3f4d59c
Parents: f7d7371
Author: Sergio Fernández <wi...@apache.org>
Authored: Wed Feb 19 11:37:05 2014 +0100
Committer: Sergio Fernández <wi...@apache.org>
Committed: Wed Feb 19 11:37:05 2014 +0100

----------------------------------------------------------------------
 launchers/marmotta-webapp/pom.xml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/37701d5e/launchers/marmotta-webapp/pom.xml
----------------------------------------------------------------------
diff --git a/launchers/marmotta-webapp/pom.xml b/launchers/marmotta-webapp/pom.xml
index d9cda1e..2d41f9b 100644
--- a/launchers/marmotta-webapp/pom.xml
+++ b/launchers/marmotta-webapp/pom.xml
@@ -37,6 +37,7 @@
         <marmotta.context>/</marmotta.context>
         <marmotta.port>8080</marmotta.port>
         <marmotta.backend>kiwi</marmotta.backend>
+        <maven.build.timestamp.format>yyyyMMddHHmmss</maven.build.timestamp.format>
     </properties>
 
     <build>
@@ -122,7 +123,7 @@
             <plugin>
                 <artifactId>jdeb</artifactId>
                 <groupId>org.vafer</groupId>
-                <!--<version>1.1-SNAPSHOT</version>-->
+                <!--required for generating proper .changes: <version>1.1-SNAPSHOT</version>-->
                 <version>1.0.1</version>
                 <executions>
                     <execution>
@@ -131,7 +132,7 @@
                             <goal>jdeb</goal>
                         </goals>
                         <configuration>
-                            <deb>${project.build.directory}/${project.artifactId}_${project.version}.deb</deb>
+                            <deb>${project.build.directory}/${project.artifactId}_${project.version}-${maven.build.timestamp}_all.deb</deb>
                             <controlDir>${basedir}/src/deb/control</controlDir>
                             <dataSet>
                                 <data>


[11/40] git commit: added configuration defaults and descriptions for clustering

Posted by ja...@apache.org.
added configuration defaults and descriptions for clustering


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/2aa3f515
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/2aa3f515
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/2aa3f515

Branch: refs/heads/ldp
Commit: 2aa3f515f6276f47c9e38467c945237485f2d8ad
Parents: 964b28c
Author: Sebastian Schaffert <ss...@apache.org>
Authored: Wed Feb 12 18:17:50 2014 +0100
Committer: Sebastian Schaffert <ss...@apache.org>
Committed: Wed Feb 12 18:17:50 2014 +0100

----------------------------------------------------------------------
 .../src/main/resources/config-defaults.properties  |  3 +++
 .../main/resources/config-descriptions.properties  | 17 ++++++++++++++++-
 2 files changed, 19 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/2aa3f515/platform/marmotta-core/src/main/resources/config-defaults.properties
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/resources/config-defaults.properties b/platform/marmotta-core/src/main/resources/config-defaults.properties
index b5b67b6..4ac724d 100644
--- a/platform/marmotta-core/src/main/resources/config-defaults.properties
+++ b/platform/marmotta-core/src/main/resources/config-defaults.properties
@@ -206,3 +206,6 @@ contexts.inferred = ${kiwi.context}context/inferred
 # Turn on cluster-specific configuration options (e.g. replicated and distributed caching, synchronization, ...)
 clustering.enabled = false
 clustering.name    = Marmotta
+clustering.mode    = REPLICATED
+clustering.address = 228.6.7.8
+clustering.port    = 46655

http://git-wip-us.apache.org/repos/asf/marmotta/blob/2aa3f515/platform/marmotta-core/src/main/resources/config-descriptions.properties
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/resources/config-descriptions.properties b/platform/marmotta-core/src/main/resources/config-descriptions.properties
index 0654931..0599619 100644
--- a/platform/marmotta-core/src/main/resources/config-descriptions.properties
+++ b/platform/marmotta-core/src/main/resources/config-descriptions.properties
@@ -166,7 +166,22 @@ clustering.enabled.type = java.lang.Boolean
 clustering.name.description = Cluster name to use in cluster configuration (e.g. cache cluster name)
 clustering.name.type = java.lang.String
 
-
+clustering.mode.description = Set the cache mode for this KiWi triple store. The following cluster modes are available: \
+  LOCAL: In local cache mode, the cache is not shared among the servers in a cluster. Each machine keeps a local cache. \
+  This allows quick startups and eliminates network traffic in the cluster, but subsequent requests to different \
+  cluster members cannot benefit from the cached data. \
+  DISTRIBUTED: In distributed cache mode, the cluster forms a big hash table used as a cache. This allows to make efficient \
+  use of the large amount of memory available, but requires cache rebalancing and a lot of network transfers, \
+  especially in case cluster members are restarted often. \
+  REPLICATED: In replicated cache mode, each node in the cluster has an identical copy of all cache data. This allows \
+  very efficient cache lookups and reduces the rebalancing effort, but requires more memory.
+clustering.mode.type = java.lang.Enum("LOCAL"|"DISTRIBUTED"|"REPLICATED")
+
+clustering.address.description = Set the address used for sending UDP multicast packages in the cluster
+clustering.address.type = java.lang.String
+
+clustering.port.description = Set the port used for sending UDP multicast packages in the cluster
+clustering.port.type = java.lang.Integer(1|1024|65535)
 
 contexts.default.description = Default context to use for triples in case no explicit context selected (may be empty)
 contexts.default.type = java.lang.String


[26/40] git commit: Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/marmotta into develop

Posted by ja...@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/ef113cd2
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/ef113cd2
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/ef113cd2

Branch: refs/heads/ldp
Commit: ef113cd2dae393ae5ceb2e34254c3882bbb0527d
Parents: e3059d6 f7cc0bc
Author: Sergio Fernández <wi...@apache.org>
Authored: Tue Feb 25 16:53:57 2014 +0100
Committer: Sergio Fernández <wi...@apache.org>
Committed: Tue Feb 25 16:53:57 2014 +0100

----------------------------------------------------------------------
 .../org/apache/marmotta/ldpath/parser/ldpath.jj | 1106 ++++++++++++++++++
 .../apache/marmotta/ldpath/parser/rdfpath.jj    | 1104 -----------------
 .../marmotta/loader/statistics/Statistics.java  |   74 +-
 .../loader/core/test/LoaderTestBase.java        |    7 +-
 .../core/test/dummy/DummyLoaderBackend.java     |    4 +-
 .../core/test/dummy/DummyLoaderHandler.java     |   17 +-
 6 files changed, 1173 insertions(+), 1139 deletions(-)
----------------------------------------------------------------------



[30/40] git commit: added Eclipse Workspace metadata folder to gitignore

Posted by ja...@apache.org.
added Eclipse Workspace metadata folder to gitignore


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/517f76e2
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/517f76e2
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/517f76e2

Branch: refs/heads/ldp
Commit: 517f76e2ddc72f5e1aaaa78b99af50e3b43005cb
Parents: 888a592
Author: Rupert Westenthaler <ru...@gmail.com>
Authored: Wed Feb 26 12:05:37 2014 +0100
Committer: Rupert Westenthaler <ru...@gmail.com>
Committed: Wed Feb 26 12:05:37 2014 +0100

----------------------------------------------------------------------
 .gitignore | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/517f76e2/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 39fd385..872c23e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,3 +16,5 @@ target
 target/*
 .idea
 .idea/**
+.metadata
+.metadata/**


[23/40] git commit: MARMOTTA-431: changed package name to just 'marmotta' (replaces the other)

Posted by ja...@apache.org.
MARMOTTA-431: changed package name to just 'marmotta' (replaces the other)


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/7496b4f0
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/7496b4f0
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/7496b4f0

Branch: refs/heads/ldp
Commit: 7496b4f0c4a4642e707477c90be75beddf4e8b60
Parents: 4b04fff
Author: Sergio Fernández <wi...@apache.org>
Authored: Tue Feb 25 15:11:25 2014 +0100
Committer: Sergio Fernández <wi...@apache.org>
Committed: Tue Feb 25 15:11:25 2014 +0100

----------------------------------------------------------------------
 launchers/marmotta-webapp/pom.xml                 | 3 ++-
 launchers/marmotta-webapp/src/deb/control/control | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/7496b4f0/launchers/marmotta-webapp/pom.xml
----------------------------------------------------------------------
diff --git a/launchers/marmotta-webapp/pom.xml b/launchers/marmotta-webapp/pom.xml
index f747fde..748e486 100644
--- a/launchers/marmotta-webapp/pom.xml
+++ b/launchers/marmotta-webapp/pom.xml
@@ -145,7 +145,8 @@
                             <goal>jdeb</goal>
                         </goals>
                         <configuration>
-                            <deb>${project.build.directory}/${project.artifactId}_${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}~${maven.build.timestamp}_all.deb</deb>
+                            <deb>${project.build.directory}/${project.build.finalName}_${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}~${maven.build.timestamp}_all.deb</deb>
+                            <changesOut>${project.build.directory}/${project.build.finalName}_${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}~${maven.build.timestamp}_all.changes</changesOut>
                             <controlDir>${basedir}/src/deb/control</controlDir>
                             <dataSet>
                                 <data>

http://git-wip-us.apache.org/repos/asf/marmotta/blob/7496b4f0/launchers/marmotta-webapp/src/deb/control/control
----------------------------------------------------------------------
diff --git a/launchers/marmotta-webapp/src/deb/control/control b/launchers/marmotta-webapp/src/deb/control/control
index 103e14c..dc9a500 100644
--- a/launchers/marmotta-webapp/src/deb/control/control
+++ b/launchers/marmotta-webapp/src/deb/control/control
@@ -6,6 +6,7 @@ Architecture: all
 Distribution: ldstack-nightly
 Maintainer: Sergio Fernández <wi...@apache.org>
 Depends: tomcat7 (>=7.0.30-1)
+Replaces: marmotta-webapp
 Description: Apache Marmotta is an Open Platform for Linked Data
  The goal of Apache Marmotta is to provide an open implementation of a Linked 
  Data Platform that can be used, extended and deployed easily by organizations 


[05/40] git commit: Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/marmotta into develop

Posted by ja...@apache.org.
Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/marmotta into develop

# By Jakob Frank (5) and Sebastian Schaffert (4)
# Via Sebastian Schaffert
* 'develop' of https://git-wip-us.apache.org/repos/asf/marmotta:
  a bit of cache tuning
  - loader: support for importing geonames data
  MARMOTTA-434: fixed jrebel configuration
  removed wrong license-headers in 3rd-party source files
  MARMOTTA-434: fixed jrebel config in snorql-webjar
  MARMOTTA-434: updated jrebel config
  turned off jslint warnings for sgvizler
  - add a test for incorrect date parsing
  - loader supports now datasets contained in archives (ZIP, tar.gz, ...)


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/d44196c3
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/d44196c3
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/d44196c3

Branch: refs/heads/ldp
Commit: d44196c3056927fba45dfad18eba666dd4d1b614
Parents: d5bbec5 e796661
Author: Rupert Westenthaler <ru...@gmail.com>
Authored: Tue Feb 4 17:04:48 2014 +0100
Committer: Rupert Westenthaler <ru...@gmail.com>
Committed: Tue Feb 4 17:04:48 2014 +0100

----------------------------------------------------------------------
 .../marmotta/commons/util/DateUtilsTest.java    |  13 +-
 .../marmotta-rio-api/pom.xml                    |  12 +
 .../marmotta-rio-ical/pom.xml                   |  12 +
 .../marmotta-rio-rss/pom.xml                    |   7 +
 .../marmotta-rio-vcard/pom.xml                  |  12 +
 .../marmotta-sail-contextaware/pom.xml          |  12 +
 .../marmotta-sail-transactions/pom.xml          |  12 +
 .../marmotta-util-facading/pom.xml              |  12 +
 .../marmotta-util-filter/pom.xml                |  12 +
 .../marmotta-util-tripletable/pom.xml           |  12 +
 extras/webjars/sgvizler/pom.xml                 |   8 +
 .../webjars/sgvizler/0.5.1/lib/d3.v2.min.js     |   1 -
 .../0.5.1/lib/raphael-dracula.pack.min.js       |   1 -
 .../webjars/sgvizler/0.5.1/sgvizler.chart.css   |   1 -
 .../webjars/sgvizler/0.5.1/sgvizler.js          |   1 -
 extras/webjars/snorql/pom.xml                   |   9 +-
 .../snorql/src/main/resources/namespaces.js     |  24 +-
 .../snorql/src/main/resources/prototype.js      |  17 -
 .../src/main/resources/scriptaculous/builder.js |  17 -
 .../main/resources/scriptaculous/controls.js    |  30 +-
 .../main/resources/scriptaculous/dragdrop.js    |  23 +-
 .../src/main/resources/scriptaculous/effects.js |  28 +-
 .../resources/scriptaculous/scriptaculous.js    |  52 ++-
 .../src/main/resources/scriptaculous/slider.js  |  22 +-
 .../src/main/resources/scriptaculous/sound.js   |  24 +-
 .../main/resources/scriptaculous/unittest.js    |  24 +-
 .../webjars/snorql/src/main/resources/snorql.js |  17 -
 .../webjars/snorql/src/main/resources/sparql.js |  75 ++--
 .../snorql/src/main/resources/xml-to-html.xsl   | 366 +++++++++----------
 extras/webjars/strftime/pom.xml                 |   7 +
 .../kiwi/loader/generic/KiWiBatchHandler.java   |   2 +-
 .../kiwi/loader/generic/KiWiHandler.java        |   4 +-
 .../marmotta/kiwi/caching/KiWiCacheManager.java |   5 +-
 libraries/ldclient/ldclient-api/pom.xml         |  12 +
 libraries/ldclient/ldclient-core/pom.xml        |   7 +
 .../ldclient/ldclient-provider-rdf/pom.xml      |  12 +
 loader/marmotta-loader-core/pom.xml             |   4 +
 .../marmotta/loader/api/LoaderOptions.java      |   6 +
 .../marmotta/loader/core/MarmottaLoader.java    | 120 +++++-
 .../marmotta/loader/rio/GeonamesFormat.java     |  45 +++
 .../marmotta/loader/rio/GeonamesParser.java     | 238 ++++++++++++
 .../loader/rio/GeonamesParserFactory.java       |  46 +++
 .../services/org.openrdf.rio.RDFParserFactory   |   1 +
 .../marmotta/loader/core/test/ArchiveTest.java  |  59 +++
 .../marmotta/loader/core/test/FilesTest.java    |  43 +++
 .../loader/core/test/GeonamesParserTest.java    |  66 ++++
 .../marmotta/loader/core/test/LoadTest.java     | 150 --------
 .../loader/core/test/LoaderTestBase.java        | 139 +++++++
 .../src/test/resources/demo-data.tar.gz         | Bin 0 -> 1405 bytes
 .../src/test/resources/demo-data.zip            | Bin 0 -> 1457 bytes
 .../src/test/resources/geonames-sample.txt      |   4 +
 parent/pom.xml                                  |   9 +
 platform/marmotta-versioning-common/pom.xml     |   3 +-
 53 files changed, 1253 insertions(+), 585 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/d44196c3/libraries/ldclient/ldclient-api/pom.xml
----------------------------------------------------------------------
diff --cc libraries/ldclient/ldclient-api/pom.xml
index 9dfd901,254a843..ae8a55e
--- a/libraries/ldclient/ldclient-api/pom.xml
+++ b/libraries/ldclient/ldclient-api/pom.xml
@@@ -27,30 -27,19 +27,42 @@@
  
      <artifactId>ldclient-api</artifactId>
      <name>LDClient: API</name>
 +    <description>
 +        Interfaces and Data Model for the Linked Data Client component.
 +    </description>
 +    <packaging>bundle</packaging>
 +
 +    <build>
 +        <plugins>
 +            <plugin>
 +                <groupId>org.apache.felix</groupId>
 +                <artifactId>maven-bundle-plugin</artifactId>
 +                <extensions>true</extensions> 
 +                <configuration>
 +                    <instructions>
 +                        <Export-Package>
 +                            org.apache.marmotta.ldlient.api.*;version=${project.version},
 +                            org.apache.marmotta.ldcache.exception;version=${project.version},
 +                            org.apache.marmotta.ldcache.model;version=${project.version}
 +                        </Export-Package>
 +                    </instructions>
 +                </configuration>
 +            </plugin>
 +        </plugins>
 +    </build>
  
+     <build>
+         <plugins>
+             <plugin>
+                 <groupId>org.zeroturnaround</groupId>
+                 <artifactId>jrebel-maven-plugin</artifactId>
+                 <configuration>
+                     <relativePath>../../../</relativePath>
+                 </configuration>
+             </plugin>
+         </plugins>
+     </build>
+ 
      <dependencies>
          <dependency>
              <groupId>org.apache.marmotta</groupId>

http://git-wip-us.apache.org/repos/asf/marmotta/blob/d44196c3/parent/pom.xml
----------------------------------------------------------------------


[20/40] git commit: updated maven-download-plugin

Posted by ja...@apache.org.
updated maven-download-plugin


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/50e978ce
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/50e978ce
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/50e978ce

Branch: refs/heads/ldp
Commit: 50e978ce4d27ef5ea09776fb5dc79ca6e1cada86
Parents: 5fa42d2
Author: Sergio Fernández <wi...@apache.org>
Authored: Mon Feb 24 10:41:36 2014 +0100
Committer: Sergio Fernández <wi...@apache.org>
Committed: Mon Feb 24 10:41:36 2014 +0100

----------------------------------------------------------------------
 launchers/marmotta-installer/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/50e978ce/launchers/marmotta-installer/pom.xml
----------------------------------------------------------------------
diff --git a/launchers/marmotta-installer/pom.xml b/launchers/marmotta-installer/pom.xml
index e723e63..521d3c6 100644
--- a/launchers/marmotta-installer/pom.xml
+++ b/launchers/marmotta-installer/pom.xml
@@ -238,7 +238,7 @@
                     <plugin>
                         <groupId>com.googlecode.maven-download-plugin</groupId>
                         <artifactId>maven-download-plugin</artifactId>
-                        <version>1.0.0</version>
+                        <version>1.1.0</version>
                         <executions>
                             <execution>
                                 <id>download-tomcat</id>


[16/40] git commit: Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/marmotta into develop

Posted by ja...@apache.org.
Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/marmotta into develop

# By Sergio Fernández
# Via Sergio Fernández
* 'develop' of https://git-wip-us.apache.org/repos/asf/marmotta:
  MARMOTTA-431: refined some details of the .deb package


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/da95d01c
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/da95d01c
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/da95d01c

Branch: refs/heads/ldp
Commit: da95d01c6afa1f9d9538188e748bab1d12fafd8b
Parents: 2ddae23 f7d7371
Author: Rupert Westenthaler <ru...@gmail.com>
Authored: Wed Feb 19 09:05:21 2014 +0100
Committer: Rupert Westenthaler <ru...@gmail.com>
Committed: Wed Feb 19 09:05:21 2014 +0100

----------------------------------------------------------------------
 launchers/marmotta-webapp/pom.xml                  | 14 ++++++++++++++
 launchers/marmotta-webapp/src/deb/control/control  |  8 ++++++--
 launchers/marmotta-webapp/src/deb/control/postinst |  2 +-
 launchers/marmotta-webapp/src/deb/control/postrm   |  4 +++-
 launchers/marmotta-webapp/src/deb/control/preinst  |  2 +-
 launchers/marmotta-webapp/src/deb/control/prerm    |  4 +++-
 launchers/marmotta-webapp/src/deb/pkg/README       |  1 +
 launchers/marmotta-webapp/src/deb/pkg/changelog    |  5 +++++
 launchers/marmotta-webapp/src/deb/pkg/copyright    |  8 ++++++++
 9 files changed, 42 insertions(+), 6 deletions(-)
----------------------------------------------------------------------



[28/40] git commit: MARMOTTA-428: added Bundle-Category to the maven-bundle-plugin configuration in the parent

Posted by ja...@apache.org.
MARMOTTA-428: added Bundle-Category to the maven-bundle-plugin configuration in the parent


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/3988ed29
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/3988ed29
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/3988ed29

Branch: refs/heads/ldp
Commit: 3988ed2945fa53fb9a8dc69b73f59cb7bd97b4b4
Parents: f92ecc1
Author: Rupert Westenthaler <ru...@gmail.com>
Authored: Wed Feb 26 12:02:58 2014 +0100
Committer: Rupert Westenthaler <ru...@gmail.com>
Committed: Wed Feb 26 12:02:58 2014 +0100

----------------------------------------------------------------------
 parent/pom.xml | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/3988ed29/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index 61ebf5e..3c1e23b 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -550,6 +550,7 @@
                   <inherited>true</inherited>
                   <configuration>
                     <instructions>
+                      <Bundle-Category>Apache Marmotta</Bundle-Category>
                       <Bundle-DocURL>http://marmotta.apache.org</Bundle-DocURL>
                       <Bundle-Vendor>Apache Marmotta</Bundle-Vendor>
                       <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>


[36/40] git commit: MARMOTTA-442: Enhanced the Service loading of the DefautlConfiguration to fail-over services that do throw a ServiceConfigurationError.

Posted by ja...@apache.org.
MARMOTTA-442: Enhanced the Service loading of the DefautlConfiguration to fail-over services that do throw a ServiceConfigurationError.


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/630b4ae2
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/630b4ae2
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/630b4ae2

Branch: refs/heads/ldp
Commit: 630b4ae21e7fed1056d1ff2b9a0830fe56fa4ab7
Parents: b243490
Author: Rupert Westenthaler <ru...@gmail.com>
Authored: Fri Feb 28 09:56:55 2014 +0100
Committer: Rupert Westenthaler <ru...@gmail.com>
Committed: Fri Feb 28 09:56:55 2014 +0100

----------------------------------------------------------------------
 .../ldpath/parser/DefaultConfiguration.java     | 31 +++++++++++++++-----
 1 file changed, 24 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/630b4ae2/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/parser/DefaultConfiguration.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/parser/DefaultConfiguration.java b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/parser/DefaultConfiguration.java
index 2238c5e..74471cf 100644
--- a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/parser/DefaultConfiguration.java
+++ b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/parser/DefaultConfiguration.java
@@ -32,7 +32,9 @@ import org.slf4j.LoggerFactory;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.Iterator;
 import java.util.Map;
+import java.util.ServiceConfigurationError;
 import java.util.ServiceLoader;
 import java.util.Set;
 
@@ -113,9 +115,16 @@ public class DefaultConfiguration<Node> extends Configuration<Node> {
     }
 
     private void addDefaultFunctions() {
-        for (SelectorFunction<Node> f : functionLoader) {
-            log.info("registering LDPath function: {}",f.getSignature());
-            addFunction(f);
+        Iterator<SelectorFunction> functions = functionLoader.iterator();
+        while (functions.hasNext()) {
+            try {
+                SelectorFunction<Node> f = functions.next();
+                log.info("registering LDPath function: {}", f.getSignature());
+                addFunction(f);
+            } catch (ServiceConfigurationError e) {
+                log.warn("Unable to load function because of an "
+                        + e.getClass().getSimpleName(), e);
+            }
         }
     }
 
@@ -124,10 +133,18 @@ public class DefaultConfiguration<Node> extends Configuration<Node> {
     }
 
     private void addDefaultTestFunctions() {
-        for (TestFunction<Node> t : testLoader) {
-            log.info("registering LDPath test function: {}", t.getSignature());
-            addTestFunction(t);
-        }
+    	Iterator<TestFunction> testFunctions = testLoader.iterator();
+    	while(testFunctions.hasNext()){
+            try {
+        		TestFunction testFunction = testFunctions.next();
+                log.info("registering LDPath test function: {}", 
+                        testFunction.getSignature());
+                addTestFunction(testFunction);
+            } catch (ServiceConfigurationError e) {
+                log.warn("Unable to load function because of an "
+                        + e.getClass().getSimpleName(), e);
+            }
+    	}
     }
 
     private void addTestFunction(TestFunction<Node> test) {


[37/40] git commit: MARMOTTA-431: fixed some details at the control file

Posted by ja...@apache.org.
MARMOTTA-431: fixed some details at the control file


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/0a69f01c
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/0a69f01c
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/0a69f01c

Branch: refs/heads/ldp
Commit: 0a69f01ce91592503455e59af3b048fec6a1dfd0
Parents: 630b4ae
Author: Sergio Fernández <wi...@apache.org>
Authored: Fri Feb 28 11:27:17 2014 +0100
Committer: Sergio Fernández <wi...@apache.org>
Committed: Fri Feb 28 11:27:17 2014 +0100

----------------------------------------------------------------------
 launchers/marmotta-webapp/src/deb/control/control | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/0a69f01c/launchers/marmotta-webapp/src/deb/control/control
----------------------------------------------------------------------
diff --git a/launchers/marmotta-webapp/src/deb/control/control b/launchers/marmotta-webapp/src/deb/control/control
index dc9a500..24ca7ea 100644
--- a/launchers/marmotta-webapp/src/deb/control/control
+++ b/launchers/marmotta-webapp/src/deb/control/control
@@ -1,13 +1,14 @@
-Package: marmotta-webapp
+Package: marmotta
 Version: [[version]]
 Section: java
 Priority: extra
 Architecture: all
 Distribution: ldstack-nightly
 Maintainer: Sergio Fernández <wi...@apache.org>
-Depends: tomcat7 (>=7.0.30-1)
 Replaces: marmotta-webapp
-Description: Apache Marmotta is an Open Platform for Linked Data
+Pre-Depends: tomcat7 (>=7.0.30-1)
+Suggests: postgresql (>=9.1)
+Description: Apache Marmotta is an Open Platform for Linked Data.
  The goal of Apache Marmotta is to provide an open implementation of a Linked 
  Data Platform that can be used, extended and deployed easily by organizations 
  who want to publish Linked Data or build custom applications on Linked Data.


[09/40] git commit: Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/marmotta into develop

Posted by ja...@apache.org.
Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/marmotta into develop

# By Jakob Frank (3) and others
# Via Sergio Fernández
* 'develop' of https://git-wip-us.apache.org/repos/asf/marmotta:
  removed andy from the root pom
  MARMOTTA-437: replaced RDFFormat.forFileName / forMIMEType with their Rio-successors.
  MARMOTTA-189: Added js-parsable timestamps for versions in the template.
  Improved error log on ambiguous marmotta backends in the classpath
  support loading a directory of archives
  added 7z support to loader
  some more code improvements


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/0fa97540
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/0fa97540
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/0fa97540

Branch: refs/heads/ldp
Commit: 0fa9754007f7bc86bec55e31d2d21a477f2b98b0
Parents: 26ed0bf 99254fe
Author: Rupert Westenthaler <ru...@gmail.com>
Authored: Wed Feb 12 15:24:55 2014 +0100
Committer: Rupert Westenthaler <ru...@gmail.com>
Committed: Wed Feb 12 15:24:55 2014 +0100

----------------------------------------------------------------------
 .../commons/sesame/rio/ical/ICalFormat.java     |   7 +-
 .../commons/sesame/rio/rss/AtomFormat.java      |   4 -
 .../commons/sesame/rio/rss/RSSFormat.java       |   4 -
 .../commons/sesame/rio/vcard/VCardFormat.java   |   3 -
 .../persistence/KiWiReasoningConnection.java    |  11 +-
 .../persistence/KiWiSparqlConnection.java       |  11 +-
 .../kiwi/caching/TripleExternalizer.java        |  24 +--
 .../kiwi/persistence/KiWiConnection.java        |  23 +--
 .../KiWiRepositoryConnectionTest.java           |   7 +
 .../ldpath/backend/file/FileBackend.java        |  13 +-
 .../marmotta/loader/core/MarmottaLoader.java    | 161 ++++++++++++++-----
 .../marmotta/loader/rio/GeonamesFormat.java     |   4 -
 .../marmotta/loader/core/test/ArchiveTest.java  |   3 +-
 .../loader/core/test/GeonamesParserTest.java    |   2 +-
 .../loader/core/test/LoaderTestBase.java        |   2 +-
 .../src/test/resources/demo-data.7z             | Bin 0 -> 1423 bytes
 .../platform/core/rio/RDFHtmlFormat.java        |   3 -
 .../services/triplestore/SesameServiceImpl.java |   5 +
 .../core/webservices/io/ExportWebService.java   |  37 ++---
 .../versioning/io/HtmlVersionSerializer.java    |  14 +-
 pom.xml                                         |   6 -
 21 files changed, 214 insertions(+), 130 deletions(-)
----------------------------------------------------------------------



[35/40] git commit: Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/marmotta into develop

Posted by ja...@apache.org.
Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/marmotta into develop

# By Jakob Frank (1) and Sergio Fernández (1)
# Via Sergio Fernández
* 'develop' of https://git-wip-us.apache.org/repos/asf/marmotta:
  MARMOTTA-431: aligned files names with timestamped versions
  MARMOTTA-446: Added "includeInferred" flag to the SesameBackend constructors/factories. MARMOTTA-445: Fixed


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/b243490b
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/b243490b
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/b243490b

Branch: refs/heads/ldp
Commit: b243490b2f60b29d6013d8a126a63482766d6700
Parents: 60b6f81 2574bbe
Author: Rupert Westenthaler <ru...@gmail.com>
Authored: Thu Feb 27 19:59:45 2014 +0100
Committer: Rupert Westenthaler <ru...@gmail.com>
Committed: Thu Feb 27 19:59:45 2014 +0100

----------------------------------------------------------------------
 launchers/marmotta-webapp/pom.xml               |   2 +-
 .../backend/sesame/AbstractSesameBackend.java   | 144 +++----
 .../ContextAwareSesameConnectionBackend.java    |  23 +-
 .../backend/sesame/SesameConnectionBackend.java |  88 ++--
 .../backend/sesame/SesameRepositoryBackend.java |  32 +-
 .../backend/sesame/SesameValueBackend.java      | 420 +++++++++----------
 6 files changed, 377 insertions(+), 332 deletions(-)
----------------------------------------------------------------------



[02/40] git commit: Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/marmotta into develop

Posted by ja...@apache.org.
Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/marmotta into develop

# By Sebastian Schaffert (5) and others
# Via Sebastian Schaffert (3) and Sergio Fernández (1)
* 'develop' of https://git-wip-us.apache.org/repos/asf/marmotta:
  - allow configuration of cache cluster port and address even in platform - some library updates
  allow setting different multicast ports and addresses for clustered caches in the KiWi triplestore
  updated loader-poms to avoid dependency-reduced-pom creation
  fixed a few (minor) eclipse warnings
  MARMOTTA-431: added debian packaging for the webapp launcher
  updated to Sesame 2.7.10
  cosmetics
  Fixed a minor warning
  work around a bug in CompressorStreamFactory (COMPRESS-259)
  cleanup kiwi-loader as it is replaced by marmotta-loader
  added Marmotta Loader implementation as better replacement for KiWiLoader


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/95122430
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/95122430
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/95122430

Branch: refs/heads/ldp
Commit: 9512243047e780be556cc2add7514d8520b1e2f0
Parents: a110dcd 5f99c9e
Author: Rupert Westenthaler <ru...@gmail.com>
Authored: Mon Feb 3 13:36:40 2014 +0100
Committer: Rupert Westenthaler <ru...@gmail.com>
Committed: Mon Feb 3 13:36:40 2014 +0100

----------------------------------------------------------------------
 .../marmotta-rio-rss/pom.xml                    |   1 -
 launchers/marmotta-webapp/pom.xml               |  57 +-
 .../marmotta-webapp/src/deb/control/control     |   8 +
 .../marmotta-webapp/src/deb/control/postinst    |   8 +
 .../marmotta-webapp/src/deb/control/postrm      |  18 +
 .../marmotta-webapp/src/deb/control/preinst     |   5 +
 launchers/marmotta-webapp/src/deb/control/prerm |   4 +
 .../marmotta-webapp/src/deb/home/marmotta.txt   |   2 +
 .../marmotta-webapp/src/deb/tomcat/marmotta.xml |  10 +
 libraries/kiwi/kiwi-loader/pom.xml              | 112 +---
 .../apache/marmotta/kiwi/loader/KiWiLoader.java | 593 -------------------
 .../kiwi/loader/KiWiLoaderConfiguration.java    |  22 -
 .../kiwi/loader/generic/KiWiBatchHandler.java   |   1 -
 .../kiwi/loader/generic/KiWiHandler.java        |  34 +-
 .../kiwi/loader/generic/Statistics.java         | 223 -------
 .../kiwi/loader/util/UnitFormatter.java         |  44 --
 .../marmotta/kiwi/loader/KiWiLoaderTest.java    | 246 --------
 .../marmotta/kiwi/caching/KiWiCacheManager.java |  74 ++-
 .../marmotta/kiwi/config/KiWiConfiguration.java |  65 +-
 .../marmotta/kiwi/persistence/KiWiDialect.java  |   2 +-
 .../src/main/resources/jgroups-kiwi.xml         |   4 +-
 .../apache/marmotta/kiwi/test/ClusterTest.java  | 158 +++++
 loader/marmotta-loader-berkeley/pom.xml         |  85 +++
 .../berkeley/BerkeleyDBLoaderBackend.java       |  80 +++
 ...org.apache.marmotta.loader.api.LoaderBackend |   1 +
 .../src/main/resources/logback.xml              |  27 +
 loader/marmotta-loader-core/pom.xml             | 160 +++++
 .../marmotta/loader/api/LoaderBackend.java      |  42 ++
 .../marmotta/loader/api/LoaderHandler.java      |  28 +
 .../marmotta/loader/api/LoaderOptions.java      |  64 ++
 .../marmotta/loader/context/ContextHandler.java |  37 ++
 .../marmotta/loader/core/MarmottaLoader.java    | 542 +++++++++++++++++
 .../functions/BackendIdentifierFunction.java    |  16 +
 .../loader/sesame/SesameLoaderHandler.java      |  39 ++
 .../marmotta/loader/statistics/Statistics.java  | 215 +++++++
 .../loader/statistics/StatisticsHandler.java    |  69 +++
 .../marmotta/loader/util/DirectoryFilter.java   |  25 +
 .../marmotta/loader/util/UnitFormatter.java     |  44 ++
 .../loader/wrapper/LoaderHandlerWrapper.java    | 123 ++++
 .../marmotta/loader/core/test/CLITest.java      | 151 +++++
 .../marmotta/loader/core/test/LoadTest.java     | 150 +++++
 .../core/test/dummy/DummyLoaderBackend.java     |  51 ++
 .../core/test/dummy/DummyLoaderHandler.java     |  51 ++
 ...org.apache.marmotta.loader.api.LoaderBackend |   1 +
 .../src/test/resources/demo-data.rdf            |  78 +++
 .../src/test/resources/demo-data.rdf.bz2        | Bin 0 -> 1469 bytes
 .../src/test/resources/demo-data.rdf.gz         | Bin 0 -> 1314 bytes
 loader/marmotta-loader-hbase/pom.xml            | 116 ++++
 .../src/main/assembly/launcher.xml              |  20 +
 .../loader/hbase/HBaseLoaderBackend.java        | 105 ++++
 ...org.apache.marmotta.loader.api.LoaderBackend |   1 +
 .../src/main/resources/logback.xml              |  32 +
 loader/marmotta-loader-kiwi/pom.xml             | 140 +++++
 .../marmotta/loader/kiwi/KiWiLoaderBackend.java |  89 +++
 .../marmotta/loader/kiwi/KiWiLoaderHandler.java | 190 ++++++
 ...org.apache.marmotta.loader.api.LoaderBackend |   1 +
 loader/marmotta-loader-titan/pom.xml            |  79 +++
 .../loader/titan/TitanLoaderHandler.java        | 111 ++++
 .../marmotta/loader/titan/TitanRDFHandler.java  | 274 +++++++++
 loader/pom.xml                                  |  85 +++
 parent/pom.xml                                  |  65 +-
 .../backend/kiwi/KiWiStoreProvider.java         |   5 +
 .../core/services/cache/CachingServiceImpl.java |  52 +-
 .../src/main/resources/jgroups-marmotta.xml     |   4 +-
 pom.xml                                         |   5 +-
 65 files changed, 3817 insertions(+), 1327 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/95122430/parent/pom.xml
----------------------------------------------------------------------


[27/40] git commit: MARMOTTA-442: updated LDPath bundles

Posted by ja...@apache.org.
MARMOTTA-442: updated LDPath bundles

* ldpath-api is bundle
* ldpath-core-bundle contains ldpath-core and aloo ldpath-functions-* modules. This is necessary because ServiceLoader is sued to find available functions for the DefaultConfiguration
* ldpath-functions-* are no longer bundles but embedded in the ldpath-core-bundle
* ldpath-nackend-* are OSGI Bundles. Users can include those backends they need
* ldpath-template is also an OSGI Bundle


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/f92ecc1b
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/f92ecc1b
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/f92ecc1b

Branch: refs/heads/ldp
Commit: f92ecc1b906e9f50e8da06a675da53031c0bb2b5
Parents: db61001
Author: Rupert Westenthaler <ru...@gmail.com>
Authored: Wed Feb 26 12:01:59 2014 +0100
Committer: Rupert Westenthaler <ru...@gmail.com>
Committed: Wed Feb 26 12:01:59 2014 +0100

----------------------------------------------------------------------
 libraries/ldclient/ldclient-api/pom.xml         |  5 --
 libraries/ldpath/ldpath-api/pom.xml             | 20 +-------
 libraries/ldpath/ldpath-backend-file/pom.xml    | 24 ++++++++-
 libraries/ldpath/ldpath-backend-jena/pom.xml    | 25 ++++++++-
 .../ldpath/ldpath-backend-linkeddata/pom.xml    | 22 +++++++-
 libraries/ldpath/ldpath-backend-sesame/pom.xml  | 24 ++++++++-
 libraries/ldpath/ldpath-core/pom.xml            | 42 ---------------
 .../ldpath/ldpath-functions-collections/pom.xml | 40 +--------------
 libraries/ldpath/ldpath-functions-date/pom.xml  | 40 +--------------
 libraries/ldpath/ldpath-functions-html/pom.xml  | 45 +---------------
 libraries/ldpath/ldpath-functions-math/pom.xml  | 40 +--------------
 libraries/ldpath/ldpath-functions-text/pom.xml  | 40 +--------------
 libraries/ldpath/ldpath-functions-xml/pom.xml   | 45 +---------------
 libraries/ldpath/ldpath-template/pom.xml        | 54 +++-----------------
 libraries/ldpath/pom.xml                        |  1 +
 15 files changed, 112 insertions(+), 355 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/f92ecc1b/libraries/ldclient/ldclient-api/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/ldclient/ldclient-api/pom.xml b/libraries/ldclient/ldclient-api/pom.xml
index ae8a55e..c309e3e 100644
--- a/libraries/ldclient/ldclient-api/pom.xml
+++ b/libraries/ldclient/ldclient-api/pom.xml
@@ -48,11 +48,6 @@
                     </instructions>
                 </configuration>
             </plugin>
-        </plugins>
-    </build>
-
-    <build>
-        <plugins>
             <plugin>
                 <groupId>org.zeroturnaround</groupId>
                 <artifactId>jrebel-maven-plugin</artifactId>

http://git-wip-us.apache.org/repos/asf/marmotta/blob/f92ecc1b/libraries/ldpath/ldpath-api/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-api/pom.xml b/libraries/ldpath/ldpath-api/pom.xml
index 4aa36fb..4a6c1f8 100644
--- a/libraries/ldpath/ldpath-api/pom.xml
+++ b/libraries/ldpath/ldpath-api/pom.xml
@@ -62,30 +62,14 @@
                 <extensions>true</extensions>
                 <configuration>
                     <instructions>
+                        <Bundle-Category>Apache Marmotta LDPath</Bundle-Category>
                         <Bundle-Vendor>Apache Software Foundation</Bundle-Vendor>
-						<Export-Package>
+                        <Export-Package>
                             org.apache.marmotta.ldpath.api.*;version=${project.version}
                         </Export-Package>
                      </instructions>
                 </configuration>
             </plugin>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-scr-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>generate-scr-scrdescriptor</id>
-                        <goals>
-                            <goal>scr</goal>
-                        </goals>
-                        <configuration>
-                            <properties>
-                                <service.vendor>Apache Software Foundation</service.vendor>
-                            </properties>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
         </plugins>
     </build>
 

http://git-wip-us.apache.org/repos/asf/marmotta/blob/f92ecc1b/libraries/ldpath/ldpath-backend-file/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-backend-file/pom.xml b/libraries/ldpath/ldpath-backend-file/pom.xml
index 1dcbd30..14612f2 100644
--- a/libraries/ldpath/ldpath-backend-file/pom.xml
+++ b/libraries/ldpath/ldpath-backend-file/pom.xml
@@ -27,7 +27,7 @@
 
     <name>LDPath Backend: File</name>
     <artifactId>ldpath-backend-file</artifactId>
-    <packaging>jar</packaging>
+    <packaging>bundle</packaging>
 
     <build>
         <pluginManagement>
@@ -51,6 +51,28 @@
                 </plugin>
             </plugins>
         </pluginManagement>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>maven-bundle-plugin</artifactId>
+            <extensions>true</extensions>
+            <configuration>
+              <instructions>
+                <Bundle-Category>Apache Marmotta LDPath</Bundle-Category>
+                <Bundle-DocURL>http://wiki.apache.org/marmotta/LDPath</Bundle-DocURL>
+                <_versionpolicy>$${version;===;${@}}</_versionpolicy>
+                <Import-Package>
+                  org.slf4j.*;version="[1.6,2)",
+                  ch.qos.logback.classic;resolution:=optional,
+                  *
+                </Import-Package>
+                <Export-Package>
+                  org.apache.marmotta.ldpath.backend.file;version=${project.version}
+                </Export-Package>
+              </instructions>
+            </configuration>
+          </plugin>
+        </plugins>
     </build>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/marmotta/blob/f92ecc1b/libraries/ldpath/ldpath-backend-jena/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-backend-jena/pom.xml b/libraries/ldpath/ldpath-backend-jena/pom.xml
index ecce8d2..a51355f 100644
--- a/libraries/ldpath/ldpath-backend-jena/pom.xml
+++ b/libraries/ldpath/ldpath-backend-jena/pom.xml
@@ -27,7 +27,7 @@
 
     <name>LDPath Backend: Jena</name>
     <artifactId>ldpath-backend-jena</artifactId>
-    <packaging>jar</packaging>
+    <packaging>bundle</packaging>
 
     <build>
         <pluginManagement>
@@ -51,6 +51,29 @@
                 </plugin>
             </plugins>
         </pluginManagement>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>maven-bundle-plugin</artifactId>
+            <extensions>true</extensions>
+            <configuration>
+              <instructions>
+                <Bundle-Category>Apache Marmotta LDPath</Bundle-Category>
+                <Bundle-DocURL>http://wiki.apache.org/marmotta/LDPath</Bundle-DocURL>
+                <_versionpolicy>$${version;===;${@}}</_versionpolicy>
+                <Import-Package>
+                  org.slf4j.*;version="[1.6,2)",
+                  ch.qos.logback.classic;resolution:=optional,
+                  *
+                </Import-Package>
+                <Export-Package>
+                  org.apache.marmotta.ldpath.backend.jena;version=${project.version}
+                </Export-Package>
+              </instructions>
+            </configuration>
+          </plugin>
+        </plugins>
+
     </build>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/marmotta/blob/f92ecc1b/libraries/ldpath/ldpath-backend-linkeddata/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-backend-linkeddata/pom.xml b/libraries/ldpath/ldpath-backend-linkeddata/pom.xml
index 89f317a..c7a167a 100644
--- a/libraries/ldpath/ldpath-backend-linkeddata/pom.xml
+++ b/libraries/ldpath/ldpath-backend-linkeddata/pom.xml
@@ -27,7 +27,7 @@
 
     <name>LDPath Backend: Linked Data</name>
     <artifactId>ldpath-backend-linkeddata</artifactId>
-    <packaging>jar</packaging>
+    <packaging>bundle</packaging>
 
     <build>
         <pluginManagement>
@@ -64,6 +64,26 @@
                     </licenseMapping>
                 </configuration>
             </plugin>
+          <plugin>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>maven-bundle-plugin</artifactId>
+            <extensions>true</extensions>
+            <configuration>
+              <instructions>
+                <Bundle-Category>Apache Marmotta LDPath</Bundle-Category>
+                <Bundle-DocURL>http://wiki.apache.org/marmotta/LDPath</Bundle-DocURL>
+                <_versionpolicy>$${version;===;${@}}</_versionpolicy>
+                <Import-Package>
+                  org.slf4j.*;version="[1.6,2)",
+                  ch.qos.logback.classic;resolution:=optional,
+                  *
+                </Import-Package>
+                <Export-Package>
+                  org.apache.marmotta.ldpath.backend.linkeddata;version=${project.version}
+                </Export-Package>
+              </instructions>
+            </configuration>
+          </plugin>
         </plugins>
     </build>
 

http://git-wip-us.apache.org/repos/asf/marmotta/blob/f92ecc1b/libraries/ldpath/ldpath-backend-sesame/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-backend-sesame/pom.xml b/libraries/ldpath/ldpath-backend-sesame/pom.xml
index 412495e..2047d44 100644
--- a/libraries/ldpath/ldpath-backend-sesame/pom.xml
+++ b/libraries/ldpath/ldpath-backend-sesame/pom.xml
@@ -27,7 +27,7 @@
 
     <name>LDPath Backend: Sesame</name>
     <artifactId>ldpath-backend-sesame</artifactId>
-    <packaging>jar</packaging>
+    <packaging>bundle</packaging>
 
     <build>
         <pluginManagement>
@@ -51,6 +51,28 @@
                 </plugin>
             </plugins>
         </pluginManagement>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>maven-bundle-plugin</artifactId>
+            <extensions>true</extensions>
+            <configuration>
+              <instructions>
+                <Bundle-Category>Apache Marmotta LDPath</Bundle-Category>
+                <Bundle-DocURL>http://wiki.apache.org/marmotta/LDPath</Bundle-DocURL>
+                <_versionpolicy>$${version;===;${@}}</_versionpolicy>
+                <Import-Package>
+                  org.slf4j.*;version="[1.6,2)",
+                  ch.qos.logback.classic;resolution:=optional,
+                  *
+                </Import-Package>
+                <Export-Package>
+                  org.apache.marmotta.ldpath.backend.sesame;version=${project.version}
+                </Export-Package>
+              </instructions>
+            </configuration>
+          </plugin>
+        </plugins>
     </build>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/marmotta/blob/f92ecc1b/libraries/ldpath/ldpath-core/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/pom.xml b/libraries/ldpath/ldpath-core/pom.xml
index 9df072a..387ff8b 100644
--- a/libraries/ldpath/ldpath-core/pom.xml
+++ b/libraries/ldpath/ldpath-core/pom.xml
@@ -27,7 +27,6 @@
 
     <name>LDPath Core</name>
     <artifactId>ldpath-core</artifactId>
-    <packaging>bundle</packaging>
 
     <dependencies>
 
@@ -180,47 +179,6 @@
                     </execution>
                 </executions>
             </plugin>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <extensions>true</extensions>
-                <configuration>
-                    <instructions>
-                        <Bundle-Name>LDPath Core</Bundle-Name>
-                        <Bundle-DocURL>http://wiki.apache.org/marmotta/LDPath</Bundle-DocURL>
-                        <Bundle-Vendor>Apache Software Foundation</Bundle-Vendor>
-                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
-                        <_versionpolicy>$${version;===;${@}}</_versionpolicy>
-                        <!-- Enable this for including your enhancement chain configuration -->
-                        <!-- <Install-Path>config</Install-Path> -->
-                        <Export-Package>
-                            org.apache.marmotta.ldpath;version=${project.version},
-                            org.apache.marmotta.ldpath.exception;version=${project.version},
-                            org.apache.marmotta.ldpath.model.*;version=${project.version},
-                            org.apache.marmotta.ldpath.util;version=${project.version}
-                            org.apache.marmotta.ldpath.parser;version=${project.version}
-                        </Export-Package>
-                        <_include>src/main/resources/META-INF/MANIFEST.MF</_include>
-                    </instructions>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-scr-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>generate-scr-scrdescriptor</id>
-                        <goals>
-                            <goal>scr</goal>
-                        </goals>
-                        <configuration>
-                            <properties>
-                                <service.vendor>Apache Software Foundation</service.vendor>
-                            </properties>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
         </plugins>
     </build>
 

http://git-wip-us.apache.org/repos/asf/marmotta/blob/f92ecc1b/libraries/ldpath/ldpath-functions-collections/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-functions-collections/pom.xml b/libraries/ldpath/ldpath-functions-collections/pom.xml
index a2968c0..dd5a4fb 100644
--- a/libraries/ldpath/ldpath-functions-collections/pom.xml
+++ b/libraries/ldpath/ldpath-functions-collections/pom.xml
@@ -27,7 +27,7 @@
     <name>LDPath Functions: rdf-Collections</name>
 
     <artifactId>ldpath-functions-collections</artifactId>
-    <packaging>bundle</packaging>
+    <packaging>jar</packaging>
 
     <description>Collection-Functions for ldpath (rdf:Bag, rdf:Sequence, rdf:Collection)</description>
 
@@ -95,43 +95,7 @@
             </plugins>
         </pluginManagement>
         <plugins>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <extensions>true</extensions>
-                <configuration>
-                    <instructions>
-                        <Bundle-Name>LDPath Functions: Math</Bundle-Name>
-                        <Bundle-DocURL>http://wiki.apache.org/marmotta/LDPath</Bundle-DocURL>
-                        <Bundle-Vendor>Apache Software Foundation</Bundle-Vendor>
-                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
-                        <_versionpolicy>$${version;===;${@}}</_versionpolicy>
-                        <!-- Enable this for including your enhancement chain configuration -->
-                        <!-- <Install-Path>config</Install-Path> -->
-                        <Export-Package>
-                            org.apache.marmotta.ldpath.model.*;version=${project.version},
-                        </Export-Package>
-                        <_include>src/main/resources/META-INF/MANIFEST.MF</_include>
-                    </instructions>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-scr-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>generate-scr-scrdescriptor</id>
-                        <goals>
-                            <goal>scr</goal>
-                        </goals>
-                        <configuration>
-                            <properties>
-                                <service.vendor>Apache Software Foundation</service.vendor>
-                            </properties>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
+
         </plugins>
 
     </build>

http://git-wip-us.apache.org/repos/asf/marmotta/blob/f92ecc1b/libraries/ldpath/ldpath-functions-date/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-functions-date/pom.xml b/libraries/ldpath/ldpath-functions-date/pom.xml
index 28f6885..506aa97 100644
--- a/libraries/ldpath/ldpath-functions-date/pom.xml
+++ b/libraries/ldpath/ldpath-functions-date/pom.xml
@@ -26,7 +26,7 @@
 
     <name>LDPath Functions: Date</name>
     <artifactId>ldpath-functions-date</artifactId>
-    <packaging>bundle</packaging>
+    <packaging>jar</packaging>
     <description>date manipulation and arithmetics in ldpath</description>
     <dependencies>
         <dependency>
@@ -91,43 +91,7 @@
             </plugins>
         </pluginManagement>
         <plugins>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <extensions>true</extensions>
-                <configuration>
-                    <instructions>
-                        <Bundle-Name>LDPath Functions: Date</Bundle-Name>
-                        <Bundle-DocURL>http://wiki.apache.org/marmotta/LDPath</Bundle-DocURL>
-                        <Bundle-Vendor>Apache Software Foundation</Bundle-Vendor>
-                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
-                        <_versionpolicy>$${version;===;${@}}</_versionpolicy>
-                        <!-- Enable this for including your enhancement chain configuration -->
-                        <!-- <Install-Path>config</Install-Path> -->
-                        <Export-Package>
-                            org.apache.marmotta.ldpath.model.*;version=${project.version},
-                        </Export-Package>
-                        <_include>src/main/resources/META-INF/MANIFEST.MF</_include>
-                    </instructions>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-scr-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>generate-scr-scrdescriptor</id>
-                        <goals>
-                            <goal>scr</goal>
-                        </goals>
-                        <configuration>
-                            <properties>
-                                <service.vendor>Apache Software Foundation</service.vendor>
-                            </properties>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
+
         </plugins>
 
     </build>

http://git-wip-us.apache.org/repos/asf/marmotta/blob/f92ecc1b/libraries/ldpath/ldpath-functions-html/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-functions-html/pom.xml b/libraries/ldpath/ldpath-functions-html/pom.xml
index 6e2e4ae..765ac38 100644
--- a/libraries/ldpath/ldpath-functions-html/pom.xml
+++ b/libraries/ldpath/ldpath-functions-html/pom.xml
@@ -26,7 +26,7 @@
 
     <name>LDPath Functions: HTML</name>
     <artifactId>ldpath-functions-html</artifactId>
-    <packaging>bundle</packaging>
+    <packaging>jar</packaging>
 
 
     <description>LDPath Functions for HTML content.</description>
@@ -109,48 +109,7 @@
             </plugins>
         </pluginManagement>
         <plugins>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <extensions>true</extensions>
-                <configuration>
-                    <instructions>
-                        <Bundle-Name>LDPath Functions: HTML</Bundle-Name>
-                        <Bundle-DocURL>http://wiki.apache.org/marmotta/LDPath</Bundle-DocURL>
-                        <Bundle-Vendor>Apache Software Foundation</Bundle-Vendor>
-                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
-                        <_versionpolicy>$${version;===;${@}}</_versionpolicy>
-                        <!-- Enable this for including your enhancement chain configuration -->
-                        <!-- <Install-Path>config</Install-Path> -->
-                        <Export-Package>
-                            org.apache.marmotta.ldpath.model.*;version=${project.version},
-                        </Export-Package>
-                        <Import-Package>
-                            !nu.xom.*,!org.dom4j.*,!org.dom4j.io.*,*
-                        </Import-Package>
-                        <Embed-Dependency>jsoup;scope=compile</Embed-Dependency>
-                        <Embed-Transitive>true</Embed-Transitive>
-                        <_include>src/main/resources/META-INF/MANIFEST.MF</_include>
-                    </instructions>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-scr-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>generate-scr-scrdescriptor</id>
-                        <goals>
-                            <goal>scr</goal>
-                        </goals>
-                        <configuration>
-                            <properties>
-                                <service.vendor>Apache Software Foundation</service.vendor>
-                            </properties>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
+
         </plugins>
 
     </build>

http://git-wip-us.apache.org/repos/asf/marmotta/blob/f92ecc1b/libraries/ldpath/ldpath-functions-math/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-functions-math/pom.xml b/libraries/ldpath/ldpath-functions-math/pom.xml
index 271bfe9..6d6aa67 100644
--- a/libraries/ldpath/ldpath-functions-math/pom.xml
+++ b/libraries/ldpath/ldpath-functions-math/pom.xml
@@ -26,7 +26,7 @@
 
     <name>LDPath Functions: Math</name>
     <artifactId>ldpath-functions-math</artifactId>
-    <packaging>bundle</packaging>
+    <packaging>jar</packaging>
 
     <description>Math-Functions for ldpath</description>
 
@@ -90,43 +90,7 @@
             </plugins>
         </pluginManagement>
         <plugins>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <extensions>true</extensions>
-                <configuration>
-                    <instructions>
-                        <Bundle-Name>LDPath Functions: Math</Bundle-Name>
-                        <Bundle-DocURL>http://wiki.apache.org/marmotta/LDPath</Bundle-DocURL>
-                        <Bundle-Vendor>Apache Software Foundation</Bundle-Vendor>
-                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
-                        <_versionpolicy>$${version;===;${@}}</_versionpolicy>
-                        <!-- Enable this for including your enhancement chain configuration -->
-                        <!-- <Install-Path>config</Install-Path> -->
-                        <Export-Package>
-                            org.apache.marmotta.ldpath.model.*;version=${project.version},
-                        </Export-Package>
-                        <_include>src/main/resources/META-INF/MANIFEST.MF</_include>
-                    </instructions>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-scr-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>generate-scr-scrdescriptor</id>
-                        <goals>
-                            <goal>scr</goal>
-                        </goals>
-                        <configuration>
-                            <properties>
-                                <service.vendor>Apache Software Foundation</service.vendor>
-                            </properties>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
+
         </plugins>
 
     </build>

http://git-wip-us.apache.org/repos/asf/marmotta/blob/f92ecc1b/libraries/ldpath/ldpath-functions-text/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-functions-text/pom.xml b/libraries/ldpath/ldpath-functions-text/pom.xml
index 35f85cb..ecb70de 100644
--- a/libraries/ldpath/ldpath-functions-text/pom.xml
+++ b/libraries/ldpath/ldpath-functions-text/pom.xml
@@ -27,7 +27,7 @@
     <name>LDPath Functions: Text</name>
 
     <artifactId>ldpath-functions-text</artifactId>
-    <packaging>bundle</packaging>
+    <packaging>jar</packaging>
 
     <description>Text-Functions for ldpath</description>
 
@@ -90,43 +90,7 @@
             </plugins>
         </pluginManagement>
         <plugins>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <extensions>true</extensions>
-                <configuration>
-                    <instructions>
-                        <Bundle-Name>LDPath Functions: Math</Bundle-Name>
-                        <Bundle-DocURL>http://wiki.apache.org/marmotta/LDPath</Bundle-DocURL>
-                        <Bundle-Vendor>Apache Software Foundation</Bundle-Vendor>
-                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
-                        <_versionpolicy>$${version;===;${@}}</_versionpolicy>
-                        <!-- Enable this for including your enhancement chain configuration -->
-                        <!-- <Install-Path>config</Install-Path> -->
-                        <Export-Package>
-                            org.apache.marmotta.ldpath.model.*;version=${project.version},
-                        </Export-Package>
-                        <_include>src/main/resources/META-INF/MANIFEST.MF</_include>
-                    </instructions>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-scr-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>generate-scr-scrdescriptor</id>
-                        <goals>
-                            <goal>scr</goal>
-                        </goals>
-                        <configuration>
-                            <properties>
-                                <service.vendor>Apache Software Foundation</service.vendor>
-                            </properties>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
+
         </plugins>
 
     </build>

http://git-wip-us.apache.org/repos/asf/marmotta/blob/f92ecc1b/libraries/ldpath/ldpath-functions-xml/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-functions-xml/pom.xml b/libraries/ldpath/ldpath-functions-xml/pom.xml
index f00c001..c61b3c9 100644
--- a/libraries/ldpath/ldpath-functions-xml/pom.xml
+++ b/libraries/ldpath/ldpath-functions-xml/pom.xml
@@ -26,7 +26,7 @@
 
     <name>LDPath Functions: XML</name>
     <artifactId>ldpath-functions-xml</artifactId>
-    <packaging>bundle</packaging>
+    <packaging>jar</packaging>
 
     <description>LDPath Functions for XML content.</description>
 
@@ -110,48 +110,7 @@
             </plugins>
         </pluginManagement>
         <plugins>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-bundle-plugin</artifactId>
-                <extensions>true</extensions>
-                <configuration>
-                    <instructions>
-                        <Bundle-Name>LDPath Functions: XML</Bundle-Name>
-                        <Bundle-DocURL>http://wiki.apache.org/marmotta/LDPath</Bundle-DocURL>
-                        <Bundle-Vendor>Apache Software Foundation</Bundle-Vendor>
-                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
-                        <_versionpolicy>$${version;===;${@}}</_versionpolicy>
-                        <!-- Enable this for including your enhancement chain configuration -->
-                        <!-- <Install-Path>config</Install-Path> -->
-                        <Export-Package>
-                            org.apache.marmotta.ldpath.model.*;version=${project.version},
-                        </Export-Package>
-                        <Import-Package>
-                            !nu.xom.*,!org.dom4j.*,!org.dom4j.io.*,*
-                        </Import-Package>
-                        <Embed-Dependency>jdom2|jaxen;scope=compile</Embed-Dependency>
-                        <Embed-Transitive>true</Embed-Transitive>
-                        <_include>src/main/resources/META-INF/MANIFEST.MF</_include>
-                    </instructions>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-scr-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>generate-scr-scrdescriptor</id>
-                        <goals>
-                            <goal>scr</goal>
-                        </goals>
-                        <configuration>
-                            <properties>
-                                <service.vendor>Apache Software Foundation</service.vendor>
-                            </properties>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
+
         </plugins>
 
     </build>

http://git-wip-us.apache.org/repos/asf/marmotta/blob/f92ecc1b/libraries/ldpath/ldpath-template/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-template/pom.xml b/libraries/ldpath/ldpath-template/pom.xml
index 66bca66..96c25fe 100644
--- a/libraries/ldpath/ldpath-template/pom.xml
+++ b/libraries/ldpath/ldpath-template/pom.xml
@@ -78,62 +78,20 @@
                 <extensions>true</extensions>
                 <configuration>
                     <instructions>
-                        <Bundle-Name>LDPath Templating</Bundle-Name>
+                        <Bundle-Category>Apache Marmotta LDPath</Bundle-Category>
                         <Bundle-DocURL>http://wiki.apache.org/marmotta/LDPath</Bundle-DocURL>
-                        <Bundle-Vendor>Apache Software Foundation</Bundle-Vendor>
-                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                         <_versionpolicy>$${version;===;${@}}</_versionpolicy>
-                        <!-- Enable this for including your enhancement chain configuration -->
-                        <!-- <Install-Path>config</Install-Path> -->
-                        <Export-Package>
-                            org.apache.marmotta.ldpath.template;version=${project.version},
-                            org.apache.marmotta.ldpath.template.engine;version=${project.version},
-                            org.apache.marmotta.ldpath.template.model;version=${project.version},
-                            org.apache.marmotta.ldpath.template.util;version=${project.version}
-                        </Export-Package>
-                        <!--
-                        <_exportcontents>freemarker.*;version="2.3.19"</_exportcontents>
-                        <Embed-Dependency>freemarker;scope=compile</Embed-Dependency>
+                        <!-- NOTE: freemarker API compatibility starts with 2.3.11 -->
                         <Import-Package>
-                            !com.sun.org.apache*, javax.el*;resolution:=optional;version="[1,2)",
-                            javax.servlet*;resolution:=optional;version="[2.5,3)",
-                            javax.servlet.jsp*;resolution:=optional;version="[2.1,3)",
-                            javax.swing*;resolution:=optional,
-                            org.apache.log;resolution:=optional;version="[1.0.1,1.0.1]",
-                            org.apache.log4j;resolution:=optional;version="[1.2,2)",
-                            org.apache.tools.ant*;resolution:=optional;version="[1.7,2)",
-                            org.apache.xml.utils;resolution:=optional;version="[2.7,3)",
-                            org.apache.xpath*;resolution:=optional;version="[2.7,3)",
-                            org.dom4j*;resolution:=optional;version="[1.6.1,2)",
-                            org.jaxen*;resolution:=optional;version="[1.1.1,2)",
-                            org.jdom*;resolution:=optional;version="[1,2)",
-                            org.mozilla.javascript;resolution:=optional,
-                            org.python*;resolution:=optional;version="[2.2.1,2.3)",
-                            org.zeroturnaround.javarebel;resolution:=optional,
-                            org.w3c.dom.traversal;resolution:=optional,
+                            freemarker.*;version="[2.3.11,3)",
                             *
                         </Import-Package>
-                        -->
+                        <Export-Package>
+                            org.apache.marmotta.ldpath.template.*;version=${project.version}
+                        </Export-Package>
                     </instructions>
                 </configuration>
             </plugin>
-            <plugin>
-                <groupId>org.apache.felix</groupId>
-                <artifactId>maven-scr-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>generate-scr-scrdescriptor</id>
-                        <goals>
-                            <goal>scr</goal>
-                        </goals>
-                        <configuration>
-                            <properties>
-                                <service.vendor>Apache Software Foundation</service.vendor>
-                            </properties>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
         </plugins>
     </build>
 

http://git-wip-us.apache.org/repos/asf/marmotta/blob/f92ecc1b/libraries/ldpath/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/ldpath/pom.xml b/libraries/ldpath/pom.xml
index 3676590..e84392c 100644
--- a/libraries/ldpath/pom.xml
+++ b/libraries/ldpath/pom.xml
@@ -76,6 +76,7 @@
     <modules>
         <module>ldpath-api</module>
         <module>ldpath-core</module>
+        <module>ldpath-core-bundle</module>
         <module>ldpath-backend-sesame</module>
         <module>ldpath-backend-file</module>
         <module>ldpath-backend-linkeddata</module>


[34/40] git commit: MARMOTTA-442: DefaultConfiguration now uses its Classloader for the ServiceLoader used to load functions and tests. This is required so that loading functions and tests works in OSGI

Posted by ja...@apache.org.
MARMOTTA-442: DefaultConfiguration now uses its Classloader for the ServiceLoader used to load functions and tests. This is required so that loading functions and tests works in OSGI


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/60b6f812
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/60b6f812
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/60b6f812

Branch: refs/heads/ldp
Commit: 60b6f8125e40d53a2a6401faf3c56f24be9248a7
Parents: 638dea3
Author: Rupert Westenthaler <ru...@gmail.com>
Authored: Thu Feb 27 19:59:38 2014 +0100
Committer: Rupert Westenthaler <ru...@gmail.com>
Committed: Thu Feb 27 19:59:38 2014 +0100

----------------------------------------------------------------------
 .../apache/marmotta/ldpath/parser/DefaultConfiguration.java    | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/60b6f812/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/parser/DefaultConfiguration.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/parser/DefaultConfiguration.java b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/parser/DefaultConfiguration.java
index faba2d5..2238c5e 100644
--- a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/parser/DefaultConfiguration.java
+++ b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/parser/DefaultConfiguration.java
@@ -46,10 +46,12 @@ public class DefaultConfiguration<Node> extends Configuration<Node> {
     private static Logger log = LoggerFactory.getLogger(DefaultConfiguration.class);
 
     @SuppressWarnings("rawtypes")
-    private static ServiceLoader<SelectorFunction> functionLoader = ServiceLoader.load(SelectorFunction.class);
+    private static ServiceLoader<SelectorFunction> functionLoader = ServiceLoader.load(SelectorFunction.class,
+    		DefaultConfiguration.class.getClassLoader());
 
     @SuppressWarnings("rawtypes")
-    private static ServiceLoader<TestFunction> testLoader = ServiceLoader.load(TestFunction.class);
+    private static ServiceLoader<TestFunction> testLoader = ServiceLoader.load(TestFunction.class,
+    		DefaultConfiguration.class.getClassLoader());
 
     public static final Map<String, String> DEFAULT_NAMESPACES;
     static {


[39/40] git commit: LMF is gone...

Posted by ja...@apache.org.
LMF is gone...


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/dd004d32
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/dd004d32
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/dd004d32

Branch: refs/heads/ldp
Commit: dd004d325462a61ebd89a36717da37338e1839ce
Parents: e2e23ef
Author: Jakob Frank <ja...@apache.org>
Authored: Mon Mar 3 14:44:48 2014 +0100
Committer: Jakob Frank <ja...@apache.org>
Committed: Mon Mar 3 14:44:48 2014 +0100

----------------------------------------------------------------------
 platform/backends/marmotta-backend-http/pom.xml           |  2 +-
 .../platform/core/servlet/MarmottaPreStartupListener.java | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/dd004d32/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
index 338e126..1087c20 100644
--- a/platform/backends/marmotta-backend-http/pom.xml
+++ b/platform/backends/marmotta-backend-http/pom.xml
@@ -97,7 +97,7 @@
                             <doclet>com.lunatech.doclets.jax.jaxrs.JAXRSDoclet</doclet>
 
                             <name>REST API</name>
-                            <description>REST API for LMF Webservices</description>
+                            <description>REST API for Marmotta Webservices</description>
 
                             <outputDirectory>${project.build.outputDirectory}/doc</outputDirectory>
                             <reportOutputDirectory>${project.build.outputDirectory}/web/doc</reportOutputDirectory>

http://git-wip-us.apache.org/repos/asf/marmotta/blob/dd004d32/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/servlet/MarmottaPreStartupListener.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/servlet/MarmottaPreStartupListener.java b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/servlet/MarmottaPreStartupListener.java
index 85a8662..ba7bc47 100644
--- a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/servlet/MarmottaPreStartupListener.java
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/servlet/MarmottaPreStartupListener.java
@@ -37,7 +37,7 @@ public class MarmottaPreStartupListener implements ServletContextListener {
 
     private static Logger log = LoggerFactory.getLogger(MarmottaPreStartupListener.class);
 
-    private MarmottaStartupService lmfStartupService;
+    private MarmottaStartupService startupService;
 
     /**
      * * Notification that the web application initialization
@@ -49,8 +49,8 @@ public class MarmottaPreStartupListener implements ServletContextListener {
     @Override
     public void contextInitialized(ServletContextEvent sce) {
 
-        if(lmfStartupService == null) {
-            lmfStartupService = CDIContext.getInstance(MarmottaStartupService.class);
+        if(startupService == null) {
+            startupService = CDIContext.getInstance(MarmottaStartupService.class);
         }
 
         // we check for the presence of the configuration.override init parameter; if it exists, we load this
@@ -65,7 +65,7 @@ public class MarmottaPreStartupListener implements ServletContextListener {
             }
         }
 
-        lmfStartupService.startupConfiguration(null,override,sce.getServletContext());
+        startupService.startupConfiguration(null, override, sce.getServletContext());
 
     }
 
@@ -77,7 +77,7 @@ public class MarmottaPreStartupListener implements ServletContextListener {
      */
     @Override
     public void contextDestroyed(ServletContextEvent sce) {
-        lmfStartupService.shutdown();
+        startupService.shutdown();
     }
 
 }


[08/40] git commit: Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/marmotta into develop

Posted by ja...@apache.org.
Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/marmotta into develop

# By Sebastian Schaffert
# Via Sebastian Schaffert
* 'develop' of https://git-wip-us.apache.org/repos/asf/marmotta:
  further code cleanups and optimizations


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/26ed0bf7
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/26ed0bf7
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/26ed0bf7

Branch: refs/heads/ldp
Commit: 26ed0bf747d144edd6bb200d8ad380a2c34ae25a
Parents: 756ed46 9ea6db0
Author: Rupert Westenthaler <ru...@gmail.com>
Authored: Wed Feb 5 14:00:30 2014 +0100
Committer: Rupert Westenthaler <ru...@gmail.com>
Committed: Wed Feb 5 14:00:30 2014 +0100

----------------------------------------------------------------------
 .../kiwi/persistence/KiWiConnection.java        | 91 +++++++++++++-------
 1 file changed, 59 insertions(+), 32 deletions(-)
----------------------------------------------------------------------



[33/40] git commit: MARMOTTA-431: aligned files names with timestamped versions

Posted by ja...@apache.org.
MARMOTTA-431: aligned files names with timestamped versions


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/2574bbef
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/2574bbef
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/2574bbef

Branch: refs/heads/ldp
Commit: 2574bbef41de6efe74f92d0cd3f04abbca6e6e81
Parents: 5c6e30d
Author: Sergio Fernández <wi...@apache.org>
Authored: Wed Feb 26 14:53:14 2014 +0100
Committer: Sergio Fernández <wi...@apache.org>
Committed: Wed Feb 26 14:53:14 2014 +0100

----------------------------------------------------------------------
 launchers/marmotta-webapp/pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/2574bbef/launchers/marmotta-webapp/pom.xml
----------------------------------------------------------------------
diff --git a/launchers/marmotta-webapp/pom.xml b/launchers/marmotta-webapp/pom.xml
index 03cb4fd..bf7bf27 100644
--- a/launchers/marmotta-webapp/pom.xml
+++ b/launchers/marmotta-webapp/pom.xml
@@ -131,7 +131,7 @@
                         </goals>
                         <configuration>
                             <source>
-                                project.properties.setProperty("version.clean", "${project.version}".replace('-SNAPSHOT', '-${maven.build.timestamp}'))
+                                project.properties.setProperty("version.clean", "${project.version}".replace('-SNAPSHOT', '~${maven.build.timestamp}'))
                             </source>
                         </configuration>
                     </execution>


[40/40] git commit: Merge the recent changes in 'develop' to 'ldp'

Posted by ja...@apache.org.
Merge the recent changes in 'develop' to 'ldp'


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/b8d367a9
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/b8d367a9
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/b8d367a9

Branch: refs/heads/ldp
Commit: b8d367a96c6dd2da584c5b296540bf547b5003fd
Parents: 673ddc3 dd004d3
Author: Jakob Frank <ja...@apache.org>
Authored: Wed Mar 12 16:47:46 2014 +0100
Committer: Jakob Frank <ja...@apache.org>
Committed: Wed Mar 12 16:47:46 2014 +0100

----------------------------------------------------------------------
 .gitignore                                      |    2 +
 launchers/marmotta-installer/pom.xml            |    2 +-
 launchers/marmotta-webapp/pom.xml               |   35 +-
 .../marmotta-webapp/src/deb/control/control     |   12 +-
 .../marmotta-webapp/src/deb/control/postinst    |    2 +-
 .../marmotta-webapp/src/deb/control/postrm      |    4 +-
 .../marmotta-webapp/src/deb/control/preinst     |    2 +-
 launchers/marmotta-webapp/src/deb/control/prerm |    4 +-
 launchers/marmotta-webapp/src/deb/pkg/README    |    1 +
 launchers/marmotta-webapp/src/deb/pkg/changelog |    5 +
 launchers/marmotta-webapp/src/deb/pkg/copyright |    8 +
 .../marmotta/kiwi/caching/KiWiCacheManager.java |   59 +-
 .../apache/marmotta/kiwi/config/CacheMode.java  |   45 +
 .../marmotta/kiwi/config/KiWiConfiguration.java |   46 +
 libraries/kiwi/pom.xml                          |   12 +-
 libraries/ldcache/ldcache-api/pom.xml           |   16 +
 libraries/ldcache/pom.xml                       |   10 +
 libraries/ldclient/ldclient-api/pom.xml         |   18 +
 libraries/ldclient/pom.xml                      |   10 +
 libraries/ldpath/ldpath-api/pom.xml             |   36 +-
 libraries/ldpath/ldpath-backend-file/pom.xml    |   24 +-
 libraries/ldpath/ldpath-backend-jena/pom.xml    |   25 +-
 .../ldpath/ldpath-backend-linkeddata/pom.xml    |   22 +-
 libraries/ldpath/ldpath-backend-sesame/pom.xml  |   24 +-
 .../backend/sesame/AbstractSesameBackend.java   |  144 +--
 .../ContextAwareSesameConnectionBackend.java    |   23 +-
 .../backend/sesame/SesameConnectionBackend.java |   88 +-
 .../backend/sesame/SesameRepositoryBackend.java |   32 +-
 .../backend/sesame/SesameValueBackend.java      |  420 +++----
 libraries/ldpath/ldpath-core-bundle/LICENSE     |  202 ++++
 libraries/ldpath/ldpath-core-bundle/pom.xml     |  124 ++
 libraries/ldpath/ldpath-core/pom.xml            |   42 -
 .../ldpath/parser/DefaultConfiguration.java     |   37 +-
 .../at/newmedialab/ldpath/parser/rdfpath.jj     | 1102 -----------------
 .../org/apache/marmotta/ldpath/parser/ldpath.jj | 1106 ++++++++++++++++++
 .../ldpath/ldpath-functions-collections/pom.xml |   40 +-
 libraries/ldpath/ldpath-functions-date/pom.xml  |   40 +-
 libraries/ldpath/ldpath-functions-html/pom.xml  |   45 +-
 libraries/ldpath/ldpath-functions-math/pom.xml  |   40 +-
 libraries/ldpath/ldpath-functions-text/pom.xml  |   40 +-
 libraries/ldpath/ldpath-functions-xml/pom.xml   |   45 +-
 libraries/ldpath/ldpath-template/pom.xml        |   54 +-
 libraries/ldpath/pom.xml                        |   12 +
 .../marmotta/loader/statistics/Statistics.java  |   74 +-
 .../loader/core/test/LoaderTestBase.java        |    7 +-
 .../core/test/dummy/DummyLoaderBackend.java     |    4 +-
 .../core/test/dummy/DummyLoaderHandler.java     |   17 +-
 parent/pom.xml                                  |   23 +-
 platform/backends/marmotta-backend-http/pom.xml |    2 +-
 .../core/services/cache/CachingServiceImpl.java |   65 +-
 .../servlet/MarmottaPreStartupListener.java     |   10 +-
 .../core/startup/MarmottaStartupService.java    |  116 +-
 .../main/resources/config-defaults.properties   |    3 +
 .../resources/config-descriptions.properties    |   17 +-
 platform/marmotta-zookeeper/pom.xml             |    2 +-
 55 files changed, 2437 insertions(+), 1963 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/b8d367a9/launchers/marmotta-webapp/pom.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/marmotta/blob/b8d367a9/parent/pom.xml
----------------------------------------------------------------------


[29/40] git commit: MARMOTTA-442: added the new ldpath-core-bundle module

Posted by ja...@apache.org.
MARMOTTA-442: added the new ldpath-core-bundle module


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/888a5927
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/888a5927
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/888a5927

Branch: refs/heads/ldp
Commit: 888a59277c70d5e79697429d473575d331cc1ce3
Parents: 3988ed2
Author: Rupert Westenthaler <ru...@gmail.com>
Authored: Wed Feb 26 12:05:01 2014 +0100
Committer: Rupert Westenthaler <ru...@gmail.com>
Committed: Wed Feb 26 12:05:01 2014 +0100

----------------------------------------------------------------------
 libraries/ldpath/ldpath-core-bundle/LICENSE | 202 +++++++++++++++++++++++
 libraries/ldpath/ldpath-core-bundle/pom.xml | 124 ++++++++++++++
 2 files changed, 326 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/888a5927/libraries/ldpath/ldpath-core-bundle/LICENSE
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core-bundle/LICENSE b/libraries/ldpath/ldpath-core-bundle/LICENSE
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/libraries/ldpath/ldpath-core-bundle/LICENSE
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed 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://git-wip-us.apache.org/repos/asf/marmotta/blob/888a5927/libraries/ldpath/ldpath-core-bundle/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core-bundle/pom.xml b/libraries/ldpath/ldpath-core-bundle/pom.xml
new file mode 100644
index 0000000..3b2e05f
--- /dev/null
+++ b/libraries/ldpath/ldpath-core-bundle/pom.xml
@@ -0,0 +1,124 @@
+<?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.
+-->
+<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-SNAPSHOT</version>
+        <relativePath>../../../parent</relativePath>
+    </parent>
+
+    <name>LDPath Bundle</name>
+    <description>
+      OSGI bundle for LDPath Core. This embedds all functions to allow loading
+      of those via the Java ServiceLoader.
+    </description>
+    <artifactId>ldpath-core-bundle</artifactId>
+    <packaging>bundle</packaging>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>org.apache.marmotta</groupId>
+            <artifactId>ldpath-api</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.marmotta</groupId>
+            <artifactId>ldpath-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+          <groupId>org.apache.marmotta</groupId>
+          <artifactId>ldpath-functions-collections</artifactId>
+          <version>${project.version}</version>
+        </dependency>
+        <dependency>
+          <groupId>org.apache.marmotta</groupId>
+          <artifactId>ldpath-functions-date</artifactId>
+          <version>${project.version}</version>
+        </dependency>
+        <dependency>
+          <groupId>org.apache.marmotta</groupId>
+          <artifactId>ldpath-functions-html</artifactId>
+          <version>${project.version}</version>
+        </dependency>
+        <dependency>
+          <groupId>org.apache.marmotta</groupId>
+          <artifactId>ldpath-functions-math</artifactId>
+          <version>${project.version}</version>
+        </dependency>
+        <dependency>
+          <groupId>org.apache.marmotta</groupId>
+          <artifactId>ldpath-functions-text</artifactId>
+          <version>${project.version}</version>
+        </dependency>
+        <dependency>
+          <groupId>org.apache.marmotta</groupId>
+          <artifactId>ldpath-functions-xml</artifactId>
+          <version>${project.version}</version>
+        </dependency>
+    </dependencies>
+
+
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Bundle-Category>Apache Marmotta LDPath</Bundle-Category>
+                        <Bundle-DocURL>http://wiki.apache.org/marmotta/LDPath</Bundle-DocURL>
+                        <_versionpolicy>$${version;===;${@}}</_versionpolicy>
+                        <!-- 
+                          NOTES: 
+                            * jdom2 is required for using the ldpath-functions-xml
+                            * jsoup is required for using the ldpath-functions-html
+                          -->
+                        <Import-Package>
+                          org.slf4j.*;version="[1.6,2)",
+                          ch.qos.logback.classic;resolution:=optional,
+                          org.jdom2.*;resolution:=optional,
+                          org.jsoup.*;resolution:=optional,
+                          *
+                        </Import-Package>
+                        <_exportcontents>
+                            org.apache.marmotta.ldpath;version=${project.version},
+                            org.apache.marmotta.ldpath.exception;version=${project.version},
+                            org.apache.marmotta.ldpath.model.*;version=${project.version},
+                            org.apache.marmotta.ldpath.parser;version=${project.version},
+                            org.apache.marmotta.ldpath.util;version=${project.version}
+                        </_exportcontents>
+                        <Embed-Dependency>
+                          ldpath-core,
+                          ldpath-functions-collections, ldpath-functions-date,
+                          ldpath-functions-html, ldpath-functions-math,
+                          ldpath-functions-text, ldpath-functions-xml
+                        </Embed-Dependency>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>


[04/40] git commit: Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/marmotta into develop

Posted by ja...@apache.org.
Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/marmotta into develop

# By Sebastian Schaffert
# Via Sebastian Schaffert
* 'develop' of https://git-wip-us.apache.org/repos/asf/marmotta:
  - try being more liberal with calendar formats
  - custom externalizer for infinispan ldcache backend


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/d5bbec57
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/d5bbec57
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/d5bbec57

Branch: refs/heads/ldp
Commit: d5bbec5714f4739624b408a2c6f486b74e28da3d
Parents: 9acbddf a7fe31d
Author: Rupert Westenthaler <ru...@gmail.com>
Authored: Tue Feb 4 12:03:54 2014 +0100
Committer: Rupert Westenthaler <ru...@gmail.com>
Committed: Tue Feb 4 12:03:54 2014 +0100

----------------------------------------------------------------------
 .../marmotta/kiwi/model/rdf/KiWiLiteral.java    |   9 +-
 .../registry/CacheTripleRegistry.java           |   2 +-
 .../ldcache/ldcache-backend-infinispan/pom.xml  |   9 +-
 .../infinispan/LDCachingInfinispanBackend.java  |  64 ++++--
 .../infinispan/io/ModelExternalizer.java        | 150 ++++++++++++++
 .../infinispan/io/ValueExternalizer.java        | 197 +++++++++++++++++++
 .../ldcache/backend/infinispan/util/DataIO.java |  68 +++++++
 .../src/main/resources/jgroups-ldcache.xml      |   2 +-
 8 files changed, 479 insertions(+), 22 deletions(-)
----------------------------------------------------------------------



[18/40] git commit: MARMOTTA-431: last details

Posted by ja...@apache.org.
MARMOTTA-431: last details


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/5fa42d20
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/5fa42d20
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/5fa42d20

Branch: refs/heads/ldp
Commit: 5fa42d206a192811ac5eeb273e0b127db9ddd015
Parents: 37701d5
Author: Sergio Fernández <wi...@apache.org>
Authored: Thu Feb 20 10:10:49 2014 +0100
Committer: Sergio Fernández <wi...@apache.org>
Committed: Thu Feb 20 10:10:49 2014 +0100

----------------------------------------------------------------------
 launchers/marmotta-webapp/pom.xml                 | 15 ++++++++++++++-
 launchers/marmotta-webapp/src/deb/control/control |  2 +-
 2 files changed, 15 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/5fa42d20/launchers/marmotta-webapp/pom.xml
----------------------------------------------------------------------
diff --git a/launchers/marmotta-webapp/pom.xml b/launchers/marmotta-webapp/pom.xml
index 2d41f9b..f747fde 100644
--- a/launchers/marmotta-webapp/pom.xml
+++ b/launchers/marmotta-webapp/pom.xml
@@ -121,6 +121,19 @@
                 </configuration>
             </plugin>
             <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <version>1.8</version>
+                <executions>
+                  <execution>
+                    <id>parse-version</id>
+                    <goals>
+                      <goal>parse-version</goal>
+                    </goals>
+                  </execution>
+                </executions>
+            </plugin>
+            <plugin>
                 <artifactId>jdeb</artifactId>
                 <groupId>org.vafer</groupId>
                 <!--required for generating proper .changes: <version>1.1-SNAPSHOT</version>-->
@@ -132,7 +145,7 @@
                             <goal>jdeb</goal>
                         </goals>
                         <configuration>
-                            <deb>${project.build.directory}/${project.artifactId}_${project.version}-${maven.build.timestamp}_all.deb</deb>
+                            <deb>${project.build.directory}/${project.artifactId}_${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}~${maven.build.timestamp}_all.deb</deb>
                             <controlDir>${basedir}/src/deb/control</controlDir>
                             <dataSet>
                                 <data>

http://git-wip-us.apache.org/repos/asf/marmotta/blob/5fa42d20/launchers/marmotta-webapp/src/deb/control/control
----------------------------------------------------------------------
diff --git a/launchers/marmotta-webapp/src/deb/control/control b/launchers/marmotta-webapp/src/deb/control/control
index d90993d..103e14c 100644
--- a/launchers/marmotta-webapp/src/deb/control/control
+++ b/launchers/marmotta-webapp/src/deb/control/control
@@ -1,4 +1,4 @@
-Package: marmotta
+Package: marmotta-webapp
 Version: [[version]]
 Section: java
 Priority: extra


[21/40] git commit: reformated rdfpath.jj and moved it to the right subdirectory

Posted by ja...@apache.org.
reformated rdfpath.jj and moved it to the right subdirectory


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/4b04fff2
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/4b04fff2
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/4b04fff2

Branch: refs/heads/ldp
Commit: 4b04fff238536418f40e2042bda18b32de71da07
Parents: 50e978c
Author: Jakob Frank <ja...@apache.org>
Authored: Mon Feb 24 20:26:43 2014 +0100
Committer: Jakob Frank <ja...@apache.org>
Committed: Mon Feb 24 20:28:01 2014 +0100

----------------------------------------------------------------------
 .../at/newmedialab/ldpath/parser/rdfpath.jj     | 1102 -----------------
 .../apache/marmotta/ldpath/parser/rdfpath.jj    | 1104 ++++++++++++++++++
 2 files changed, 1104 insertions(+), 1102 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/4b04fff2/libraries/ldpath/ldpath-core/src/main/javacc/at/newmedialab/ldpath/parser/rdfpath.jj
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/javacc/at/newmedialab/ldpath/parser/rdfpath.jj b/libraries/ldpath/ldpath-core/src/main/javacc/at/newmedialab/ldpath/parser/rdfpath.jj
deleted file mode 100644
index 972a546..0000000
--- a/libraries/ldpath/ldpath-core/src/main/javacc/at/newmedialab/ldpath/parser/rdfpath.jj
+++ /dev/null
@@ -1,1102 +0,0 @@
-/*
- * Copyright (c) 2013 The Apache Software Foundation
- *
- *  Licensed 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.
- */
-options
-{
-  STATIC=false;
-//  LOOKAHEAD=5;
-  CACHE_TOKENS=true;
-//  FORCE_LA_CHECK=true;
-//  CHOICE_AMBIGUITY_CHECK=5;
-  LOOKAHEAD=2147483647;
-//  DEBUG_PARSER=true;
-//  DEBUG_TOKEN_MANAGER=true;
-//  DEBUG_LOOKAHEAD=true;
-}
-
-PARSER_BEGIN(LdPathParser)
-package org.apache.marmotta.ldpath.parser;
-
-import org.apache.marmotta.ldpath.model.Constants;
-
-import org.apache.marmotta.ldpath.api.backend.*;
-import org.apache.marmotta.ldpath.api.functions.*;
-import org.apache.marmotta.ldpath.api.selectors.*;
-import org.apache.marmotta.ldpath.api.tests.*;
-import org.apache.marmotta.ldpath.api.transformers.*;
-
-
-import org.apache.marmotta.ldpath.model.fields.*;
-import org.apache.marmotta.ldpath.model.functions.*;
-import org.apache.marmotta.ldpath.model.programs.*;
-import org.apache.marmotta.ldpath.model.selectors.*;
-import org.apache.marmotta.ldpath.model.tests.*;
-import org.apache.marmotta.ldpath.model.transformers.*;
-
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.HashMap;
-import java.util.Locale;
-import java.util.Collections;
-
-import java.io.Reader;
-import java.io.InputStream;
-
-import java.net.URI;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-@SuppressWarnings("all")
-public class LdPathParser<Node> {
-
-        private enum Mode { RULE, SELECTOR, TEST, PROGRAM, PREFIX };
-
-
-        private static final Logger log = LoggerFactory.getLogger(LdPathParser.class);
-
-        /**
-         * A map mapping from namespace prefix to namespace URI
-         */
-        private Map<String,String> namespaces = new HashMap<String,String>();
-
-        private NodeBackend<Node> backend;
-
-        private Configuration config;
-
-        private Mode mode = Mode.PROGRAM;
-
-        public LdPathParser(NodeBackend<Node> backend, Reader in) {
-            this(backend,null,in);
-        }
-
-        public LdPathParser(NodeBackend<Node> backend, Configuration config, Reader in) {
-            this(in);
-            this.backend = backend;
-            if(config == null) {
-                this.config = new DefaultConfiguration();
-            } else {
-                this.config = config;
-            }
-
-            initialise();
-        }
-
-        public LdPathParser(NodeBackend<Node> backend, InputStream in) {
-            this(backend,null,in);
-        }
-
-        public LdPathParser(NodeBackend<Node> backend, Configuration config, InputStream in) {
-            this(in);
-            this.backend = backend;
-            if(config == null) {
-                this.config = new DefaultConfiguration();
-            } else {
-                this.config = config;
-            }
-
-            initialise();
-        }
-
-        public LdPathParser(NodeBackend<Node> backend, InputStream in, String encoding) {
-            this(backend,null,in,encoding);
-        }
-
-        public LdPathParser(NodeBackend<Node> backend, Configuration config, InputStream in, String encoding) {
-            this(in,encoding);
-            this.backend = backend;
-            if(config == null) {
-                this.config = new DefaultConfiguration();
-            } else {
-                this.config = config;
-            }
-
-            initialise();
-        }
-
-        public Program<Node> parseProgram() throws ParseException {
-			namespaces.clear();
-			namespaces.putAll(config.getNamespaces());
-
-            mode = Mode.PROGRAM;
-            try {
-		        return Program();
-		    } catch(TokenMgrError error){
-		        throw new ParseException("Unable to parse Program: (Message: "+error.getMessage()+")");
-		    }
-        }
-
-        public Entry<String, String> parsePrefix() throws ParseException {
-            namespaces.clear();
-            namespaces.putAll(config.getNamespaces());
-            mode = Mode.PREFIX;
-            try {
-                return Namespace();
-            } catch (TokenMgrError error) {
-                throw new ParseException("Unable to parse Prefix: (Message: "+ error.getMessage()+")");
-            }
-        }
-
-        public Map<String, String> parsePrefixes() throws ParseException {
-            namespaces.clear();
-            namespaces.putAll(config.getNamespaces());
-            mode = Mode.PREFIX;
-            try {
-                return Namespaces();
-            } catch (TokenMgrError error) {
-                throw new ParseException("Unable to parse Prefixes: (Message: "+ error.getMessage()+")");
-            }
-        }
-
-
-        public NodeSelector<Node> parseSelector(Map<String,String> ctxNamespaces) throws ParseException {
-			namespaces.clear();
-			namespaces.putAll(config.getNamespaces());
-			if(ctxNamespaces != null) {
-			    namespaces.putAll(ctxNamespaces);
-			}
-
-			mode = Mode.SELECTOR;
-
-            try {
-    		    return Selector();
-            } catch(TokenMgrError error){
-                throw new ParseException("Unable to parse Selector: (Message: "+error.getMessage()+")");
-            }
-        }
-        
-        public NodeTest<Node> parseTest(Map<String, String> ctxNamespaces) throws ParseException {
-            namespaces.clear();
-            namespaces.putAll(config.getNamespaces());
-            if (ctxNamespaces != null) {
-                namespaces.putAll(ctxNamespaces);
-            }
-            mode = Mode.TEST;
-            try {
-                return NodeTest();
-            } catch (TokenMgrError error) {
-                throw new ParseException("Unable to parse Test: (Message: "+ error.getMessage()+")");
-            }
-        }
-
-        public <T> FieldMapping<T,Node> parseRule(Map<String,String> ctxNamespaces) throws ParseException {
-			namespaces.clear();
-			namespaces.putAll(config.getNamespaces());
-			if(ctxNamespaces != null) {
-			    namespaces.putAll(ctxNamespaces);
-			}
-
-			mode = Mode.RULE;
-
-            try {
-	            return Rule();
-            } catch(TokenMgrError error){
-                throw new ParseException("Unable to parse Rule: (Message: "+error.getMessage()+")");
-            }
-        }
-
-        public Node resolveURI(URI uri) {
            return backend.createURI(uri.toString());
-        }
-
-        public Node resolveResource(String uri) throws ParseException {
-            return backend.createURI(uri);
-        }
-
-        public Node resolveResource(String prefix, String local) throws ParseException {
-            return resolveResource(resolveNamespace(prefix)+local);
        }
-
-
-        public String resolveNamespace(String prefix) throws ParseException {
-            String uri = namespaces.get(prefix);
-            if(uri == null) {
-                throw new ParseException("Namespace "+prefix+" not defined!");
-            }
-            return uri;
-        }
-
-
-        public SelectorFunction<Node> getFunction(String uri) throws ParseException {
-            if(xsdNodeFunctionMap.get(uri) != null) {
-               return xsdNodeFunctionMap.get(uri);
-            } else {
-                throw new ParseException("function with URI "+uri+" does not exist");
-            }
-        }
-
-        public TestFunction<Node> getTestFunction(String uri) throws ParseException {
-            if (xsdNodeTestMap.get(uri) != null) {
-                return xsdNodeTestMap.get(uri);
-            } else {
-                throw new ParseException("test function with URI "+uri+" does not exist");
-            }
-        }
-
-        public NodeTransformer<?,Node> getTransformer(URI type) throws ParseException {
-            return getTransformer(type.toString());
-        }
-
-        public NodeTransformer<?,Node> getTransformer(Node node) throws ParseException {
-            return getTransformer(backend.stringValue(node));
-        }
-
-        public NodeTransformer<?,Node> getTransformer(String uri) throws ParseException {
-            if(xsdNodeTransformerMap.get(uri) != null) {
-                return xsdNodeTransformerMap.get(uri);
-            } else {
-                throw new ParseException("transformer with URI "+uri+" does not exist");
-            }
-        }
-
-
-        private void initialise() {
-            initTransformerMappings();
-            initFunctionMappings();
-        }
-
-        /**
-         * Register the function passed as argument in this parser's function map.
-         */
-        public void registerFunction(SelectorFunction<Node> function) {
-            registerFunction(xsdNodeFunctionMap,function);
-        }
-
-    public void registerFunction(TestFunction<Node> test) {
-        registerTest(xsdNodeTestMap, test);
-    }
-
-        /**
-         * Register the result transformer passed as argument for the given type uri.
-         */
-        public void registerTransformer(String typeUri, NodeTransformer<?,Node> transformer) {
-            xsdNodeTransformerMap.put(typeUri,transformer);
-        }
-
-
-        /**
-         * A map mapping from XSD types to node transformers.
-         */
-        private Map<String, NodeTransformer<?,Node>> xsdNodeTransformerMap;
-        private void initTransformerMappings() {
-            Map<String, NodeTransformer<?,Node>> transformerMap = new HashMap<String, NodeTransformer<?,Node>>();
-
-            transformerMap.putAll(config.getTransformers());
-
-            xsdNodeTransformerMap = transformerMap;
-        }
-
-
-        private Map<String, SelectorFunction<Node>> xsdNodeFunctionMap;
-        private Map<String, TestFunction<Node>> xsdNodeTestMap;
-        private void initFunctionMappings() {
-            Map<String, SelectorFunction<Node>> functionMap = new HashMap<String, SelectorFunction<Node>>();
-
-            functionMap.putAll(config.getFunctions());
-
-            xsdNodeFunctionMap = functionMap;
-
-        Map<String, TestFunction<Node>> testMap = new HashMap<String, TestFunction<Node>>();
-        testMap.putAll(config.getTestFunctions());
-        xsdNodeTestMap = testMap;
-        }
-
-        private void registerFunction(Map<String, SelectorFunction<Node>> register, final SelectorFunction<Node> function) {
-            register.put(Constants.NS_LMF_FUNCS + function.getPathExpression(backend), function);
-        }
-        
-    private void registerTest(Map<String, TestFunction<Node>> register, final TestFunction<Node> test) {
-        register.put(Constants.NS_LMF_FUNCS + test.getLocalName(), test);
-    }
-
-        private class Namespace implements Entry<String, String> {
-            private String key, val;
-            public Namespace(String key, String val) {
-                this.key = key;
-                this.val = val;
-            }
-            @Override
-            public String getKey() {
-                return key;
-            }
-            @Override
-            public String getValue() {
-                return val;
-            }
-            @Override
-            public String setValue(String value) {
-                String oV = val;
-                val = value;
-                return oV;
-            }
-        }
-
-}
-PARSER_END(LdPathParser)
-
-SKIP :
-{
- 	" "
-|	"\r"
-|	"\t"
-|	"\n"
-}
-
-// When a /* is seen in the DEFAULT state, skip it and switch to the IN_COMMENT state
-SKIP : {
-    "/*": IN_COMMENT
-}
-
-// When any other character is seen in the IN_COMMENT state, skip it.
-< IN_COMMENT > SKIP : {
-    <  ~[] >
-}
-
-// When a */ is seen in the IN_COMMENT state, skip it and switch back to the DEFAULT state
-< IN_COMMENT > SKIP : {
-    "*/": DEFAULT
-}
-
-MORE:
-{
- "\"" : WithinString
-}
-
-<WithinString> TOKEN:
-{
-  <STRLIT: "\""> : DEFAULT
-}
-
-<WithinString> MORE:
-{
-  <~["\n","\r"]>
-}
-
-
-TOKEN : /* LDPATH */
-{
-  < COMMA:  "," >  |
-  < SCOLON: ";" >  |
-  < COLON:  ":" >  |
-  < DCOLON: "::" > |
-  < ASSIGN: "=" >  |
-  < K_PREFIX: "@prefix" > |
-  < K_FILTER: "@filter" > |
-  < K_BOOST:  "@boost" >  |
-  < K_GRAPH:  "@graph" >
-}
-TOKEN : /* OPERATORS */
-{
-    < SELF: "." >    |
-	< AND:  "&" >    |
-	< OR:   "|" >    |
-    < P_SEP:"/" >    |
-    < PLUS: "+" >    |
-    < STAR: "*" >    |
-	< NOT:  "!" >    |
-    < INVERSE: "^" > |
-	< IS:   "is" >   |
-	< IS_A: "is-a" > |
-    < FUNC: "fn:" >  |
-  	< TYPE: "^^" >   |
-  	< LANG: "@" >
-}
-
-TOKEN : /* BRACKETS */
-{
-  < B_RO: "(" > |
-  < B_RC: ")" > |
-  < B_SO: "[" > |
-  < B_SC: "]" > |
-  < B_CO: "{" > |
-  < B_CC: "}" > |
-  < B_XO: "<" > |
-  < B_XC: ">" > 
-}
-TOKEN :
-{
-    < URI: "<" (~[ ">","<", "\"", "{", "}", "^", "\\", "|", "`", "\u0000"-"\u0020"])+ ">" > |
-    < IDENTIFIER: ["a"-"z","A"-"Z","0"-"9","_"](["a"-"z","A"-"Z","0"-"9","_","'","-", "."])* > |
-    < #URICHAR: ["a"-"z","A"-"Z","0"-"9",";","/","?",":","@","&","=","+","$",".","-","_","!","~","*","'","%"] >
-}
-
-Map<String, String> Namespaces() :
-{
-    Map<String, String> ns = new HashMap<String, String>();
-    Entry<String, String> namespace = null;
-}
-{
-  (
-     namespace = Namespace() {
-       ns.put(namespace.getKey(), namespace.getValue());
-     }
-  )+
-  {
-    return ns;
-  }   
-}
-
-Entry<String, String> Namespace() :
-{
-    Token id = null;
-    Token uri;
-}
-{
-  ( 
-    <K_PREFIX> id = <IDENTIFIER> <COLON> uri = <URI> (<SCOLON> )? {
-    }
-  ) { return new Namespace(id.image, uri.image.substring(1,uri.image.length()-1)); }
-}
-
-Program Program() :
-{
-    Program<Node> program = new Program();
-    NodeTest<Node> filter = null;
-    Map<String, String> nss = null;
-    FieldMapping<?,Node> rule;
-    NodeSelector<Node> boostSelector;
-    LinkedList<URI> graphs;
-}
-{
-  (
-    nss = Namespaces() {
-        namespaces.putAll(nss);
-        for (String k : nss.keySet()) {
-            program.addNamespace(k, nss.get(k));
-        }
-    }
-  )?
-
-  (
-    <K_GRAPH> graphs = UriList() <SCOLON> {
-      program.setGraphs(graphs);
-    }
-  )?
-
-  (
-    <K_FILTER> filter = NodeTest() <SCOLON> {
-        program.setFilter(filter);
-    }
-  )?
-
-  (
-    <K_BOOST> boostSelector = Selector() <SCOLON> {
-    	NodeTransformer transformer = getTransformer(Program.DOCUMENT_BOOST_TYPE);
-		FieldMapping booster = new FieldMapping("@boost", java.net.URI.create(Program.DOCUMENT_BOOST_TYPE), boostSelector, transformer, null);
-		program.setBooster(booster);  
-    }
-  )?
-
-  (
-    rule = Rule()
-    {
-       program.addMapping(rule);
-    }
-  )*
-  <EOF>
-  {
-    return program;
-  }
-}
-
-LinkedList<URI> UriList() :
-{
-    LinkedList<URI> rest = null;
-    URI uri;
-}
-{
-    uri = Uri() ( <COMMA> rest = UriList() )?
-    {
-      if (rest == null) rest = new LinkedList<URI>();
-      rest.addFirst(uri);
-      return rest;
-    }
-}
-
-FieldMapping Rule() :
-{
-    FieldMapping<?,Node> rule;
-    Token name;
-    URI uri;
-    URI type = null;
-    NodeSelector<Node> selector;
-    NodeTransformer<?,Node> transformer;
-    Map<String, String> conf = null;
-}
-{
-    name = <IDENTIFIER> <ASSIGN> selector = Selector() (<DCOLON> type = Uri())? (<B_RO> conf = FieldConfig() <B_RC>)? <SCOLON> {
-        if(type != null) {
-            transformer = getTransformer(type);
-        } else {
-            transformer = new IdentityTransformer();
-        }
-        if(mode != Mode.PROGRAM) {
-            throw new ParseException("cannot use field names when parsing single paths");
-        }
-        rule = new FieldMapping(name.image,type,selector,transformer, conf);
-        return rule;
-    }
-|   uri = Uri() <ASSIGN> selector = Selector() (<DCOLON> type = Uri())? (<B_RO> conf = FieldConfig() <B_RC>)? <SCOLON> {
-        if(type != null) {
-            transformer = getTransformer(type);
-        } else {
-            transformer = new IdentityTransformer();
-        }
-        if(mode != Mode.PROGRAM) {
-            throw new ParseException("cannot use field names when parsing single paths");
-        }
-        rule = new FieldMapping(uri,type,selector,transformer, conf);
-        return rule;
-    }
-|   selector = Selector() (<DCOLON> type = Uri())? (<B_RO> conf = FieldConfig() <B_RC>)? (<SCOLON>)? {
-        if(type != null) {
-            transformer = getTransformer(type);
-        } else {
-            transformer = new IdentityTransformer();
-        }
-        if(mode != Mode.PROGRAM && conf != null) {
-            throw new ParseException("cannot use configuration parameters when parsing single paths");
-        }
-        try {
-            rule = new FieldMapping(selector.getName(backend),type,selector,transformer, conf);
-        } catch(UnsupportedOperationException ex) {
-            if(mode == Mode.PROGRAM) {
-                rule = new FieldMapping("unnamed",type,selector,transformer, conf);
-                log.error("error while parsing {}: {}", rule.getPathExpression(backend),ex.getMessage());
-                throw new ParseException("error while parsing "+rule.getPathExpression(backend)+": "+ex.getMessage());
-            } else {
-                rule = new FieldMapping("unnamed",type,selector,transformer, conf);
-            }
-        }
-        return rule;
-    }
-}
-
-
-Map<String,String> FieldConfig() : {
-	Map<String, String> conf = new HashMap<String, String>();
-	Token key = null;
-	String val = null;
-	Map<String,String> more = null;
-}
-{
-	( key = <IDENTIFIER> <ASSIGN> val = ConfVal() ( <COMMA> more = FieldConfig() )? )? {
-		if (key == null || val == null) return null;
-		conf.put(key.image, val);
-		if (more != null) {
-			conf.putAll(more);
-		}
-		return conf;
-	}
-}
-
-String ConfVal() : {
-	Token str, id;
-}
-{
-	str = <STRLIT> { return str.image.substring(1, str.image.length() -1); }
-|	id = <IDENTIFIER> { return id.image; }
-}
-
-URI Uri() : {
-    Token uri, prefix, localName;
-
-}
-{
-    uri = <URI> {
-       return java.net.URI.create(uri.image.substring(1,uri.image.length()-1));
-    }
-|   prefix = <IDENTIFIER> ":" localName = <IDENTIFIER> {
-        return java.net.URI.create(resolveNamespace(prefix.image)+localName.image);
-    }
-}
-
-
-NodeSelector Selector() :
-{
-    NodeSelector result;
-}
-{
-    (
-        result = CompoundSelector()
-    |   result = TestingSelector()
-    |   result = AtomicSelector()
-    )
-    {
-        return result;
-    }
-}
-
-
-NodeSelector CompoundSelector() :
-{
-    NodeSelector result = null;
-}
-{
-    (
-        /* Union Selector */
-        result = UnionSelector() |
-
-        /* Intersection Selector */
-        result = IntersectionSelector() |
-
-        /* Path Selector */
-        result = PathSelector()
-
-
-    )
-    {
-        return result;
-    }
-}
-
-/**
- * As path elements, we do not allow arbitrary compound selectors, but we allow all atomic and path selectors.
- */
-NodeSelector AtomicOrTestingOrPathSelector() :
-{
-    NodeSelector result = null;
-}
-{
-    (
-        /* Path Selector */
-        result = PathSelector() |
-
-        /* Atomic Selector */
-        result = AtomicOrTestingSelector()
-    )
-    {
-        return result;
-    }
-}
-
-NodeSelector AtomicOrTestingSelector() :
-{
-    NodeSelector result = null;
-}
-{
-    (
-        /* Testing Selector */
-        result = TestingSelector() |
-
-        /* Atomic Selector */
-        result = AtomicSelector()
-    )
-    {
-        return result;
-    }
-}
-
-NodeSelector AtomicSelector() :
-{
-    NodeSelector result = null;
-}
-{
-    (
-    	/* Self Selector */
-    	result = SelfSelector() |
-    	    
-        /* Property Selector */
-        result = PropertySelector() |
-
-        /* Wildcard Selector */
-        result = WildcardSelector() |
-        
-        /* Reverse Property Selector */
-        result = ReversePropertySelector() |
-
-        /* Function Selector */
-        result = FunctionSelector() |
-
-        /* String Constant Selector */
-        result = StringConstantSelector() |
-        
-        /* Recursive Path Selector */
-        result = RecursivePathSelector() |
-
-        /* Other selector enclosed in braces */
-        result = GroupedSelector()
-
-    )
-    {
-        return result;
-    }
-}
-
-NodeSelector SelfSelector() :
-{
-}
-{
-	<SELF> { return new SelfSelector(); }
-}
-
-NodeSelector GroupedSelector() :
-{
-    NodeSelector result = null;
-}
-{
-    /* Other selector enclosed in braces */
-    <B_RO> result = Selector() <B_RC>
-    {
-        return new GroupedSelector(result);
-    }
-
-}
-
-RecursivePathSelector RecursivePathSelector() :
-{
-	RecursivePathSelector result = null;
-	NodeSelector delegate        = null;
-}
-{
-	<B_RO> delegate = Selector() <B_RC> <PLUS>	
-	{
-		result = RecursivePathSelector.getPathSelectorPlused(delegate);
-		return result;
-	} |
-    <B_RO> delegate = Selector() <B_RC> <STAR>
-    {
-        result = RecursivePathSelector.getPathSelectorStared(delegate);
-        return result;
-    } 
-}
-
-PathSelector PathSelector() :
-{
-    PathSelector result = null;
-    NodeSelector left   = null;
-    NodeSelector right  = null;
-}
-{
-    left = AtomicOrTestingSelector() <P_SEP> right = AtomicOrTestingOrPathSelector()
-    {
-        result = new PathSelector(left,right);
-        return result;
-    }
-}
-
-IntersectionSelector IntersectionSelector() :
-{
-    IntersectionSelector result = null;
-    NodeSelector left   = null;
-    NodeSelector right  = null;
-}
-{
-    left = AtomicOrTestingOrPathSelector() <AND> right = Selector()
-    {
-        result = new IntersectionSelector(left,right);
-        return result;
-    }
-}
-
-UnionSelector UnionSelector() :
-{
-    UnionSelector result = null;
-    NodeSelector left   = null;
-    NodeSelector right  = null;
-}
-{
-    left = AtomicOrTestingOrPathSelector() <OR> right = Selector()
-    {
-        result = new UnionSelector(left,right);
-        return result;
-    }
-}
-
-TestingSelector TestingSelector() :
-{
-    TestingSelector result = null;
-    NodeSelector delegate  = null;
-    NodeTest test = null;
-}
-{
-    delegate = AtomicSelector() <B_SO> test = NodeTest() <B_SC> {
-        result = new TestingSelector(delegate,test);
-        return result;
-    }
-}
-
-ReversePropertySelector ReversePropertySelector() :
-{
-	ReversePropertySelector result = null;
-	URI uri;
-}
-{
-	<INVERSE> uri = Uri() {
-        result   = new ReversePropertySelector(resolveURI(uri));
-        return result;
-	}
-}
-
-PropertySelector PropertySelector() :
-{
-    PropertySelector result = null;
-    URI uri;
-}
-{
-    uri = Uri() {
-        result   = new PropertySelector(resolveURI(uri));
-        return result;
-    }
-}
-
-WildcardSelector WildcardSelector() :
-{
-    WildcardSelector result = null;
-}
-{
-    <STAR> {
-        result = new WildcardSelector();
-        return result;
-    }
-}
-
-FunctionSelector FunctionSelector() :
-{
-    FunctionSelector result = null;
-    List<NodeSelector> arguments = new ArrayList<NodeSelector>();
-    NodeSelector argument;
-    String uri;
-    Token fName;
-}
-{
-    /* Function-Calls without arguments can skip parenthesis */
-    /* Does not work... why?
-    <FUNC> fName = <IDENTIFIER> {
-           uri = namespaces.get("fn") + fName.image;
-           result = new FunctionSelector(getFunction(uri),Collections.emptyList());
-           return result;
-    } | */
-    /* Functions do not need to have arguments */
-    <FUNC> fName = <IDENTIFIER> <B_RO> <B_RC> {
-           uri = namespaces.get("fn") + fName.image;
-           result = new FunctionSelector(getFunction(uri),Collections.emptyList());
-           return result;
-    } |
-    /* Sometimes arguments are required */
-    <FUNC> fName = <IDENTIFIER> <B_RO>
-            argument = Selector() { arguments.add(argument); }
-            ( <COMMA> argument = Selector() { arguments.add(argument); } )*
-    <B_RC> {
-           uri = namespaces.get("fn") + fName.image;
-           result = new FunctionSelector(getFunction(uri),arguments);
-           return result;
-    }
-}
-
-
-StringConstantSelector StringConstantSelector() :
-{
-    StringConstantSelector result = null;
-    Token literal;
-}
-{
-    literal = <STRLIT> {
-        result = new StringConstantSelector(literal.image.substring(1, literal.image.length()-1));
-        return result;
-    }
-}
-
-
-
-NodeTest NodeTest() :
-{
-    NodeTest result;
-}
-{
-    (
-        result = GroupedTest()
-    |   result = NotTest()
-    |   result = AndTest()
-    |   result = OrTest()
-    |   result = AtomicNodeTest()
-    )
-    {
-        return result;
-    }
-}
-
-NodeTest GroupedTest() :
-{
-    NodeTest delegate;
-}
-{
-    <B_RO> delegate = NodeTest() <B_RC> {
-       return delegate;
-    }
-}
-
-NodeTest AtomicNodeTest() :
-{
-    NodeTest result;
-}
-{
-    (
-        result = LiteralLanguageTest()
-    |   result = LiteralTypeTest()
-    |   result = IsATest()
-    |   result = PathEqualityTest()
-    |   result = FunctionTest()
-    |   result = PathTest()
-    )
-    {
-        return result;
-    }
-}
-
-FunctionTest FunctionTest() :
-{
-    FunctionTest result;
-    List<NodeSelector> arguments = new ArrayList<NodeSelector>();
-    NodeSelector argument;
-    String uri;
-    Token fName;
-}
-{
-  (    
-    /* Function-Calls without arguments can skip parenthesis */
-    /* Does not work... why?
-    <FUNC> fName = <IDENTIFIER> {
-           uri = namespaces.get("fn") + fName.image;
-           result = new FunctionSelector(getTestFunction(uri),Collections.emptyList());
-    } | */
-    /* Functions do not need to have arguments */
-    <FUNC> fName = <IDENTIFIER> <B_RO> <B_RC> {
-           uri = namespaces.get("fn") + fName.image;
-           result = new FunctionTest(getTestFunction(uri),Collections.emptyList());
-    } |
-    /* Sometimes arguments are required */
-    <FUNC> fName = <IDENTIFIER> <B_RO>
-            argument = Selector() { arguments.add(argument); }
-            ( <COMMA> argument = Selector() { arguments.add(argument); } )*
-    <B_RC> {
-           uri = namespaces.get("fn") + fName.image;
-           result = new FunctionTest(getTestFunction(uri),arguments);
-    }
-  )
-  {
-    return result;
-  }
-}
-
-LiteralLanguageTest LiteralLanguageTest():
-{
-    Token lang;
-}
-{
-    <LANG> lang = <IDENTIFIER> {
-        return new LiteralLanguageTest(lang.image);
-    }
-}
-
-LiteralTypeTest LiteralTypeTest():
-{
-    URI type;
-}
-{
-    <TYPE> type = Uri() {
-        return new LiteralTypeTest(type);
-    }
-}
-
-NotTest NotTest() :
-{
-    NodeTest delegate;
-}
-{
-    <NOT>  delegate = NodeTest() {
-        return new NotTest(delegate);
-    }
-}
-
-IsATest IsATest() :
-{
-    Node node;
-}
-{
-    <IS_A> node = Node() {
-        return new IsATest(resolveResource("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"), node);
-    }
-}
-
-
-AndTest AndTest():
-{
-    NodeTest left, right;
-}
-{
-    left = AtomicNodeTest() <AND> right = NodeTest() {
-        return new AndTest(left,right);
-    }
-}
-
-OrTest OrTest():
-{
-    NodeTest left, right;
-}
-{
-    left = AtomicNodeTest() <OR> right = NodeTest() {
-        return new OrTest(left,right);
-    }
-}
-
-PathEqualityTest PathEqualityTest():
-{
-    NodeSelector path;
-    Node node;
-}
-{
-    path = Selector() <IS> node = Node() {
-        return new PathEqualityTest(path,node);
-    }
-}
-
-
-Node Node():
-{
-    URI uri, type = null;
-    Token literal, language;
-}
-{
-    uri = Uri() {
-        return resolveURI(uri);
-    }
-|   literal = <STRLIT>  (<TYPE> type = Uri() )? {
-        return backend.createLiteral(literal.image.substring(1, literal.image.length()-1),null,type);
-    }
-|   literal = <STRLIT>  <LANG> language = <IDENTIFIER> {
-        return backend.createLiteral(literal.image.substring(1, literal.image.length()-1),new Locale(language.image),null);
-    }
-}
-
-
-PathTest PathTest():
-{
-    NodeSelector path;
-}
-{
-    (
-        path = PathSelector()
-    |   path = TestingSelector()
-    |   path = AtomicSelector()
-    )
-    {
-        return new PathTest(path);
-    }
-}
-

http://git-wip-us.apache.org/repos/asf/marmotta/blob/4b04fff2/libraries/ldpath/ldpath-core/src/main/javacc/org/apache/marmotta/ldpath/parser/rdfpath.jj
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/javacc/org/apache/marmotta/ldpath/parser/rdfpath.jj b/libraries/ldpath/ldpath-core/src/main/javacc/org/apache/marmotta/ldpath/parser/rdfpath.jj
new file mode 100644
index 0000000..8b5f19a
--- /dev/null
+++ b/libraries/ldpath/ldpath-core/src/main/javacc/org/apache/marmotta/ldpath/parser/rdfpath.jj
@@ -0,0 +1,1104 @@
+/*
+ * Copyright (c) 2013 The Apache Software Foundation
+ *
+ *  Licensed 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.
+ */
+options
+{
+  STATIC=false;
+//  LOOKAHEAD=5;
+  CACHE_TOKENS=true;
+//  FORCE_LA_CHECK=true;
+//  CHOICE_AMBIGUITY_CHECK=5;
+  LOOKAHEAD=2147483647;
+//  DEBUG_PARSER=true;
+//  DEBUG_TOKEN_MANAGER=true;
+//  DEBUG_LOOKAHEAD=true;
+}
+
+PARSER_BEGIN(LdPathParser)
+package org.apache.marmotta.ldpath.parser;
+
+import org.apache.marmotta.ldpath.model.Constants;
+
+import org.apache.marmotta.ldpath.api.backend.*;
+import org.apache.marmotta.ldpath.api.functions.*;
+import org.apache.marmotta.ldpath.api.selectors.*;
+import org.apache.marmotta.ldpath.api.tests.*;
+import org.apache.marmotta.ldpath.api.transformers.*;
+
+
+import org.apache.marmotta.ldpath.model.fields.*;
+import org.apache.marmotta.ldpath.model.functions.*;
+import org.apache.marmotta.ldpath.model.programs.*;
+import org.apache.marmotta.ldpath.model.selectors.*;
+import org.apache.marmotta.ldpath.model.tests.*;
+import org.apache.marmotta.ldpath.model.transformers.*;
+
+
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Collections;
+
+import java.io.Reader;
+import java.io.InputStream;
+
+import java.net.URI;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+@SuppressWarnings("all")
+public class LdPathParser<Node> {
+
+        private enum Mode { RULE, SELECTOR, TEST, PROGRAM, PREFIX };
+
+
+        private static final Logger log = LoggerFactory.getLogger(LdPathParser.class);
+
+        /**
+         * A map mapping from namespace prefix to namespace URI
+         */
+        private Map<String,String> namespaces = new HashMap<String,String>();
+
+        private NodeBackend<Node> backend;
+
+        private Configuration config;
+
+        private Mode mode = Mode.PROGRAM;
+
+        public LdPathParser(NodeBackend<Node> backend, Reader in) {
+            this(backend,null,in);
+        }
+
+        public LdPathParser(NodeBackend<Node> backend, Configuration config, Reader in) {
+            this(in);
+            this.backend = backend;
+            if(config == null) {
+                this.config = new DefaultConfiguration();
+            } else {
+                this.config = config;
+            }
+
+            initialise();
+        }
+
+        public LdPathParser(NodeBackend<Node> backend, InputStream in) {
+            this(backend,null,in);
+        }
+
+        public LdPathParser(NodeBackend<Node> backend, Configuration config, InputStream in) {
+            this(in);
+            this.backend = backend;
+            if(config == null) {
+                this.config = new DefaultConfiguration();
+            } else {
+                this.config = config;
+            }
+
+            initialise();
+        }
+
+        public LdPathParser(NodeBackend<Node> backend, InputStream in, String encoding) {
+            this(backend,null,in,encoding);
+        }
+
+        public LdPathParser(NodeBackend<Node> backend, Configuration config, InputStream in, String encoding) {
+            this(in,encoding);
+            this.backend = backend;
+            if(config == null) {
+                this.config = new DefaultConfiguration();
+            } else {
+                this.config = config;
+            }
+
+            initialise();
+        }
+
+        public Program<Node> parseProgram() throws ParseException {
+			namespaces.clear();
+			namespaces.putAll(config.getNamespaces());
+
+            mode = Mode.PROGRAM;
+            try {
+		        return Program();
+		    } catch(TokenMgrError error){
+		        throw new ParseException("Unable to parse Program: (Message: "+error.getMessage()+")");
+		    }
+        }
+
+        public Entry<String, String> parsePrefix() throws ParseException {
+            namespaces.clear();
+            namespaces.putAll(config.getNamespaces());
+            mode = Mode.PREFIX;
+            try {
+                return Namespace();
+            } catch (TokenMgrError error) {
+                throw new ParseException("Unable to parse Prefix: (Message: "+ error.getMessage()+")");
+            }
+        }
+
+        public Map<String, String> parsePrefixes() throws ParseException {
+            namespaces.clear();
+            namespaces.putAll(config.getNamespaces());
+            mode = Mode.PREFIX;
+            try {
+                return Namespaces();
+            } catch (TokenMgrError error) {
+                throw new ParseException("Unable to parse Prefixes: (Message: "+ error.getMessage()+")");
+            }
+        }
+
+
+        public NodeSelector<Node> parseSelector(Map<String,String> ctxNamespaces) throws ParseException {
+			namespaces.clear();
+			namespaces.putAll(config.getNamespaces());
+			if(ctxNamespaces != null) {
+			    namespaces.putAll(ctxNamespaces);
+			}
+
+			mode = Mode.SELECTOR;
+
+            try {
+    		    return Selector();
+            } catch(TokenMgrError error){
+                throw new ParseException("Unable to parse Selector: (Message: "+error.getMessage()+")");
+            }
+        }
+        
+        public NodeTest<Node> parseTest(Map<String, String> ctxNamespaces) throws ParseException {
+            namespaces.clear();
+            namespaces.putAll(config.getNamespaces());
+            if (ctxNamespaces != null) {
+                namespaces.putAll(ctxNamespaces);
+            }
+            mode = Mode.TEST;
+            try {
+                return NodeTest();
+            } catch (TokenMgrError error) {
+                throw new ParseException("Unable to parse Test: (Message: "+ error.getMessage()+")");
+            }
+        }
+
+        public <T> FieldMapping<T,Node> parseRule(Map<String,String> ctxNamespaces) throws ParseException {
+			namespaces.clear();
+			namespaces.putAll(config.getNamespaces());
+			if(ctxNamespaces != null) {
+			    namespaces.putAll(ctxNamespaces);
+			}
+
+			mode = Mode.RULE;
+
+            try {
+	            return Rule();
+            } catch(TokenMgrError error){
+                throw new ParseException("Unable to parse Rule: (Message: "+error.getMessage()+")");
+            }
+        }
+
+        public Node resolveURI(URI uri) {
+            return backend.createURI(uri.toString());
+        }
+
+        public Node resolveResource(String uri) throws ParseException {
+            return backend.createURI(uri);
+        }
+
+        public Node resolveResource(String prefix, String local) throws ParseException {
+            return resolveResource(resolveNamespace(prefix)+local);
+        }
+
+
+        public String resolveNamespace(String prefix) throws ParseException {
+            String uri = namespaces.get(prefix);
+            if(uri == null) {
+                throw new ParseException("Namespace "+prefix+" not defined!");
+            }
+            return uri;
+        }
+
+
+        public SelectorFunction<Node> getFunction(String uri) throws ParseException {
+            if(xsdNodeFunctionMap.get(uri) != null) {
+               return xsdNodeFunctionMap.get(uri);
+            } else {
+                throw new ParseException("function with URI "+uri+" does not exist");
+            }
+        }
+
+        public TestFunction<Node> getTestFunction(String uri) throws ParseException {
+            if (xsdNodeTestMap.get(uri) != null) {
+                return xsdNodeTestMap.get(uri);
+            } else {
+                throw new ParseException("test function with URI "+uri+" does not exist");
+            }
+        }
+
+        public NodeTransformer<?,Node> getTransformer(URI type) throws ParseException {
+            return getTransformer(type.toString());
+        }
+
+        public NodeTransformer<?,Node> getTransformer(Node node) throws ParseException {
+            return getTransformer(backend.stringValue(node));
+        }
+
+        public NodeTransformer<?,Node> getTransformer(String uri) throws ParseException {
+            if(xsdNodeTransformerMap.get(uri) != null) {
+                return xsdNodeTransformerMap.get(uri);
+            } else {
+                throw new ParseException("transformer with URI "+uri+" does not exist");
+            }
+        }
+
+
+        private void initialise() {
+            initTransformerMappings();
+            initFunctionMappings();
+        }
+
+        /**
+         * Register the function passed as argument in this parser's function map.
+         */
+        public void registerFunction(SelectorFunction<Node> function) {
+            registerFunction(xsdNodeFunctionMap,function);
+        }
+
+        public void registerFunction(TestFunction<Node> test) {
+            registerTest(xsdNodeTestMap, test);
+        }
+
+        /**
+         * Register the result transformer passed as argument for the given type uri.
+         */
+        public void registerTransformer(String typeUri, NodeTransformer<?,Node> transformer) {
+            xsdNodeTransformerMap.put(typeUri,transformer);
+        }
+
+
+        /**
+         * A map mapping from XSD types to node transformers.
+         */
+        private Map<String, NodeTransformer<?,Node>> xsdNodeTransformerMap;
+        private void initTransformerMappings() {
+            Map<String, NodeTransformer<?,Node>> transformerMap = new HashMap<String, NodeTransformer<?,Node>>();
+
+            transformerMap.putAll(config.getTransformers());
+
+            xsdNodeTransformerMap = transformerMap;
+        }
+
+
+        private Map<String, SelectorFunction<Node>> xsdNodeFunctionMap;
+        private Map<String, TestFunction<Node>> xsdNodeTestMap;
+        private void initFunctionMappings() {
+            Map<String, SelectorFunction<Node>> functionMap = new HashMap<String, SelectorFunction<Node>>();
+
+            functionMap.putAll(config.getFunctions());
+
+            xsdNodeFunctionMap = functionMap;
+
+        Map<String, TestFunction<Node>> testMap = new HashMap<String, TestFunction<Node>>();
+        testMap.putAll(config.getTestFunctions());
+        xsdNodeTestMap = testMap;
+        }
+
+        private void registerFunction(Map<String, SelectorFunction<Node>> register, final SelectorFunction<Node> function) {
+            register.put(Constants.NS_LMF_FUNCS + function.getPathExpression(backend), function);
+        }
+        
+        private void registerTest(Map<String, TestFunction<Node>> register, final TestFunction<Node> test) {
+            register.put(Constants.NS_LMF_FUNCS + test.getLocalName(), test);
+        }
+
+        private class Namespace implements Entry<String, String> {
+            private String key, val;
+            public Namespace(String key, String val) {
+                this.key = key;
+                this.val = val;
+            }
+            @Override
+            public String getKey() {
+                return key;
+            }
+            @Override
+            public String getValue() {
+                return val;
+            }
+            @Override
+            public String setValue(String value) {
+                String oV = val;
+                val = value;
+                return oV;
+            }
+        }
+
+}
+PARSER_END(LdPathParser)
+
+SKIP :
+{
+ 	" "
+|	"\r"
+|	"\t"
+|	"\n"
+}
+
+// When a /* is seen in the DEFAULT state, skip it and switch to the IN_COMMENT state
+SKIP : {
+    "/*": IN_COMMENT
+}
+
+// When any other character is seen in the IN_COMMENT state, skip it.
+< IN_COMMENT > SKIP : {
+    <  ~[] >
+}
+
+// When a */ is seen in the IN_COMMENT state, skip it and switch back to the DEFAULT state
+< IN_COMMENT > SKIP : {
+    "*/": DEFAULT
+}
+
+MORE:
+{
+ "\"" : WithinString
+}
+
+<WithinString> TOKEN:
+{
+  <STRLIT: "\""> : DEFAULT
+}
+
+<WithinString> MORE:
+{
+  <~["\n","\r"]>
+}
+
+
+TOKEN : /* LDPATH */
+{
+  < COMMA:  "," >  |
+  < SCOLON: ";" >  |
+  < COLON:  ":" >  |
+  < DCOLON: "::" > |
+  < ASSIGN: "=" >  |
+  < K_PREFIX: "@prefix" > |
+  < K_FILTER: "@filter" > |
+  < K_BOOST:  "@boost" >  |
+  < K_GRAPH:  "@graph" >
+}
+TOKEN : /* OPERATORS */
+{
+    < SELF: "." >    |
+	< AND:  "&" >    |
+	< OR:   "|" >    |
+    < P_SEP:"/" >    |
+    < PLUS: "+" >    |
+    < STAR: "*" >    |
+	< NOT:  "!" >    |
+    < INVERSE: "^" > |
+	< IS:   "is" >   |
+	< IS_A: "is-a" > |
+    < FUNC: "fn:" >  |
+  	< TYPE: "^^" >   |
+  	< LANG: "@" >
+}
+
+TOKEN : /* BRACKETS */
+{
+  < B_RO: "(" > |
+  < B_RC: ")" > |
+  < B_SO: "[" > |
+  < B_SC: "]" > |
+  < B_CO: "{" > |
+  < B_CC: "}" > |
+  < B_XO: "<" > |
+  < B_XC: ">" > 
+}
+TOKEN :
+{
+    < URI: "<" (~[ ">","<", "\"", "{", "}", "^", "\\", "|", "`", "\u0000"-"\u0020"])+ ">" > |
+    < IDENTIFIER: ["a"-"z","A"-"Z","0"-"9","_"](["a"-"z","A"-"Z","0"-"9","_","'","-", "."])* > |
+    < #URICHAR: ["a"-"z","A"-"Z","0"-"9",";","/","?",":","@","&","=","+","$",".","-","_","!","~","*","'","%"] >
+}
+
+Map<String, String> Namespaces() :
+{
+    Map<String, String> ns = new HashMap<String, String>();
+    Entry<String, String> namespace = null;
+}
+{
+  (
+     namespace = Namespace() {
+       ns.put(namespace.getKey(), namespace.getValue());
+     }
+  )+
+  {
+    return ns;
+  }   
+}
+
+Entry<String, String> Namespace() :
+{
+    Token id = null;
+    Token uri;
+}
+{
+  ( 
+    <K_PREFIX> id = <IDENTIFIER> <COLON> uri = <URI> (<SCOLON> )? {
+    }
+  ) { return new Namespace(id.image, uri.image.substring(1,uri.image.length()-1)); }
+}
+
+Program Program() :
+{
+    Program<Node> program = new Program();
+    NodeTest<Node> filter = null;
+    Map<String, String> nss = null;
+    FieldMapping<?,Node> rule;
+    NodeSelector<Node> boostSelector;
+    LinkedList<URI> graphs;
+}
+{
+  (
+    nss = Namespaces() {
+        namespaces.putAll(nss);
+        for (String k : nss.keySet()) {
+            program.addNamespace(k, nss.get(k));
+        }
+    }
+  )?
+
+  (
+    <K_GRAPH> graphs = UriList() <SCOLON> {
+      program.setGraphs(graphs);
+    }
+  )?
+
+  (
+    <K_FILTER> filter = NodeTest() <SCOLON> {
+        program.setFilter(filter);
+    }
+  )?
+
+  (
+    <K_BOOST> boostSelector = Selector() <SCOLON> {
+    	NodeTransformer transformer = getTransformer(Program.DOCUMENT_BOOST_TYPE);
+		FieldMapping booster = new FieldMapping("@boost", java.net.URI.create(Program.DOCUMENT_BOOST_TYPE), boostSelector, transformer, null);
+		program.setBooster(booster);  
+    }
+  )?
+
+  (
+    rule = Rule()
+    {
+       program.addMapping(rule);
+    }
+  )*
+  <EOF>
+  {
+    return program;
+  }
+}
+
+LinkedList<URI> UriList() :
+{
+    LinkedList<URI> rest = null;
+    URI uri;
+}
+{
+    uri = Uri() ( <COMMA> rest = UriList() )?
+    {
+      if (rest == null) rest = new LinkedList<URI>();
+      rest.addFirst(uri);
+      return rest;
+    }
+}
+
+FieldMapping Rule() :
+{
+    FieldMapping<?,Node> rule;
+    Token name;
+    URI uri;
+    URI type = null;
+    NodeSelector<Node> selector;
+    NodeTransformer<?,Node> transformer;
+    Map<String, String> conf = null;
+}
+{
+    name = <IDENTIFIER> <ASSIGN> selector = Selector() (<DCOLON> type = Uri())? (<B_RO> conf = FieldConfig() <B_RC>)? <SCOLON> {
+        if(type != null) {
+            transformer = getTransformer(type);
+        } else {
+            transformer = new IdentityTransformer();
+        }
+        if(mode != Mode.PROGRAM) {
+            throw new ParseException("cannot use field names when parsing single paths");
+        }
+        rule = new FieldMapping(name.image,type,selector,transformer, conf);
+        return rule;
+    }
+|   uri = Uri() <ASSIGN> selector = Selector() (<DCOLON> type = Uri())? (<B_RO> conf = FieldConfig() <B_RC>)? <SCOLON> {
+        if(type != null) {
+            transformer = getTransformer(type);
+        } else {
+            transformer = new IdentityTransformer();
+        }
+        if(mode != Mode.PROGRAM) {
+            throw new ParseException("cannot use field names when parsing single paths");
+        }
+        rule = new FieldMapping(uri,type,selector,transformer, conf);
+        return rule;
+    }
+|   selector = Selector() (<DCOLON> type = Uri())? (<B_RO> conf = FieldConfig() <B_RC>)? (<SCOLON>)? {
+        if(type != null) {
+            transformer = getTransformer(type);
+        } else {
+            transformer = new IdentityTransformer();
+        }
+        if(mode != Mode.PROGRAM && conf != null) {
+            throw new ParseException("cannot use configuration parameters when parsing single paths");
+        }
+        try {
+            rule = new FieldMapping(selector.getName(backend),type,selector,transformer, conf);
+        } catch(UnsupportedOperationException ex) {
+            if(mode == Mode.PROGRAM) {
+                rule = new FieldMapping("unnamed",type,selector,transformer, conf);
+                log.error("error while parsing {}: {}", rule.getPathExpression(backend),ex.getMessage());
+                throw new ParseException("error while parsing "+rule.getPathExpression(backend)+": "+ex.getMessage());
+            } else {
+                rule = new FieldMapping("unnamed",type,selector,transformer, conf);
+            }
+        }
+        return rule;
+    }
+}
+
+
+Map<String,String> FieldConfig() : {
+	Map<String, String> conf = new HashMap<String, String>();
+	Token key = null;
+	String val = null;
+	Map<String,String> more = null;
+}
+{
+	( key = <IDENTIFIER> <ASSIGN> val = ConfVal() ( <COMMA> more = FieldConfig() )? )? {
+		if (key == null || val == null) return null;
+		conf.put(key.image, val);
+		if (more != null) {
+			conf.putAll(more);
+		}
+		return conf;
+	}
+}
+
+String ConfVal() : {
+	Token str, id;
+}
+{
+	str = <STRLIT> { return str.image.substring(1, str.image.length() -1); }
+|	id = <IDENTIFIER> { return id.image; }
+}
+
+URI Uri() : {
+    Token uri, prefix, localName;
+
+}
+{
+    uri = <URI> {
+       return java.net.URI.create(uri.image.substring(1,uri.image.length()-1));
+    }
+|   prefix = <IDENTIFIER> ":" localName = <IDENTIFIER> {
+        return java.net.URI.create(resolveNamespace(prefix.image)+localName.image);
+    }
+}
+
+
+NodeSelector Selector() :
+{
+    NodeSelector result;
+}
+{
+    (
+        result = CompoundSelector()
+    |   result = TestingSelector()
+    |   result = AtomicSelector()
+    )
+    {
+        return result;
+    }
+}
+
+
+NodeSelector CompoundSelector() :
+{
+    NodeSelector result = null;
+}
+{
+    (
+        /* Union Selector */
+        result = UnionSelector() |
+
+        /* Intersection Selector */
+        result = IntersectionSelector() |
+
+        /* Path Selector */
+        result = PathSelector()
+
+
+    )
+    {
+        return result;
+    }
+}
+
+/**
+ * As path elements, we do not allow arbitrary compound selectors, but we allow all atomic and path selectors.
+ */
+NodeSelector AtomicOrTestingOrPathSelector() :
+{
+    NodeSelector result = null;
+}
+{
+    (
+        /* Path Selector */
+        result = PathSelector() |
+
+        /* Atomic Selector */
+        result = AtomicOrTestingSelector()
+    )
+    {
+        return result;
+    }
+}
+
+NodeSelector AtomicOrTestingSelector() :
+{
+    NodeSelector result = null;
+}
+{
+    (
+        /* Testing Selector */
+        result = TestingSelector() |
+
+        /* Atomic Selector */
+        result = AtomicSelector()
+    )
+    {
+        return result;
+    }
+}
+
+NodeSelector AtomicSelector() :
+{
+    NodeSelector result = null;
+}
+{
+    (
+    	/* Self Selector */
+    	result = SelfSelector() |
+    	    
+        /* Property Selector */
+        result = PropertySelector() |
+
+        /* Wildcard Selector */
+        result = WildcardSelector() |
+        
+        /* Reverse Property Selector */
+        result = ReversePropertySelector() |
+
+        /* Function Selector */
+        result = FunctionSelector() |
+
+        /* String Constant Selector */
+        result = StringConstantSelector() |
+        
+        /* Recursive Path Selector */
+        result = RecursivePathSelector() |
+
+        /* Other selector enclosed in braces */
+        result = GroupedSelector()
+
+    )
+    {
+        return result;
+    }
+}
+
+NodeSelector SelfSelector() :
+{
+}
+{
+	<SELF> { return new SelfSelector(); }
+}
+
+NodeSelector GroupedSelector() :
+{
+    NodeSelector result = null;
+}
+{
+    /* Other selector enclosed in braces */
+    <B_RO> result = Selector() <B_RC>
+    {
+        return new GroupedSelector(result);
+    }
+
+}
+
+RecursivePathSelector RecursivePathSelector() :
+{
+	RecursivePathSelector result = null;
+	NodeSelector delegate        = null;
+}
+{
+	<B_RO> delegate = Selector() <B_RC> <PLUS>	
+	{
+		result = RecursivePathSelector.getPathSelectorPlused(delegate);
+		return result;
+	} |
+    <B_RO> delegate = Selector() <B_RC> <STAR>
+    {
+        result = RecursivePathSelector.getPathSelectorStared(delegate);
+        return result;
+    } 
+}
+
+PathSelector PathSelector() :
+{
+    PathSelector result = null;
+    NodeSelector left   = null;
+    NodeSelector right  = null;
+}
+{
+    left = AtomicOrTestingSelector() <P_SEP> right = AtomicOrTestingOrPathSelector()
+    {
+        result = new PathSelector(left,right);
+        return result;
+    }
+}
+
+IntersectionSelector IntersectionSelector() :
+{
+    IntersectionSelector result = null;
+    NodeSelector left   = null;
+    NodeSelector right  = null;
+}
+{
+    left = AtomicOrTestingOrPathSelector() <AND> right = Selector()
+    {
+        result = new IntersectionSelector(left,right);
+        return result;
+    }
+}
+
+UnionSelector UnionSelector() :
+{
+    UnionSelector result = null;
+    NodeSelector left   = null;
+    NodeSelector right  = null;
+}
+{
+    left = AtomicOrTestingOrPathSelector() <OR> right = Selector()
+    {
+        result = new UnionSelector(left,right);
+        return result;
+    }
+}
+
+TestingSelector TestingSelector() :
+{
+    TestingSelector result = null;
+    NodeSelector delegate  = null;
+    NodeTest test = null;
+}
+{
+    delegate = AtomicSelector() <B_SO> test = NodeTest() <B_SC> {
+        result = new TestingSelector(delegate,test);
+        return result;
+    }
+}
+
+ReversePropertySelector ReversePropertySelector() :
+{
+	ReversePropertySelector result = null;
+	URI uri;
+}
+{
+	<INVERSE> uri = Uri() {
+        result   = new ReversePropertySelector(resolveURI(uri));
+        return result;
+	}
+}
+
+PropertySelector PropertySelector() :
+{
+    PropertySelector result = null;
+    URI uri;
+}
+{
+    uri = Uri() {
+        result   = new PropertySelector(resolveURI(uri));
+        return result;
+    }
+}
+
+WildcardSelector WildcardSelector() :
+{
+    WildcardSelector result = null;
+}
+{
+    <STAR> {
+        result = new WildcardSelector();
+        return result;
+    }
+}
+
+FunctionSelector FunctionSelector() :
+{
+    FunctionSelector result = null;
+    List<NodeSelector> arguments = new ArrayList<NodeSelector>();
+    NodeSelector argument;
+    String uri;
+    Token fName;
+}
+{
+    /* Function-Calls without arguments can skip parenthesis */
+    /* Does not work... why?
+    <FUNC> fName = <IDENTIFIER> {
+           uri = namespaces.get("fn") + fName.image;
+           result = new FunctionSelector(getFunction(uri),Collections.emptyList());
+           return result;
+    } | */
+    /* Functions do not need to have arguments */
+    <FUNC> fName = <IDENTIFIER> <B_RO> <B_RC> {
+           uri = namespaces.get("fn") + fName.image;
+           result = new FunctionSelector(getFunction(uri),Collections.emptyList());
+           return result;
+    } |
+    /* Sometimes arguments are required */
+    <FUNC> fName = <IDENTIFIER> <B_RO>
+            argument = Selector() { arguments.add(argument); }
+            ( <COMMA> argument = Selector() { arguments.add(argument); } )*
+    <B_RC> {
+           uri = namespaces.get("fn") + fName.image;
+           result = new FunctionSelector(getFunction(uri),arguments);
+           return result;
+    }
+}
+
+
+StringConstantSelector StringConstantSelector() :
+{
+    StringConstantSelector result = null;
+    Token literal;
+}
+{
+    literal = <STRLIT> {
+        result = new StringConstantSelector(literal.image.substring(1, literal.image.length()-1));
+        return result;
+    }
+}
+
+
+
+NodeTest NodeTest() :
+{
+    NodeTest result;
+}
+{
+    (
+        result = GroupedTest()
+    |   result = NotTest()
+    |   result = AndTest()
+    |   result = OrTest()
+    |   result = AtomicNodeTest()
+    )
+    {
+        return result;
+    }
+}
+
+NodeTest GroupedTest() :
+{
+    NodeTest delegate;
+}
+{
+    <B_RO> delegate = NodeTest() <B_RC> {
+       return delegate;
+    }
+}
+
+NodeTest AtomicNodeTest() :
+{
+    NodeTest result;
+}
+{
+    (
+        result = LiteralLanguageTest()
+    |   result = LiteralTypeTest()
+    |   result = IsATest()
+    |   result = PathEqualityTest()
+    |   result = FunctionTest()
+    |   result = PathTest()
+    )
+    {
+        return result;
+    }
+}
+
+FunctionTest FunctionTest() :
+{
+    FunctionTest result;
+    List<NodeSelector> arguments = new ArrayList<NodeSelector>();
+    NodeSelector argument;
+    String uri;
+    Token fName;
+}
+{
+  (    
+    /* Function-Calls without arguments can skip parenthesis */
+    /* Does not work... why?
+    <FUNC> fName = <IDENTIFIER> {
+           uri = namespaces.get("fn") + fName.image;
+           result = new FunctionSelector(getTestFunction(uri),Collections.emptyList());
+    } | */
+    /* Functions do not need to have arguments */
+    <FUNC> fName = <IDENTIFIER> <B_RO> <B_RC> {
+           uri = namespaces.get("fn") + fName.image;
+           result = new FunctionTest(getTestFunction(uri),Collections.emptyList());
+    } |
+    /* Sometimes arguments are required */
+    <FUNC> fName = <IDENTIFIER> <B_RO>
+            argument = Selector() { arguments.add(argument); }
+            ( <COMMA> argument = Selector() { arguments.add(argument); } )*
+    <B_RC> {
+           uri = namespaces.get("fn") + fName.image;
+           result = new FunctionTest(getTestFunction(uri),arguments);
+    }
+  )
+  {
+    return result;
+  }
+}
+
+LiteralLanguageTest LiteralLanguageTest():
+{
+    Token lang;
+}
+{
+    <LANG> lang = <IDENTIFIER> {
+        return new LiteralLanguageTest(lang.image);
+    }
+}
+
+LiteralTypeTest LiteralTypeTest():
+{
+    URI type;
+}
+{
+    <TYPE> type = Uri() {
+        return new LiteralTypeTest(type);
+    }
+}
+
+NotTest NotTest() :
+{
+    NodeTest delegate;
+}
+{
+    <NOT>  delegate = NodeTest() {
+        return new NotTest(delegate);
+    }
+}
+
+IsATest IsATest() :
+{
+    Node node;
+}
+{
+    <IS_A> node = Node() {
+        return new IsATest(resolveResource("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"), node);
+    }
+}
+
+
+AndTest AndTest():
+{
+    NodeTest left, right;
+}
+{
+    left = AtomicNodeTest() <AND> right = NodeTest() {
+        return new AndTest(left,right);
+    }
+}
+
+OrTest OrTest():
+{
+    NodeTest left, right;
+}
+{
+    left = AtomicNodeTest() <OR> right = NodeTest() {
+        return new OrTest(left,right);
+    }
+}
+
+PathEqualityTest PathEqualityTest():
+{
+    NodeSelector path;
+    Node node;
+}
+{
+    path = Selector() <IS> node = Node() {
+        return new PathEqualityTest(path,node);
+    }
+}
+
+
+Node Node():
+{
+    URI uri, type = null;
+    Token literal, language;
+}
+{
+    uri = Uri() {
+        return resolveURI(uri);
+    }
+|   literal = <STRLIT>  (<TYPE> type = Uri() )? {
+        return backend.createLiteral(literal.image.substring(1, literal.image.length()-1),null,type);
+    }
+|   literal = <STRLIT>  <LANG> language = <IDENTIFIER> {
+        return backend.createLiteral(literal.image.substring(1, literal.image.length()-1),new Locale(language.image),null);
+    }
+}
+
+
+PathTest PathTest():
+{
+    NodeSelector path;
+}
+{
+    (
+        path = PathSelector()
+    |   path = TestingSelector()
+    |   path = AtomicSelector()
+    )
+    {
+        return new PathTest(path);
+    }
+}
+


[32/40] git commit: MARMOTTA-446: Added "includeInferred" flag to the SesameBackend constructors/factories. MARMOTTA-445: Fixed

Posted by ja...@apache.org.
MARMOTTA-446: Added "includeInferred" flag to the SesameBackend constructors/factories.
MARMOTTA-445: Fixed


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/5c6e30dd
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/5c6e30dd
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/5c6e30dd

Branch: refs/heads/ldp
Commit: 5c6e30dd188af34357a18a90f29151a3e2180342
Parents: 638dea3
Author: Jakob Frank <ja...@apache.org>
Authored: Wed Feb 26 12:16:44 2014 +0100
Committer: Jakob Frank <ja...@apache.org>
Committed: Wed Feb 26 14:16:20 2014 +0100

----------------------------------------------------------------------
 .../backend/sesame/AbstractSesameBackend.java   | 144 +++----
 .../ContextAwareSesameConnectionBackend.java    |  23 +-
 .../backend/sesame/SesameConnectionBackend.java |  88 ++--
 .../backend/sesame/SesameRepositoryBackend.java |  32 +-
 .../backend/sesame/SesameValueBackend.java      | 420 +++++++++----------
 5 files changed, 376 insertions(+), 331 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/5c6e30dd/libraries/ldpath/ldpath-backend-sesame/src/main/java/org/apache/marmotta/ldpath/backend/sesame/AbstractSesameBackend.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-backend-sesame/src/main/java/org/apache/marmotta/ldpath/backend/sesame/AbstractSesameBackend.java b/libraries/ldpath/ldpath-backend-sesame/src/main/java/org/apache/marmotta/ldpath/backend/sesame/AbstractSesameBackend.java
index 62fd5fe..08f7365 100644
--- a/libraries/ldpath/ldpath-backend-sesame/src/main/java/org/apache/marmotta/ldpath/backend/sesame/AbstractSesameBackend.java
+++ b/libraries/ldpath/ldpath-backend-sesame/src/main/java/org/apache/marmotta/ldpath/backend/sesame/AbstractSesameBackend.java
@@ -36,60 +36,60 @@ import org.slf4j.LoggerFactory;
 
 public abstract class AbstractSesameBackend extends SesameValueBackend implements RDFBackend<Value> {
 
-	private static final Logger log = LoggerFactory.getLogger(AbstractSesameBackend.class);
-
-	protected org.openrdf.model.URI createURIInternal(final ValueFactory valueFactory, String uri) {
-		return valueFactory.createURI(uri);
-	}
-
-	protected Literal createLiteralInternal(final ValueFactory valueFactory, String content) {
-		log.debug("creating literal with content \"{}\"",content);
-		return valueFactory.createLiteral(content);
-	}
-
-	protected Literal createLiteralInternal(final ValueFactory valueFactory, String content,
-			Locale language, URI type) {
-		log.debug("creating literal with content \"{}\", language {}, datatype {}",new Object[]{content,language,type});
-		if(language == null && type == null) {
-			return valueFactory.createLiteral(content);
-		} else if(type == null) {
-			return valueFactory.createLiteral(content,language.getLanguage());
-		} else  {
-			return valueFactory.createLiteral(content, valueFactory.createURI(type.toString()));
-		}
-	}
-
-	protected Collection<Value> listObjectsInternal(RepositoryConnection connection, Resource subject, org.openrdf.model.URI property, Resource... contexts)
-			throws RepositoryException {
+    private static final Logger log = LoggerFactory.getLogger(AbstractSesameBackend.class);
+
+    protected org.openrdf.model.URI createURIInternal(final ValueFactory valueFactory, String uri) {
+        return valueFactory.createURI(uri);
+    }
+
+    protected Literal createLiteralInternal(final ValueFactory valueFactory, String content) {
+        log.debug("creating literal with content \"{}\"",content);
+        return valueFactory.createLiteral(content);
+    }
+
+    protected Literal createLiteralInternal(final ValueFactory valueFactory, String content,
+                                            Locale language, URI type) {
+        log.debug("creating literal with content \"{}\", language {}, datatype {}",new Object[]{content,language,type});
+        if(language == null && type == null) {
+            return valueFactory.createLiteral(content);
+        } else if(type == null) {
+            return valueFactory.createLiteral(content,language.getLanguage());
+        } else  {
+            return valueFactory.createLiteral(content, valueFactory.createURI(type.toString()));
+        }
+    }
+
+    protected Collection<Value> listObjectsInternal(RepositoryConnection connection, Resource subject, org.openrdf.model.URI property, boolean includeInferred, Resource... contexts)
+            throws RepositoryException {
         final ValueFactory valueFactory = connection.getValueFactory();
 
-		Set<Value> result = new HashSet<Value>();
-		RepositoryResult<Statement> qResult = connection.getStatements(merge(subject, valueFactory), merge(property, valueFactory), null, true);
-		try {
-			while(qResult.hasNext()) {
-				result.add(qResult.next().getObject());
-			}
-		} finally {
-			qResult.close();
-		}
-		return  result;
-	}
-
-	protected Collection<Value> listSubjectsInternal(final RepositoryConnection connection, org.openrdf.model.URI property, Value object, Resource... contexts)
-			throws RepositoryException {
-	    final ValueFactory valueFactory = connection.getValueFactory();
-	    
-		Set<Value> result = new HashSet<Value>();
-        RepositoryResult<Statement> qResult = connection.getStatements(null, merge(property, valueFactory), merge(object, valueFactory), true);
-		try {
-			while(qResult.hasNext()) {
-				result.add(qResult.next().getSubject());
-			}
-		} finally {
-			qResult.close();
-		}
-		return  result;
-	}
+        Set<Value> result = new HashSet<Value>();
+        RepositoryResult<Statement> qResult = connection.getStatements(merge(subject, valueFactory), merge(property, valueFactory), null, includeInferred, contexts);
+        try {
+            while(qResult.hasNext()) {
+                result.add(qResult.next().getObject());
+            }
+        } finally {
+            qResult.close();
+        }
+        return  result;
+    }
+
+    protected Collection<Value> listSubjectsInternal(final RepositoryConnection connection, org.openrdf.model.URI property, Value object, boolean includeInferred, Resource... contexts)
+            throws RepositoryException {
+        final ValueFactory valueFactory = connection.getValueFactory();
+
+        Set<Value> result = new HashSet<Value>();
+        RepositoryResult<Statement> qResult = connection.getStatements(null, merge(property, valueFactory), merge(object, valueFactory), includeInferred, contexts);
+        try {
+            while(qResult.hasNext()) {
+                result.add(qResult.next().getSubject());
+            }
+        } finally {
+            qResult.close();
+        }
+        return  result;
+    }
 
     /**
      * Merge the value given as argument into the value factory given as argument
@@ -109,32 +109,32 @@ public abstract class AbstractSesameBackend extends SesameValueBackend implement
         }
     }
 
-	@Override
-	public abstract Literal createLiteral(String content);
+    @Override
+    public abstract Literal createLiteral(String content);
 
-	@Override
-	public abstract Literal createLiteral(String content, Locale language, URI type);
+    @Override
+    public abstract Literal createLiteral(String content, Locale language, URI type);
 
-	@Override
-	public abstract org.openrdf.model.URI createURI(String uri);
+    @Override
+    public abstract org.openrdf.model.URI createURI(String uri);
 
-	@Override
-	public abstract Collection<Value> listObjects(Value subject, Value property);
+    @Override
+    public abstract Collection<Value> listObjects(Value subject, Value property);
 
-	@Override
-	public abstract Collection<Value> listSubjects(Value property, Value object);
+    @Override
+    public abstract Collection<Value> listSubjects(Value property, Value object);
 
-	@Override
-	@Deprecated
-	public boolean supportsThreading() {
-		return false;
-	}
+    @Override
+    @Deprecated
+    public boolean supportsThreading() {
+        return false;
+    }
 
-	@Override
-	@Deprecated
-	public ThreadPoolExecutor getThreadPool() {
-		return null;
-	}
+    @Override
+    @Deprecated
+    public ThreadPoolExecutor getThreadPool() {
+        return null;
+    }
 
 
 }

http://git-wip-us.apache.org/repos/asf/marmotta/blob/5c6e30dd/libraries/ldpath/ldpath-backend-sesame/src/main/java/org/apache/marmotta/ldpath/backend/sesame/ContextAwareSesameConnectionBackend.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-backend-sesame/src/main/java/org/apache/marmotta/ldpath/backend/sesame/ContextAwareSesameConnectionBackend.java b/libraries/ldpath/ldpath-backend-sesame/src/main/java/org/apache/marmotta/ldpath/backend/sesame/ContextAwareSesameConnectionBackend.java
index 3368269..2930a8c 100644
--- a/libraries/ldpath/ldpath-backend-sesame/src/main/java/org/apache/marmotta/ldpath/backend/sesame/ContextAwareSesameConnectionBackend.java
+++ b/libraries/ldpath/ldpath-backend-sesame/src/main/java/org/apache/marmotta/ldpath/backend/sesame/ContextAwareSesameConnectionBackend.java
@@ -33,7 +33,17 @@ public class ContextAwareSesameConnectionBackend extends SesameConnectionBackend
      * @param contexts the contexts to look for, providing an empty array here will revert the functionality to {@link SesameConnectionBackend}.
      */
     public ContextAwareSesameConnectionBackend(RepositoryConnection connection, Resource... contexts) {
-        super(connection, contexts);
+        super(connection, true, contexts);
+    }
+
+    /**
+     * Create a new {@link ContextAwareSesameConnectionBackend} that considers only data from the provided contexts.
+     * @param connection the {@link RepositoryConnection} to use.
+     * @param includeInferred
+     * @param contexts the contexts to look for, providing an empty array here will revert the functionality to {@link SesameConnectionBackend}.
+     */
+    public ContextAwareSesameConnectionBackend(RepositoryConnection connection, boolean includeInferred, Resource... contexts) {
+        super(connection, includeInferred, contexts);
     }
 
     /**
@@ -44,4 +54,15 @@ public class ContextAwareSesameConnectionBackend extends SesameConnectionBackend
     public static ContextAwareSesameConnectionBackend withConnection(RepositoryConnection connection, Resource... contexts) {
         return new ContextAwareSesameConnectionBackend(connection, contexts);
     }
+
+
+    /**
+     * Create a new {@link ContextAwareSesameConnectionBackend} that considers only data from the provided contexts.
+     * @param connection the {@link RepositoryConnection} to use.
+     * @param includeInferred
+     * @param contexts the contexts to look for, providing an empty array here will revert the functionality to {@link SesameConnectionBackend}.
+     */
+    public static ContextAwareSesameConnectionBackend withConnection(RepositoryConnection connection, boolean includeInferred, Resource... contexts) {
+        return new ContextAwareSesameConnectionBackend(connection, includeInferred, contexts);
+    }
 }

http://git-wip-us.apache.org/repos/asf/marmotta/blob/5c6e30dd/libraries/ldpath/ldpath-backend-sesame/src/main/java/org/apache/marmotta/ldpath/backend/sesame/SesameConnectionBackend.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-backend-sesame/src/main/java/org/apache/marmotta/ldpath/backend/sesame/SesameConnectionBackend.java b/libraries/ldpath/ldpath-backend-sesame/src/main/java/org/apache/marmotta/ldpath/backend/sesame/SesameConnectionBackend.java
index afa3dea..ca4f427 100644
--- a/libraries/ldpath/ldpath-backend-sesame/src/main/java/org/apache/marmotta/ldpath/backend/sesame/SesameConnectionBackend.java
+++ b/libraries/ldpath/ldpath-backend-sesame/src/main/java/org/apache/marmotta/ldpath/backend/sesame/SesameConnectionBackend.java
@@ -30,59 +30,61 @@ import org.openrdf.repository.RepositoryException;
 
 public class SesameConnectionBackend extends AbstractSesameBackend {
 
-	private final RepositoryConnection connection;
-	private final ValueFactory valueFactory;
+    private final RepositoryConnection connection;
+    private final ValueFactory valueFactory;
     private final Resource[] contexts;
+    private final boolean includeInferred;
 
     /**
      * Create a new {@link SesameConnectionBackend}. This backend is context-agnostig (ignores all context information). 
      * @param connection the {@link RepositoryConnection} to use.
      * @see ContextAwareSesameConnectionBackend#ContextAwareSesameConnectionBackend(RepositoryConnection, Resource...)
      */
-	public SesameConnectionBackend(RepositoryConnection connection) {
-	    this(connection, new Resource[] {});
-	}
+    public SesameConnectionBackend(RepositoryConnection connection) {
+        this(connection, true);
+    }
 
-	protected SesameConnectionBackend(RepositoryConnection connection, Resource[] contexts) {
-	    this.connection = connection;
+    protected SesameConnectionBackend(RepositoryConnection connection, boolean includeInferred, Resource... contexts) {
+        this.connection = connection;
         this.contexts = contexts;
-	    valueFactory = connection.getValueFactory();
+        this.valueFactory = connection.getValueFactory();
+        this.includeInferred = includeInferred;
     }
 
     @Override
-	public Literal createLiteral(String content) {
-		return createLiteralInternal(valueFactory, content);
-	}
+    public Literal createLiteral(String content) {
+        return createLiteralInternal(valueFactory, content);
+    }
 
-	@Override
-	public Literal createLiteral(String content, Locale language, URI type) {
-		return createLiteralInternal(valueFactory, content, language, type);
-	}
+    @Override
+    public Literal createLiteral(String content, Locale language, URI type) {
+        return createLiteralInternal(valueFactory, content, language, type);
+    }
 
-	@Override
-	public org.openrdf.model.URI createURI(String uri) {
-		return createURIInternal(valueFactory, uri);
-	}
+    @Override
+    public org.openrdf.model.URI createURI(String uri) {
+        return createURIInternal(valueFactory, uri);
+    }
 
-	@Override
-	public Collection<Value> listObjects(Value subject, Value property) {
-		try {
-			return listObjectsInternal(connection, (Resource) subject, (org.openrdf.model.URI) property, contexts);
-		} catch (RepositoryException e) {
-			throw new RuntimeException(
-					"error while querying Sesame repository!", e);
-		} catch (ClassCastException e) {
-			throw new IllegalArgumentException(String.format(
-					"Subject needs to be a URI or blank node, property a URI node "
-							+ "(types: [subject: %s, property: %s])",
-					debugType(subject), debugType(property)), e);
-		}
-	}
+    @Override
+    public Collection<Value> listObjects(Value subject, Value property) {
+        try {
+            return listObjectsInternal(connection, (Resource) subject, (org.openrdf.model.URI) property, includeInferred, contexts);
+        } catch (RepositoryException e) {
+            throw new RuntimeException(
+                    "error while querying Sesame repository!", e);
+        } catch (ClassCastException e) {
+            throw new IllegalArgumentException(String.format(
+                    "Subject needs to be a URI or blank node, property a URI node "
+                            + "(types: [subject: %s, property: %s])",
+                    debugType(subject), debugType(property)), e);
+        }
+    }
 
-	@Override
-	public Collection<Value> listSubjects(Value property, Value object) {
+    @Override
+    public Collection<Value> listSubjects(Value property, Value object) {
         try {
-        	return listSubjectsInternal(connection, (org.openrdf.model.URI) property, object, contexts);
+            return listSubjectsInternal(connection, (org.openrdf.model.URI) property, object, includeInferred, contexts);
         } catch (RepositoryException e) {
             throw new RuntimeException("error while querying Sesame repository!",e);
         } catch (ClassCastException e) {
@@ -90,15 +92,19 @@ public class SesameConnectionBackend extends AbstractSesameBackend {
                     "Property needs to be a URI node (property type: %s)",
                     isURI(property)?"URI":isBlank(property)?"bNode":"literal"),e);
         }
-	}
+    }
 
     /**
      * Create a new {@link SesameConnectionBackend}. This backend is context-agnostig (ignores all context information). 
      * @param connection the {@link RepositoryConnection} to use.
      * @see ContextAwareSesameConnectionBackend#withConnection(RepositoryConnection, Resource...)
      */
-	public static SesameConnectionBackend withConnection(RepositoryConnection connection) {
-		return new SesameConnectionBackend(connection);
-	}
-	
+    public static SesameConnectionBackend withConnection(RepositoryConnection connection) {
+        return new SesameConnectionBackend(connection);
+    }
+
+    public static SesameConnectionBackend withConnection(RepositoryConnection connection, boolean includeInferred) {
+        return new SesameConnectionBackend(connection, includeInferred);
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/marmotta/blob/5c6e30dd/libraries/ldpath/ldpath-backend-sesame/src/main/java/org/apache/marmotta/ldpath/backend/sesame/SesameRepositoryBackend.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-backend-sesame/src/main/java/org/apache/marmotta/ldpath/backend/sesame/SesameRepositoryBackend.java b/libraries/ldpath/ldpath-backend-sesame/src/main/java/org/apache/marmotta/ldpath/backend/sesame/SesameRepositoryBackend.java
index d98575a..392146c 100644
--- a/libraries/ldpath/ldpath-backend-sesame/src/main/java/org/apache/marmotta/ldpath/backend/sesame/SesameRepositoryBackend.java
+++ b/libraries/ldpath/ldpath-backend-sesame/src/main/java/org/apache/marmotta/ldpath/backend/sesame/SesameRepositoryBackend.java
@@ -42,20 +42,38 @@ import org.openrdf.repository.RepositoryException;
 public class SesameRepositoryBackend extends AbstractSesameBackend {
 
     private Repository repository;
+    private final boolean includeInferred;
+    private final Resource[] contexts;
 
     /**
      * Initialise a new sesame backend. Repository needs to be set using setRepository.
      */
     protected SesameRepositoryBackend() {
+        this.includeInferred = false;
+        this.contexts = new Resource[0];
     }
 
     /**
      * Initialise a new sesame backend using the repository passed as argument.
+     * Queries will include inferred statements and all contexts.
      *
      * @param repository
      */
     public SesameRepositoryBackend(Repository repository) {
+        this(repository, true);
+    }
+
+    /**
+     * Initialise a new sesame backend using the repository.
+     *
+     * @param repository
+     * @param includeInferred
+     * @param contexts
+     */
+    public SesameRepositoryBackend(Repository repository, boolean includeInferred, Resource... contexts) {
         this.repository = repository;
+        this.includeInferred = includeInferred;
+        this.contexts = contexts;
     }
 
     public Repository getRepository() {
@@ -75,7 +93,7 @@ public class SesameRepositoryBackend extends AbstractSesameBackend {
      */
     @Override
     public Literal createLiteral(String content) {
-    	return createLiteralInternal(repository.getValueFactory(), content);
+        return createLiteralInternal(repository.getValueFactory(), content);
     }
 
 
@@ -87,7 +105,7 @@ public class SesameRepositoryBackend extends AbstractSesameBackend {
      */
     @Override
     public Literal createLiteral(String content, Locale language, URI type) {
-    	return createLiteralInternal(repository.getValueFactory(), content, language, type);
+        return createLiteralInternal(repository.getValueFactory(), content, language, type);
     }
 
 
@@ -116,8 +134,8 @@ public class SesameRepositoryBackend extends AbstractSesameBackend {
             RepositoryConnection connection = repository.getConnection();
 
             try {
-            	connection.begin();
-            	return listObjectsInternal(connection, (Resource) subject, (org.openrdf.model.URI) property);
+                connection.begin();
+                return listObjectsInternal(connection, (Resource) subject, (org.openrdf.model.URI) property, includeInferred, contexts);
             } finally {
                 connection.commit();
                 connection.close();
@@ -133,7 +151,7 @@ public class SesameRepositoryBackend extends AbstractSesameBackend {
 
     }
 
-	/**
+    /**
      * List the subjects of triples in the triple store underlying this backend that have the object and
      * property given as argument.
      *
@@ -148,8 +166,8 @@ public class SesameRepositoryBackend extends AbstractSesameBackend {
             final RepositoryConnection connection = repository.getConnection();
 
             try {
-            	connection.begin();
-            	return listSubjectsInternal(connection, (org.openrdf.model.URI) property, object);
+                connection.begin();
+                return listSubjectsInternal(connection, (org.openrdf.model.URI) property, object, includeInferred, contexts);
             } finally {
                 connection.commit();
                 connection.close();

http://git-wip-us.apache.org/repos/asf/marmotta/blob/5c6e30dd/libraries/ldpath/ldpath-backend-sesame/src/main/java/org/apache/marmotta/ldpath/backend/sesame/SesameValueBackend.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-backend-sesame/src/main/java/org/apache/marmotta/ldpath/backend/sesame/SesameValueBackend.java b/libraries/ldpath/ldpath-backend-sesame/src/main/java/org/apache/marmotta/ldpath/backend/sesame/SesameValueBackend.java
index b341a27..e127886 100644
--- a/libraries/ldpath/ldpath-backend-sesame/src/main/java/org/apache/marmotta/ldpath/backend/sesame/SesameValueBackend.java
+++ b/libraries/ldpath/ldpath-backend-sesame/src/main/java/org/apache/marmotta/ldpath/backend/sesame/SesameValueBackend.java
@@ -38,237 +38,237 @@ import org.slf4j.LoggerFactory;
 
 public class SesameValueBackend implements NodeBackend<Value>{
 
-	private static final Logger log = LoggerFactory.getLogger(SesameValueBackend.class);
+    private static final Logger log = LoggerFactory.getLogger(SesameValueBackend.class);
 
-	public SesameValueBackend() {
-		super();
-	}
+    public SesameValueBackend() {
+        super();
+    }
 
-	/**
-	 * Test whether the node passed as argument is a literal
-	 *
-	 * @param n the node to check
-	 * @return true if the node is a literal
-	 */
-	@Override
-	public boolean isLiteral(Value n) {
-	    return n instanceof Literal;
-	}
+    /**
+     * Test whether the node passed as argument is a literal
+     *
+     * @param n the node to check
+     * @return true if the node is a literal
+     */
+    @Override
+    public boolean isLiteral(Value n) {
+        return n instanceof Literal;
+    }
 
-	/**
-	 * Test whether the node passed as argument is a URI
-	 *
-	 * @param n the node to check
-	 * @return true if the node is a URI
-	 */
-	@Override
-	public boolean isURI(Value n) {
-	    return n instanceof org.openrdf.model.URI;
-	}
+    /**
+     * Test whether the node passed as argument is a URI
+     *
+     * @param n the node to check
+     * @return true if the node is a URI
+     */
+    @Override
+    public boolean isURI(Value n) {
+        return n instanceof org.openrdf.model.URI;
+    }
 
-	/**
-	 * Test whether the node passed as argument is a blank node
-	 *
-	 * @param n the node to check
-	 * @return true if the node is a blank node
-	 */
-	@Override
-	public boolean isBlank(Value n) {
-	    return n instanceof BNode;
-	}
+    /**
+     * Test whether the node passed as argument is a blank node
+     *
+     * @param n the node to check
+     * @return true if the node is a blank node
+     */
+    @Override
+    public boolean isBlank(Value n) {
+        return n instanceof BNode;
+    }
 
-	/**
-	 * Return the language of the literal node passed as argument.
-	 *
-	 * @param n the literal node for which to return the language
-	 * @return a Locale representing the language of the literal, or null if the literal node has no language
-	 * @throws IllegalArgumentException in case the node is no literal
-	 */
-	@Override
-	public Locale getLiteralLanguage(Value n) {
-	    try {
-	        if(((Literal)n).getLanguage() != null) {
-	            return new Locale( ((Literal)n).getLanguage() );
-	        } else {
-	            return null;
-	        }
-	    } catch (ClassCastException e) {
-	        throw new IllegalArgumentException("Value "+n.stringValue()+" is not a literal" +
-	                "but of type "+debugType(n));
-	    }
-	}
+    /**
+     * Return the language of the literal node passed as argument.
+     *
+     * @param n the literal node for which to return the language
+     * @return a Locale representing the language of the literal, or null if the literal node has no language
+     * @throws IllegalArgumentException in case the node is no literal
+     */
+    @Override
+    public Locale getLiteralLanguage(Value n) {
+        try {
+            if(((Literal)n).getLanguage() != null) {
+                return new Locale( ((Literal)n).getLanguage() );
+            } else {
+                return null;
+            }
+        } catch (ClassCastException e) {
+            throw new IllegalArgumentException("Value "+n.stringValue()+" is not a literal" +
+                    "but of type "+debugType(n));
+        }
+    }
 
-	/**
-	 * Return the URI of the type of the literal node passed as argument.
-	 *
-	 * @param n the literal node for which to return the typer
-	 * @return a URI representing the type of the literal content, or null if the literal is untyped
-	 * @throws IllegalArgumentException in case the node is no literal
-	 */
-	@Override
-	public URI getLiteralType(Value n) {
-	    try {
-	        if(((Literal)n).getDatatype() != null) {
-	            try {
-	                return new URI(((Literal)n).getDatatype().stringValue());
-	            } catch (URISyntaxException e) {
-	                log.error("literal datatype was not a valid URI: {}",((Literal) n).getDatatype());
-	                return null;
-	            }
-	        } else {
-	            return null;
-	        }
-	    } catch (ClassCastException e) {
-	        throw new IllegalArgumentException("Value "+n.stringValue()+" is not a literal" +
-	                "but of type "+debugType(n));
-	    }
-	}
+    /**
+     * Return the URI of the type of the literal node passed as argument.
+     *
+     * @param n the literal node for which to return the typer
+     * @return a URI representing the type of the literal content, or null if the literal is untyped
+     * @throws IllegalArgumentException in case the node is no literal
+     */
+    @Override
+    public URI getLiteralType(Value n) {
+        try {
+            if(((Literal)n).getDatatype() != null) {
+                try {
+                    return new URI(((Literal)n).getDatatype().stringValue());
+                } catch (URISyntaxException e) {
+                    log.error("literal datatype was not a valid URI: {}",((Literal) n).getDatatype());
+                    return null;
+                }
+            } else {
+                return null;
+            }
+        } catch (ClassCastException e) {
+            throw new IllegalArgumentException("Value "+n.stringValue()+" is not a literal" +
+                    "but of type "+debugType(n));
+        }
+    }
 
-	/**
-	 * Return the string value of a node. For a literal, this will be the content, for a URI node it will be the
-	 * URI itself, and for a blank node it will be the identifier of the node.
-	 *
-	 * @param value
-	 * @return
-	 */
-	@Override
-	public String stringValue(Value value) {
-	    return value.stringValue();
-	}
+    /**
+     * Return the string value of a node. For a literal, this will be the content, for a URI node it will be the
+     * URI itself, and for a blank node it will be the identifier of the node.
+     *
+     * @param value
+     * @return
+     */
+    @Override
+    public String stringValue(Value value) {
+        return value.stringValue();
+    }
 
-	@Override
-	public BigDecimal decimalValue(Value node) {
-	    try {
-	        return ((Literal)node).decimalValue();
-	    } catch (ClassCastException e) {
-	        throw new IllegalArgumentException("Value "+node.stringValue()+" is not a literal" +
-	                "but of type "+debugType(node));
-	    }
-	}
+    @Override
+    public BigDecimal decimalValue(Value node) {
+        try {
+            return ((Literal)node).decimalValue();
+        } catch (ClassCastException e) {
+            throw new IllegalArgumentException("Value "+node.stringValue()+" is not a literal" +
+                    "but of type "+debugType(node));
+        }
+    }
 
-	@Override
-	public BigInteger integerValue(Value node) {
-	    try {
-	        return ((Literal)node).integerValue();
-	    } catch (ClassCastException e) {
-	        throw new IllegalArgumentException("Value "+node.stringValue()+" is not a literal" +
-	                "but of type "+debugType(node));
-	    }
-	}
+    @Override
+    public BigInteger integerValue(Value node) {
+        try {
+            return ((Literal)node).integerValue();
+        } catch (ClassCastException e) {
+            throw new IllegalArgumentException("Value "+node.stringValue()+" is not a literal" +
+                    "but of type "+debugType(node));
+        }
+    }
 
-	@Override
-	public Boolean booleanValue(Value node) {
-	    try {
-	        return ((Literal)node).booleanValue();
-	    } catch (ClassCastException e) {
-	        throw new IllegalArgumentException("Value "+node.stringValue()+" is not a literal" +
-	                "but of type "+debugType(node));
-	    }
-	}
+    @Override
+    public Boolean booleanValue(Value node) {
+        try {
+            return ((Literal)node).booleanValue();
+        } catch (ClassCastException e) {
+            throw new IllegalArgumentException("Value "+node.stringValue()+" is not a literal" +
+                    "but of type "+debugType(node));
+        }
+    }
 
-	@Override
-	public Date dateTimeValue(Value node) {
-	    try {
-	        XMLGregorianCalendar cal = ((Literal)node).calendarValue();
-	        //TODO: check if we need to deal with timezone and Local here
-	        return cal.toGregorianCalendar().getTime();
-	    } catch (ClassCastException e) {
-	        throw new IllegalArgumentException("Value "+node.stringValue()+" is not a literal" +
-	                "but of type "+debugType(node));
-	    }
-	}
+    @Override
+    public Date dateTimeValue(Value node) {
+        try {
+            XMLGregorianCalendar cal = ((Literal)node).calendarValue();
+            //TODO: check if we need to deal with timezone and Local here
+            return cal.toGregorianCalendar().getTime();
+        } catch (ClassCastException e) {
+            throw new IllegalArgumentException("Value "+node.stringValue()+" is not a literal" +
+                    "but of type "+debugType(node));
+        }
+    }
 
-	@Override
-	public Date dateValue(Value node) {
-	    try {
-	        XMLGregorianCalendar cal = ((Literal)node).calendarValue();
-	        return new GregorianCalendar(cal.getYear(), cal.getMonth(), cal.getDay()).getTime();
-	    } catch (ClassCastException e) {
-	        throw new IllegalArgumentException("Value "+node.stringValue()+" is not a literal" +
-	                "but of type "+debugType(node));
-	    }
-	}
+    @Override
+    public Date dateValue(Value node) {
+        try {
+            XMLGregorianCalendar cal = ((Literal)node).calendarValue();
+            return new GregorianCalendar(cal.getYear(), cal.getMonth(), cal.getDay()).getTime();
+        } catch (ClassCastException e) {
+            throw new IllegalArgumentException("Value "+node.stringValue()+" is not a literal" +
+                    "but of type "+debugType(node));
+        }
+    }
 
-	@Override
-	public Date timeValue(Value node) {
-	    //TODO: Unless someone knows how to create a Date that only has the time
-	    //      from a XMLGregorianCalendar
-	    return dateTimeValue(node);
-	}
+    @Override
+    public Date timeValue(Value node) {
+        //TODO: Unless someone knows how to create a Date that only has the time
+        //      from a XMLGregorianCalendar
+        return dateTimeValue(node);
+    }
 
-	@Override
-	public Long longValue(Value node) {
-	    try {
-	        return ((Literal)node).longValue();
-	    } catch (ClassCastException e) {
-	        throw new IllegalArgumentException("Value "+node.stringValue()+" is not a literal" +
-	                "but of type "+debugType(node));
-	    }
-	}
+    @Override
+    public Long longValue(Value node) {
+        try {
+            return ((Literal)node).longValue();
+        } catch (ClassCastException e) {
+            throw new IllegalArgumentException("Value "+node.stringValue()+" is not a literal" +
+                    "but of type "+debugType(node));
+        }
+    }
 
-	@Override
-	public Double doubleValue(Value node) {
-	    try {
-	        return ((Literal)node).doubleValue();
-	    } catch (ClassCastException e) {
-	        throw new IllegalArgumentException("Value "+node.stringValue()+" is not a literal" +
-	                "but of type "+debugType(node));
-	    }
-	}
+    @Override
+    public Double doubleValue(Value node) {
+        try {
+            return ((Literal)node).doubleValue();
+        } catch (ClassCastException e) {
+            throw new IllegalArgumentException("Value "+node.stringValue()+" is not a literal" +
+                    "but of type "+debugType(node));
+        }
+    }
 
-	@Override
-	public Float floatValue(Value node) {
-	    try {
-	        return ((Literal)node).floatValue();
-	    } catch (ClassCastException e) {
-	        throw new IllegalArgumentException("Value "+node.stringValue()+" is not a literal" +
-	                "but of type "+debugType(node));
-	    }
-	}
+    @Override
+    public Float floatValue(Value node) {
+        try {
+            return ((Literal)node).floatValue();
+        } catch (ClassCastException e) {
+            throw new IllegalArgumentException("Value "+node.stringValue()+" is not a literal" +
+                    "but of type "+debugType(node));
+        }
+    }
 
-	@Override
-	public Integer intValue(Value node) {
-	    try {
-	        return ((Literal)node).intValue();
-	    } catch (ClassCastException e) {
-	        throw new IllegalArgumentException("Value "+node.stringValue()+" is not a literal" +
-	                "but of type "+debugType(node));
-	    }
-	}
+    @Override
+    public Integer intValue(Value node) {
+        try {
+            return ((Literal)node).intValue();
+        } catch (ClassCastException e) {
+            throw new IllegalArgumentException("Value "+node.stringValue()+" is not a literal" +
+                    "but of type "+debugType(node));
+        }
+    }
 
 
-	/**
-	 * Prints the type (URI,bNode,literal) by inspecting the parsed {@link Value}
-	 * to improve error messages and other loggings. In case of literals 
-	 * also the {@link #getLiteralType(Value) literal type} is printed
-	 * @param value the value or <code>null</code> 
-	 * @return the type as string.
-	 */
-	protected String debugType(Value value) {
-	    return value == null ? "null":isURI(value)?"URI":isBlank(value)?"bNode":
-	            "literal ("+getLiteralType(value)+")";
-	}
+    /**
+     * Prints the type (URI,bNode,literal) by inspecting the parsed {@link Value}
+     * to improve error messages and other loggings. In case of literals
+     * also the {@link #getLiteralType(Value) literal type} is printed
+     * @param value the value or <code>null</code>
+     * @return the type as string.
+     */
+    protected String debugType(Value value) {
+        return value == null ? "null":isURI(value)?"URI":isBlank(value)?"bNode":
+                "literal ("+getLiteralType(value)+")";
+    }
 
-	@Override
-	public Literal createLiteral(String content) {
-		return new LiteralImpl(content);
-	}
+    @Override
+    public Literal createLiteral(String content) {
+        return new LiteralImpl(content);
+    }
 
-	@Override
-	public Literal createLiteral(String content, Locale language, URI type) {
-		log.debug("creating literal with content \"{}\", language {}, datatype {}",new Object[]{content,language,type});
-		if(language == null && type == null) {
-			return createLiteral(content);
-		} else if(type == null) {
-			return new LiteralImpl(content,language.getLanguage());
-		} else  {
-			return new LiteralImpl(content, createURI(type.toString()));
-		}
-	}
+    @Override
+    public Literal createLiteral(String content, Locale language, URI type) {
+        log.debug("creating literal with content \"{}\", language {}, datatype {}",new Object[]{content,language,type});
+        if(language == null && type == null) {
+            return createLiteral(content);
+        } else if(type == null) {
+            return new LiteralImpl(content,language.getLanguage());
+        } else  {
+            return new LiteralImpl(content, createURI(type.toString()));
+        }
+    }
 
-	@Override
-	public org.openrdf.model.URI createURI(String uri) {
-		return new URIImpl(uri);
-	}
+    @Override
+    public org.openrdf.model.URI createURI(String uri) {
+        return new URIImpl(uri);
+    }
 
 }
\ No newline at end of file


[12/40] git commit: Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/marmotta into develop

Posted by ja...@apache.org.
Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/marmotta into develop

# By Sebastian Schaffert
# Via Sebastian Schaffert
* 'develop' of https://git-wip-us.apache.org/repos/asf/marmotta:
  added configuration defaults and descriptions for clustering
  make cache mode configurable in triplestore and platform for clustered operation


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/3ef4c49b
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/3ef4c49b
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/3ef4c49b

Branch: refs/heads/ldp
Commit: 3ef4c49bd183fca7c536171f5c1cf31c8ff31e31
Parents: 0fa9754 2aa3f51
Author: Rupert Westenthaler <ru...@gmail.com>
Authored: Thu Feb 13 10:36:29 2014 +0100
Committer: Rupert Westenthaler <ru...@gmail.com>
Committed: Thu Feb 13 10:36:29 2014 +0100

----------------------------------------------------------------------
 .../marmotta/kiwi/caching/KiWiCacheManager.java | 59 ++++++++++++------
 .../apache/marmotta/kiwi/config/CacheMode.java  | 45 ++++++++++++++
 .../marmotta/kiwi/config/KiWiConfiguration.java | 46 ++++++++++++++
 .../core/services/cache/CachingServiceImpl.java | 65 +++++++++++++-------
 .../main/resources/config-defaults.properties   |  3 +
 .../resources/config-descriptions.properties    | 17 ++++-
 6 files changed, 191 insertions(+), 44 deletions(-)
----------------------------------------------------------------------



[10/40] git commit: make cache mode configurable in triplestore and platform for clustered operation

Posted by ja...@apache.org.
make cache mode configurable in triplestore and platform for clustered operation


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/964b28cc
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/964b28cc
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/964b28cc

Branch: refs/heads/ldp
Commit: 964b28ccdf21853c5af89eb9b1afb2a6e8244ea3
Parents: 99254fe
Author: Sebastian Schaffert <ss...@apache.org>
Authored: Wed Feb 12 18:10:33 2014 +0100
Committer: Sebastian Schaffert <ss...@apache.org>
Committed: Wed Feb 12 18:10:33 2014 +0100

----------------------------------------------------------------------
 .../marmotta/kiwi/caching/KiWiCacheManager.java | 59 ++++++++++++------
 .../apache/marmotta/kiwi/config/CacheMode.java  | 45 ++++++++++++++
 .../marmotta/kiwi/config/KiWiConfiguration.java | 46 ++++++++++++++
 .../core/services/cache/CachingServiceImpl.java | 65 +++++++++++++-------
 4 files changed, 172 insertions(+), 43 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/964b28cc/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/caching/KiWiCacheManager.java
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/caching/KiWiCacheManager.java b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/caching/KiWiCacheManager.java
index be9538e..9760a66 100644
--- a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/caching/KiWiCacheManager.java
+++ b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/caching/KiWiCacheManager.java
@@ -41,6 +41,9 @@ import java.util.Iterator;
 import java.util.Set;
 import java.util.concurrent.TimeUnit;
 
+import static org.apache.marmotta.kiwi.config.CacheMode.DISTRIBUTED;
+import static org.apache.marmotta.kiwi.config.CacheMode.REPLICATED;
+
 /**
  * A class for managing the different caches that are used by the triple store.
  * <p/>
@@ -85,7 +88,7 @@ public class KiWiCacheManager {
         this.clustered = config.isClustered();
         this.kiWiConfiguration = config;
 
-        if(clustered) {
+        if(clustered && (config.getCacheMode() == DISTRIBUTED || config.getCacheMode() == REPLICATED)) {
             try {
                 String jgroupsXml = IOUtils.toString(KiWiCacheManager.class.getResourceAsStream("/jgroups-kiwi.xml"));
 
@@ -126,27 +129,43 @@ public class KiWiCacheManager {
 
             }
 
-
-            defaultConfiguration = new ConfigurationBuilder()
-                    .clustering()
-                        .cacheMode(CacheMode.DIST_ASYNC)
-                        .async()
-                            .asyncMarshalling()
-                        .l1()
-                            .lifespan(5, TimeUnit.MINUTES)
-                        .hash()
-                            .numOwners(2)
-                            .numSegments(40)
-                            .consistentHashFactory(new SyncConsistentHashFactory())
+            if(config.getCacheMode() == DISTRIBUTED) {
+                defaultConfiguration = new ConfigurationBuilder()
+                        .clustering()
+                            .cacheMode(CacheMode.DIST_ASYNC)
+                            .async()
+                                .asyncMarshalling()
+                            .l1()
+                                .lifespan(5, TimeUnit.MINUTES)
+                            .hash()
+                                .numOwners(2)
+                                .numSegments(40)
+                                .consistentHashFactory(new SyncConsistentHashFactory())
+                            .stateTransfer()
+                                .fetchInMemoryState(false)
+                        .eviction()
+                            .strategy(EvictionStrategy.LIRS)
+                            .maxEntries(100000)
+                        .expiration()
+                            .lifespan(30, TimeUnit.MINUTES)
+                            .maxIdle(10, TimeUnit.MINUTES)
+                        .build();
+            } else {
+                defaultConfiguration = new ConfigurationBuilder()
+                        .clustering()
+                            .cacheMode(CacheMode.REPL_ASYNC)
+                            .async()
+                                .asyncMarshalling()
                         .stateTransfer()
                             .fetchInMemoryState(false)
-                    .eviction()
-                        .strategy(EvictionStrategy.LIRS)
-                        .maxEntries(100000)
-                    .expiration()
-                        .lifespan(30, TimeUnit.MINUTES)
-                        .maxIdle(10, TimeUnit.MINUTES)
-                    .build();
+                        .eviction()
+                            .strategy(EvictionStrategy.LIRS)
+                            .maxEntries(100000)
+                        .expiration()
+                            .lifespan(30, TimeUnit.MINUTES)
+                            .maxIdle(10, TimeUnit.MINUTES)
+                        .build();
+            }
         } else {
             globalConfiguration = new GlobalConfigurationBuilder()
                     .classLoader(KiWiCacheManager.class.getClassLoader())

http://git-wip-us.apache.org/repos/asf/marmotta/blob/964b28cc/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/config/CacheMode.java
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/config/CacheMode.java b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/config/CacheMode.java
new file mode 100644
index 0000000..94964b4
--- /dev/null
+++ b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/config/CacheMode.java
@@ -0,0 +1,45 @@
+/*
+ * 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.kiwi.config;
+
+/**
+ * Add file description here!
+ *
+ * @author Sebastian Schaffert (sschaffert@apache.org)
+ */
+public enum CacheMode {
+    /**
+     * In local cache mode, the cache is not shared among the servers in a cluster. Each machine keeps a local cache.
+     * This allows quick startups and eliminates network traffic in the cluster, but subsequent requests to different
+     * cluster members cannot benefit from the cached data.
+     */
+    LOCAL,
+
+    /**
+     * In distributed cache mode, the cluster forms a big hash table used as a cache. This allows to make efficient
+     * use of the large amount of memory available, but requires cache rebalancing and a lot of network transfers,
+     * especially in case cluster members are restarted often.
+     */
+    DISTRIBUTED,
+
+    /**
+     * In replicated cache mode, each node in the cluster has an identical copy of all cache data. This allows
+     * very efficient cache lookups and reduces the rebalancing effort, but requires more memory.
+     */
+    REPLICATED
+}

http://git-wip-us.apache.org/repos/asf/marmotta/blob/964b28cc/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/config/KiWiConfiguration.java
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/config/KiWiConfiguration.java b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/config/KiWiConfiguration.java
index 8be3c76..21e740e 100644
--- a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/config/KiWiConfiguration.java
+++ b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/config/KiWiConfiguration.java
@@ -106,6 +106,9 @@ public class KiWiConfiguration {
 
     private RegistryStrategy registryStrategy = RegistryStrategy.CACHE;
 
+
+    private CacheMode cacheMode = CacheMode.DISTRIBUTED;
+
     /**
      * Enable to turn on cluster mode (e.g. for cache replication)
      */
@@ -413,6 +416,49 @@ public class KiWiConfiguration {
 
 
     /**
+     * Get the cache mode for this KiWi triple store. The following cluster modes are available:
+     * <ul>
+     *     <li>LOCAL: In local cache mode, the cache is not shared among the servers in a cluster. Each machine keeps a local cache.
+     *         This allows quick startups and eliminates network traffic in the cluster, but subsequent requests to different
+     *         cluster members cannot benefit from the cached data.</li>
+     *     <li>DISTRIBUTED: In distributed cache mode, the cluster forms a big hash table used as a cache. This allows to make efficient
+     *         use of the large amount of memory available, but requires cache rebalancing and a lot of network transfers,
+     *         especially in case cluster members are restarted often.</li>
+     *     <li>REPLICATED: In replicated cache mode, each node in the cluster has an identical copy of all cache data. This allows
+     *         very efficient cache lookups and reduces the rebalancing effort, but requires more memory.</li>
+     * </ul>
+     *
+     * This setting is only relevant if clustered = true . If the configuration is not clustered, the triple store will always
+     * use LOCAL mode.
+     *
+     */
+    public CacheMode getCacheMode() {
+        return cacheMode;
+    }
+
+    /**
+     * Set the cache mode for this KiWi triple store. The following cluster modes are available:
+     * <ul>
+     *     <li>LOCAL: In local cache mode, the cache is not shared among the servers in a cluster. Each machine keeps a local cache.
+     *         This allows quick startups and eliminates network traffic in the cluster, but subsequent requests to different
+     *         cluster members cannot benefit from the cached data.</li>
+     *     <li>DISTRIBUTED: In distributed cache mode, the cluster forms a big hash table used as a cache. This allows to make efficient
+     *         use of the large amount of memory available, but requires cache rebalancing and a lot of network transfers,
+     *         especially in case cluster members are restarted often.</li>
+     *     <li>REPLICATED: In replicated cache mode, each node in the cluster has an identical copy of all cache data. This allows
+     *         very efficient cache lookups and reduces the rebalancing effort, but requires more memory.</li>
+     * </ul>
+     *
+     * This setting is only relevant if clustered = true . If the configuration is not clustered, the triple store will always
+     * use LOCAL mode.
+     *
+     * @param cacheMode
+     */
+    public void setCacheMode(CacheMode cacheMode) {
+        this.cacheMode = cacheMode;
+    }
+
+    /**
      * Return the name of the cluster. This name is e.g. used by the Infinispan cache to identify other cache members
      * in the same cluster,
      *

http://git-wip-us.apache.org/repos/asf/marmotta/blob/964b28cc/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/cache/CachingServiceImpl.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/cache/CachingServiceImpl.java b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/cache/CachingServiceImpl.java
index 2ac763d..f53cdc6 100644
--- a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/cache/CachingServiceImpl.java
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/services/cache/CachingServiceImpl.java
@@ -18,6 +18,7 @@
 package org.apache.marmotta.platform.core.services.cache;
 
 import org.apache.commons.io.IOUtils;
+import org.apache.commons.lang3.StringUtils;
 import org.apache.marmotta.platform.core.api.cache.CachingService;
 import org.apache.marmotta.platform.core.api.config.ConfigurationService;
 import org.apache.marmotta.platform.core.events.SystemRestartingEvent;
@@ -58,6 +59,7 @@ public class CachingServiceImpl implements CachingService {
     public static final String CLUSTERING_PORT = "clustering.port";
     public static final String CLUSTERING_ADDRESS = "clustering.address";
     public static final String CLUSTERING_ENABLED = "clustering.enabled";
+    public static final String CLUSTERING_MODE = "clustering.mode";
 
     /**
      * Get the seam logger for issuing logging statements.
@@ -83,9 +85,11 @@ public class CachingServiceImpl implements CachingService {
     @PostConstruct
     public void initialize() {
         boolean clustered = configurationService.getBooleanConfiguration(CLUSTERING_ENABLED, false);
+        String cacheMode = configurationService.getStringConfiguration(CLUSTERING_MODE,"replicated");
+
 
         log.info("Apache Marmotta Caching Service starting up ({}) ...", clustered ? "cluster name: " + configurationService.getStringConfiguration("clustering.name", "Marmotta") : "single host" );
-        if(clustered) {
+        if(clustered && (StringUtils.equalsIgnoreCase(cacheMode,"replicated") || StringUtils.equalsIgnoreCase(cacheMode, "distributed"))) {
 
             try {
                 String jgroupsXml = IOUtils.toString(CachingService.class.getResourceAsStream("/jgroups-marmotta.xml"));
@@ -120,28 +124,43 @@ public class CachingServiceImpl implements CachingService {
             }
 
 
-
-
-            defaultConfiguration = new ConfigurationBuilder()
-                    .clustering()
-                        .cacheMode(CacheMode.DIST_ASYNC)
-                        .async()
+            if(StringUtils.equalsIgnoreCase(cacheMode, "distributed")) {
+                defaultConfiguration = new ConfigurationBuilder()
+                        .clustering()
+                            .cacheMode(CacheMode.DIST_ASYNC)
+                            .async()
+                                .asyncMarshalling()
+                            .l1()
+                                .lifespan(5, TimeUnit.MINUTES)
+                            .hash()
+                                .numOwners(2)
+                                .numSegments(40)
+                                .consistentHashFactory(new SyncConsistentHashFactory())
+                        .stateTransfer()
+                            .fetchInMemoryState(false)
+                        .eviction()
+                            .strategy(EvictionStrategy.LIRS)
+                            .maxEntries(100000)
+                        .expiration()
+                            .lifespan(30, TimeUnit.MINUTES)
+                            .maxIdle(10, TimeUnit.MINUTES)
+                        .build();
+            } else {
+                defaultConfiguration = new ConfigurationBuilder()
+                        .clustering()
+                            .cacheMode(CacheMode.REPL_ASYNC)
+                            .async()
                             .asyncMarshalling()
-                        .l1()
-                            .lifespan(5, TimeUnit.MINUTES)
-                        .hash()
-                            .numOwners(2)
-                            .numSegments(40)
-                            .consistentHashFactory(new SyncConsistentHashFactory())
-                    .stateTransfer()
-                        .fetchInMemoryState(false)
-                    .eviction()
-                        .strategy(EvictionStrategy.LIRS)
-                        .maxEntries(10000)
-                    .expiration()
-                        .lifespan(30, TimeUnit.MINUTES)
-                        .maxIdle(10, TimeUnit.MINUTES)
-                    .build();
+                        .stateTransfer()
+                            .fetchInMemoryState(false)
+                        .eviction()
+                            .strategy(EvictionStrategy.LIRS)
+                            .maxEntries(100000)
+                        .expiration()
+                            .lifespan(30, TimeUnit.MINUTES)
+                            .maxIdle(10, TimeUnit.MINUTES)
+                        .build();
+            }
         } else {
             globalConfiguration = new GlobalConfigurationBuilder()
                     .globalJmxStatistics()
@@ -154,7 +173,7 @@ public class CachingServiceImpl implements CachingService {
                         .cacheMode(CacheMode.LOCAL)
                     .eviction()
                         .strategy(EvictionStrategy.LIRS)
-                        .maxEntries(1000)
+                        .maxEntries(100000)
                     .expiration()
                         .lifespan(5, TimeUnit.MINUTES)
                         .maxIdle(1, TimeUnit.MINUTES)


[31/40] git commit: Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/marmotta into develop

Posted by ja...@apache.org.
Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/marmotta into develop

# By Jakob Frank (3) and Sergio Fernández (3)
# Via Sergio Fernández
* 'develop' of https://git-wip-us.apache.org/repos/asf/marmotta:
  MARMOTTA-431: fixed version generation, both for snapshots and releases
  fixed naming of the ldpath-parser spec (and updated license header)
  MARMOTTA-431: changed package name to just 'marmotta' (replaces the other)
  Fixed marmotta-loader to cleanup the statistics db on shutdown (also moved the file to ${temp.dir})  - updated statistics to use nio.Path
  reformated rdfpath.jj and moved it to the right subdirectory
  updated maven-download-plugin


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/638dea35
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/638dea35
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/638dea35

Branch: refs/heads/ldp
Commit: 638dea35be21de2749131e3ac220278a440d05cb
Parents: 517f76e ef113cd
Author: Rupert Westenthaler <ru...@gmail.com>
Authored: Wed Feb 26 12:05:45 2014 +0100
Committer: Rupert Westenthaler <ru...@gmail.com>
Committed: Wed Feb 26 12:05:45 2014 +0100

----------------------------------------------------------------------
 launchers/marmotta-installer/pom.xml            |    2 +-
 launchers/marmotta-webapp/pom.xml               |   25 +-
 .../marmotta-webapp/src/deb/control/control     |    1 +
 .../at/newmedialab/ldpath/parser/rdfpath.jj     | 1102 -----------------
 .../org/apache/marmotta/ldpath/parser/ldpath.jj | 1106 ++++++++++++++++++
 .../marmotta/loader/statistics/Statistics.java  |   74 +-
 .../loader/core/test/LoaderTestBase.java        |    7 +-
 .../core/test/dummy/DummyLoaderBackend.java     |    4 +-
 .../core/test/dummy/DummyLoaderHandler.java     |   17 +-
 parent/pom.xml                                  |    5 +
 10 files changed, 1195 insertions(+), 1148 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/638dea35/parent/pom.xml
----------------------------------------------------------------------


[07/40] git commit: Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/marmotta into develop

Posted by ja...@apache.org.
Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/marmotta into develop

# By Sebastian Schaffert
# Via Sebastian Schaffert
* 'develop' of https://git-wip-us.apache.org/repos/asf/marmotta:
  fix statements


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/756ed46f
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/756ed46f
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/756ed46f

Branch: refs/heads/ldp
Commit: 756ed46f4eed83a7dc2bd2b2539d55834eeedac5
Parents: d4c22f4 af130d6
Author: Rupert Westenthaler <ru...@gmail.com>
Authored: Wed Feb 5 13:50:05 2014 +0100
Committer: Rupert Westenthaler <ru...@gmail.com>
Committed: Wed Feb 5 13:50:05 2014 +0100

----------------------------------------------------------------------
 .../marmotta/kiwi/persistence/h2/statements.properties  | 12 ++++++------
 .../kiwi/persistence/mysql/statements.properties        | 12 ++++++------
 .../kiwi/persistence/pgsql/statements.properties        | 12 ++++++------
 3 files changed, 18 insertions(+), 18 deletions(-)
----------------------------------------------------------------------



[25/40] git commit: MARMOTTA-431: fixed version generation, both for snapshots and releases

Posted by ja...@apache.org.
MARMOTTA-431: fixed version generation, both for snapshots and releases


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/e3059d65
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/e3059d65
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/e3059d65

Branch: refs/heads/ldp
Commit: e3059d659fa20c17a4b2dd69c7b2dfb2c10574ac
Parents: 7496b4f
Author: Sergio Fernández <wi...@apache.org>
Authored: Tue Feb 25 16:53:40 2014 +0100
Committer: Sergio Fernández <wi...@apache.org>
Committed: Tue Feb 25 16:53:40 2014 +0100

----------------------------------------------------------------------
 launchers/marmotta-webapp/pom.xml | 26 +++++++++++++++-----------
 parent/pom.xml                    |  5 +++++
 2 files changed, 20 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/e3059d65/launchers/marmotta-webapp/pom.xml
----------------------------------------------------------------------
diff --git a/launchers/marmotta-webapp/pom.xml b/launchers/marmotta-webapp/pom.xml
index 748e486..03cb4fd 100644
--- a/launchers/marmotta-webapp/pom.xml
+++ b/launchers/marmotta-webapp/pom.xml
@@ -121,16 +121,20 @@
                 </configuration>
             </plugin>
             <plugin>
-                <groupId>org.codehaus.mojo</groupId>
-                <artifactId>build-helper-maven-plugin</artifactId>
-                <version>1.8</version>
+                <groupId>org.codehaus.gmaven</groupId>
+                <artifactId>gmaven-plugin</artifactId>
                 <executions>
-                  <execution>
-                    <id>parse-version</id>
-                    <goals>
-                      <goal>parse-version</goal>
-                    </goals>
-                  </execution>
+                    <execution>
+                        <phase>generate-sources</phase>
+                        <goals>
+                            <goal>execute</goal>
+                        </goals>
+                        <configuration>
+                            <source>
+                                project.properties.setProperty("version.clean", "${project.version}".replace('-SNAPSHOT', '-${maven.build.timestamp}'))
+                            </source>
+                        </configuration>
+                    </execution>
                 </executions>
             </plugin>
             <plugin>
@@ -145,8 +149,8 @@
                             <goal>jdeb</goal>
                         </goals>
                         <configuration>
-                            <deb>${project.build.directory}/${project.build.finalName}_${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}~${maven.build.timestamp}_all.deb</deb>
-                            <changesOut>${project.build.directory}/${project.build.finalName}_${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}~${maven.build.timestamp}_all.changes</changesOut>
+                            <deb>${project.build.directory}/${project.build.finalName}_${version.clean}_all.deb</deb>
+                            <changesOut>${project.build.directory}/${project.build.finalName}_${version.clean}_all.changes</changesOut>
                             <controlDir>${basedir}/src/deb/control</controlDir>
                             <dataSet>
                                 <data>

http://git-wip-us.apache.org/repos/asf/marmotta/blob/e3059d65/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index a6b1414..62d30cb 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -575,6 +575,11 @@
                         <jswarn>false</jswarn>
                     </configuration>
                 </plugin>
+                <plugin>
+                    <groupId>org.codehaus.gmaven</groupId>
+                    <artifactId>gmaven-plugin</artifactId>
+                    <version>1.5</version>
+                </plugin>
             </plugins>
         </pluginManagement>
         <plugins>


[15/40] git commit: MARMOTTA-431: refined some details of the .deb package

Posted by ja...@apache.org.
MARMOTTA-431: refined some details of the .deb package


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/f7d7371c
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/f7d7371c
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/f7d7371c

Branch: refs/heads/ldp
Commit: f7d7371c3fd8e2cc3d45c2ff90c8291cd911dc07
Parents: da93ae3
Author: Sergio Fernández <wi...@apache.org>
Authored: Tue Feb 18 15:27:02 2014 +0100
Committer: Sergio Fernández <wi...@apache.org>
Committed: Tue Feb 18 15:27:02 2014 +0100

----------------------------------------------------------------------
 launchers/marmotta-webapp/pom.xml                  | 14 ++++++++++++++
 launchers/marmotta-webapp/src/deb/control/control  |  8 ++++++--
 launchers/marmotta-webapp/src/deb/control/postinst |  2 +-
 launchers/marmotta-webapp/src/deb/control/postrm   |  4 +++-
 launchers/marmotta-webapp/src/deb/control/preinst  |  2 +-
 launchers/marmotta-webapp/src/deb/control/prerm    |  4 +++-
 launchers/marmotta-webapp/src/deb/pkg/README       |  1 +
 launchers/marmotta-webapp/src/deb/pkg/changelog    |  5 +++++
 launchers/marmotta-webapp/src/deb/pkg/copyright    |  8 ++++++++
 9 files changed, 42 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/f7d7371c/launchers/marmotta-webapp/pom.xml
----------------------------------------------------------------------
diff --git a/launchers/marmotta-webapp/pom.xml b/launchers/marmotta-webapp/pom.xml
index 84dc039..d9cda1e 100644
--- a/launchers/marmotta-webapp/pom.xml
+++ b/launchers/marmotta-webapp/pom.xml
@@ -122,6 +122,7 @@
             <plugin>
                 <artifactId>jdeb</artifactId>
                 <groupId>org.vafer</groupId>
+                <!--<version>1.1-SNAPSHOT</version>-->
                 <version>1.0.1</version>
                 <executions>
                     <execution>
@@ -134,6 +135,16 @@
                             <controlDir>${basedir}/src/deb/control</controlDir>
                             <dataSet>
                                 <data>
+                                    <src>${basedir}/src/deb/pkg</src>
+                                    <type>directory</type>
+                                    <mapper>
+                                        <type>perm</type>
+                                        <prefix>usr/share/doc/marmotta</prefix>
+                                        <user>root</user>
+                                        <group>root</group>
+                                    </mapper>
+                                </data>
+                                <data>
                                     <src>${basedir}/src/deb/home</src>
                                     <type>directory</type>
                                     <mapper>
@@ -164,6 +175,9 @@
                                     </mapper>
                                 </data>
                             </dataSet>
+                            <signPackage>true</signPackage>
+                            <key>5531369F</key>
+                            <timestamped>true</timestamped>
                             <verbose>false</verbose>
                         </configuration>
                     </execution>

http://git-wip-us.apache.org/repos/asf/marmotta/blob/f7d7371c/launchers/marmotta-webapp/src/deb/control/control
----------------------------------------------------------------------
diff --git a/launchers/marmotta-webapp/src/deb/control/control b/launchers/marmotta-webapp/src/deb/control/control
index 68c23b8..d90993d 100644
--- a/launchers/marmotta-webapp/src/deb/control/control
+++ b/launchers/marmotta-webapp/src/deb/control/control
@@ -3,6 +3,10 @@ Version: [[version]]
 Section: java
 Priority: extra
 Architecture: all
-Description: [[description]]
-Maintainer: wikier@apache.org
+Distribution: ldstack-nightly
+Maintainer: Sergio Fernández <wi...@apache.org>
 Depends: tomcat7 (>=7.0.30-1)
+Description: Apache Marmotta is an Open Platform for Linked Data
+ The goal of Apache Marmotta is to provide an open implementation of a Linked 
+ Data Platform that can be used, extended and deployed easily by organizations 
+ who want to publish Linked Data or build custom applications on Linked Data.

http://git-wip-us.apache.org/repos/asf/marmotta/blob/f7d7371c/launchers/marmotta-webapp/src/deb/control/postinst
----------------------------------------------------------------------
diff --git a/launchers/marmotta-webapp/src/deb/control/postinst b/launchers/marmotta-webapp/src/deb/control/postinst
index ca20fc2..8cb3f30 100644
--- a/launchers/marmotta-webapp/src/deb/control/postinst
+++ b/launchers/marmotta-webapp/src/deb/control/postinst
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/sh -e
 
 echo $(date) >> var/lib/marmotta/marmotta.txt
 

http://git-wip-us.apache.org/repos/asf/marmotta/blob/f7d7371c/launchers/marmotta-webapp/src/deb/control/postrm
----------------------------------------------------------------------
diff --git a/launchers/marmotta-webapp/src/deb/control/postrm b/launchers/marmotta-webapp/src/deb/control/postrm
index 58cbe36..ced87d6 100644
--- a/launchers/marmotta-webapp/src/deb/control/postrm
+++ b/launchers/marmotta-webapp/src/deb/control/postrm
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/sh -e
 
 operation="$1"
 
@@ -14,5 +14,7 @@ case "$operation" in
     ;;
 esac
 
+service tomcat7 start
+
 exit 0
 

http://git-wip-us.apache.org/repos/asf/marmotta/blob/f7d7371c/launchers/marmotta-webapp/src/deb/control/preinst
----------------------------------------------------------------------
diff --git a/launchers/marmotta-webapp/src/deb/control/preinst b/launchers/marmotta-webapp/src/deb/control/preinst
index b6c4e6e..de2ed73 100644
--- a/launchers/marmotta-webapp/src/deb/control/preinst
+++ b/launchers/marmotta-webapp/src/deb/control/preinst
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/sh -e
 
 service tomcat7 stop
 

http://git-wip-us.apache.org/repos/asf/marmotta/blob/f7d7371c/launchers/marmotta-webapp/src/deb/control/prerm
----------------------------------------------------------------------
diff --git a/launchers/marmotta-webapp/src/deb/control/prerm b/launchers/marmotta-webapp/src/deb/control/prerm
index 500fb1e..120736e 100644
--- a/launchers/marmotta-webapp/src/deb/control/prerm
+++ b/launchers/marmotta-webapp/src/deb/control/prerm
@@ -1,4 +1,6 @@
-#!/bin/sh
+#!/bin/sh -e
+
+service tomcat7 stop
 
 exit 0
 

http://git-wip-us.apache.org/repos/asf/marmotta/blob/f7d7371c/launchers/marmotta-webapp/src/deb/pkg/README
----------------------------------------------------------------------
diff --git a/launchers/marmotta-webapp/src/deb/pkg/README b/launchers/marmotta-webapp/src/deb/pkg/README
new file mode 100644
index 0000000..f8b46d5
--- /dev/null
+++ b/launchers/marmotta-webapp/src/deb/pkg/README
@@ -0,0 +1 @@
+Apache Marmotta Web Application

http://git-wip-us.apache.org/repos/asf/marmotta/blob/f7d7371c/launchers/marmotta-webapp/src/deb/pkg/changelog
----------------------------------------------------------------------
diff --git a/launchers/marmotta-webapp/src/deb/pkg/changelog b/launchers/marmotta-webapp/src/deb/pkg/changelog
new file mode 100644
index 0000000..5d6d389
--- /dev/null
+++ b/launchers/marmotta-webapp/src/deb/pkg/changelog
@@ -0,0 +1,5 @@
+marmotta (3.2.0-SNAPSHOT) ldstack-nightly; urgency=low
+
+  * First Marmotta Webapp Debian package
+
+ -- Sergio Fernandez <wi...@apache.org>  Tue, 18 Feb 2014 14:36:00 +0100

http://git-wip-us.apache.org/repos/asf/marmotta/blob/f7d7371c/launchers/marmotta-webapp/src/deb/pkg/copyright
----------------------------------------------------------------------
diff --git a/launchers/marmotta-webapp/src/deb/pkg/copyright b/launchers/marmotta-webapp/src/deb/pkg/copyright
new file mode 100644
index 0000000..6113bf8
--- /dev/null
+++ b/launchers/marmotta-webapp/src/deb/pkg/copyright
@@ -0,0 +1,8 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: Apache Marmotta
+Upstream-Contact: Sergio Fernández <wi...@apache.org>
+Source: http://marmotta.apache.org
+
+Files: *
+Copyright: 2012-2014 The Apache Software Foundation
+License: Apache


[38/40] git commit: Fixed parameter wording

Posted by ja...@apache.org.
Fixed parameter wording


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/e2e23ef7
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/e2e23ef7
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/e2e23ef7

Branch: refs/heads/ldp
Commit: e2e23ef7439067489f3a39097563a9ca34130b84
Parents: 0a69f01
Author: Jakob Frank <ja...@apache.org>
Authored: Sat Mar 1 09:45:29 2014 +0100
Committer: Jakob Frank <ja...@apache.org>
Committed: Sat Mar 1 09:45:29 2014 +0100

----------------------------------------------------------------------
 .../marmotta/platform/core/startup/MarmottaStartupService.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/e2e23ef7/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/startup/MarmottaStartupService.java
----------------------------------------------------------------------
diff --git a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/startup/MarmottaStartupService.java b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/startup/MarmottaStartupService.java
index f0b4ca5..07bc0cc 100644
--- a/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/startup/MarmottaStartupService.java
+++ b/platform/marmotta-core/src/main/java/org/apache/marmotta/platform/core/startup/MarmottaStartupService.java
@@ -85,10 +85,10 @@ public class MarmottaStartupService {
     /**
      * Startup the Apache Marmotta Configuration. This method ensures that the Apache Marmotta home directory is created and the
      * ConfigurationService is properly initialised. It must be called first in the startup sequence.
-     * The parameters lmfHome and configurationOverride can be used to override the default settings
+     * The parameters home and configurationOverride can be used to override the default settings
      * of the Apache Marmotta.
      *
-     * @param lmfHome                 home directory of the Apache Marmotta instance (may be null, in which case the default will be used)
+     * @param home                    home directory of the Apache Marmotta instance (may be null, in which case the default will be used)
      * @param configurationOverride   configuration options that should override the default values from default-config.properties (may be null)
      * @param context                 the servlet context the Apache Marmotta is running in (may be null)
      */


[13/40] git commit: fixed default setting for caching in kiwi

Posted by ja...@apache.org.
fixed default setting for caching in kiwi


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/da93ae37
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/da93ae37
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/da93ae37

Branch: refs/heads/ldp
Commit: da93ae37595ba2182af671559b85f52fd7546b42
Parents: 2aa3f51
Author: Sebastian Schaffert <ss...@apache.org>
Authored: Thu Feb 13 12:41:33 2014 +0100
Committer: Sebastian Schaffert <ss...@apache.org>
Committed: Thu Feb 13 12:41:33 2014 +0100

----------------------------------------------------------------------
 .../java/org/apache/marmotta/kiwi/config/KiWiConfiguration.java    | 2 +-
 platform/marmotta-zookeeper/pom.xml                                | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/da93ae37/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/config/KiWiConfiguration.java
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/config/KiWiConfiguration.java b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/config/KiWiConfiguration.java
index 21e740e..3658d25 100644
--- a/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/config/KiWiConfiguration.java
+++ b/libraries/kiwi/kiwi-triplestore/src/main/java/org/apache/marmotta/kiwi/config/KiWiConfiguration.java
@@ -107,7 +107,7 @@ public class KiWiConfiguration {
     private RegistryStrategy registryStrategy = RegistryStrategy.CACHE;
 
 
-    private CacheMode cacheMode = CacheMode.DISTRIBUTED;
+    private CacheMode cacheMode = CacheMode.REPLICATED;
 
     /**
      * Enable to turn on cluster mode (e.g. for cache replication)

http://git-wip-us.apache.org/repos/asf/marmotta/blob/da93ae37/platform/marmotta-zookeeper/pom.xml
----------------------------------------------------------------------
diff --git a/platform/marmotta-zookeeper/pom.xml b/platform/marmotta-zookeeper/pom.xml
index b7b32fd..9f193b8 100644
--- a/platform/marmotta-zookeeper/pom.xml
+++ b/platform/marmotta-zookeeper/pom.xml
@@ -142,7 +142,7 @@
         <dependency>
             <groupId>at.salzburgresearch.nodekeeper</groupId>
             <artifactId>nodekeeper-java</artifactId>
-            <version>1.0</version>
+            <version>1.1</version>
 
             <exclusions>
                 <exclusion>


[19/40] git commit: Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/marmotta into develop

Posted by ja...@apache.org.
Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/marmotta into develop

# By Sergio Fernández
# Via Sergio Fernández
* 'develop' of https://git-wip-us.apache.org/repos/asf/marmotta:
  MARMOTTA-431: last details
  MARMOTTA-431: fixed missing arch in the .deb file


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/db610014
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/db610014
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/db610014

Branch: refs/heads/ldp
Commit: db61001401728f8990c0768cde8995b363b1056a
Parents: da95d01 5fa42d2
Author: Rupert Westenthaler <ru...@gmail.com>
Authored: Mon Feb 24 10:17:53 2014 +0100
Committer: Rupert Westenthaler <ru...@gmail.com>
Committed: Mon Feb 24 10:17:53 2014 +0100

----------------------------------------------------------------------
 launchers/marmotta-webapp/pom.xml                 | 18 ++++++++++++++++--
 launchers/marmotta-webapp/src/deb/control/control |  2 +-
 2 files changed, 17 insertions(+), 3 deletions(-)
----------------------------------------------------------------------



[22/40] git commit: Fixed marmotta-loader to cleanup the statistics db on shutdown (also moved the file to ${temp.dir}) - updated statistics to use nio.Path

Posted by ja...@apache.org.
Fixed marmotta-loader to cleanup the statistics db on shutdown (also moved the file to ${temp.dir})
 - updated statistics to use nio.Path


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/df99bded
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/df99bded
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/df99bded

Branch: refs/heads/ldp
Commit: df99bdedb722cfe15b4afafec906ab29f12bd07d
Parents: 4b04fff
Author: Jakob Frank <ja...@apache.org>
Authored: Tue Feb 25 10:07:28 2014 +0100
Committer: Jakob Frank <ja...@apache.org>
Committed: Tue Feb 25 10:07:28 2014 +0100

----------------------------------------------------------------------
 .../marmotta/loader/statistics/Statistics.java  | 74 ++++++++++++--------
 .../loader/core/test/LoaderTestBase.java        |  7 +-
 .../core/test/dummy/DummyLoaderBackend.java     |  4 +-
 .../core/test/dummy/DummyLoaderHandler.java     | 17 ++++-
 4 files changed, 67 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/df99bded/loader/marmotta-loader-core/src/main/java/org/apache/marmotta/loader/statistics/Statistics.java
----------------------------------------------------------------------
diff --git a/loader/marmotta-loader-core/src/main/java/org/apache/marmotta/loader/statistics/Statistics.java b/loader/marmotta-loader-core/src/main/java/org/apache/marmotta/loader/statistics/Statistics.java
index c44fdf1..2535fd5 100644
--- a/loader/marmotta-loader-core/src/main/java/org/apache/marmotta/loader/statistics/Statistics.java
+++ b/loader/marmotta-loader-core/src/main/java/org/apache/marmotta/loader/statistics/Statistics.java
@@ -31,8 +31,9 @@ import org.slf4j.LoggerFactory;
 import javax.imageio.ImageIO;
 import java.awt.*;
 import java.awt.image.BufferedImage;
-import java.io.File;
 import java.io.IOException;
+import java.io.OutputStream;
+import java.nio.file.*;
 import java.util.concurrent.Executors;
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.TimeUnit;
@@ -48,7 +49,7 @@ public class Statistics {
 
     private StatisticsHandler handler;
 
-
+    protected Path statFile;
     protected RrdDb statDB;
     protected Sample statSample;
     protected long statLastDump;
@@ -61,6 +62,7 @@ public class Statistics {
     private long start, previous;
 
     private Configuration configuration;
+    private DiagramUpdater diagramUpdater;
 
     public Statistics(StatisticsHandler handler, Configuration configuration) {
         this.handler       = handler;
@@ -74,20 +76,23 @@ public class Statistics {
         this.start = System.currentTimeMillis();
         this.previous = System.currentTimeMillis();
 
-        File statFile = new File("kiwiloader.rrd");
-        if(statFile.exists()) {
-            log.info("deleting old statistics database");
-            statFile.delete();
-        }
+        try {
+            statFile = Files.createTempFile("kiwiloader.", ".rrd");
+            Path gFile;
+            if (configuration.containsKey(LoaderOptions.STATISTICS_GRAPH)) {
+                gFile = Paths.get(configuration.getString(LoaderOptions.STATISTICS_GRAPH));
+            } else {
+                gFile = Files.createTempFile("marmotta-loader.", ".png");
+            }
 
-        RrdDef stCfg = new RrdDef("kiwiloader.rrd");
-        stCfg.setStep(SAMPLE_INTERVAL);
-        stCfg.addDatasource("triples", DsType.COUNTER, 600, Double.NaN, Double.NaN);
-        stCfg.addArchive(ConsolFun.AVERAGE, 0.5, 1, 1440);  // every five seconds for 2 hours
-        stCfg.addArchive(ConsolFun.AVERAGE, 0.5, 12, 1440); // every minute for 1 day
-        stCfg.addArchive(ConsolFun.AVERAGE, 0.5, 60, 1440); // every five minutes for five days
 
-        try {
+            RrdDef stCfg = new RrdDef(statFile.toString());
+            stCfg.setStep(SAMPLE_INTERVAL);
+            stCfg.addDatasource("triples", DsType.COUNTER, 600, Double.NaN, Double.NaN);
+            stCfg.addArchive(ConsolFun.AVERAGE, 0.5, 1, 1440);  // every five seconds for 2 hours
+            stCfg.addArchive(ConsolFun.AVERAGE, 0.5, 12, 1440); // every minute for 1 day
+            stCfg.addArchive(ConsolFun.AVERAGE, 0.5, 60, 1440); // every five minutes for five days
+
             statDB = new RrdDb(stCfg);
             statSample = statDB.createSample();
             statLastDump = System.currentTimeMillis();
@@ -97,7 +102,8 @@ public class Statistics {
             statSampler.scheduleAtFixedRate(new StatisticsUpdater(),0, SAMPLE_INTERVAL, TimeUnit.SECONDS);
 
             // create a statistics diagram every 5 minutes
-            statSampler.scheduleAtFixedRate(new DiagramUpdater(),DIAGRAM_INTERVAL,DIAGRAM_INTERVAL,TimeUnit.SECONDS);
+            diagramUpdater = new DiagramUpdater(gFile);
+            statSampler.scheduleAtFixedRate(diagramUpdater,DIAGRAM_INTERVAL,DIAGRAM_INTERVAL,TimeUnit.SECONDS);
         } catch (IOException e) {
             log.warn("could not initialize statistics database: {}",e.getMessage());
         }
@@ -105,8 +111,13 @@ public class Statistics {
     }
 
     public void stopSampling() {
-        DiagramUpdater du = new DiagramUpdater();
-        du.run();
+        if(statSampler != null) {
+            statSampler.shutdown();
+        }
+
+        if (diagramUpdater != null) {
+            diagramUpdater.run();
+        }
 
         if(statDB != null) {
             try {
@@ -115,8 +126,11 @@ public class Statistics {
                 log.warn("could not close statistics database...");
             }
         }
-        if(statSampler != null) {
-            statSampler.shutdown();
+
+        try {
+            Files.deleteIfExists(statFile);
+        } catch (IOException e) {
+            log.warn("could not cleanup statistics database: {}",e.getMessage());
         }
     }
 
@@ -169,15 +183,16 @@ public class Statistics {
 
 
     private class DiagramUpdater implements Runnable {
+
+        private final Path gFile;
+
+        public DiagramUpdater(Path gFile) {
+            this.gFile = gFile;
+        }
+
         @Override
         public void run() {
             try {
-                File gFile = new File(configuration.getString(LoaderOptions.STATISTICS_GRAPH, File.createTempFile("marmotta-loader","png").getAbsolutePath()));
-
-                if(gFile.exists()) {
-                    gFile.delete();
-                }
-
                 // generate PNG diagram
                 RrdGraphDef gDef = new RrdGraphDef();
                 gDef.setFilename("-");
@@ -190,7 +205,7 @@ public class Statistics {
                 gDef.setAntiAliasing(true);
 
 
-                gDef.datasource("triples", "kiwiloader.rrd", "triples", ConsolFun.AVERAGE);
+                gDef.datasource("triples", statFile.toString(), "triples", ConsolFun.AVERAGE);
 
                 gDef.line("triples", Color.BLUE, "Triples Written", 3F);
 
@@ -201,9 +216,12 @@ public class Statistics {
                 RrdGraph graph = new RrdGraph(gDef);
                 BufferedImage img = new BufferedImage(900,750, BufferedImage.TYPE_INT_RGB);
                 graph.render(img.getGraphics());
-                ImageIO.write(img, "png", gFile);
 
-                log.info("updated statistics diagram generated in {}", gFile.getAbsolutePath());
+                try (OutputStream stream = Files.newOutputStream(gFile, StandardOpenOption.TRUNCATE_EXISTING)) {
+                    ImageIO.write(img, "png", stream);
+                }
+
+                log.info("updated statistics diagram generated in {}", gFile);
 
                 statLastDump = System.currentTimeMillis();
             } catch (Exception ex) {

http://git-wip-us.apache.org/repos/asf/marmotta/blob/df99bded/loader/marmotta-loader-core/src/test/java/org/apache/marmotta/loader/core/test/LoaderTestBase.java
----------------------------------------------------------------------
diff --git a/loader/marmotta-loader-core/src/test/java/org/apache/marmotta/loader/core/test/LoaderTestBase.java b/loader/marmotta-loader-core/src/test/java/org/apache/marmotta/loader/core/test/LoaderTestBase.java
index c4dfc1b..2205b38 100644
--- a/loader/marmotta-loader-core/src/test/java/org/apache/marmotta/loader/core/test/LoaderTestBase.java
+++ b/loader/marmotta-loader-core/src/test/java/org/apache/marmotta/loader/core/test/LoaderTestBase.java
@@ -23,12 +23,10 @@ import org.apache.commons.io.FileUtils;
 import org.apache.marmotta.loader.api.LoaderHandler;
 import org.apache.marmotta.loader.api.LoaderOptions;
 import org.apache.marmotta.loader.core.MarmottaLoader;
+import org.apache.marmotta.loader.core.test.dummy.DummyLoaderBackend;
 import org.apache.marmotta.loader.core.test.dummy.DummyLoaderHandler;
 import org.apache.marmotta.loader.wrapper.LoaderHandlerWrapper;
-import org.junit.AfterClass;
-import org.junit.Assert;
-import org.junit.BeforeClass;
-import org.junit.Test;
+import org.junit.*;
 import org.openrdf.model.Model;
 import org.openrdf.model.URI;
 import org.openrdf.model.impl.URIImpl;
@@ -94,6 +92,7 @@ public abstract class LoaderTestBase {
 
         cfg.setProperty(LoaderOptions.STATISTICS_ENABLED, true);
         cfg.setProperty(LoaderOptions.STATISTICS_GRAPH, new File(tempDir.toFile(), "stats.png").toString());
+        cfg.setProperty(DummyLoaderBackend.METHOD_SLEEP_MILLIS, 10);
 
         MarmottaLoader loader = new MarmottaLoader(cfg);
         DummyLoaderHandler handler = getBase(loader.load());

http://git-wip-us.apache.org/repos/asf/marmotta/blob/df99bded/loader/marmotta-loader-core/src/test/java/org/apache/marmotta/loader/core/test/dummy/DummyLoaderBackend.java
----------------------------------------------------------------------
diff --git a/loader/marmotta-loader-core/src/test/java/org/apache/marmotta/loader/core/test/dummy/DummyLoaderBackend.java b/loader/marmotta-loader-core/src/test/java/org/apache/marmotta/loader/core/test/dummy/DummyLoaderBackend.java
index 6597e68..828ac6b 100644
--- a/loader/marmotta-loader-core/src/test/java/org/apache/marmotta/loader/core/test/dummy/DummyLoaderBackend.java
+++ b/loader/marmotta-loader-core/src/test/java/org/apache/marmotta/loader/core/test/dummy/DummyLoaderBackend.java
@@ -14,6 +14,8 @@ import java.util.Collection;
  * @author Sebastian Schaffert (sschaffert@apache.org)
  */
 public class DummyLoaderBackend implements LoaderBackend {
+    public static final String METHOD_SLEEP_MILLIS = "loader.dummy.method_sleep";
+
     /**
      * Return a unique identifier for the loader; used for identifying the loader to choose on the command line
      * in case more than one loader implementation is available.
@@ -35,7 +37,7 @@ public class DummyLoaderBackend implements LoaderBackend {
      */
     @Override
     public LoaderHandler createLoader(Configuration configuration) {
-        return new DummyLoaderHandler();
+        return new DummyLoaderHandler(configuration.getLong(METHOD_SLEEP_MILLIS, 0l));
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/marmotta/blob/df99bded/loader/marmotta-loader-core/src/test/java/org/apache/marmotta/loader/core/test/dummy/DummyLoaderHandler.java
----------------------------------------------------------------------
diff --git a/loader/marmotta-loader-core/src/test/java/org/apache/marmotta/loader/core/test/dummy/DummyLoaderHandler.java b/loader/marmotta-loader-core/src/test/java/org/apache/marmotta/loader/core/test/dummy/DummyLoaderHandler.java
index 0c92baa..0869dad 100644
--- a/loader/marmotta-loader-core/src/test/java/org/apache/marmotta/loader/core/test/dummy/DummyLoaderHandler.java
+++ b/loader/marmotta-loader-core/src/test/java/org/apache/marmotta/loader/core/test/dummy/DummyLoaderHandler.java
@@ -14,10 +14,16 @@ import org.openrdf.rio.helpers.RDFHandlerBase;
  */
 public class DummyLoaderHandler extends RDFHandlerBase implements LoaderHandler {
 
-    private Model model;
+    private final long sleep;
+    private final Model model;
 
     public DummyLoaderHandler() {
+        this(0);
+    }
+
+    public DummyLoaderHandler(long methodSleep) {
         model = new TreeModel();
+        sleep = methodSleep;
     }
 
     public Model getModel() {
@@ -36,7 +42,7 @@ public class DummyLoaderHandler extends RDFHandlerBase implements LoaderHandler
     }
 
     /**
-     * Peform cleanup on shutdown, e.g. re-creating indexes after import completed or freeing resources acquired by
+     * Perform cleanup on shutdown, e.g. re-creating indexes after import completed or freeing resources acquired by
      * the handler.
      */
     @Override
@@ -47,5 +53,12 @@ public class DummyLoaderHandler extends RDFHandlerBase implements LoaderHandler
     @Override
     public void handleStatement(Statement st) throws RDFHandlerException {
         model.add(st);
+        if (sleep > 0) {
+            try {
+                Thread.sleep(sleep);
+            } catch (InterruptedException e) {
+                // ignored
+            }
+        }
     }
 }


[06/40] git commit: Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/marmotta into develop

Posted by ja...@apache.org.
Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/marmotta into develop

# By Sebastian Schaffert
# Via Sebastian Schaffert
* 'develop' of https://git-wip-us.apache.org/repos/asf/marmotta:
  batched triple store selects for improved performance
  some performance optimizations for JDBC


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/d4c22f45
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/d4c22f45
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/d4c22f45

Branch: refs/heads/ldp
Commit: d4c22f45afb1b680634b823b18a960941b37e6c9
Parents: d44196c bfd688b
Author: Rupert Westenthaler <ru...@gmail.com>
Authored: Wed Feb 5 12:50:11 2014 +0100
Committer: Rupert Westenthaler <ru...@gmail.com>
Committed: Wed Feb 5 12:50:11 2014 +0100

----------------------------------------------------------------------
 .../kiwi/persistence/KiWiConnection.java        | 307 ++++++++++++++++---
 .../kiwi/persistence/h2/statements.properties   |   1 +
 .../persistence/mysql/statements.properties     |   1 +
 .../persistence/pgsql/statements.properties     |   1 +
 .../apache/marmotta/kiwi/test/ClusterTest.java  |   7 +-
 .../kiwi/test/profile/ProfileLoading.java       | 103 +++++++
 6 files changed, 377 insertions(+), 43 deletions(-)
----------------------------------------------------------------------



[24/40] git commit: fixed naming of the ldpath-parser spec (and updated license header)

Posted by ja...@apache.org.
fixed naming of the ldpath-parser spec (and updated license header)


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/f7cc0bc0
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/f7cc0bc0
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/f7cc0bc0

Branch: refs/heads/ldp
Commit: f7cc0bc01672ae6c37abab4254303209cd19b8bd
Parents: df99bde
Author: Jakob Frank <ja...@apache.org>
Authored: Tue Feb 25 15:19:25 2014 +0100
Committer: Jakob Frank <ja...@apache.org>
Committed: Tue Feb 25 15:19:25 2014 +0100

----------------------------------------------------------------------
 .../org/apache/marmotta/ldpath/parser/ldpath.jj | 1106 ++++++++++++++++++
 .../apache/marmotta/ldpath/parser/rdfpath.jj    | 1104 -----------------
 2 files changed, 1106 insertions(+), 1104 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/f7cc0bc0/libraries/ldpath/ldpath-core/src/main/javacc/org/apache/marmotta/ldpath/parser/ldpath.jj
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/javacc/org/apache/marmotta/ldpath/parser/ldpath.jj b/libraries/ldpath/ldpath-core/src/main/javacc/org/apache/marmotta/ldpath/parser/ldpath.jj
new file mode 100644
index 0000000..da522ed
--- /dev/null
+++ b/libraries/ldpath/ldpath-core/src/main/javacc/org/apache/marmotta/ldpath/parser/ldpath.jj
@@ -0,0 +1,1106 @@
+/*
+ * 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.
+ */
+options
+{
+  STATIC=false;
+//  LOOKAHEAD=5;
+  CACHE_TOKENS=true;
+//  FORCE_LA_CHECK=true;
+//  CHOICE_AMBIGUITY_CHECK=5;
+  LOOKAHEAD=2147483647;
+//  DEBUG_PARSER=true;
+//  DEBUG_TOKEN_MANAGER=true;
+//  DEBUG_LOOKAHEAD=true;
+}
+
+PARSER_BEGIN(LdPathParser)
+package org.apache.marmotta.ldpath.parser;
+
+import org.apache.marmotta.ldpath.model.Constants;
+
+import org.apache.marmotta.ldpath.api.backend.*;
+import org.apache.marmotta.ldpath.api.functions.*;
+import org.apache.marmotta.ldpath.api.selectors.*;
+import org.apache.marmotta.ldpath.api.tests.*;
+import org.apache.marmotta.ldpath.api.transformers.*;
+
+
+import org.apache.marmotta.ldpath.model.fields.*;
+import org.apache.marmotta.ldpath.model.functions.*;
+import org.apache.marmotta.ldpath.model.programs.*;
+import org.apache.marmotta.ldpath.model.selectors.*;
+import org.apache.marmotta.ldpath.model.tests.*;
+import org.apache.marmotta.ldpath.model.transformers.*;
+
+
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.HashMap;
+import java.util.Locale;
+import java.util.Collections;
+
+import java.io.Reader;
+import java.io.InputStream;
+
+import java.net.URI;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+@SuppressWarnings("all")
+public class LdPathParser<Node> {
+
+        private enum Mode { RULE, SELECTOR, TEST, PROGRAM, PREFIX };
+
+
+        private static final Logger log = LoggerFactory.getLogger(LdPathParser.class);
+
+        /**
+         * A map mapping from namespace prefix to namespace URI
+         */
+        private Map<String,String> namespaces = new HashMap<String,String>();
+
+        private NodeBackend<Node> backend;
+
+        private Configuration config;
+
+        private Mode mode = Mode.PROGRAM;
+
+        public LdPathParser(NodeBackend<Node> backend, Reader in) {
+            this(backend,null,in);
+        }
+
+        public LdPathParser(NodeBackend<Node> backend, Configuration config, Reader in) {
+            this(in);
+            this.backend = backend;
+            if(config == null) {
+                this.config = new DefaultConfiguration();
+            } else {
+                this.config = config;
+            }
+
+            initialise();
+        }
+
+        public LdPathParser(NodeBackend<Node> backend, InputStream in) {
+            this(backend,null,in);
+        }
+
+        public LdPathParser(NodeBackend<Node> backend, Configuration config, InputStream in) {
+            this(in);
+            this.backend = backend;
+            if(config == null) {
+                this.config = new DefaultConfiguration();
+            } else {
+                this.config = config;
+            }
+
+            initialise();
+        }
+
+        public LdPathParser(NodeBackend<Node> backend, InputStream in, String encoding) {
+            this(backend,null,in,encoding);
+        }
+
+        public LdPathParser(NodeBackend<Node> backend, Configuration config, InputStream in, String encoding) {
+            this(in,encoding);
+            this.backend = backend;
+            if(config == null) {
+                this.config = new DefaultConfiguration();
+            } else {
+                this.config = config;
+            }
+
+            initialise();
+        }
+
+        public Program<Node> parseProgram() throws ParseException {
+			namespaces.clear();
+			namespaces.putAll(config.getNamespaces());
+
+            mode = Mode.PROGRAM;
+            try {
+		        return Program();
+		    } catch(TokenMgrError error){
+		        throw new ParseException("Unable to parse Program: (Message: "+error.getMessage()+")");
+		    }
+        }
+
+        public Entry<String, String> parsePrefix() throws ParseException {
+            namespaces.clear();
+            namespaces.putAll(config.getNamespaces());
+            mode = Mode.PREFIX;
+            try {
+                return Namespace();
+            } catch (TokenMgrError error) {
+                throw new ParseException("Unable to parse Prefix: (Message: "+ error.getMessage()+")");
+            }
+        }
+
+        public Map<String, String> parsePrefixes() throws ParseException {
+            namespaces.clear();
+            namespaces.putAll(config.getNamespaces());
+            mode = Mode.PREFIX;
+            try {
+                return Namespaces();
+            } catch (TokenMgrError error) {
+                throw new ParseException("Unable to parse Prefixes: (Message: "+ error.getMessage()+")");
+            }
+        }
+
+
+        public NodeSelector<Node> parseSelector(Map<String,String> ctxNamespaces) throws ParseException {
+			namespaces.clear();
+			namespaces.putAll(config.getNamespaces());
+			if(ctxNamespaces != null) {
+			    namespaces.putAll(ctxNamespaces);
+			}
+
+			mode = Mode.SELECTOR;
+
+            try {
+    		    return Selector();
+            } catch(TokenMgrError error){
+                throw new ParseException("Unable to parse Selector: (Message: "+error.getMessage()+")");
+            }
+        }
+        
+        public NodeTest<Node> parseTest(Map<String, String> ctxNamespaces) throws ParseException {
+            namespaces.clear();
+            namespaces.putAll(config.getNamespaces());
+            if (ctxNamespaces != null) {
+                namespaces.putAll(ctxNamespaces);
+            }
+            mode = Mode.TEST;
+            try {
+                return NodeTest();
+            } catch (TokenMgrError error) {
+                throw new ParseException("Unable to parse Test: (Message: "+ error.getMessage()+")");
+            }
+        }
+
+        public <T> FieldMapping<T,Node> parseRule(Map<String,String> ctxNamespaces) throws ParseException {
+			namespaces.clear();
+			namespaces.putAll(config.getNamespaces());
+			if(ctxNamespaces != null) {
+			    namespaces.putAll(ctxNamespaces);
+			}
+
+			mode = Mode.RULE;
+
+            try {
+	            return Rule();
+            } catch(TokenMgrError error){
+                throw new ParseException("Unable to parse Rule: (Message: "+error.getMessage()+")");
+            }
+        }
+
+        public Node resolveURI(URI uri) {
+            return backend.createURI(uri.toString());
+        }
+
+        public Node resolveResource(String uri) throws ParseException {
+            return backend.createURI(uri);
+        }
+
+        public Node resolveResource(String prefix, String local) throws ParseException {
+            return resolveResource(resolveNamespace(prefix)+local);
+        }
+
+
+        public String resolveNamespace(String prefix) throws ParseException {
+            String uri = namespaces.get(prefix);
+            if(uri == null) {
+                throw new ParseException("Namespace "+prefix+" not defined!");
+            }
+            return uri;
+        }
+
+
+        public SelectorFunction<Node> getFunction(String uri) throws ParseException {
+            if(xsdNodeFunctionMap.get(uri) != null) {
+               return xsdNodeFunctionMap.get(uri);
+            } else {
+                throw new ParseException("function with URI "+uri+" does not exist");
+            }
+        }
+
+        public TestFunction<Node> getTestFunction(String uri) throws ParseException {
+            if (xsdNodeTestMap.get(uri) != null) {
+                return xsdNodeTestMap.get(uri);
+            } else {
+                throw new ParseException("test function with URI "+uri+" does not exist");
+            }
+        }
+
+        public NodeTransformer<?,Node> getTransformer(URI type) throws ParseException {
+            return getTransformer(type.toString());
+        }
+
+        public NodeTransformer<?,Node> getTransformer(Node node) throws ParseException {
+            return getTransformer(backend.stringValue(node));
+        }
+
+        public NodeTransformer<?,Node> getTransformer(String uri) throws ParseException {
+            if(xsdNodeTransformerMap.get(uri) != null) {
+                return xsdNodeTransformerMap.get(uri);
+            } else {
+                throw new ParseException("transformer with URI "+uri+" does not exist");
+            }
+        }
+
+
+        private void initialise() {
+            initTransformerMappings();
+            initFunctionMappings();
+        }
+
+        /**
+         * Register the function passed as argument in this parser's function map.
+         */
+        public void registerFunction(SelectorFunction<Node> function) {
+            registerFunction(xsdNodeFunctionMap,function);
+        }
+
+        public void registerFunction(TestFunction<Node> test) {
+            registerTest(xsdNodeTestMap, test);
+        }
+
+        /**
+         * Register the result transformer passed as argument for the given type uri.
+         */
+        public void registerTransformer(String typeUri, NodeTransformer<?,Node> transformer) {
+            xsdNodeTransformerMap.put(typeUri,transformer);
+        }
+
+
+        /**
+         * A map mapping from XSD types to node transformers.
+         */
+        private Map<String, NodeTransformer<?,Node>> xsdNodeTransformerMap;
+        private void initTransformerMappings() {
+            Map<String, NodeTransformer<?,Node>> transformerMap = new HashMap<String, NodeTransformer<?,Node>>();
+
+            transformerMap.putAll(config.getTransformers());
+
+            xsdNodeTransformerMap = transformerMap;
+        }
+
+
+        private Map<String, SelectorFunction<Node>> xsdNodeFunctionMap;
+        private Map<String, TestFunction<Node>> xsdNodeTestMap;
+        private void initFunctionMappings() {
+            Map<String, SelectorFunction<Node>> functionMap = new HashMap<String, SelectorFunction<Node>>();
+
+            functionMap.putAll(config.getFunctions());
+
+            xsdNodeFunctionMap = functionMap;
+
+        Map<String, TestFunction<Node>> testMap = new HashMap<String, TestFunction<Node>>();
+        testMap.putAll(config.getTestFunctions());
+        xsdNodeTestMap = testMap;
+        }
+
+        private void registerFunction(Map<String, SelectorFunction<Node>> register, final SelectorFunction<Node> function) {
+            register.put(Constants.NS_LMF_FUNCS + function.getPathExpression(backend), function);
+        }
+        
+        private void registerTest(Map<String, TestFunction<Node>> register, final TestFunction<Node> test) {
+            register.put(Constants.NS_LMF_FUNCS + test.getLocalName(), test);
+        }
+
+        private class Namespace implements Entry<String, String> {
+            private String key, val;
+            public Namespace(String key, String val) {
+                this.key = key;
+                this.val = val;
+            }
+            @Override
+            public String getKey() {
+                return key;
+            }
+            @Override
+            public String getValue() {
+                return val;
+            }
+            @Override
+            public String setValue(String value) {
+                String oV = val;
+                val = value;
+                return oV;
+            }
+        }
+
+}
+PARSER_END(LdPathParser)
+
+SKIP :
+{
+ 	" "
+|	"\r"
+|	"\t"
+|	"\n"
+}
+
+// When a /* is seen in the DEFAULT state, skip it and switch to the IN_COMMENT state
+SKIP : {
+    "/*": IN_COMMENT
+}
+
+// When any other character is seen in the IN_COMMENT state, skip it.
+< IN_COMMENT > SKIP : {
+    <  ~[] >
+}
+
+// When a */ is seen in the IN_COMMENT state, skip it and switch back to the DEFAULT state
+< IN_COMMENT > SKIP : {
+    "*/": DEFAULT
+}
+
+MORE:
+{
+ "\"" : WithinString
+}
+
+<WithinString> TOKEN:
+{
+  <STRLIT: "\""> : DEFAULT
+}
+
+<WithinString> MORE:
+{
+  <~["\n","\r"]>
+}
+
+
+TOKEN : /* LDPATH */
+{
+  < COMMA:  "," >  |
+  < SCOLON: ";" >  |
+  < COLON:  ":" >  |
+  < DCOLON: "::" > |
+  < ASSIGN: "=" >  |
+  < K_PREFIX: "@prefix" > |
+  < K_FILTER: "@filter" > |
+  < K_BOOST:  "@boost" >  |
+  < K_GRAPH:  "@graph" >
+}
+TOKEN : /* OPERATORS */
+{
+    < SELF: "." >    |
+	< AND:  "&" >    |
+	< OR:   "|" >    |
+    < P_SEP:"/" >    |
+    < PLUS: "+" >    |
+    < STAR: "*" >    |
+	< NOT:  "!" >    |
+    < INVERSE: "^" > |
+	< IS:   "is" >   |
+	< IS_A: "is-a" > |
+    < FUNC: "fn:" >  |
+  	< TYPE: "^^" >   |
+  	< LANG: "@" >
+}
+
+TOKEN : /* BRACKETS */
+{
+  < B_RO: "(" > |
+  < B_RC: ")" > |
+  < B_SO: "[" > |
+  < B_SC: "]" > |
+  < B_CO: "{" > |
+  < B_CC: "}" > |
+  < B_XO: "<" > |
+  < B_XC: ">" > 
+}
+TOKEN :
+{
+    < URI: "<" (~[ ">","<", "\"", "{", "}", "^", "\\", "|", "`", "\u0000"-"\u0020"])+ ">" > |
+    < IDENTIFIER: ["a"-"z","A"-"Z","0"-"9","_"](["a"-"z","A"-"Z","0"-"9","_","'","-", "."])* > |
+    < #URICHAR: ["a"-"z","A"-"Z","0"-"9",";","/","?",":","@","&","=","+","$",".","-","_","!","~","*","'","%"] >
+}
+
+Map<String, String> Namespaces() :
+{
+    Map<String, String> ns = new HashMap<String, String>();
+    Entry<String, String> namespace = null;
+}
+{
+  (
+     namespace = Namespace() {
+       ns.put(namespace.getKey(), namespace.getValue());
+     }
+  )+
+  {
+    return ns;
+  }   
+}
+
+Entry<String, String> Namespace() :
+{
+    Token id = null;
+    Token uri;
+}
+{
+  ( 
+    <K_PREFIX> id = <IDENTIFIER> <COLON> uri = <URI> (<SCOLON> )? {
+    }
+  ) { return new Namespace(id.image, uri.image.substring(1,uri.image.length()-1)); }
+}
+
+Program Program() :
+{
+    Program<Node> program = new Program();
+    NodeTest<Node> filter = null;
+    Map<String, String> nss = null;
+    FieldMapping<?,Node> rule;
+    NodeSelector<Node> boostSelector;
+    LinkedList<URI> graphs;
+}
+{
+  (
+    nss = Namespaces() {
+        namespaces.putAll(nss);
+        for (String k : nss.keySet()) {
+            program.addNamespace(k, nss.get(k));
+        }
+    }
+  )?
+
+  (
+    <K_GRAPH> graphs = UriList() <SCOLON> {
+      program.setGraphs(graphs);
+    }
+  )?
+
+  (
+    <K_FILTER> filter = NodeTest() <SCOLON> {
+        program.setFilter(filter);
+    }
+  )?
+
+  (
+    <K_BOOST> boostSelector = Selector() <SCOLON> {
+    	NodeTransformer transformer = getTransformer(Program.DOCUMENT_BOOST_TYPE);
+		FieldMapping booster = new FieldMapping("@boost", java.net.URI.create(Program.DOCUMENT_BOOST_TYPE), boostSelector, transformer, null);
+		program.setBooster(booster);  
+    }
+  )?
+
+  (
+    rule = Rule()
+    {
+       program.addMapping(rule);
+    }
+  )*
+  <EOF>
+  {
+    return program;
+  }
+}
+
+LinkedList<URI> UriList() :
+{
+    LinkedList<URI> rest = null;
+    URI uri;
+}
+{
+    uri = Uri() ( <COMMA> rest = UriList() )?
+    {
+      if (rest == null) rest = new LinkedList<URI>();
+      rest.addFirst(uri);
+      return rest;
+    }
+}
+
+FieldMapping Rule() :
+{
+    FieldMapping<?,Node> rule;
+    Token name;
+    URI uri;
+    URI type = null;
+    NodeSelector<Node> selector;
+    NodeTransformer<?,Node> transformer;
+    Map<String, String> conf = null;
+}
+{
+    name = <IDENTIFIER> <ASSIGN> selector = Selector() (<DCOLON> type = Uri())? (<B_RO> conf = FieldConfig() <B_RC>)? <SCOLON> {
+        if(type != null) {
+            transformer = getTransformer(type);
+        } else {
+            transformer = new IdentityTransformer();
+        }
+        if(mode != Mode.PROGRAM) {
+            throw new ParseException("cannot use field names when parsing single paths");
+        }
+        rule = new FieldMapping(name.image,type,selector,transformer, conf);
+        return rule;
+    }
+|   uri = Uri() <ASSIGN> selector = Selector() (<DCOLON> type = Uri())? (<B_RO> conf = FieldConfig() <B_RC>)? <SCOLON> {
+        if(type != null) {
+            transformer = getTransformer(type);
+        } else {
+            transformer = new IdentityTransformer();
+        }
+        if(mode != Mode.PROGRAM) {
+            throw new ParseException("cannot use field names when parsing single paths");
+        }
+        rule = new FieldMapping(uri,type,selector,transformer, conf);
+        return rule;
+    }
+|   selector = Selector() (<DCOLON> type = Uri())? (<B_RO> conf = FieldConfig() <B_RC>)? (<SCOLON>)? {
+        if(type != null) {
+            transformer = getTransformer(type);
+        } else {
+            transformer = new IdentityTransformer();
+        }
+        if(mode != Mode.PROGRAM && conf != null) {
+            throw new ParseException("cannot use configuration parameters when parsing single paths");
+        }
+        try {
+            rule = new FieldMapping(selector.getName(backend),type,selector,transformer, conf);
+        } catch(UnsupportedOperationException ex) {
+            if(mode == Mode.PROGRAM) {
+                rule = new FieldMapping("unnamed",type,selector,transformer, conf);
+                log.error("error while parsing {}: {}", rule.getPathExpression(backend),ex.getMessage());
+                throw new ParseException("error while parsing "+rule.getPathExpression(backend)+": "+ex.getMessage());
+            } else {
+                rule = new FieldMapping("unnamed",type,selector,transformer, conf);
+            }
+        }
+        return rule;
+    }
+}
+
+
+Map<String,String> FieldConfig() : {
+	Map<String, String> conf = new HashMap<String, String>();
+	Token key = null;
+	String val = null;
+	Map<String,String> more = null;
+}
+{
+	( key = <IDENTIFIER> <ASSIGN> val = ConfVal() ( <COMMA> more = FieldConfig() )? )? {
+		if (key == null || val == null) return null;
+		conf.put(key.image, val);
+		if (more != null) {
+			conf.putAll(more);
+		}
+		return conf;
+	}
+}
+
+String ConfVal() : {
+	Token str, id;
+}
+{
+	str = <STRLIT> { return str.image.substring(1, str.image.length() -1); }
+|	id = <IDENTIFIER> { return id.image; }
+}
+
+URI Uri() : {
+    Token uri, prefix, localName;
+
+}
+{
+    uri = <URI> {
+       return java.net.URI.create(uri.image.substring(1,uri.image.length()-1));
+    }
+|   prefix = <IDENTIFIER> ":" localName = <IDENTIFIER> {
+        return java.net.URI.create(resolveNamespace(prefix.image)+localName.image);
+    }
+}
+
+
+NodeSelector Selector() :
+{
+    NodeSelector result;
+}
+{
+    (
+        result = CompoundSelector()
+    |   result = TestingSelector()
+    |   result = AtomicSelector()
+    )
+    {
+        return result;
+    }
+}
+
+
+NodeSelector CompoundSelector() :
+{
+    NodeSelector result = null;
+}
+{
+    (
+        /* Union Selector */
+        result = UnionSelector() |
+
+        /* Intersection Selector */
+        result = IntersectionSelector() |
+
+        /* Path Selector */
+        result = PathSelector()
+
+
+    )
+    {
+        return result;
+    }
+}
+
+/**
+ * As path elements, we do not allow arbitrary compound selectors, but we allow all atomic and path selectors.
+ */
+NodeSelector AtomicOrTestingOrPathSelector() :
+{
+    NodeSelector result = null;
+}
+{
+    (
+        /* Path Selector */
+        result = PathSelector() |
+
+        /* Atomic Selector */
+        result = AtomicOrTestingSelector()
+    )
+    {
+        return result;
+    }
+}
+
+NodeSelector AtomicOrTestingSelector() :
+{
+    NodeSelector result = null;
+}
+{
+    (
+        /* Testing Selector */
+        result = TestingSelector() |
+
+        /* Atomic Selector */
+        result = AtomicSelector()
+    )
+    {
+        return result;
+    }
+}
+
+NodeSelector AtomicSelector() :
+{
+    NodeSelector result = null;
+}
+{
+    (
+    	/* Self Selector */
+    	result = SelfSelector() |
+    	    
+        /* Property Selector */
+        result = PropertySelector() |
+
+        /* Wildcard Selector */
+        result = WildcardSelector() |
+        
+        /* Reverse Property Selector */
+        result = ReversePropertySelector() |
+
+        /* Function Selector */
+        result = FunctionSelector() |
+
+        /* String Constant Selector */
+        result = StringConstantSelector() |
+        
+        /* Recursive Path Selector */
+        result = RecursivePathSelector() |
+
+        /* Other selector enclosed in braces */
+        result = GroupedSelector()
+
+    )
+    {
+        return result;
+    }
+}
+
+NodeSelector SelfSelector() :
+{
+}
+{
+	<SELF> { return new SelfSelector(); }
+}
+
+NodeSelector GroupedSelector() :
+{
+    NodeSelector result = null;
+}
+{
+    /* Other selector enclosed in braces */
+    <B_RO> result = Selector() <B_RC>
+    {
+        return new GroupedSelector(result);
+    }
+
+}
+
+RecursivePathSelector RecursivePathSelector() :
+{
+	RecursivePathSelector result = null;
+	NodeSelector delegate        = null;
+}
+{
+	<B_RO> delegate = Selector() <B_RC> <PLUS>	
+	{
+		result = RecursivePathSelector.getPathSelectorPlused(delegate);
+		return result;
+	} |
+    <B_RO> delegate = Selector() <B_RC> <STAR>
+    {
+        result = RecursivePathSelector.getPathSelectorStared(delegate);
+        return result;
+    } 
+}
+
+PathSelector PathSelector() :
+{
+    PathSelector result = null;
+    NodeSelector left   = null;
+    NodeSelector right  = null;
+}
+{
+    left = AtomicOrTestingSelector() <P_SEP> right = AtomicOrTestingOrPathSelector()
+    {
+        result = new PathSelector(left,right);
+        return result;
+    }
+}
+
+IntersectionSelector IntersectionSelector() :
+{
+    IntersectionSelector result = null;
+    NodeSelector left   = null;
+    NodeSelector right  = null;
+}
+{
+    left = AtomicOrTestingOrPathSelector() <AND> right = Selector()
+    {
+        result = new IntersectionSelector(left,right);
+        return result;
+    }
+}
+
+UnionSelector UnionSelector() :
+{
+    UnionSelector result = null;
+    NodeSelector left   = null;
+    NodeSelector right  = null;
+}
+{
+    left = AtomicOrTestingOrPathSelector() <OR> right = Selector()
+    {
+        result = new UnionSelector(left,right);
+        return result;
+    }
+}
+
+TestingSelector TestingSelector() :
+{
+    TestingSelector result = null;
+    NodeSelector delegate  = null;
+    NodeTest test = null;
+}
+{
+    delegate = AtomicSelector() <B_SO> test = NodeTest() <B_SC> {
+        result = new TestingSelector(delegate,test);
+        return result;
+    }
+}
+
+ReversePropertySelector ReversePropertySelector() :
+{
+	ReversePropertySelector result = null;
+	URI uri;
+}
+{
+	<INVERSE> uri = Uri() {
+        result   = new ReversePropertySelector(resolveURI(uri));
+        return result;
+	}
+}
+
+PropertySelector PropertySelector() :
+{
+    PropertySelector result = null;
+    URI uri;
+}
+{
+    uri = Uri() {
+        result   = new PropertySelector(resolveURI(uri));
+        return result;
+    }
+}
+
+WildcardSelector WildcardSelector() :
+{
+    WildcardSelector result = null;
+}
+{
+    <STAR> {
+        result = new WildcardSelector();
+        return result;
+    }
+}
+
+FunctionSelector FunctionSelector() :
+{
+    FunctionSelector result = null;
+    List<NodeSelector> arguments = new ArrayList<NodeSelector>();
+    NodeSelector argument;
+    String uri;
+    Token fName;
+}
+{
+    /* Function-Calls without arguments can skip parenthesis */
+    /* Does not work... why?
+    <FUNC> fName = <IDENTIFIER> {
+           uri = namespaces.get("fn") + fName.image;
+           result = new FunctionSelector(getFunction(uri),Collections.emptyList());
+           return result;
+    } | */
+    /* Functions do not need to have arguments */
+    <FUNC> fName = <IDENTIFIER> <B_RO> <B_RC> {
+           uri = namespaces.get("fn") + fName.image;
+           result = new FunctionSelector(getFunction(uri),Collections.emptyList());
+           return result;
+    } |
+    /* Sometimes arguments are required */
+    <FUNC> fName = <IDENTIFIER> <B_RO>
+            argument = Selector() { arguments.add(argument); }
+            ( <COMMA> argument = Selector() { arguments.add(argument); } )*
+    <B_RC> {
+           uri = namespaces.get("fn") + fName.image;
+           result = new FunctionSelector(getFunction(uri),arguments);
+           return result;
+    }
+}
+
+
+StringConstantSelector StringConstantSelector() :
+{
+    StringConstantSelector result = null;
+    Token literal;
+}
+{
+    literal = <STRLIT> {
+        result = new StringConstantSelector(literal.image.substring(1, literal.image.length()-1));
+        return result;
+    }
+}
+
+
+
+NodeTest NodeTest() :
+{
+    NodeTest result;
+}
+{
+    (
+        result = GroupedTest()
+    |   result = NotTest()
+    |   result = AndTest()
+    |   result = OrTest()
+    |   result = AtomicNodeTest()
+    )
+    {
+        return result;
+    }
+}
+
+NodeTest GroupedTest() :
+{
+    NodeTest delegate;
+}
+{
+    <B_RO> delegate = NodeTest() <B_RC> {
+       return delegate;
+    }
+}
+
+NodeTest AtomicNodeTest() :
+{
+    NodeTest result;
+}
+{
+    (
+        result = LiteralLanguageTest()
+    |   result = LiteralTypeTest()
+    |   result = IsATest()
+    |   result = PathEqualityTest()
+    |   result = FunctionTest()
+    |   result = PathTest()
+    )
+    {
+        return result;
+    }
+}
+
+FunctionTest FunctionTest() :
+{
+    FunctionTest result;
+    List<NodeSelector> arguments = new ArrayList<NodeSelector>();
+    NodeSelector argument;
+    String uri;
+    Token fName;
+}
+{
+  (    
+    /* Function-Calls without arguments can skip parenthesis */
+    /* Does not work... why?
+    <FUNC> fName = <IDENTIFIER> {
+           uri = namespaces.get("fn") + fName.image;
+           result = new FunctionSelector(getTestFunction(uri),Collections.emptyList());
+    } | */
+    /* Functions do not need to have arguments */
+    <FUNC> fName = <IDENTIFIER> <B_RO> <B_RC> {
+           uri = namespaces.get("fn") + fName.image;
+           result = new FunctionTest(getTestFunction(uri),Collections.emptyList());
+    } |
+    /* Sometimes arguments are required */
+    <FUNC> fName = <IDENTIFIER> <B_RO>
+            argument = Selector() { arguments.add(argument); }
+            ( <COMMA> argument = Selector() { arguments.add(argument); } )*
+    <B_RC> {
+           uri = namespaces.get("fn") + fName.image;
+           result = new FunctionTest(getTestFunction(uri),arguments);
+    }
+  )
+  {
+    return result;
+  }
+}
+
+LiteralLanguageTest LiteralLanguageTest():
+{
+    Token lang;
+}
+{
+    <LANG> lang = <IDENTIFIER> {
+        return new LiteralLanguageTest(lang.image);
+    }
+}
+
+LiteralTypeTest LiteralTypeTest():
+{
+    URI type;
+}
+{
+    <TYPE> type = Uri() {
+        return new LiteralTypeTest(type);
+    }
+}
+
+NotTest NotTest() :
+{
+    NodeTest delegate;
+}
+{
+    <NOT>  delegate = NodeTest() {
+        return new NotTest(delegate);
+    }
+}
+
+IsATest IsATest() :
+{
+    Node node;
+}
+{
+    <IS_A> node = Node() {
+        return new IsATest(resolveResource("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"), node);
+    }
+}
+
+
+AndTest AndTest():
+{
+    NodeTest left, right;
+}
+{
+    left = AtomicNodeTest() <AND> right = NodeTest() {
+        return new AndTest(left,right);
+    }
+}
+
+OrTest OrTest():
+{
+    NodeTest left, right;
+}
+{
+    left = AtomicNodeTest() <OR> right = NodeTest() {
+        return new OrTest(left,right);
+    }
+}
+
+PathEqualityTest PathEqualityTest():
+{
+    NodeSelector path;
+    Node node;
+}
+{
+    path = Selector() <IS> node = Node() {
+        return new PathEqualityTest(path,node);
+    }
+}
+
+
+Node Node():
+{
+    URI uri, type = null;
+    Token literal, language;
+}
+{
+    uri = Uri() {
+        return resolveURI(uri);
+    }
+|   literal = <STRLIT>  (<TYPE> type = Uri() )? {
+        return backend.createLiteral(literal.image.substring(1, literal.image.length()-1),null,type);
+    }
+|   literal = <STRLIT>  <LANG> language = <IDENTIFIER> {
+        return backend.createLiteral(literal.image.substring(1, literal.image.length()-1),new Locale(language.image),null);
+    }
+}
+
+
+PathTest PathTest():
+{
+    NodeSelector path;
+}
+{
+    (
+        path = PathSelector()
+    |   path = TestingSelector()
+    |   path = AtomicSelector()
+    )
+    {
+        return new PathTest(path);
+    }
+}
+

http://git-wip-us.apache.org/repos/asf/marmotta/blob/f7cc0bc0/libraries/ldpath/ldpath-core/src/main/javacc/org/apache/marmotta/ldpath/parser/rdfpath.jj
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/javacc/org/apache/marmotta/ldpath/parser/rdfpath.jj b/libraries/ldpath/ldpath-core/src/main/javacc/org/apache/marmotta/ldpath/parser/rdfpath.jj
deleted file mode 100644
index 8b5f19a..0000000
--- a/libraries/ldpath/ldpath-core/src/main/javacc/org/apache/marmotta/ldpath/parser/rdfpath.jj
+++ /dev/null
@@ -1,1104 +0,0 @@
-/*
- * Copyright (c) 2013 The Apache Software Foundation
- *
- *  Licensed 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.
- */
-options
-{
-  STATIC=false;
-//  LOOKAHEAD=5;
-  CACHE_TOKENS=true;
-//  FORCE_LA_CHECK=true;
-//  CHOICE_AMBIGUITY_CHECK=5;
-  LOOKAHEAD=2147483647;
-//  DEBUG_PARSER=true;
-//  DEBUG_TOKEN_MANAGER=true;
-//  DEBUG_LOOKAHEAD=true;
-}
-
-PARSER_BEGIN(LdPathParser)
-package org.apache.marmotta.ldpath.parser;
-
-import org.apache.marmotta.ldpath.model.Constants;
-
-import org.apache.marmotta.ldpath.api.backend.*;
-import org.apache.marmotta.ldpath.api.functions.*;
-import org.apache.marmotta.ldpath.api.selectors.*;
-import org.apache.marmotta.ldpath.api.tests.*;
-import org.apache.marmotta.ldpath.api.transformers.*;
-
-
-import org.apache.marmotta.ldpath.model.fields.*;
-import org.apache.marmotta.ldpath.model.functions.*;
-import org.apache.marmotta.ldpath.model.programs.*;
-import org.apache.marmotta.ldpath.model.selectors.*;
-import org.apache.marmotta.ldpath.model.tests.*;
-import org.apache.marmotta.ldpath.model.transformers.*;
-
-
-import java.util.ArrayList;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-import java.util.HashMap;
-import java.util.Locale;
-import java.util.Collections;
-
-import java.io.Reader;
-import java.io.InputStream;
-
-import java.net.URI;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-@SuppressWarnings("all")
-public class LdPathParser<Node> {
-
-        private enum Mode { RULE, SELECTOR, TEST, PROGRAM, PREFIX };
-
-
-        private static final Logger log = LoggerFactory.getLogger(LdPathParser.class);
-
-        /**
-         * A map mapping from namespace prefix to namespace URI
-         */
-        private Map<String,String> namespaces = new HashMap<String,String>();
-
-        private NodeBackend<Node> backend;
-
-        private Configuration config;
-
-        private Mode mode = Mode.PROGRAM;
-
-        public LdPathParser(NodeBackend<Node> backend, Reader in) {
-            this(backend,null,in);
-        }
-
-        public LdPathParser(NodeBackend<Node> backend, Configuration config, Reader in) {
-            this(in);
-            this.backend = backend;
-            if(config == null) {
-                this.config = new DefaultConfiguration();
-            } else {
-                this.config = config;
-            }
-
-            initialise();
-        }
-
-        public LdPathParser(NodeBackend<Node> backend, InputStream in) {
-            this(backend,null,in);
-        }
-
-        public LdPathParser(NodeBackend<Node> backend, Configuration config, InputStream in) {
-            this(in);
-            this.backend = backend;
-            if(config == null) {
-                this.config = new DefaultConfiguration();
-            } else {
-                this.config = config;
-            }
-
-            initialise();
-        }
-
-        public LdPathParser(NodeBackend<Node> backend, InputStream in, String encoding) {
-            this(backend,null,in,encoding);
-        }
-
-        public LdPathParser(NodeBackend<Node> backend, Configuration config, InputStream in, String encoding) {
-            this(in,encoding);
-            this.backend = backend;
-            if(config == null) {
-                this.config = new DefaultConfiguration();
-            } else {
-                this.config = config;
-            }
-
-            initialise();
-        }
-
-        public Program<Node> parseProgram() throws ParseException {
-			namespaces.clear();
-			namespaces.putAll(config.getNamespaces());
-
-            mode = Mode.PROGRAM;
-            try {
-		        return Program();
-		    } catch(TokenMgrError error){
-		        throw new ParseException("Unable to parse Program: (Message: "+error.getMessage()+")");
-		    }
-        }
-
-        public Entry<String, String> parsePrefix() throws ParseException {
-            namespaces.clear();
-            namespaces.putAll(config.getNamespaces());
-            mode = Mode.PREFIX;
-            try {
-                return Namespace();
-            } catch (TokenMgrError error) {
-                throw new ParseException("Unable to parse Prefix: (Message: "+ error.getMessage()+")");
-            }
-        }
-
-        public Map<String, String> parsePrefixes() throws ParseException {
-            namespaces.clear();
-            namespaces.putAll(config.getNamespaces());
-            mode = Mode.PREFIX;
-            try {
-                return Namespaces();
-            } catch (TokenMgrError error) {
-                throw new ParseException("Unable to parse Prefixes: (Message: "+ error.getMessage()+")");
-            }
-        }
-
-
-        public NodeSelector<Node> parseSelector(Map<String,String> ctxNamespaces) throws ParseException {
-			namespaces.clear();
-			namespaces.putAll(config.getNamespaces());
-			if(ctxNamespaces != null) {
-			    namespaces.putAll(ctxNamespaces);
-			}
-
-			mode = Mode.SELECTOR;
-
-            try {
-    		    return Selector();
-            } catch(TokenMgrError error){
-                throw new ParseException("Unable to parse Selector: (Message: "+error.getMessage()+")");
-            }
-        }
-        
-        public NodeTest<Node> parseTest(Map<String, String> ctxNamespaces) throws ParseException {
-            namespaces.clear();
-            namespaces.putAll(config.getNamespaces());
-            if (ctxNamespaces != null) {
-                namespaces.putAll(ctxNamespaces);
-            }
-            mode = Mode.TEST;
-            try {
-                return NodeTest();
-            } catch (TokenMgrError error) {
-                throw new ParseException("Unable to parse Test: (Message: "+ error.getMessage()+")");
-            }
-        }
-
-        public <T> FieldMapping<T,Node> parseRule(Map<String,String> ctxNamespaces) throws ParseException {
-			namespaces.clear();
-			namespaces.putAll(config.getNamespaces());
-			if(ctxNamespaces != null) {
-			    namespaces.putAll(ctxNamespaces);
-			}
-
-			mode = Mode.RULE;
-
-            try {
-	            return Rule();
-            } catch(TokenMgrError error){
-                throw new ParseException("Unable to parse Rule: (Message: "+error.getMessage()+")");
-            }
-        }
-
-        public Node resolveURI(URI uri) {
-            return backend.createURI(uri.toString());
-        }
-
-        public Node resolveResource(String uri) throws ParseException {
-            return backend.createURI(uri);
-        }
-
-        public Node resolveResource(String prefix, String local) throws ParseException {
-            return resolveResource(resolveNamespace(prefix)+local);
-        }
-
-
-        public String resolveNamespace(String prefix) throws ParseException {
-            String uri = namespaces.get(prefix);
-            if(uri == null) {
-                throw new ParseException("Namespace "+prefix+" not defined!");
-            }
-            return uri;
-        }
-
-
-        public SelectorFunction<Node> getFunction(String uri) throws ParseException {
-            if(xsdNodeFunctionMap.get(uri) != null) {
-               return xsdNodeFunctionMap.get(uri);
-            } else {
-                throw new ParseException("function with URI "+uri+" does not exist");
-            }
-        }
-
-        public TestFunction<Node> getTestFunction(String uri) throws ParseException {
-            if (xsdNodeTestMap.get(uri) != null) {
-                return xsdNodeTestMap.get(uri);
-            } else {
-                throw new ParseException("test function with URI "+uri+" does not exist");
-            }
-        }
-
-        public NodeTransformer<?,Node> getTransformer(URI type) throws ParseException {
-            return getTransformer(type.toString());
-        }
-
-        public NodeTransformer<?,Node> getTransformer(Node node) throws ParseException {
-            return getTransformer(backend.stringValue(node));
-        }
-
-        public NodeTransformer<?,Node> getTransformer(String uri) throws ParseException {
-            if(xsdNodeTransformerMap.get(uri) != null) {
-                return xsdNodeTransformerMap.get(uri);
-            } else {
-                throw new ParseException("transformer with URI "+uri+" does not exist");
-            }
-        }
-
-
-        private void initialise() {
-            initTransformerMappings();
-            initFunctionMappings();
-        }
-
-        /**
-         * Register the function passed as argument in this parser's function map.
-         */
-        public void registerFunction(SelectorFunction<Node> function) {
-            registerFunction(xsdNodeFunctionMap,function);
-        }
-
-        public void registerFunction(TestFunction<Node> test) {
-            registerTest(xsdNodeTestMap, test);
-        }
-
-        /**
-         * Register the result transformer passed as argument for the given type uri.
-         */
-        public void registerTransformer(String typeUri, NodeTransformer<?,Node> transformer) {
-            xsdNodeTransformerMap.put(typeUri,transformer);
-        }
-
-
-        /**
-         * A map mapping from XSD types to node transformers.
-         */
-        private Map<String, NodeTransformer<?,Node>> xsdNodeTransformerMap;
-        private void initTransformerMappings() {
-            Map<String, NodeTransformer<?,Node>> transformerMap = new HashMap<String, NodeTransformer<?,Node>>();
-
-            transformerMap.putAll(config.getTransformers());
-
-            xsdNodeTransformerMap = transformerMap;
-        }
-
-
-        private Map<String, SelectorFunction<Node>> xsdNodeFunctionMap;
-        private Map<String, TestFunction<Node>> xsdNodeTestMap;
-        private void initFunctionMappings() {
-            Map<String, SelectorFunction<Node>> functionMap = new HashMap<String, SelectorFunction<Node>>();
-
-            functionMap.putAll(config.getFunctions());
-
-            xsdNodeFunctionMap = functionMap;
-
-        Map<String, TestFunction<Node>> testMap = new HashMap<String, TestFunction<Node>>();
-        testMap.putAll(config.getTestFunctions());
-        xsdNodeTestMap = testMap;
-        }
-
-        private void registerFunction(Map<String, SelectorFunction<Node>> register, final SelectorFunction<Node> function) {
-            register.put(Constants.NS_LMF_FUNCS + function.getPathExpression(backend), function);
-        }
-        
-        private void registerTest(Map<String, TestFunction<Node>> register, final TestFunction<Node> test) {
-            register.put(Constants.NS_LMF_FUNCS + test.getLocalName(), test);
-        }
-
-        private class Namespace implements Entry<String, String> {
-            private String key, val;
-            public Namespace(String key, String val) {
-                this.key = key;
-                this.val = val;
-            }
-            @Override
-            public String getKey() {
-                return key;
-            }
-            @Override
-            public String getValue() {
-                return val;
-            }
-            @Override
-            public String setValue(String value) {
-                String oV = val;
-                val = value;
-                return oV;
-            }
-        }
-
-}
-PARSER_END(LdPathParser)
-
-SKIP :
-{
- 	" "
-|	"\r"
-|	"\t"
-|	"\n"
-}
-
-// When a /* is seen in the DEFAULT state, skip it and switch to the IN_COMMENT state
-SKIP : {
-    "/*": IN_COMMENT
-}
-
-// When any other character is seen in the IN_COMMENT state, skip it.
-< IN_COMMENT > SKIP : {
-    <  ~[] >
-}
-
-// When a */ is seen in the IN_COMMENT state, skip it and switch back to the DEFAULT state
-< IN_COMMENT > SKIP : {
-    "*/": DEFAULT
-}
-
-MORE:
-{
- "\"" : WithinString
-}
-
-<WithinString> TOKEN:
-{
-  <STRLIT: "\""> : DEFAULT
-}
-
-<WithinString> MORE:
-{
-  <~["\n","\r"]>
-}
-
-
-TOKEN : /* LDPATH */
-{
-  < COMMA:  "," >  |
-  < SCOLON: ";" >  |
-  < COLON:  ":" >  |
-  < DCOLON: "::" > |
-  < ASSIGN: "=" >  |
-  < K_PREFIX: "@prefix" > |
-  < K_FILTER: "@filter" > |
-  < K_BOOST:  "@boost" >  |
-  < K_GRAPH:  "@graph" >
-}
-TOKEN : /* OPERATORS */
-{
-    < SELF: "." >    |
-	< AND:  "&" >    |
-	< OR:   "|" >    |
-    < P_SEP:"/" >    |
-    < PLUS: "+" >    |
-    < STAR: "*" >    |
-	< NOT:  "!" >    |
-    < INVERSE: "^" > |
-	< IS:   "is" >   |
-	< IS_A: "is-a" > |
-    < FUNC: "fn:" >  |
-  	< TYPE: "^^" >   |
-  	< LANG: "@" >
-}
-
-TOKEN : /* BRACKETS */
-{
-  < B_RO: "(" > |
-  < B_RC: ")" > |
-  < B_SO: "[" > |
-  < B_SC: "]" > |
-  < B_CO: "{" > |
-  < B_CC: "}" > |
-  < B_XO: "<" > |
-  < B_XC: ">" > 
-}
-TOKEN :
-{
-    < URI: "<" (~[ ">","<", "\"", "{", "}", "^", "\\", "|", "`", "\u0000"-"\u0020"])+ ">" > |
-    < IDENTIFIER: ["a"-"z","A"-"Z","0"-"9","_"](["a"-"z","A"-"Z","0"-"9","_","'","-", "."])* > |
-    < #URICHAR: ["a"-"z","A"-"Z","0"-"9",";","/","?",":","@","&","=","+","$",".","-","_","!","~","*","'","%"] >
-}
-
-Map<String, String> Namespaces() :
-{
-    Map<String, String> ns = new HashMap<String, String>();
-    Entry<String, String> namespace = null;
-}
-{
-  (
-     namespace = Namespace() {
-       ns.put(namespace.getKey(), namespace.getValue());
-     }
-  )+
-  {
-    return ns;
-  }   
-}
-
-Entry<String, String> Namespace() :
-{
-    Token id = null;
-    Token uri;
-}
-{
-  ( 
-    <K_PREFIX> id = <IDENTIFIER> <COLON> uri = <URI> (<SCOLON> )? {
-    }
-  ) { return new Namespace(id.image, uri.image.substring(1,uri.image.length()-1)); }
-}
-
-Program Program() :
-{
-    Program<Node> program = new Program();
-    NodeTest<Node> filter = null;
-    Map<String, String> nss = null;
-    FieldMapping<?,Node> rule;
-    NodeSelector<Node> boostSelector;
-    LinkedList<URI> graphs;
-}
-{
-  (
-    nss = Namespaces() {
-        namespaces.putAll(nss);
-        for (String k : nss.keySet()) {
-            program.addNamespace(k, nss.get(k));
-        }
-    }
-  )?
-
-  (
-    <K_GRAPH> graphs = UriList() <SCOLON> {
-      program.setGraphs(graphs);
-    }
-  )?
-
-  (
-    <K_FILTER> filter = NodeTest() <SCOLON> {
-        program.setFilter(filter);
-    }
-  )?
-
-  (
-    <K_BOOST> boostSelector = Selector() <SCOLON> {
-    	NodeTransformer transformer = getTransformer(Program.DOCUMENT_BOOST_TYPE);
-		FieldMapping booster = new FieldMapping("@boost", java.net.URI.create(Program.DOCUMENT_BOOST_TYPE), boostSelector, transformer, null);
-		program.setBooster(booster);  
-    }
-  )?
-
-  (
-    rule = Rule()
-    {
-       program.addMapping(rule);
-    }
-  )*
-  <EOF>
-  {
-    return program;
-  }
-}
-
-LinkedList<URI> UriList() :
-{
-    LinkedList<URI> rest = null;
-    URI uri;
-}
-{
-    uri = Uri() ( <COMMA> rest = UriList() )?
-    {
-      if (rest == null) rest = new LinkedList<URI>();
-      rest.addFirst(uri);
-      return rest;
-    }
-}
-
-FieldMapping Rule() :
-{
-    FieldMapping<?,Node> rule;
-    Token name;
-    URI uri;
-    URI type = null;
-    NodeSelector<Node> selector;
-    NodeTransformer<?,Node> transformer;
-    Map<String, String> conf = null;
-}
-{
-    name = <IDENTIFIER> <ASSIGN> selector = Selector() (<DCOLON> type = Uri())? (<B_RO> conf = FieldConfig() <B_RC>)? <SCOLON> {
-        if(type != null) {
-            transformer = getTransformer(type);
-        } else {
-            transformer = new IdentityTransformer();
-        }
-        if(mode != Mode.PROGRAM) {
-            throw new ParseException("cannot use field names when parsing single paths");
-        }
-        rule = new FieldMapping(name.image,type,selector,transformer, conf);
-        return rule;
-    }
-|   uri = Uri() <ASSIGN> selector = Selector() (<DCOLON> type = Uri())? (<B_RO> conf = FieldConfig() <B_RC>)? <SCOLON> {
-        if(type != null) {
-            transformer = getTransformer(type);
-        } else {
-            transformer = new IdentityTransformer();
-        }
-        if(mode != Mode.PROGRAM) {
-            throw new ParseException("cannot use field names when parsing single paths");
-        }
-        rule = new FieldMapping(uri,type,selector,transformer, conf);
-        return rule;
-    }
-|   selector = Selector() (<DCOLON> type = Uri())? (<B_RO> conf = FieldConfig() <B_RC>)? (<SCOLON>)? {
-        if(type != null) {
-            transformer = getTransformer(type);
-        } else {
-            transformer = new IdentityTransformer();
-        }
-        if(mode != Mode.PROGRAM && conf != null) {
-            throw new ParseException("cannot use configuration parameters when parsing single paths");
-        }
-        try {
-            rule = new FieldMapping(selector.getName(backend),type,selector,transformer, conf);
-        } catch(UnsupportedOperationException ex) {
-            if(mode == Mode.PROGRAM) {
-                rule = new FieldMapping("unnamed",type,selector,transformer, conf);
-                log.error("error while parsing {}: {}", rule.getPathExpression(backend),ex.getMessage());
-                throw new ParseException("error while parsing "+rule.getPathExpression(backend)+": "+ex.getMessage());
-            } else {
-                rule = new FieldMapping("unnamed",type,selector,transformer, conf);
-            }
-        }
-        return rule;
-    }
-}
-
-
-Map<String,String> FieldConfig() : {
-	Map<String, String> conf = new HashMap<String, String>();
-	Token key = null;
-	String val = null;
-	Map<String,String> more = null;
-}
-{
-	( key = <IDENTIFIER> <ASSIGN> val = ConfVal() ( <COMMA> more = FieldConfig() )? )? {
-		if (key == null || val == null) return null;
-		conf.put(key.image, val);
-		if (more != null) {
-			conf.putAll(more);
-		}
-		return conf;
-	}
-}
-
-String ConfVal() : {
-	Token str, id;
-}
-{
-	str = <STRLIT> { return str.image.substring(1, str.image.length() -1); }
-|	id = <IDENTIFIER> { return id.image; }
-}
-
-URI Uri() : {
-    Token uri, prefix, localName;
-
-}
-{
-    uri = <URI> {
-       return java.net.URI.create(uri.image.substring(1,uri.image.length()-1));
-    }
-|   prefix = <IDENTIFIER> ":" localName = <IDENTIFIER> {
-        return java.net.URI.create(resolveNamespace(prefix.image)+localName.image);
-    }
-}
-
-
-NodeSelector Selector() :
-{
-    NodeSelector result;
-}
-{
-    (
-        result = CompoundSelector()
-    |   result = TestingSelector()
-    |   result = AtomicSelector()
-    )
-    {
-        return result;
-    }
-}
-
-
-NodeSelector CompoundSelector() :
-{
-    NodeSelector result = null;
-}
-{
-    (
-        /* Union Selector */
-        result = UnionSelector() |
-
-        /* Intersection Selector */
-        result = IntersectionSelector() |
-
-        /* Path Selector */
-        result = PathSelector()
-
-
-    )
-    {
-        return result;
-    }
-}
-
-/**
- * As path elements, we do not allow arbitrary compound selectors, but we allow all atomic and path selectors.
- */
-NodeSelector AtomicOrTestingOrPathSelector() :
-{
-    NodeSelector result = null;
-}
-{
-    (
-        /* Path Selector */
-        result = PathSelector() |
-
-        /* Atomic Selector */
-        result = AtomicOrTestingSelector()
-    )
-    {
-        return result;
-    }
-}
-
-NodeSelector AtomicOrTestingSelector() :
-{
-    NodeSelector result = null;
-}
-{
-    (
-        /* Testing Selector */
-        result = TestingSelector() |
-
-        /* Atomic Selector */
-        result = AtomicSelector()
-    )
-    {
-        return result;
-    }
-}
-
-NodeSelector AtomicSelector() :
-{
-    NodeSelector result = null;
-}
-{
-    (
-    	/* Self Selector */
-    	result = SelfSelector() |
-    	    
-        /* Property Selector */
-        result = PropertySelector() |
-
-        /* Wildcard Selector */
-        result = WildcardSelector() |
-        
-        /* Reverse Property Selector */
-        result = ReversePropertySelector() |
-
-        /* Function Selector */
-        result = FunctionSelector() |
-
-        /* String Constant Selector */
-        result = StringConstantSelector() |
-        
-        /* Recursive Path Selector */
-        result = RecursivePathSelector() |
-
-        /* Other selector enclosed in braces */
-        result = GroupedSelector()
-
-    )
-    {
-        return result;
-    }
-}
-
-NodeSelector SelfSelector() :
-{
-}
-{
-	<SELF> { return new SelfSelector(); }
-}
-
-NodeSelector GroupedSelector() :
-{
-    NodeSelector result = null;
-}
-{
-    /* Other selector enclosed in braces */
-    <B_RO> result = Selector() <B_RC>
-    {
-        return new GroupedSelector(result);
-    }
-
-}
-
-RecursivePathSelector RecursivePathSelector() :
-{
-	RecursivePathSelector result = null;
-	NodeSelector delegate        = null;
-}
-{
-	<B_RO> delegate = Selector() <B_RC> <PLUS>	
-	{
-		result = RecursivePathSelector.getPathSelectorPlused(delegate);
-		return result;
-	} |
-    <B_RO> delegate = Selector() <B_RC> <STAR>
-    {
-        result = RecursivePathSelector.getPathSelectorStared(delegate);
-        return result;
-    } 
-}
-
-PathSelector PathSelector() :
-{
-    PathSelector result = null;
-    NodeSelector left   = null;
-    NodeSelector right  = null;
-}
-{
-    left = AtomicOrTestingSelector() <P_SEP> right = AtomicOrTestingOrPathSelector()
-    {
-        result = new PathSelector(left,right);
-        return result;
-    }
-}
-
-IntersectionSelector IntersectionSelector() :
-{
-    IntersectionSelector result = null;
-    NodeSelector left   = null;
-    NodeSelector right  = null;
-}
-{
-    left = AtomicOrTestingOrPathSelector() <AND> right = Selector()
-    {
-        result = new IntersectionSelector(left,right);
-        return result;
-    }
-}
-
-UnionSelector UnionSelector() :
-{
-    UnionSelector result = null;
-    NodeSelector left   = null;
-    NodeSelector right  = null;
-}
-{
-    left = AtomicOrTestingOrPathSelector() <OR> right = Selector()
-    {
-        result = new UnionSelector(left,right);
-        return result;
-    }
-}
-
-TestingSelector TestingSelector() :
-{
-    TestingSelector result = null;
-    NodeSelector delegate  = null;
-    NodeTest test = null;
-}
-{
-    delegate = AtomicSelector() <B_SO> test = NodeTest() <B_SC> {
-        result = new TestingSelector(delegate,test);
-        return result;
-    }
-}
-
-ReversePropertySelector ReversePropertySelector() :
-{
-	ReversePropertySelector result = null;
-	URI uri;
-}
-{
-	<INVERSE> uri = Uri() {
-        result   = new ReversePropertySelector(resolveURI(uri));
-        return result;
-	}
-}
-
-PropertySelector PropertySelector() :
-{
-    PropertySelector result = null;
-    URI uri;
-}
-{
-    uri = Uri() {
-        result   = new PropertySelector(resolveURI(uri));
-        return result;
-    }
-}
-
-WildcardSelector WildcardSelector() :
-{
-    WildcardSelector result = null;
-}
-{
-    <STAR> {
-        result = new WildcardSelector();
-        return result;
-    }
-}
-
-FunctionSelector FunctionSelector() :
-{
-    FunctionSelector result = null;
-    List<NodeSelector> arguments = new ArrayList<NodeSelector>();
-    NodeSelector argument;
-    String uri;
-    Token fName;
-}
-{
-    /* Function-Calls without arguments can skip parenthesis */
-    /* Does not work... why?
-    <FUNC> fName = <IDENTIFIER> {
-           uri = namespaces.get("fn") + fName.image;
-           result = new FunctionSelector(getFunction(uri),Collections.emptyList());
-           return result;
-    } | */
-    /* Functions do not need to have arguments */
-    <FUNC> fName = <IDENTIFIER> <B_RO> <B_RC> {
-           uri = namespaces.get("fn") + fName.image;
-           result = new FunctionSelector(getFunction(uri),Collections.emptyList());
-           return result;
-    } |
-    /* Sometimes arguments are required */
-    <FUNC> fName = <IDENTIFIER> <B_RO>
-            argument = Selector() { arguments.add(argument); }
-            ( <COMMA> argument = Selector() { arguments.add(argument); } )*
-    <B_RC> {
-           uri = namespaces.get("fn") + fName.image;
-           result = new FunctionSelector(getFunction(uri),arguments);
-           return result;
-    }
-}
-
-
-StringConstantSelector StringConstantSelector() :
-{
-    StringConstantSelector result = null;
-    Token literal;
-}
-{
-    literal = <STRLIT> {
-        result = new StringConstantSelector(literal.image.substring(1, literal.image.length()-1));
-        return result;
-    }
-}
-
-
-
-NodeTest NodeTest() :
-{
-    NodeTest result;
-}
-{
-    (
-        result = GroupedTest()
-    |   result = NotTest()
-    |   result = AndTest()
-    |   result = OrTest()
-    |   result = AtomicNodeTest()
-    )
-    {
-        return result;
-    }
-}
-
-NodeTest GroupedTest() :
-{
-    NodeTest delegate;
-}
-{
-    <B_RO> delegate = NodeTest() <B_RC> {
-       return delegate;
-    }
-}
-
-NodeTest AtomicNodeTest() :
-{
-    NodeTest result;
-}
-{
-    (
-        result = LiteralLanguageTest()
-    |   result = LiteralTypeTest()
-    |   result = IsATest()
-    |   result = PathEqualityTest()
-    |   result = FunctionTest()
-    |   result = PathTest()
-    )
-    {
-        return result;
-    }
-}
-
-FunctionTest FunctionTest() :
-{
-    FunctionTest result;
-    List<NodeSelector> arguments = new ArrayList<NodeSelector>();
-    NodeSelector argument;
-    String uri;
-    Token fName;
-}
-{
-  (    
-    /* Function-Calls without arguments can skip parenthesis */
-    /* Does not work... why?
-    <FUNC> fName = <IDENTIFIER> {
-           uri = namespaces.get("fn") + fName.image;
-           result = new FunctionSelector(getTestFunction(uri),Collections.emptyList());
-    } | */
-    /* Functions do not need to have arguments */
-    <FUNC> fName = <IDENTIFIER> <B_RO> <B_RC> {
-           uri = namespaces.get("fn") + fName.image;
-           result = new FunctionTest(getTestFunction(uri),Collections.emptyList());
-    } |
-    /* Sometimes arguments are required */
-    <FUNC> fName = <IDENTIFIER> <B_RO>
-            argument = Selector() { arguments.add(argument); }
-            ( <COMMA> argument = Selector() { arguments.add(argument); } )*
-    <B_RC> {
-           uri = namespaces.get("fn") + fName.image;
-           result = new FunctionTest(getTestFunction(uri),arguments);
-    }
-  )
-  {
-    return result;
-  }
-}
-
-LiteralLanguageTest LiteralLanguageTest():
-{
-    Token lang;
-}
-{
-    <LANG> lang = <IDENTIFIER> {
-        return new LiteralLanguageTest(lang.image);
-    }
-}
-
-LiteralTypeTest LiteralTypeTest():
-{
-    URI type;
-}
-{
-    <TYPE> type = Uri() {
-        return new LiteralTypeTest(type);
-    }
-}
-
-NotTest NotTest() :
-{
-    NodeTest delegate;
-}
-{
-    <NOT>  delegate = NodeTest() {
-        return new NotTest(delegate);
-    }
-}
-
-IsATest IsATest() :
-{
-    Node node;
-}
-{
-    <IS_A> node = Node() {
-        return new IsATest(resolveResource("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"), node);
-    }
-}
-
-
-AndTest AndTest():
-{
-    NodeTest left, right;
-}
-{
-    left = AtomicNodeTest() <AND> right = NodeTest() {
-        return new AndTest(left,right);
-    }
-}
-
-OrTest OrTest():
-{
-    NodeTest left, right;
-}
-{
-    left = AtomicNodeTest() <OR> right = NodeTest() {
-        return new OrTest(left,right);
-    }
-}
-
-PathEqualityTest PathEqualityTest():
-{
-    NodeSelector path;
-    Node node;
-}
-{
-    path = Selector() <IS> node = Node() {
-        return new PathEqualityTest(path,node);
-    }
-}
-
-
-Node Node():
-{
-    URI uri, type = null;
-    Token literal, language;
-}
-{
-    uri = Uri() {
-        return resolveURI(uri);
-    }
-|   literal = <STRLIT>  (<TYPE> type = Uri() )? {
-        return backend.createLiteral(literal.image.substring(1, literal.image.length()-1),null,type);
-    }
-|   literal = <STRLIT>  <LANG> language = <IDENTIFIER> {
-        return backend.createLiteral(literal.image.substring(1, literal.image.length()-1),new Locale(language.image),null);
-    }
-}
-
-
-PathTest PathTest():
-{
-    NodeSelector path;
-}
-{
-    (
-        path = PathSelector()
-    |   path = TestingSelector()
-    |   path = AtomicSelector()
-    )
-    {
-        return new PathTest(path);
-    }
-}
-


[03/40] git commit: MARMOTTA-428: two minor fixes in the maven-bundle-plugin definitions for two pom files

Posted by ja...@apache.org.
MARMOTTA-428: two minor fixes in the maven-bundle-plugin definitions for two pom files


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/9acbddfa
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/9acbddfa
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/9acbddfa

Branch: refs/heads/ldp
Commit: 9acbddfa8546168ba61ef4ca074a96f9e3d9fb39
Parents: 9512243
Author: Rupert Westenthaler <ru...@gmail.com>
Authored: Mon Feb 3 13:55:53 2014 +0100
Committer: Rupert Westenthaler <ru...@gmail.com>
Committed: Mon Feb 3 13:55:53 2014 +0100

----------------------------------------------------------------------
 libraries/ldcache/ldcache-api/pom.xml   | 29 ++++++++++++------------
 libraries/ldclient/ldclient-api/pom.xml | 34 +++++++++++++---------------
 2 files changed, 31 insertions(+), 32 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/9acbddfa/libraries/ldcache/ldcache-api/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/ldcache/ldcache-api/pom.xml b/libraries/ldcache/ldcache-api/pom.xml
index b3acd34..59454ef 100644
--- a/libraries/ldcache/ldcache-api/pom.xml
+++ b/libraries/ldcache/ldcache-api/pom.xml
@@ -53,22 +53,23 @@
                         <rootPath>$${rebel.root}</rootPath>
                     </configuration>
                 </plugin>
-                <plugin>
-              	    <groupId>org.apache.felix</groupId>
-              		<artifactId>maven-bundle-plugin</artifactId>
-              		<inherited>true</inherited>
-              		<configuration>
-                		<instructions>
-                  			<Export-Package>
-                  				org.apache.marmotta.ldcache.api;version=${project.version},
-                  				org.apache.marmotta.ldcache.model;version=${project.version}
-                  			</Export-Package>
-                		</instructions>
-              		</configuration>
-                </plugin>
-                
             </plugins>
         </pluginManagement>
+        <plugins>
+          <plugin>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>maven-bundle-plugin</artifactId>
+            <extensions>true</extensions>
+            <configuration>
+              <instructions>
+                <Export-Package>
+                  org.apache.marmotta.ldcache.api;version=${project.version},
+                  org.apache.marmotta.ldcache.model;version=${project.version}
+                </Export-Package>
+              </instructions>
+            </configuration>
+          </plugin>
+        </plugins>
     </build>
 
     <dependencies>

http://git-wip-us.apache.org/repos/asf/marmotta/blob/9acbddfa/libraries/ldclient/ldclient-api/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/ldclient/ldclient-api/pom.xml b/libraries/ldclient/ldclient-api/pom.xml
index bec955f..9dfd901 100644
--- a/libraries/ldclient/ldclient-api/pom.xml
+++ b/libraries/ldclient/ldclient-api/pom.xml
@@ -33,24 +33,22 @@
     <packaging>bundle</packaging>
 
     <build>
-        <pluginManagement>
-            <plugins>
-                <plugin>
-                    <groupId>org.apache.felix</groupId>
-                    <artifactId>maven-bundle-plugin</artifactId>
-                    <inherited>true</inherited>
-                    <configuration>
-                        <instructions>
-                            <Export-Package>
-                                org.apache.marmotta.ldlient.api.*;version=${project.version},
-                                org.apache.marmotta.ldcache.exception;version=${project.version},
-                                org.apache.marmotta.ldcache.model;version=${project.version}
-                            </Export-Package>
-                        </instructions>
-                    </configuration>
-                </plugin>
-            </plugins>
-        </pluginManagement>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions> 
+                <configuration>
+                    <instructions>
+                        <Export-Package>
+                            org.apache.marmotta.ldlient.api.*;version=${project.version},
+                            org.apache.marmotta.ldcache.exception;version=${project.version},
+                            org.apache.marmotta.ldcache.model;version=${project.version}
+                        </Export-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
     </build>
 
     <dependencies>


[14/40] git commit: Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/marmotta into develop

Posted by ja...@apache.org.
Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/marmotta into develop

# By Sebastian Schaffert
# Via Sebastian Schaffert
* 'develop' of https://git-wip-us.apache.org/repos/asf/marmotta:
  fixed default setting for caching in kiwi


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/2ddae235
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/2ddae235
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/2ddae235

Branch: refs/heads/ldp
Commit: 2ddae235620be568c97c527db52d2d24e7bceb92
Parents: 3ef4c49 da93ae3
Author: Rupert Westenthaler <ru...@gmail.com>
Authored: Tue Feb 18 09:52:38 2014 +0100
Committer: Rupert Westenthaler <ru...@gmail.com>
Committed: Tue Feb 18 09:52:38 2014 +0100

----------------------------------------------------------------------
 .../java/org/apache/marmotta/kiwi/config/KiWiConfiguration.java    | 2 +-
 platform/marmotta-zookeeper/pom.xml                                | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------