You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marmotta.apache.org by wi...@apache.org on 2013/02/19 13:52:00 UTC

[17/52] [partial] code contribution, initial import of relevant modules of LMF-3.0.0-SNAPSHOT based on revision 4bf944319368 of the default branch at https://code.google.com/p/lmf/

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/c32963d5/lmf-client/lmf-client-php/src/main/php/test_classifier.php
----------------------------------------------------------------------
diff --git a/lmf-client/lmf-client-php/src/main/php/test_classifier.php b/lmf-client/lmf-client-php/src/main/php/test_classifier.php
new file mode 100644
index 0000000..262cb72
--- /dev/null
+++ b/lmf-client/lmf-client-php/src/main/php/test_classifier.php
@@ -0,0 +1,65 @@
+<?php
+/*
+ * Copyright (C) 2013 Salzburg Research.
+ *
+ * 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.
+ */
+/**
+ * Created by IntelliJ IDEA.
+ * User: sschaffe
+ * Date: 27.01.12
+ * Time: 17:21
+ * To change this template use File | Settings | File Templates.
+ */
+require_once 'autoload.php';
+
+use LMFClient\ClientConfiguration;
+use LMFClient\Clients\ClassificationClient;
+use LMFClient\Clients\ResourceClient;
+
+$config = new ClientConfiguration("http://localhost:8080/LMF");
+
+$client = new ClassificationClient($config);
+$rclient = new ResourceClient($config);
+
+// create classifier
+$client->removeClassifier("phptest",true);
+$client->createClassifier("phptest");
+
+// add some training data
+$rclient->createResource("http://www.example.com/Concept1");
+$rclient->createResource("http://www.example.com/Concept2");
+
+$data1 = <<<DATA1
+Major acquisitions that have a lower gross margin than the existing network also
+had a negative impact on the overall gross margin, but it should improve following
+the implementation of its integration strategies .
+DATA1;
+
+$data2 = <<<DATA2
+The upward movement of gross margin resulted from amounts pursuant to adjustments
+to obligations towards dealers .
+DATA2;
+
+
+$client->trainClassifier("phptest","http://www.example.com/Concept1", $data1);
+$client->trainClassifier("phptest","http://www.example.com/Concept2", $data2);
+
+$client->retrainClassifier("phptest");
+
+foreach($client->getAllClassifications("phptest","Major acquisitions that have a lower gross margin than the existing network") as $classification) {
+    echo "Concept: " . $classification["concept"] . ", probability " . $classification["probability"] . "\n";
+}
+$client->removeClassifier("phptest",true);
+
+?>

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/c32963d5/lmf-client/lmf-client-php/src/main/php/test_configuration.php
----------------------------------------------------------------------
diff --git a/lmf-client/lmf-client-php/src/main/php/test_configuration.php b/lmf-client/lmf-client-php/src/main/php/test_configuration.php
new file mode 100644
index 0000000..da6a6d2
--- /dev/null
+++ b/lmf-client/lmf-client-php/src/main/php/test_configuration.php
@@ -0,0 +1,50 @@
+<?php
+/*
+ * Copyright (C) 2013 Salzburg Research.
+ *
+ * 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.
+ */
+/**
+ * Created by IntelliJ IDEA.
+ * User: sschaffe
+ * Date: 25.01.12
+ * Time: 15:49
+ * To change this template use File | Settings | File Templates.
+ */
+require_once 'autoload.php';
+
+use LMFClient\ClientConfiguration;
+use LMFClient\Clients\ConfigurationClient;
+
+$config = new ClientConfiguration("http://localhost:8080/LMF");
+
+$client = new ConfigurationClient($config);
+
+//var_dump($client->listConfigurationKeys());
+
+//var_dump($client->listConfigurations("solr"));
+
+$client->setConfiguration("lmfclient.php.test1","1234");
+$client->setConfiguration("lmfclient.php.test2",array("1234","abc"));
+
+var_dump($client->getConfiguration("lmfclient.php.test1"));
+var_dump($client->getConfiguration("lmfclient.php.test2"));
+
+$client->deleteConfiguration("lmfclient.php.test1");
+$client->deleteConfiguration("lmfclient.php.test2");
+
+
+var_dump($client->getConfiguration("lmfclient.php.test1"));
+var_dump($client->getConfiguration("lmfclient.php.test2"));
+
+?>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/c32963d5/lmf-client/lmf-client-php/src/main/php/test_cores.php
----------------------------------------------------------------------
diff --git a/lmf-client/lmf-client-php/src/main/php/test_cores.php b/lmf-client/lmf-client-php/src/main/php/test_cores.php
new file mode 100644
index 0000000..a08dc97
--- /dev/null
+++ b/lmf-client/lmf-client-php/src/main/php/test_cores.php
@@ -0,0 +1,63 @@
+<?php
+/*
+ * Copyright (C) 2013 Salzburg Research.
+ *
+ * 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.
+ */
+/**
+ * Created by IntelliJ IDEA.
+ * User: sschaffe
+ * Date: 27.01.12
+ * Time: 16:06
+ * To change this template use File | Settings | File Templates.
+ */
+
+require_once 'autoload.php';
+
+use LMFClient\ClientConfiguration;
+use LMFClient\Clients\CoresClient;
+
+$config = new ClientConfiguration("http://localhost:8080/LMF");
+
+$client = new CoresClient($config);
+
+// list all available cores
+foreach($client->listCores() as $core) {
+    echo "Found core: $core\n";
+}
+
+// retrieve a core
+echo "Core $core:\n";
+echo $client->getCoreConfiguration($core);
+
+
+// create a core
+$program = "title = rdfs:label :: xsd:string ;";
+$client->createCoreConfiguration("lmfclient",$program);
+
+// give it some time
+sleep(2);
+
+// retrieve the core
+echo "Core lmfclient:\n";
+echo $client->getCoreConfiguration("lmfclient");
+
+// delete the core
+$client->deleteCore("lmfclient");
+
+
+// try to get it again
+//echo "Core lmfclient:\n";
+//echo $client->getCoreConfiguration("lmfclient");
+
+?>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/c32963d5/lmf-client/lmf-client-php/src/main/php/test_import.php
----------------------------------------------------------------------
diff --git a/lmf-client/lmf-client-php/src/main/php/test_import.php b/lmf-client/lmf-client-php/src/main/php/test_import.php
new file mode 100644
index 0000000..57c4978
--- /dev/null
+++ b/lmf-client/lmf-client-php/src/main/php/test_import.php
@@ -0,0 +1,61 @@
+<?php
+/*
+ * Copyright (C) 2013 Salzburg Research.
+ *
+ * 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.
+ */
+/**
+ * Created by IntelliJ IDEA.
+ * User: sschaffe
+ * Date: 27.01.12
+ * Time: 14:13
+ * To change this template use File | Settings | File Templates.
+ */
+
+require_once 'autoload.php';
+
+use LMFClient\ClientConfiguration;
+use LMFClient\Clients\ImportClient;
+use LMFClient\Clients\ResourceClient;
+
+$config = new ClientConfiguration("http://localhost:8080/LMF");
+
+$client = new ImportClient($config);
+
+// list supported types
+echo "Supported Types: ";
+foreach($client->getSupportedTypes() as $type) {
+    echo $type . ",";
+}
+echo "\n";
+
+
+// import a simple data set
+$data = "<http://example.com/resource/r1> <http://example.com/resource/p1> \"Test Data\".";
+$client->uploadDataset($data,"text/rdf+n3");
+
+
+// wait a bit for import to finish
+sleep(1);
+
+
+$rclient = new ResourceClient($config);
+
+foreach($rclient->getResourceMetadata("http://example.com/resource/r1") as $property => $value) {
+    echo $property . " = " . $value[0] . "\n";
+}
+
+
+
+
+?>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/c32963d5/lmf-client/lmf-client-php/src/main/php/test_ldpath.php
----------------------------------------------------------------------
diff --git a/lmf-client/lmf-client-php/src/main/php/test_ldpath.php b/lmf-client/lmf-client-php/src/main/php/test_ldpath.php
new file mode 100644
index 0000000..3a7e8ab
--- /dev/null
+++ b/lmf-client/lmf-client-php/src/main/php/test_ldpath.php
@@ -0,0 +1,48 @@
+<?php
+/*
+ * Copyright (C) 2013 Salzburg Research.
+ *
+ * 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.
+ */
+/**
+ * Created by IntelliJ IDEA.
+ * User: sschaffe
+ * Date: 27.01.12
+ * Time: 17:21
+ * To change this template use File | Settings | File Templates.
+ */
+require_once 'autoload.php';
+
+use LMFClient\ClientConfiguration;
+use LMFClient\Clients\LDPathClient;
+
+$config = new ClientConfiguration("http://localhost:8080/LMF");
+
+$client = new LDPathClient($config);
+
+// list friends of hans meier
+foreach($client->evaluatePath("http://localhost:8080/LMF/resource/hans_meier", "foaf:knows / foaf:name") as $friend) {
+    echo "Friend: $friend\n";
+}
+
+// list profile of hans meier
+foreach($client->evaluateProgram("http://localhost:8080/LMF/resource/hans_meier", "friend = foaf:knows / foaf:name :: xsd:string; name = foaf:name :: xsd:string; interest   = foaf:interest / (rdfs:label[@en] | rdfs:label[@none] | <http://rdf.freebase.com/ns/type.object.name>[@en]) :: xsd:string;") as $field => $values) {
+    echo "$field: ";
+    foreach($values as $value) {
+        echo $value . ",";
+    }
+    echo "\n";
+}
+
+
+?>

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/c32963d5/lmf-client/lmf-client-php/src/main/php/test_private.php
----------------------------------------------------------------------
diff --git a/lmf-client/lmf-client-php/src/main/php/test_private.php b/lmf-client/lmf-client-php/src/main/php/test_private.php
new file mode 100644
index 0000000..2b4e484
--- /dev/null
+++ b/lmf-client/lmf-client-php/src/main/php/test_private.php
@@ -0,0 +1,38 @@
+<?php
+/*
+ * Copyright (C) 2013 Salzburg Research.
+ *
+ * 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.
+ */
+/**
+ * Created by IntelliJ IDEA.
+ * User: sschaffe
+ * Date: 30.01.12
+ * Time: 17:00
+ * To change this template use File | Settings | File Templates.
+ */
+require_once 'autoload.php';
+
+use LMFClient\ClientConfiguration;
+use LMFClient\Clients\LDPathClient;
+
+$config = new ClientConfiguration("http://localhost:8080/LMF");
+
+$client = new LDPathClient($config);
+
+// list friends of hans meier
+foreach($client->evaluatePath("https://www.youtube.com/profile?user=wastl76", "(<http://gdata.youtube.com/schemas/2007#playlist> | <http://gdata.youtube.com/schemas/2007#favorite> ) / <http://gdata.youtube.com/schemas/2007#video> / <http://www.holygoat.co.uk/owl/redwood/0.1/tags/taggedWithTag> / <http://www.holygoat.co.uk/owl/redwood/0.1/tags/name>") as $field) {
+    echo "Tag: $field\n";
+}
+
+?>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/c32963d5/lmf-client/lmf-client-php/src/main/php/test_resource.php
----------------------------------------------------------------------
diff --git a/lmf-client/lmf-client-php/src/main/php/test_resource.php b/lmf-client/lmf-client-php/src/main/php/test_resource.php
new file mode 100644
index 0000000..e5497a4
--- /dev/null
+++ b/lmf-client/lmf-client-php/src/main/php/test_resource.php
@@ -0,0 +1,63 @@
+<?php
+/*
+ * Copyright (C) 2013 Salzburg Research.
+ *
+ * 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.
+ */
+/**
+ * Created by IntelliJ IDEA.
+ * User: sschaffe
+ * Date: 25.01.12
+ * Time: 10:38
+ * To change this template use File | Settings | File Templates.
+ */
+
+
+require_once 'autoload.php';
+
+use LMFClient\ClientConfiguration;
+use LMFClient\Clients\ResourceClient;
+
+$config = new ClientConfiguration("http://localhost:8080/LMF");
+
+$client = new ResourceClient($config);
+
+/*
+echo $client->getResourceContent("http://localhost:8080/LMF/resource/Chess","application/xhtml+xml")->getData();
+*/
+
+/*
+echo "should be false: " . $client->existsResource("http://brzlbrnft.com/123") . "\n";
+echo "should be true: " . $client->existsResource("http://localhost:8080/LMF/resource/Chess") . "\n";
+*/
+
+
+$client->createResource("http://localhost:8080/LMF/resource/1234");
+
+$metadata = array(
+    "http://xmlns.com/foaf/0.1/name" => array(new \LMFClient\Model\RDF\Literal("Hans Mustermann"))
+);
+
+$client->updateResourceMetadata("http://localhost:8080/LMF/resource/1234",$metadata);
+
+$client->deleteResource("http://localhost:8080/LMF/resource/1234");
+
+
+/*
+$metadata = $client->getResourceMetadata("http://localhost:8080/LMF/resource/hans_meier");
+
+var_dump($metadata);
+
+echo encode_metadata("http://localhost:8080/LMF/resource/hans_meier",$metadata);
+*/
+?>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/c32963d5/lmf-client/lmf-client-php/src/main/php/test_search.php
----------------------------------------------------------------------
diff --git a/lmf-client/lmf-client-php/src/main/php/test_search.php b/lmf-client/lmf-client-php/src/main/php/test_search.php
new file mode 100644
index 0000000..1558961
--- /dev/null
+++ b/lmf-client/lmf-client-php/src/main/php/test_search.php
@@ -0,0 +1,38 @@
+<?php
+/*
+ * Copyright (C) 2013 Salzburg Research.
+ *
+ * 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.
+ */
+/**
+ * Created by IntelliJ IDEA.
+ * User: sschaffe
+ * Date: 27.01.12
+ * Time: 15:55
+ * To change this template use File | Settings | File Templates.
+ */
+
+require_once 'autoload.php';
+
+use LMFClient\ClientConfiguration;
+use LMFClient\Clients\SearchClient;
+
+$config = new ClientConfiguration("http://localhost:8080/LMF");
+
+$client = new SearchClient($config);
+
+foreach($client->simpleSearch("dc","summary:Sepp") as $result) {
+    echo "Result: " . $result->uri . "\n";
+}
+
+?>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/c32963d5/lmf-client/lmf-client-php/src/main/php/test_sparql.php
----------------------------------------------------------------------
diff --git a/lmf-client/lmf-client-php/src/main/php/test_sparql.php b/lmf-client/lmf-client-php/src/main/php/test_sparql.php
new file mode 100644
index 0000000..e7f0acd
--- /dev/null
+++ b/lmf-client/lmf-client-php/src/main/php/test_sparql.php
@@ -0,0 +1,44 @@
+<?php
+/*
+ * Copyright (C) 2013 Salzburg Research.
+ *
+ * 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.
+ */
+/**
+ * Created by IntelliJ IDEA.
+ * User: sschaffe
+ * Date: 27.01.12
+ * Time: 10:48
+ * To change this template use File | Settings | File Templates.
+ */
+require_once 'autoload.php';
+
+use LMFClient\ClientConfiguration;
+use LMFClient\Clients\SPARQLClient;
+
+$config = new ClientConfiguration("http://localhost:8080/LMF");
+
+$client = new SPARQLClient($config);
+
+echo "TEST SPARQL SELECT:\n";
+foreach($client->select("SELECT ?r ?n WHERE { ?r <http://xmlns.com/foaf/0.1/name> ?n }") as $row) {
+    echo $row["r"] . " has name " . $row["n"] . "\n";
+}
+
+
+echo "TEST SPARQL ASK:\n";
+echo "should be true: " . $client->ask("ASK { ?r <http://xmlns.com/foaf/0.1/name> ?n }") . "\n";
+echo "should be false: " . $client->ask("ASK { ?r <http://xmlns.com/foaf/0.1/brzlbrnft> ?n }")  . "\n";
+
+
+?>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/c32963d5/lmf-client/lmf-client-php/src/main/php/util/rdfjson.php
----------------------------------------------------------------------
diff --git a/lmf-client/lmf-client-php/src/main/php/util/rdfjson.php b/lmf-client/lmf-client-php/src/main/php/util/rdfjson.php
new file mode 100644
index 0000000..2d2105c
--- /dev/null
+++ b/lmf-client/lmf-client-php/src/main/php/util/rdfjson.php
@@ -0,0 +1,132 @@
+<?php
+/*
+ * Copyright (C) 2013 Salzburg Research.
+ *
+ * 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.
+ */
+/**
+ * Created by IntelliJ IDEA.
+ * User: sschaffe
+ * Date: 25.01.12
+ * Time: 11:08
+ * To change this template use File | Settings | File Templates.
+ */
+
+require_once 'model/rdf/Literal.php';
+require_once 'model/rdf/URI.php';
+require_once 'model/rdf/BNode.php';
+
+use LMFClient\Model\RDF\Literal;
+use LMFClient\Model\RDF\URI;
+use LMFClient\Model\RDF\BNode;
+
+/**
+ * Convert an RDF/JSON string into the LMFClient metadata representation. Returns an array of the form
+ *
+ * array(
+ *    "http://xmlns.com/foaf/0.1/name" => array(new Literal("Sepp Huber"))
+ * )
+ *
+ * @param $rdfjson_string
+ */
+function decode_metadata($uri,$rdfjson_string) {
+    $result = array();
+
+    $json_array = json_decode($rdfjson_string,true);
+    foreach($json_array as $subject => $properties) {
+        if($uri == $subject) {
+            foreach($properties as $property => $objects) {
+                $result[$property] = array();
+                foreach($objects as $object) {
+                    $result[$property][] = decode_node($object);
+                }
+            }
+        }
+    }
+    return $result;
+}
+
+
+function decode_node($object) {
+    if($object["type"] == "literal") {
+        return new Literal(
+            $object["value"],
+            isset($object["lang"]) ? $object["lang"] : null,
+            isset($object["datatype"]) ? $object["datatype"] : null
+        );
+    } else if($object["type"] == "uri") {
+        return new URI($object["value"]);
+    } else if($object["type"] == "bnode") {
+        return new BNode($object["value"]);
+    } else {
+        return null;
+    }
+}
+
+/**
+ * Transform a metadata array into an RDF/JSON representation suitable for sending to the LMF Server.
+ *
+ * @param $uri
+ * @param $metadata_array
+ */
+function encode_metadata($uri, $metadata_array) {
+    $result = array();
+    $result[$uri] = array();
+
+    foreach($metadata_array as $property => $values) {
+        $result[$uri][$property] = array();
+        foreach($values as $value) {
+            if($value instanceof \LMFClient\Model\RDF\Literal) {
+                $object = array (
+                    "type"  => "literal",
+                    "value" => $value->getContent()
+                );
+                if(!is_null($value->getLanguage())) {
+                    $object["lang"] = $value->getLanguage();
+                }
+                if(!is_null($value->getDatatype())) {
+                    $object["datatype"] = $value->getDatatype();
+                }
+                $result[$uri][$property][] = $object;
+            } else if($value instanceof \LMFClient\Model\RDF\URI) {
+                $result[$uri][$property][] = array(
+                    "type"  => "uri",
+                    "value" => $value->getUri()
+                );
+            } else if($value instanceof \LMFClient\Model\RDF\BNode) {
+                $result[$uri][$property][] = array(
+                    "type"  => "bnode",
+                    "value" => $value->getAnonId()
+                );
+            } else {
+                // try figuring out whether it is literal or uri based on the string value
+                if(preg_match('|^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i', $value)) {
+                    $result[$uri][$property][] = array(
+                        "type"  => "uri",
+                        "value" => $value
+                    );
+                } else {
+                    $object = array (
+                        "type"  => "literal",
+                        "value" => $value
+                    );
+                }
+            }
+        }
+    }
+    return json_encode($result);
+}
+
+
+
+?>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/c32963d5/lmf-client/lmf-client-php/src/site/phpdoc/phpdoc.conf
----------------------------------------------------------------------
diff --git a/lmf-client/lmf-client-php/src/site/phpdoc/phpdoc.conf b/lmf-client/lmf-client-php/src/site/phpdoc/phpdoc.conf
new file mode 100644
index 0000000..e69de29

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/c32963d5/lmf-client/pom.xml
----------------------------------------------------------------------
diff --git a/lmf-client/pom.xml b/lmf-client/pom.xml
new file mode 100644
index 0000000..217e9b5
--- /dev/null
+++ b/lmf-client/pom.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Copyright (c) 2013 Salzburg Research.
+  ~
+  ~  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.
+  -->
+<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/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>at.newmedialab.lmf</groupId>
+        <artifactId>lmf-parent</artifactId>
+        <version>3.0.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>lmf-client</artifactId>
+    <packaging>pom</packaging>
+
+    <name>LMF Client Library</name>
+    <description>The Linked Media Framework Client Library</description>
+
+    <modules>
+        <module>lmf-client-java</module>
+    </modules>
+    
+    <profiles>
+        <profile>
+            <id>all</id>
+            <modules>
+                <module>lmf-client-php</module>
+                <module>lmf-client-js</module>
+                <module>lmf-client-js-sample-webapp</module>          
+            </modules>
+        </profile>
+    </profiles>
+
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/c32963d5/lmf-client/spring-data-lmf/.classpath
----------------------------------------------------------------------
diff --git a/lmf-client/spring-data-lmf/.classpath b/lmf-client/spring-data-lmf/.classpath
new file mode 100644
index 0000000..da5037b
--- /dev/null
+++ b/lmf-client/spring-data-lmf/.classpath
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" output="target/classes" path="src/main/java"/>
+	<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+	<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/c32963d5/lmf-client/spring-data-lmf/.project
----------------------------------------------------------------------
diff --git a/lmf-client/spring-data-lmf/.project b/lmf-client/spring-data-lmf/.project
new file mode 100644
index 0000000..fc5e74c
--- /dev/null
+++ b/lmf-client/spring-data-lmf/.project
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>spring-data-lmf</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.springframework.ide.eclipse.core.springbuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.m2e.core.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.springframework.ide.eclipse.core.springnature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.m2e.core.maven2Nature</nature>
+	</natures>
+</projectDescription>

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/c32963d5/lmf-client/spring-data-lmf/.settings/org.eclipse.core.resources.prefs
----------------------------------------------------------------------
diff --git a/lmf-client/spring-data-lmf/.settings/org.eclipse.core.resources.prefs b/lmf-client/spring-data-lmf/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..8fb0e26
--- /dev/null
+++ b/lmf-client/spring-data-lmf/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,3 @@
+eclipse.preferences.version=1
+encoding//src/main/java=UTF-8
+encoding//src/main/resources=UTF-8

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/c32963d5/lmf-client/spring-data-lmf/.settings/org.eclipse.jdt.core.prefs
----------------------------------------------------------------------
diff --git a/lmf-client/spring-data-lmf/.settings/org.eclipse.jdt.core.prefs b/lmf-client/spring-data-lmf/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..60105c1
--- /dev/null
+++ b/lmf-client/spring-data-lmf/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,5 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.6

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/c32963d5/lmf-client/spring-data-lmf/.settings/org.eclipse.m2e.core.prefs
----------------------------------------------------------------------
diff --git a/lmf-client/spring-data-lmf/.settings/org.eclipse.m2e.core.prefs b/lmf-client/spring-data-lmf/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/lmf-client/spring-data-lmf/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/c32963d5/lmf-core/.classpath
----------------------------------------------------------------------
diff --git a/lmf-core/.classpath b/lmf-core/.classpath
new file mode 100644
index 0000000..bf96ac0
--- /dev/null
+++ b/lmf-core/.classpath
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" output="target/classes" path="src/main/java"/>
+	<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
+	<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+	<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+	<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+		<attributes>
+			<attribute name="org.eclipse.jst.component.nondependency" value=""/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/c32963d5/lmf-core/.project
----------------------------------------------------------------------
diff --git a/lmf-core/.project b/lmf-core/.project
new file mode 100644
index 0000000..8d2d5ec
--- /dev/null
+++ b/lmf-core/.project
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>lmf-core</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.wst.common.project.facet.core.builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.wst.validation.validationbuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.m2e.core.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+		<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.m2e.core.maven2Nature</nature>
+		<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+	</natures>
+</projectDescription>

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/c32963d5/lmf-core/.settings/org.eclipse.core.resources.prefs
----------------------------------------------------------------------
diff --git a/lmf-core/.settings/org.eclipse.core.resources.prefs b/lmf-core/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..dc1b414
--- /dev/null
+++ b/lmf-core/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,5 @@
+eclipse.preferences.version=1
+encoding//src/main/java=UTF-8
+encoding//src/main/resources=UTF-8
+encoding//src/test/java=UTF-8
+encoding//src/test/resources=UTF-8

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/c32963d5/lmf-core/.settings/org.eclipse.jdt.core.prefs
----------------------------------------------------------------------
diff --git a/lmf-core/.settings/org.eclipse.jdt.core.prefs b/lmf-core/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..69c31cd
--- /dev/null
+++ b/lmf-core/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.6

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/c32963d5/lmf-core/.settings/org.eclipse.m2e.core.prefs
----------------------------------------------------------------------
diff --git a/lmf-core/.settings/org.eclipse.m2e.core.prefs b/lmf-core/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/lmf-core/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/c32963d5/lmf-core/.settings/org.eclipse.wst.common.component
----------------------------------------------------------------------
diff --git a/lmf-core/.settings/org.eclipse.wst.common.component b/lmf-core/.settings/org.eclipse.wst.common.component
new file mode 100644
index 0000000..f6487d5
--- /dev/null
+++ b/lmf-core/.settings/org.eclipse.wst.common.component
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+    <wb-module deploy-name="lmf-core">
+        <wb-resource deploy-path="/" source-path="/src/main/java"/>
+        <wb-resource deploy-path="/" source-path="/src/main/resources"/>
+    </wb-module>
+</project-modules>

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/c32963d5/lmf-core/.settings/org.eclipse.wst.common.project.facet.core.xml
----------------------------------------------------------------------
diff --git a/lmf-core/.settings/org.eclipse.wst.common.project.facet.core.xml b/lmf-core/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100644
index 0000000..c78d932
--- /dev/null
+++ b/lmf-core/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+  <installed facet="java" version="1.6"/>
+  <installed facet="jst.utility" version="1.0"/>
+</faceted-project>

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/c32963d5/lmf-core/pom.xml
----------------------------------------------------------------------
diff --git a/lmf-core/pom.xml b/lmf-core/pom.xml
new file mode 100644
index 0000000..8430dd3
--- /dev/null
+++ b/lmf-core/pom.xml
@@ -0,0 +1,445 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+
+<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>at.newmedialab.lmf</groupId>
+        <artifactId>lmf-parent</artifactId>
+        <version>3.0.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>lmf-core</artifactId>
+    <packaging>jar</packaging>
+
+    <name>LMF Module: Core</name>
+    <description>
+        Core functionalities of the Linked Media Framework: Persistence, Transaction Management, Triple Store,
+        Framework Setup.
+    </description>
+
+    <!-- build a test jar for lmf-core so other modules can use the EmbeddedLMF configuration -->
+    <!-- usage:
+         <dependency>
+           <groupId>at.newmedialab.lmf</groupId>
+           <artifactId>lmf-core</artifactId>
+           <version>${project.version}</version>
+           <type>test-jar</type>
+           <scope>test</scope>
+         </dependency>
+         further details: http://maven.apache.org/guides/mini/guide-attached-tests.html
+    -->
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+                <version>2.4</version>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>test-jar</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <artifactId>maven-dependency-plugin</artifactId>
+            </plugin>
+
+            <!-- for coffescript compilation -->
+            <plugin>
+                <groupId>com.voltvoodoo</groupId>
+                <artifactId>brew</artifactId>
+                <version>0.2.10</version>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>compile</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+
+        </plugins>
+
+        <!--
+        <resources>
+            <resource>
+                <directory>src/main/js</directory>
+                <filtering>false</filtering>
+                <targetPath>${project.build.outputDirectory}/META-INF/resources/${project.artifactId}/js</targetPath>
+            </resource>
+        </resources>
+        -->
+
+    </build>
+
+    <!-- dependencies for all modules -->
+    <dependencies>
+        <dependency>
+            <groupId>at.newmedialab.lmf</groupId>
+            <artifactId>marmotta-commons</artifactId>
+        </dependency>
+
+        <!-- Logging -->
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-ext</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>jcl-over-slf4j</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>log4j-over-slf4j</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>jul-to-slf4j</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-classic</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.codehaus.janino</groupId>
+            <artifactId>janino</artifactId>
+        </dependency>
+
+        <!-- Commonly used libraries -->
+        <dependency>
+            <groupId>com.google.guava</groupId>
+            <artifactId>guava</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>commons-configuration</groupId>
+            <artifactId>commons-configuration</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>commons-lang</groupId>
+            <artifactId>commons-lang</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>commons-net</groupId>
+            <artifactId>commons-net</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>commons-codec</groupId>
+            <artifactId>commons-codec</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>commons-validator</groupId>
+            <artifactId>commons-validator</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.httpcomponents</groupId>
+            <artifactId>httpclient-cache</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.resteasy</groupId>
+            <artifactId>resteasy-cdi</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.resteasy</groupId>
+            <artifactId>resteasy-jackson-provider</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.codehaus.jackson</groupId>
+            <artifactId>jackson-core-asl</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.codehaus.jackson</groupId>
+            <artifactId>jackson-mapper-asl</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.codehaus.jackson</groupId>
+            <artifactId>jackson-jaxrs</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.codehaus.jackson</groupId>
+            <artifactId>jackson-xc</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.json</groupId>
+            <artifactId>json</artifactId>
+        </dependency>
+
+        <!-- Front-end -->
+        <dependency>
+            <groupId>org.webjars</groupId>
+            <artifactId>jquery</artifactId>
+        </dependency>
+        
+        <!-- Persistence -->
+        <dependency>
+            <groupId>net.sf.ehcache</groupId>
+            <artifactId>ehcache-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>javax.validation</groupId>
+            <artifactId>validation-api</artifactId>
+            <version>1.0.0.GA</version>
+        </dependency>
+
+
+        <!-- XML Processing -->
+        <dependency>
+            <groupId>xml-apis</groupId>
+            <artifactId>xml-apis</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.jdom</groupId>
+            <artifactId>jdom2</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>jaxen</groupId>
+            <artifactId>jaxen</artifactId>
+        </dependency>
+
+        <!-- Test Support -->
+        <dependency>
+            <groupId>org.mortbay.jetty</groupId>
+            <artifactId>jetty-embedded</artifactId>
+            <version>6.1.26</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.weld.se</groupId>
+            <artifactId>weld-se-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>com.h2database</groupId>
+            <artifactId>h2</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>com.jayway.restassured</groupId>
+            <artifactId>rest-assured</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.hamcrest</groupId>
+            <artifactId>hamcrest-library</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.hamcrest</groupId>
+            <artifactId>hamcrest-core</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.google.code.tempus-fugit</groupId>
+            <artifactId>tempus-fugit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.googlecode.jatl</groupId>
+            <artifactId>jatl</artifactId>
+            <scope>test</scope>
+        </dependency>
+
+        <!-- CDI/Java EE 6 Environment -->
+        <dependency>
+            <groupId>javax.enterprise</groupId>
+            <artifactId>cdi-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.weld</groupId>
+            <artifactId>weld-api</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.weld</groupId>
+            <artifactId>weld-spi</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.weld</groupId>
+            <artifactId>weld-core</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.javassist</groupId>
+            <artifactId>javassist</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.interceptor</groupId>
+            <artifactId>jboss-interceptor-core</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.jboss.interceptor</groupId>
+            <artifactId>jboss-interceptor-spi</artifactId>
+            <scope>runtime</scope>
+        </dependency>
+
+        <!-- Sesame -->
+        <dependency>
+            <groupId>org.openrdf.sesame</groupId>
+            <artifactId>sesame-model</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.openrdf.sesame</groupId>
+            <artifactId>sesame-repository-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.openrdf.sesame</groupId>
+            <artifactId>sesame-repository-event</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.openrdf.sesame</groupId>
+            <artifactId>sesame-repository-sail</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.openrdf.sesame</groupId>
+            <artifactId>sesame-rio-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.openrdf.sesame</groupId>
+            <artifactId>sesame-rio-rdfxml</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.openrdf.sesame</groupId>
+            <artifactId>sesame-rio-trix</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.openrdf.sesame</groupId>
+            <artifactId>sesame-rio-turtle</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.openrdf.sesame</groupId>
+            <artifactId>sesame-rio-n3</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.openrdf.sesame</groupId>
+            <artifactId>sesame-rio-ntriples</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.openrdf.sesame</groupId>
+            <artifactId>sesame-rio-trig</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.openrdf.sesame</groupId>
+            <artifactId>sesame-sail-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.openrdf.sesame</groupId>
+            <artifactId>sesame-sail-memory</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.openrdf.sesame</groupId>
+            <artifactId>sesame-sail-nativerdf</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.openrdf.sesame</groupId>
+            <artifactId>sesame-sail-inferencer</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>at.newmedialab.sesame</groupId>
+            <artifactId>sesame-commons</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>at.newmedialab.sesame</groupId>
+            <artifactId>sesame-filter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>at.newmedialab.sesame</groupId>
+            <artifactId>sesame-tools-rio-vcard</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>at.newmedialab.sesame</groupId>
+            <artifactId>sesame-tools-rio-ical</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>at.newmedialab.sesame</groupId>
+            <artifactId>sesame-tools-rio-rdfa</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>at.newmedialab.sesame</groupId>
+            <artifactId>sesame-tools-rio-rdfjson</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>at.newmedialab.sesame</groupId>
+            <artifactId>sesame-tools-rio-rss</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>at.newmedialab.sesame</groupId>
+            <artifactId>sesame-tools-rio-jsonld</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>at.newmedialab.sesame</groupId>
+            <artifactId>sesame-tools-facading</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.freemarker</groupId>
+            <artifactId>freemarker</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>eu.medsea.mimeutil</groupId>
+            <artifactId>mime-util</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.tika</groupId>
+            <artifactId>tika-core</artifactId>
+        </dependency>
+
+
+        <dependency>
+            <groupId>at.newmedialab.lmf</groupId>
+            <artifactId>kiwi-triplestore</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>at.newmedialab.lmf</groupId>
+            <artifactId>kiwi-transactions</artifactId>
+        </dependency>
+
+    </dependencies>
+
+</project>

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/c32963d5/lmf-core/src/main/coffeescript/web/public/js/widgets/configurator/configurator.coffee
----------------------------------------------------------------------
diff --git a/lmf-core/src/main/coffeescript/web/public/js/widgets/configurator/configurator.coffee b/lmf-core/src/main/coffeescript/web/public/js/widgets/configurator/configurator.coffee
new file mode 100644
index 0000000..a2605f7
--- /dev/null
+++ b/lmf-core/src/main/coffeescript/web/public/js/widgets/configurator/configurator.coffee
@@ -0,0 +1,544 @@
+### TODO:
+  - add new line
+###
+### Configurator for LMF properties ###
+class window.Configurator
+
+  #load model and draw
+  constructor:(options)->
+    # merge options
+    @options =
+      url       : "http://localhost:8080/"
+      prefix    : undefined
+      container : "configurator"
+      blacklist : []
+    $.extend(@options,options)
+
+    # create client, datamodel and tableview
+    @client = new Client @options.url, @options.prefix, @options.blacklist
+    @model = new Model()
+    @datatTable = new DataTable @options.container
+
+    onsuccess = =>
+      @datatTable.draw @model,@client
+      @addValue = new AddValue @options.container, @options.prefix, @options.blacklist, @options.url
+      @addValue.onAdd = ->
+        console.log 213
+        window.location.reload()
+
+    onfailure = ->
+      throw "cannot load model"
+
+    # load data into client model and draw datatable afterwards
+    @client.load @model,onsuccess,onfailure
+
+  # should allow extenion with new types
+  extend:(options)->
+    alert "not implemented yet"
+
+
+### MODEL ###
+class Model
+
+  # model is an array of properties
+  constructor:->
+    @properties = new Array()
+
+  # add property for each serverside property
+  init:(data)->
+    for property,value of data
+      clazz = undefined
+      if value.type.match /java.lang.Boolean.*/ then clazz = BooleanProperty
+      else if value.type.match /java.lang.Enum.*/ then clazz = EnumProperty
+      else if value.type.match /java.lang.Integer.*/ then clazz = IntegerProperty
+      else if value.type.match /java.lang.String.*/ then clazz = StringProperty
+      else if value.type.match /java.net.URL.*/ then clazz = URIProperty
+      else if value.type.match /at.newmedialab.lmf.SolrProgram.*/ then clazz = SolrProgramProperty
+      else if value.type.match /java.util.List.*/ then clazz = ListProperty
+      else clazz = Property
+
+      @properties.push new clazz property,value
+
+### superclass of all properties ###
+class Property
+  constructor:(@key,value)->
+    # parse key
+    @view = $("<tr></tr>")
+    @options = new Array()
+    @value = value.value
+    @comment = ""
+    if value.comment != undefined && value.comment != null
+      @comment = value.comment
+    mapping = value.type.match(/\((.+)\)/)
+    @options = mapping[1] if mapping && mapping[1]
+    @tdtitle = "<td class='config_tdtitle'><h3>#{@key}</h2><span>#{@comment}</span></td>"
+
+  setValue:(@value)->
+
+  getValue:->
+    @value
+
+  show:()->
+    @view.show()
+
+  hide:()->
+    @view.hide()
+
+  hasChanged:->
+    false
+
+  onchange:->
+    false
+
+  onstorage:->
+    return
+
+  # get tr for this property
+  draw:->
+    @view.append(@tdtitle).append("<td>#{@value}</td>")
+
+  toString:->
+    @key+" = "+@value
+
+### for boolean type: a checkbox ###
+class BooleanProperty extends Property
+  constructor:(@key,value,@comment)->
+    super(@key,value,@comment)
+    @value = @value == "true"
+    @checkbox = $('<input type="checkbox">')
+    @checkbox.change =>
+      @onchange @
+
+  hasChanged:->
+    @value != @checkbox.is(':checked')
+
+  onstorage:->
+     @value = @checkbox.is(':checked')
+
+  getValue:->
+    @checkbox.is(':checked')
+
+  draw:->
+    @checkbox.attr("checked","checked") if @value
+    @view.append(@tdtitle).append $("<td></td>").append @checkbox
+
+### for enum type: a selector ###
+class EnumProperty extends Property
+  constructor:(@key,value,@comment)->
+    super(@key,value,@comment)
+    @td = $("<td></td>")
+    @select = $("<select></select>").addClass("config_selectfield").appendTo @td
+    values = value.type.substring(15,value.type.length-1).split "|"
+    for index,value of values
+      @select.append $("<option>"+value.substring(1,value.length-1)+"</option>")
+    @select.change ()=>
+      @onchange @
+
+  hasChanged:->
+    @select.val() != @value
+
+  getValue:->
+    @select.val()
+
+  onstorage:->
+    @value = @select.val()
+
+  draw:->
+    @select.val @value
+    @view.append(@tdtitle).append @td
+
+### for integer type: an input field with validation or an input field with change buttons ###
+class IntegerProperty extends Property
+  constructor:(@key,value,@comment)->
+    super(@key,value,@comment)
+    @input = $("<input >").addClass "config_intergerfield_short"
+    @field = $("<div></div>").append @input
+
+    values = []
+    if value.type.length > 17 then values = value.type.substring(18,value.type.length-1).split "|"
+
+    step = undefined
+    @min = undefined
+    @max = undefined
+
+    if values[0] && values[0]!="*" then step = parseInt(values[0])
+    if values[1] && values[1]!="*" then @min = parseInt(values[1])
+    if values[2] && values[2]!="*" then @max = parseInt(values[2])
+
+    if step
+      @input.attr("readonly","readonly")
+      interval = undefined
+
+      up_func = =>
+        if @max != undefined
+          if parseInt(@input.val())+step <= @max
+            @input.val(parseInt(@input.val())+step)
+            @onchange @
+        else
+          @input.val(parseInt(@input.val())+step)
+          @onchange @
+
+
+      up = $("<button>+</button>").mousedown =>
+        interval = setInterval(up_func,100)
+      .mouseup =>
+        clearInterval interval
+      .mouseout =>
+        clearInterval interval
+
+      down_func = =>
+        if @min != undefined
+          if parseInt(@input.val())-step >= @min
+            @input.val(parseInt(@input.val())-step)
+            @onchange @
+        else
+          @input.val(parseInt(@input.val())-step)
+          @onchange @
+
+      down = $("<button>-</button>").mousedown =>
+        interval = setInterval(down_func,100)
+      .mouseup =>
+        clearInterval interval
+      .mouseout =>
+        clearInterval interval
+
+      @field.append(down).append(up)
+    else
+      @input.removeClass("config_intergerfield_short").addClass("config_intergerfield")
+    @input.keydown ()=>
+      @onchange @
+
+  hasChanged:->
+    parseInt(@value) != parseInt(@input.val())
+
+  onstorage:->
+    @value = parseInt(@input.val())
+
+  getValue:->
+    if(@min && parseInt(@input.val()) < @min) then throw @key + "is under min value"
+    if(@max && parseInt(@input.val()) > @max) then throw @key + "is under min value"
+    parseInt(@input.val())
+
+  draw:->
+    @input.val(parseInt(@value))
+    @view.append(@tdtitle).append $("<td></td>").append @field
+
+### for string property: a input box or (for password) an edit button ###
+class StringProperty extends Property
+  constructor:(@key,value,@comment)->
+    super(@key,value,@comment)
+    @input = $('<input>').addClass "config_inputfield"
+    @field = $("<div></div>").append @input
+
+    # clean lists
+    if @value instanceof Array
+      @value = @value.join(",")
+
+    # check for password
+    match = value.type.match /".+"/
+    if match and match[0] == "\"password\""
+      @input.css "display","none"
+      @button = $("<button>edit</button>").click =>
+        if prompt("insert old password","")==@value
+          val = prompt "insert new password",""
+          if val != ""
+            if prompt("confirm new password")==val
+              @input.val val
+              @onchange @
+            else alert "password cannot be confirmed"
+          else alert "password may not be empty"
+        else alert "wrong password"
+      @field.append @button
+
+    @input.keydown =>
+      @onchange @
+
+  hasChanged:->
+    @value != @input.val()
+
+  onstorage:->
+    @value = @input.val()
+
+  getValue:->
+    @input.val()
+
+  draw:->
+    @input.val(@value)
+    @view.append(@tdtitle).append $("<td></td>").append @field
+
+### for URI properties: input field with pattern validation ###
+class URIProperty extends StringProperty
+  constructor:(@key,value,@comment)->
+    super(@key,value,@comment)
+
+  getValue:->
+    url_pattern = /[-a-zA-Z0-9@:%_\+.~#?&//=]{2,256}\.[a-z]{2,4}\b(\/[-a-zA-Z0-9@:%_\+.~#?&//=]*)?/gi
+    if @.hasChanged()
+      if !url_pattern.test(@input.val()) then throw "#{@key}: #{@input.val()} is not a valid URL"
+    @input.val()
+
+### a textual property: textarea ###
+class TextProperty extends Property
+  constructor:(@key,value,@comment)->
+    super(@key,value,@comment)
+    @input = $('<textarea>').addClass "config_textfield"
+    @input.keydown =>
+      @onchange @
+
+  hasChanged:->
+    @value != @input.val()
+
+  onstorage:->
+    @value = @input.val()
+
+  getValue:->
+    @input.val()
+
+  draw:->
+    @input.val(@value)
+    @view.append(@tdtitle).append $("<td></td>").append @input
+
+### a textarea for Solr Programs (not editable) ###
+class SolrProgramProperty extends TextProperty
+  constructor:(@key,value,@comment)->
+    super(@key,value,@comment)
+    @input.addClass "config_solrprorgamfield"
+    @input.attr "readonly","readonly"
+    @input.unbind "keydown"
+    @input.keydown ->
+      alert "not editable here, try configuration interface in search module"
+
+  hasChanged:->
+    false
+
+### for lists: TODO ###
+class ListProperty extends StringProperty
+  constructor:(@key,value,@comment)->
+    super(@key,value,@comment)
+
+
+### VIEW ###
+class AddValue
+  constructor:(container,@prefix,@blacklist,@url)->
+    @container = $("#"+container)
+    @background = $('<div style="display:none"></div>').css({display:'none'}).addClass('config_background').appendTo 'body'
+    prefix_span = if prefix == undefined then '' else '<span>'+prefix+'.</span>'
+    @popup = $("
+                <div id='config_popup' style='display:none'>
+                  <h1>Add new value</h1>
+                  <table>
+                    <tr><td>Key</td><td>#{prefix_span}<input type='text' id='config_add_label'/></td></tr>
+                    <tr><td>Type</td><td><select id='config_add_type'>
+                      <option value='java.lang.String'>String</option>
+                      <option value='java.lang.Integer'>Integer</option>
+                      <option value='java.net.URL'>URL</option>
+                      <option value='java.lang.Boolean'>Boolean</option>
+                      <option value='java.lang.Enum'>Enum</option>
+                      <option value='java.util.List'>List</option>
+                    </select></td></tr>
+                    <tr><td>Parameters</td><td><input type='text' id='config_add_parameters'/></td></tr>
+                    <tr><td>Value</td><td><input type='text' id='config_add_value'/></td></tr>
+                    <tr><td>Comment</td><td><textarea cols='20' rows='3' type='text' id='config_add_comment'/></td></tr>
+                  </table>
+                </div>
+               ").appendTo 'body'
+    @popup.find('#config_add_type').change =>
+      ps = @popup.find('#config_add_parameters')
+      switch @popup.find('#config_add_type').val()
+        when 'java.lang.Integer' then ps.val('10|0|*')
+        when 'java.lang.Enum' then ps.val('"one 1"|"two 2"')
+        else ps.val("")
+
+    @button = $("<button></button>").css({margin:"0px auto",display:"block",marginBottom:"40px"}).text('Add Value').click =>
+      @open()
+
+    @container.append @button
+
+    clean = =>
+      @popup.find('#config_add_label').val ''
+      @popup.find('#config_add_parameters').val ''
+      @popup.find('#config_add_value').val ''
+      @popup.find('#config_add_comment').val ''
+
+    buttons = $("<div id='config_add_buttons'></div>").appendTo @popup
+
+    buttons.append $('<button></button>').text('cancel').click =>
+      @popup.hide()
+      @background.hide()
+      clean()
+
+    buttons.append $('<button></button>').text('add').click =>
+      # store data
+      label = @popup.find('#config_add_label').val()
+      type = @popup.find('#config_add_type').val()
+      params = @popup.find('#config_add_parameters').val()
+      value = @popup.find('#config_add_value').val()
+      comment = @popup.find('#config_add_comment').val()
+
+      if label == ""
+        alert "key may not be empty"
+        return
+
+      inBlacklist = false
+      lab = label
+      if @prefix != undefined then lab = prefix + "." + lab
+
+      for v,index in @blacklist
+        if (lab.slice 0, v.length) == v
+          inBlacklist = true
+          break
+
+      if inBlacklist
+        if !confirm("label will be filtered by blacklist and thus not be displayed in this configuration view. Still create?")
+          return
+
+      if params != "" then params = '('+params+')'
+
+      if prefix != undefined then label = prefix+"."+label
+
+      if comment != "" then comment = "&comment="+encodeURIComponent(comment)
+
+      encodeData = (data)->
+        d = '["'+data+'"]'
+
+      $.ajax
+        url:@url+"config/data/"+label+"?type="+encodeURIComponent(type+params)+comment,
+        type:"POST",
+        data:encodeData(value),
+        contentType:"application/json; charset=utf-8",
+        success: =>
+          @onAdd()
+
+
+  open:->
+    @background.show()
+    # open window
+    @popup.show()
+
+  onAdd:->
+    console.log "must be overwritten"
+
+class DataTable
+
+  constructor:(container)->
+    @container = $("#"+container)
+    @saver = $("<div>SAVE</div>").addClass("config_saveButton").css("display","none");
+
+  draw:(model,client)->
+    @container.html "<h2>Configurator:</h2>"
+    @saver.appendTo @container
+    #sort
+    sortFunction = (a,b)->
+      return -1 if a.key < b.key
+      return 1 if a.key > b.key
+      0
+    model.properties.sort sortFunction
+
+    @table = $("<table></table>").addClass("config_datatable").appendTo @container
+
+    filter = (key)=>
+      regex = new RegExp ".*"+key+".*"
+      for row,index in model.properties
+        if row.key.match regex
+          row.show()
+        else
+          row.hide()
+
+    filter_input = $("<input>").addClass("config_filterinput").keyup ()->
+      filter filter_input.val()
+
+    $("<tr></tr>").append($("<td style='text-align:center' colspan='3'></td>").append("<span style='font-weight:bold;'>Filter: </span>").append(filter_input)).appendTo(@table)
+
+    remover = (val)->
+      button = $("<button>remove</button>").click =>
+        client.delete val.key
+
+      $("<td></td>").append button
+
+    for value,index in model.properties
+      value.draw().append(remover(value)).appendTo @table
+      value.onchange = ()=>
+        @saver.show()
+
+    # saver
+    onsave = ()=>
+      for value,index in model.properties
+        value.onstorage()
+      @saver.hide()
+      alert "saved values"
+
+    onfailure = ()->
+      alert "cannot store values"
+
+    @saver.click ()=>
+      client.store model,onsave,onfailure
+
+  redraw:(model,key)->
+    # TODO
+
+### Controler ###
+class Client
+
+  constructor:(@url,@prefix,@blacklist)->
+
+  delete:(key)->
+
+    if(!confirm("delete "+key)) then return
+
+    $.ajax
+      url:@url+"config/data/"+key,
+      type:"DELETE",
+      success: =>
+        window.location.reload()
+
+  load:(model,onsuccess,onfailure)->
+
+    filter = (data)=>
+      toDelete = []
+      for value1 of data
+        for value2 in @blacklist
+          if (value1.slice 0,value2.length) == value2
+            toDelete.push value1
+            break
+      for value in toDelete
+        delete data[value]
+      data
+
+    afterRequest = (data)->
+      model.init filter data
+      onsuccess()
+
+    if @prefix then prefix = "?prefix=#{@prefix}" else prefix = ""
+    $.getJSON @url + "config/list" + prefix,afterRequest,onfailure
+
+  store:(model,onsuccess,onfailure)->
+    try
+      str = ""
+      data = []
+      for value,index in model.properties
+        console.log model.properties.length,index
+        if value.hasChanged()
+          data.push(value)
+          str += value.key + ":" + value.getValue()
+          if index < model.properties.length-1
+            str += "\n"
+
+      if( confirm("Store values: \n"+str) )
+
+        str = "{"
+        for value,index in data
+          str += '"'+value.key + '":"'+value.getValue() + '"'
+          str += "," if index < data.length-1
+        str += "}"
+
+        $.ajax data =
+          type : 'POST'
+          contentType: "application/json"
+          url : @url + "config/list"
+          data : str
+          success : onsuccess
+          failure : onfailure
+
+    catch e
+      alert "cannot store content: "+e
+      if onfailure then onfailure()

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/c32963d5/lmf-core/src/main/java/kiwi/core/api/cache/CachingService.java
----------------------------------------------------------------------
diff --git a/lmf-core/src/main/java/kiwi/core/api/cache/CachingService.java b/lmf-core/src/main/java/kiwi/core/api/cache/CachingService.java
new file mode 100644
index 0000000..60e485a
--- /dev/null
+++ b/lmf-core/src/main/java/kiwi/core/api/cache/CachingService.java
@@ -0,0 +1,39 @@
+/**
+ * Copyright (C) 2013 Salzburg Research.
+ *
+ * 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.
+ */
+package kiwi.core.api.cache;
+
+import net.sf.ehcache.CacheManager;
+import net.sf.ehcache.Ehcache;
+
+import javax.enterprise.inject.spi.InjectionPoint;
+
+/**
+ * Add file description here!
+ * <p/>
+ * User: sschaffe
+ */
+public interface CachingService {
+
+    public Ehcache getCache(InjectionPoint injectionPoint);
+
+    public String[] getCacheNames();
+
+    public void clearAll();
+
+    Ehcache getCacheByName(String cacheName);
+
+    CacheManager getCacheManager();
+}

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/c32963d5/lmf-core/src/main/java/kiwi/core/api/config/ConfigurationService.java
----------------------------------------------------------------------
diff --git a/lmf-core/src/main/java/kiwi/core/api/config/ConfigurationService.java b/lmf-core/src/main/java/kiwi/core/api/config/ConfigurationService.java
new file mode 100644
index 0000000..5edf972
--- /dev/null
+++ b/lmf-core/src/main/java/kiwi/core/api/config/ConfigurationService.java
@@ -0,0 +1,514 @@
+/**
+ * Copyright (C) 2013 Salzburg Research.
+ *
+ * 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.
+ */
+package kiwi.core.api.config;
+
+import org.apache.commons.configuration.Configuration;
+
+import javax.servlet.ServletContext;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+
+/**
+ * Manage the system configuration.
+ *
+ * @author Sebastian Schaffert
+ * @author Sergio Fernández
+ *
+ */
+public interface ConfigurationService {
+
+    static final String RESOURCE_PATH = "resource";
+
+    static final String ANONYMOUS_PATH = "anon";
+
+    static final String META_PATH = "meta";
+
+    static final String CONTENT_PATH = "content";
+
+    static final String INSPECT_PATH = "inspect";
+    
+    static final String LDP_PATH = "ldp"; //to be removed
+    static final String CONTAINER_PATH = "container";
+    
+    @Deprecated
+    static final String KNOWLEDGESPACE_PATH = "knowledgedspace";
+
+    static final String CONTEXT_PATH = "context";
+
+    static final String CONTEXT_DEFAULT = "default";
+
+    static final String CONTEXT_CACHE = "cache";
+
+    static final String CONTEXT_ENHANCEMENT = "enhanced";
+
+    static final String CONTEXT_INFERRED = "inferred";
+
+    static final String CONTEXT_SYSTEM = "system";
+
+    /**
+     * Get the base URI of the system.
+     * The base URI is used by the LMF to create local resource URIs. In this way, all LMF resources
+     * are "Linked Open Data" compatible.
+     * 
+     * The base URI is calculated based on the request URI given by the user.
+     * In most cases it is the same as {@link #getServerUri()}, but this is not guaranteed.
+     * 
+     * @return the base URI
+     */
+    String getBaseUri();
+
+    /**
+     * Get the base path of the system, which is the relative path from the server host.
+     * For example, in the case of http://localhost:8080/LMF, /LMF would be returned as the path.
+     * @return a String representing the path
+     */
+    String getPath();
+
+    /**
+     * Get the server URI of the system.
+     * The server URI is used to accesses the
+     * server that runs the KiWi (and SOLR) applications.
+     * 
+     * Can be used to compute the paths of the web services or
+     * other applications relative to the current application.
+     * 
+     * Computed like the base URI.
+     * 
+     * @return the server URI
+     */
+    String getServerUri();
+
+    /**
+     * List all configuration keys defined for the system configuration of KiWi.
+     * @return
+     */
+    List<String> listConfigurationKeys();
+
+    /**
+     * List all configuration keys defined for the system configuration of KiWi having prefix.
+     * @param prefix the prefix of keys that should be returned
+     * @return
+     */
+    List<String> listConfigurationKeys(String prefix);
+
+    /**
+     * Check whether a certain configuration property is set.
+     * @param key
+     * @return
+     */
+    boolean isConfigurationSet(String key);
+
+    /**
+     * Get the configuration for the given key. If there is no such configuration, a new one is
+     * created with empty value (returns null).
+     *
+     * @param key  unique configuration key for lookup
+     * @return a configuration object with either the configured value or null as value
+     */
+    Object getConfiguration(String key);
+
+    /**
+     * Return the comment for the configuration with the given key as string. If there is no such
+     * configuration, null is returned
+     *
+     * @param key unique configuration key for lookup
+     * @return a string describing the configuration option or null if no comment was given
+     */
+    String getComment(String key);
+
+    /**
+     * Return the comment for the configuration with the given key as string. If there is no such
+     * configuration, null is returned
+     * @param key unique configuration key for lookup
+     * @return  a string describing the type for key or DEFAULT_TYPE (String) if no type was given
+     */
+    String getType(String key);
+
+    /**
+     * Get the configuration for the given key. If there is no such configuration, a new one is
+     * created with empty value (returns null).
+     *
+     * @param key  unique configuration key for lookup
+     * @return a configuration object with either the configured value or null as value
+     */
+    String getStringConfiguration(String key);
+
+    /**
+     * Get the configuration for the given key. If there is no such configuration, a new one is
+     * created using the provided defaultValue as string value.
+     *
+     * @param key unique configuration key for lookup
+     * @param defaultValue default value if configuration not found
+     * @return a configuration object with either the configured value or defaultValue
+     */
+    String getStringConfiguration(String key, String defaultValue);
+
+    /**
+     * Get the configuration for the given key. If there is no such configuration, 0.0 is returned
+     *
+     * @param key unique configuration key for lookup
+     * @return a double value with either the configured value or 0.0
+     */
+
+    double getDoubleConfiguration(String key);
+
+    /**
+     * Get the configuration for the given key. If there is no such configuration, a new one is
+     * created using the provided defaultValue as double value.
+     *
+     * @param key unique configuration key for lookup
+     * @param defaultValue default value if configuration not found
+     * @return a configuration object with either the configured value or defaultValue
+     */
+    double getDoubleConfiguration(String key, double defaultValue);
+
+    /**
+     * Set the system configuration with the given key to the given double value.
+     * 
+     * @param key
+     * @param value
+     */
+    void setDoubleConfiguration(String key, double value);
+
+    /**
+     * Get the configuration for the given key. If there is no such configuration, 0 is returned
+     *
+     * @param key unique configuration key for lookup
+     * @return a int value with either the configured value or 0
+     */
+    int getIntConfiguration(String key);
+
+    /**
+     * Get the configuration for the given key. If there is no such configuration, a new one is
+     * created using the provided defaultValue as double value.
+     *
+     * @param key unique configuration key for lookup
+     * @param defaultValue default value if configuration not found
+     * @return a configuration object with either the configured value or defaultValue
+     */
+    int getIntConfiguration(String key, int defaultValue);
+
+    /**
+     * Set the system configuration with the given key to the given int value.
+     * 
+     * @param key
+     * @param value
+     */
+    void setIntConfiguration(String key, int value);
+
+
+
+    /**
+     * Get the configuration for the given key. If there is no such configuration, 0 is returned
+     *
+     * @param key unique configuration key for lookup
+     * @return a int value with either the configured value or 0
+     */
+    long getLongConfiguration(String key);
+
+    /**
+     * Get the configuration for the given key. If there is no such configuration, a new one is
+     * created using the provided defaultValue as double value.
+     *
+     * @param key unique configuration key for lookup
+     * @param defaultValue default value if configuration not found
+     * @return a configuration object with either the configured value or defaultValue
+     */
+    long getLongConfiguration(String key, long defaultValue);
+
+    /**
+     * Set the system configuration with the given key to the given int value.
+     *
+     * @param key
+     * @param value
+     */
+    void setLongConfiguration(String key, long value);
+
+
+    /**
+     * Get the configuration for the given key. If there is no such configuration, true is returned
+     *
+     * @param key unique configuration key for lookup
+     * @return a int value with either the configured value or true
+     */
+    boolean getBooleanConfiguration(String key);
+
+    /**
+     * Get the configuration for the given key. If there is no such configuration, a new one is
+     * created using the provided defaultValue as boolean value.
+     *
+     * @param key unique configuration key for lookup
+     * @param defaultValue default value if configuration not found
+     * @return a configuration object with either the configured value or defaultValue
+     */
+    boolean getBooleanConfiguration(String key, boolean defaultValue);
+
+    /**
+     * Set the system configuration with the given key to the given boolean value.
+     * 
+     * @param key
+     * @param value
+     */
+    void setBooleanConfiguration(String key, boolean value);
+
+    /**
+     * Get the configuration for the given key as properties. The configuration is persisted in the following form:
+     * key = k=v,k=v,k=v
+     *
+     * @param key unique configuration key for lookup
+     * @return properties with the configured key value pairs
+     */
+    Properties getPropertiesConfiguration(String key);
+
+    /**
+     * Get the configuration for the given key. If there is no such configuration, an empty list is returned
+     *
+     * @param key unique configuration key for lookup
+     * @return a list with either the configured value or empty list
+     */
+
+    List<String> getListConfiguration(String key);
+
+    /**
+     * Get the configuration for the given key. If there is no such configuration, a new one is
+     * created using the provided defaultValue as double value.
+     *
+     * @param key unique configuration key for lookup
+     * @param defaultValue default value if configuration not found
+     * @return a configuration object with either the configured value or defaultValue
+     */
+    List<String> getListConfiguration(String key, List<String> defaultValue);
+
+    /**
+     * Set the system configuration with the given key to the given int value.
+     * 
+     * @param key
+     * @param value
+     */
+    void setListConfiguration(String key, List<String> value);
+
+    /**
+     * Set a configuration value without firing an event. This is in rare cases needed to avoid
+     * propagation of events.
+     *
+     * @param key
+     * @param value
+     */
+    void setConfigurationWithoutEvent(String key, Object value);
+
+
+    /**
+     * Set the configuration "key" to the string value "value".
+     * @param key
+     * @param value
+     */
+    void setConfiguration(String key, Object value);
+
+    /**
+     * Set the configuration "key" to the string value "value".
+     * @param key
+     * @param value
+     */
+    void setConfiguration(String key, String value);
+
+    /**
+     * Set the configuration "key" to the string value "value".
+     * @param key
+     * @param values
+     */
+    void setConfiguration(String key, List<String> values);
+
+    /**
+     * Remove the configuration identified by "key" from the database.
+     * @param key
+     */
+    void removeConfiguration(String key);
+
+    /**
+     * @return a string representation of work direction
+     */
+    String getWorkDir();
+
+    /**
+     * Initialise the configuration service using the given home directory, and optionally a configuration override
+     * @param lmfHome
+     * @param override
+     */
+    void initialize(String lmfHome, Configuration override);
+
+
+    /**
+     * Set a flag at runtime that is discarded on system shutdown; used e.g. to indicate that certain
+     * processes have already been carried out.
+     * @param value
+     */
+    void setRuntimeFlag(String flag,boolean value);
+
+    /**
+     * Return the value of the runtime flag passed as argument.
+     * @param flag
+     * @return
+     */
+    boolean getRuntimeFlag(String flag);
+
+    /**
+     * Set the LMF_HOME value to the correct path. Used during the initialisation process.
+     *
+     * @param home
+     */
+    void setLMFHome(String home);
+
+    /**
+     * Return the value of the LMF_HOME setting. Used during the initialisation process.
+     * @return
+     */
+    String getLMFHome();
+
+    /**
+     * Get the base URI for contexts
+     * @return
+     */
+    String getBaseContext();
+
+    /**
+     * Return the context used for storing system information.
+     *
+     * @return a URI representing the system context
+     */
+    String getSystemContext();
+
+    /**
+     * Get the uri of the inferred context
+     *
+     * @return uri of this inferred context
+     */
+    String getInferredContext();
+
+    /**
+     * Get the uri of the default context
+     *
+     * @return
+     */
+    String getDefaultContext();
+
+    /**
+     * Get the uri of the context used for caching linked data
+     * @return
+     */
+    String getCacheContext();
+
+    /**
+     * Get the uri of the context used for enhancements.
+     * 
+     * @return
+     */
+    String getEnhancerContex();
+
+    /**
+     * Batch update.
+     * 
+     * @param values
+     * @see #setConfiguration(String, String)
+     */
+    void setConfigurations(Map<String, ?> values);
+
+    /**
+     * Set type for a configuration key
+     *
+     * @param key key for configuration fields
+     * @param type type for configuratino field
+     */
+    void setType(String key, String type);
+
+    /**
+     * Set type for a configuration key
+     *
+     * @param key key for configuration fields
+     * @param comment type for configuratino field
+     */
+    void setComment(String key, String comment);
+
+    /**
+     * Pass the servlet context over to the configuration service to provide runtime information about
+     * the environment to the rest of the system.
+     * @param context
+     */
+    void setServletContext(ServletContext context);
+
+    /**
+     * Get the servlet context used when initialising the system
+     * @return
+     */
+    ServletContext getServletContext();
+
+    /**
+     * Get a string describing the type and version of the application server running the LMF.
+     *
+     * @return
+     */
+    String getServerInfo();
+
+    /**
+     * Try figuring out on which port the server is running ...
+     */
+    int getServerPort();
+
+    /**
+     * Try figuring out the local name of the server
+     * @return
+     */
+    String getServerName();
+
+    /**
+     * Return the context path of this application
+     * @return
+     */
+    String getServerContext();
+
+    /**
+     * Return true if Jetty 6.x is detected; tests for presence of class org.mortbay.jetty.Server
+     * @return
+     */
+    boolean isJetty6();
+
+    /**
+     * Return true if Jetty 7.x is detected; tests for presence of class org.eclipse.jetty.server.Server
+     * @return
+     */
+    boolean isJetty7();
+
+    /**
+     * Return true if Tomcat 6.x is detected; tests for presence of class org.apache.catalina.ServerFactory
+     * @return
+     */
+    boolean isTomcat6();
+
+    /**
+     * Return true if Tomcat 7.x is detected; tests for presence of class org.apache.catalina.CatalinaFactory
+     * @return
+     */
+    boolean isTomcat7();
+
+    /**
+     * Shutdown the application server running this web application; tries to determine the kind of server we are
+     * running under and send the proper shutdown signal before exiting with System.exit
+     */
+    void performServerShutdown();
+
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/c32963d5/lmf-core/src/main/java/kiwi/core/api/config/DependenciesService.java
----------------------------------------------------------------------
diff --git a/lmf-core/src/main/java/kiwi/core/api/config/DependenciesService.java b/lmf-core/src/main/java/kiwi/core/api/config/DependenciesService.java
new file mode 100644
index 0000000..f0e118e
--- /dev/null
+++ b/lmf-core/src/main/java/kiwi/core/api/config/DependenciesService.java
@@ -0,0 +1,40 @@
+/**
+ * Copyright (C) 2013 Salzburg Research.
+ *
+ * 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.
+ */
+package kiwi.core.api.config;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Provides meta information about the current dependencies
+ * 
+ * @author Sergio Fernández
+ * 
+ */
+public interface DependenciesService {
+
+    String PATH     = "/dependencies.txt";
+    String GROUP    = "groupId";
+    String ARTIFACT = "artifactId";
+    String VERSION  = "version";
+
+    List<Map<String, String>> getArtifacs();
+
+    List<Map<String, String>> getArtifacs(String groupId);
+
+    String getVersion(String groupId, String artifactId);
+
+}