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:57:40 UTC
[11/11] git commit: added missing module from the previous code
importation
Updated Branches:
refs/heads/master c32963d5a -> 32a909f74
added missing module from the previous code importation
Project: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/commit/32a909f7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/tree/32a909f7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-marmotta/diff/32a909f7
Branch: refs/heads/master
Commit: 32a909f74474d11eb493a94db9ff287cbfc93022
Parents: c32963d
Author: Sergio Fernández <wi...@apache.org>
Authored: Tue Feb 19 13:57:04 2013 +0100
Committer: Sergio Fernández <wi...@apache.org>
Committed: Tue Feb 19 13:57:04 2013 +0100
----------------------------------------------------------------------
ldpath/.project | 17 +
ldpath/.settings/org.eclipse.m2e.core.prefs | 4 +
ldpath/ldpath-api/.classpath | 11 +
ldpath/ldpath-api/.project | 43 +
.../.settings/org.eclipse.core.resources.prefs | 2 +
.../.settings/org.eclipse.jdt.core.prefs | 8 +
.../.settings/org.eclipse.m2e.core.prefs | 4 +
.../.settings/org.eclipse.pde.core.prefs | 2 +
.../.settings/org.eclipse.wst.common.component | 6 +
.../org.eclipse.wst.common.project.facet.core.xml | 5 +
ldpath/ldpath-api/LICENSE | 202 +++
ldpath/ldpath-api/pom.xml | 76 ++
.../at/newmedialab/ldpath/api/LDPathConstruct.java | 34 +
.../newmedialab/ldpath/api/backend/RDFBackend.java | 274 ++++
.../ldpath/api/functions/NodeFunction.java | 59 +
.../ldpath/api/functions/SelectorFunction.java | 37 +
.../ldpath/api/functions/TestFunction.java | 29 +
.../ldpath/api/selectors/NodeSelector.java | 56 +
.../at/newmedialab/ldpath/api/tests/NodeTest.java | 44 +
.../ldpath/api/transformers/NodeTransformer.java | 40 +
ldpath/ldpath-backend-file/.classpath | 9 +
ldpath/ldpath-backend-file/.project | 23 +
.../.settings/org.eclipse.core.resources.prefs | 4 +
.../.settings/org.eclipse.jdt.core.prefs | 5 +
.../.settings/org.eclipse.m2e.core.prefs | 4 +
ldpath/ldpath-backend-file/pom.xml | 120 ++
.../ldpath/backend/file/FileBackend.java | 128 ++
.../newmedialab/ldpath/backend/file/FileQuery.java | 193 +++
.../src/test/java/ParserTest.java | 124 ++
.../src/test/java/PathTest.java | 73 +
.../src/test/resources/demo-data.foaf | 62 +
.../src/test/resources/orf.search | 24 +
.../src/test/resources/sn.search | 24 +
.../src/test/resources/stanbol.search | 18 +
ldpath/ldpath-backend-jena/.classpath | 7 +
ldpath/ldpath-backend-jena/.project | 23 +
.../.settings/org.eclipse.core.resources.prefs | 2 +
.../.settings/org.eclipse.jdt.core.prefs | 5 +
.../.settings/org.eclipse.m2e.core.prefs | 4 +
ldpath/ldpath-backend-jena/pom.xml | 50 +
.../ldpath/backend/jena/GenericJenaBackend.java | 468 +++++++
ldpath/ldpath-backend-linkeddata/.classpath | 8 +
ldpath/ldpath-backend-linkeddata/.project | 23 +
.../.settings/org.eclipse.core.resources.prefs | 3 +
.../.settings/org.eclipse.jdt.core.prefs | 5 +
.../.settings/org.eclipse.m2e.core.prefs | 4 +
ldpath/ldpath-backend-linkeddata/pom.xml | 136 ++
.../newmedialab/ldclient/api/LDCacheProvider.java | 72 +
.../ldclient/exception/LDClientException.java | 82 ++
.../at/newmedialab/ldclient/model/CacheEntry.java | 92 ++
.../newmedialab/ldclient/model/ClientResponse.java | 52 +
.../at/newmedialab/ldclient/model/Endpoint.java | 270 ++++
.../at/newmedialab/ldclient/service/LDCache.java | 212 +++
.../at/newmedialab/ldclient/service/LDClient.java | 490 +++++++
.../newmedialab/ldclient/service/LDEndpoints.java | 91 ++
.../backend/linkeddata/AbstractLDBackend.java | 177 +++
.../ldpath/backend/linkeddata/LDMemoryBackend.java | 70 +
.../backend/linkeddata/LDPersistentBackend.java | 103 ++
.../ldpath/backend/linkeddata/LDQuery.java | 187 +++
.../src/main/resources/endpoints.properties | 24 +
.../src/main/resources/ldclient.properties | 28 +
ldpath/ldpath-backend-sesame/.classpath | 11 +
ldpath/ldpath-backend-sesame/.project | 36 +
.../.settings/org.eclipse.core.resources.prefs | 2 +
.../.settings/org.eclipse.jdt.core.prefs | 8 +
.../.settings/org.eclipse.m2e.core.prefs | 4 +
.../.settings/org.eclipse.wst.common.component | 6 +
.../org.eclipse.wst.common.project.facet.core.xml | 5 +
ldpath/ldpath-backend-sesame/pom.xml | 54 +
.../backend/sesame/AbstractSesameBackend.java | 324 +++++
.../backend/sesame/SesameConnectionBackend.java | 85 ++
.../backend/sesame/SesameRepositoryBackend.java | 161 +++
.../backend/sesame/ThreadingSesameBackend.java | 78 ++
ldpath/ldpath-core/.classpath | 19 +
ldpath/ldpath-core/.project | 37 +
.../.settings/org.eclipse.core.resources.prefs | 5 +
.../.settings/org.eclipse.jdt.core.prefs | 8 +
.../.settings/org.eclipse.m2e.core.prefs | 4 +
.../.settings/org.eclipse.pde.core.prefs | 2 +
.../.settings/org.eclipse.wst.common.component | 8 +
.../org.eclipse.wst.common.project.facet.core.xml | 5 +
ldpath/ldpath-core/LICENSE | 202 +++
ldpath/ldpath-core/pom.xml | 168 +++
.../main/java/at/newmedialab/ldpath/LDPath.java | 309 +++++
.../ldpath/exception/LDPathParseException.java | 82 ++
.../at/newmedialab/ldpath/model/Constants.java | 42 +
.../ldpath/model/backend/AbstractBackend.java | 269 ++++
.../ldpath/model/fields/FieldMapping.java | 164 +++
.../model/functions/ConcatenateFunction.java | 86 ++
.../ldpath/model/functions/CountFunction.java | 57 +
.../ldpath/model/functions/FirstFunction.java | 81 ++
.../ldpath/model/functions/LastFunction.java | 80 ++
.../ldpath/model/functions/SortFunction.java | 161 +++
.../newmedialab/ldpath/model/programs/Program.java | 206 +++
.../ldpath/model/selectors/FunctionSelector.java | 151 +++
.../model/selectors/IntersectionSelector.java | 98 ++
.../ldpath/model/selectors/PathSelector.java | 114 ++
.../ldpath/model/selectors/PropertySelector.java | 111 ++
.../model/selectors/RecursivePathSelector.java | 175 +++
.../model/selectors/ReversePropertySelector.java | 105 ++
.../ldpath/model/selectors/SelfSelector.java | 76 ++
.../model/selectors/StringConstantSelector.java | 95 ++
.../ldpath/model/selectors/TestingSelector.java | 120 ++
.../ldpath/model/selectors/UnionSelector.java | 105 ++
.../ldpath/model/selectors/WildcardSelector.java | 45 +
.../at/newmedialab/ldpath/model/tests/AndTest.java | 112 ++
.../ldpath/model/tests/ComplexTest.java | 22 +
.../ldpath/model/tests/FunctionTest.java | 77 ++
.../ldpath/model/tests/LiteralLanguageTest.java | 118 ++
.../ldpath/model/tests/LiteralTypeTest.java | 121 ++
.../at/newmedialab/ldpath/model/tests/NotTest.java | 89 ++
.../at/newmedialab/ldpath/model/tests/OrTest.java | 103 ++
.../ldpath/model/tests/PathEqualityTest.java | 124 ++
.../newmedialab/ldpath/model/tests/PathTest.java | 108 ++
.../model/tests/functions/BinaryNumericTest.java | 63 +
.../ldpath/model/tests/functions/EqualTest.java | 36 +
.../model/tests/functions/GreaterEqualTest.java | 37 +
.../model/tests/functions/GreaterThanTest.java | 37 +
.../model/tests/functions/LessEqualTest.java | 37 +
.../ldpath/model/tests/functions/LessThanTest.java | 36 +
.../ldpath/model/tests/functions/NotEqualTest.java | 36 +
.../model/transformers/BigDecimalTransformer.java | 33 +
.../model/transformers/BigIntegerTransformer.java | 33 +
.../model/transformers/BooleanTransformer.java | 46 +
.../ldpath/model/transformers/ByteTransformer.java | 33 +
.../model/transformers/DateTimeTransformer.java | 46 +
.../ldpath/model/transformers/DateTransformer.java | 45 +
.../model/transformers/DoubleTransformer.java | 45 +
.../model/transformers/DurationTransformer.java | 77 ++
.../model/transformers/FloatTransformer.java | 44 +
.../model/transformers/IdentityTransformer.java | 41 +
.../ldpath/model/transformers/IntTransformer.java | 46 +
.../ldpath/model/transformers/LongTransformer.java | 44 +
.../model/transformers/ShortTransformer.java | 33 +
.../model/transformers/StringTransformer.java | 41 +
.../ldpath/model/transformers/TimeTransformer.java | 46 +
.../newmedialab/ldpath/parser/Configuration.java | 210 +++
.../ldpath/parser/DefaultConfiguration.java | 131 ++
.../at/newmedialab/ldpath/util/Collections.java | 103 ++
.../at/newmedialab/ldpath/util/FormatUtils.java | 113 ++
.../javacc/at/newmedialab/ldpath/parser/rdfpath.jj | 1012 +++++++++++++++
.../src/main/resources/META-INF/MANIFEST.MF | 1 +
...wmedialab.ldpath.api.functions.SelectorFunction | 5 +
...t.newmedialab.ldpath.api.functions.TestFunction | 6 +
.../src/test/java/core/AbstractTestBase.java | 154 +++
.../ldpath/BinaryNumericTestFunctionsTest.java | 112 ++
.../src/test/java/ldpath/FunctionsTest.java | 150 +++
.../src/test/java/parse/EmptyTestingBackend.java | 109 ++
.../src/test/java/parse/ParserTest.java | 122 ++
.../src/test/resources/ldpath/test-data.n3 | 32 +
.../src/test/resources/parse/namespaces.txt | 5 +
.../src/test/resources/parse/program.txt | 16 +
.../ldpath-core/src/test/resources/parse/test.txt | 1 +
ldpath/ldpath-functions-collections/.classpath | 10 +
ldpath/ldpath-functions-collections/.project | 24 +
.../.settings/org.eclipse.core.resources.prefs | 5 +
.../.settings/org.eclipse.jdt.core.prefs | 5 +
.../.settings/org.eclipse.m2e.core.prefs | 4 +
.../.settings/org.eclipse.pde.core.prefs | 2 +
ldpath/ldpath-functions-collections/pom.xml | 107 ++
.../model/functions/coll/AbstractCollFunction.java | 40 +
.../model/functions/coll/FlattenFunction.java | 104 ++
.../ldpath/model/functions/coll/GetFunction.java | 91 ++
.../model/functions/coll/SubListFunction.java | 115 ++
.../src/main/resources/META-INF/MANIFEST.MF | 1 +
...wmedialab.ldpath.api.functions.SelectorFunction | 3 +
.../src/test/java/coll/CollectionsTest.java | 123 ++
.../src/test/resources/coll/data.n3 | 29 +
ldpath/ldpath-functions-date/.classpath | 13 +
ldpath/ldpath-functions-date/.project | 37 +
.../.settings/org.eclipse.core.resources.prefs | 4 +
.../.settings/org.eclipse.jdt.core.prefs | 8 +
.../.settings/org.eclipse.m2e.core.prefs | 4 +
.../.settings/org.eclipse.pde.core.prefs | 2 +
.../.settings/org.eclipse.wst.common.component | 7 +
.../org.eclipse.wst.common.project.facet.core.xml | 5 +
ldpath/ldpath-functions-date/pom.xml | 102 ++
.../ldpath/model/functions/date/DateFunction.java | 22 +
.../model/functions/date/EarliestDateFunction.java | 69 +
.../model/functions/date/LatestDateFunction.java | 69 +
.../src/main/resources/META-INF/MANIFEST.MF | 1 +
...wmedialab.ldpath.api.functions.SelectorFunction | 2 +
.../src/test/java/date/DateFunctionsTest.java | 99 ++
ldpath/ldpath-functions-html/.classpath | 14 +
ldpath/ldpath-functions-html/.project | 37 +
.../.settings/org.eclipse.core.resources.prefs | 5 +
.../.settings/org.eclipse.jdt.core.prefs | 8 +
.../.settings/org.eclipse.m2e.core.prefs | 4 +
.../.settings/org.eclipse.pde.core.prefs | 2 +
.../.settings/org.eclipse.wst.common.component | 7 +
.../org.eclipse.wst.common.project.facet.core.xml | 5 +
ldpath/ldpath-functions-html/pom.xml | 122 ++
.../ldpath/model/functions/CleanHtmlFunction.java | 105 ++
.../ldpath/model/functions/CssSelectFunction.java | 144 ++
.../src/main/resources/META-INF/MANIFEST.MF | 1 +
...wmedialab.ldpath.api.functions.SelectorFunction | 2 +
.../src/test/java/html/HtmlFunctionsTest.java | 92 ++
.../src/test/resources/html/data.n3 | 19 +
ldpath/ldpath-functions-math/.classpath | 13 +
ldpath/ldpath-functions-math/.project | 37 +
.../.settings/org.eclipse.core.resources.prefs | 4 +
.../.settings/org.eclipse.jdt.core.prefs | 8 +
.../.settings/org.eclipse.m2e.core.prefs | 4 +
.../.settings/org.eclipse.pde.core.prefs | 2 +
.../.settings/org.eclipse.wst.common.component | 7 +
.../org.eclipse.wst.common.project.facet.core.xml | 5 +
ldpath/ldpath-functions-math/pom.xml | 102 ++
.../ldpath/model/functions/math/MathFunction.java | 23 +
.../ldpath/model/functions/math/MaxFunction.java | 79 ++
.../ldpath/model/functions/math/MinFunction.java | 80 ++
.../ldpath/model/functions/math/RoundFunction.java | 75 ++
.../ldpath/model/functions/math/SumFunction.java | 75 ++
.../src/main/resources/META-INF/MANIFEST.MF | 1 +
...wmedialab.ldpath.api.functions.SelectorFunction | 4 +
.../src/test/java/math/MathFunctionTest.java | 269 ++++
ldpath/ldpath-functions-text/.classpath | 9 +
ldpath/ldpath-functions-text/.project | 24 +
.../.settings/org.eclipse.core.resources.prefs | 4 +
.../.settings/org.eclipse.jdt.core.prefs | 5 +
.../.settings/org.eclipse.m2e.core.prefs | 4 +
.../.settings/org.eclipse.pde.core.prefs | 2 +
ldpath/ldpath-functions-text/pom.xml | 102 ++
.../model/functions/text/ReplaceFunction.java | 93 ++
.../model/functions/text/StrLeftFunction.java | 63 +
.../model/functions/text/StrLenFunction.java | 61 +
.../model/functions/text/StrRightFunction.java | 64 +
.../model/functions/text/SubstringFunction.java | 75 ++
.../model/functions/text/WordCountFunction.java | 67 +
.../src/main/resources/META-INF/MANIFEST.MF | 1 +
...wmedialab.ldpath.api.functions.SelectorFunction | 6 +
.../src/test/java/text/TextFunctionsTest.java | 180 +++
ldpath/ldpath-functions-xml/.classpath | 14 +
ldpath/ldpath-functions-xml/.project | 37 +
.../.settings/org.eclipse.core.resources.prefs | 5 +
.../.settings/org.eclipse.jdt.core.prefs | 8 +
.../.settings/org.eclipse.m2e.core.prefs | 4 +
.../.settings/org.eclipse.pde.core.prefs | 2 +
.../.settings/org.eclipse.wst.common.component | 7 +
.../org.eclipse.wst.common.project.facet.core.xml | 5 +
ldpath/ldpath-functions-xml/pom.xml | 123 ++
.../model/functions/RemoveXmlTagsFunction.java | 100 ++
.../ldpath/model/functions/XPathFunction.java | 151 +++
.../src/main/resources/META-INF/MANIFEST.MF | 1 +
...wmedialab.ldpath.api.functions.SelectorFunction | 2 +
.../test/java/xml/RemoveXmlTagsFunctionTest.java | 55 +
.../src/test/java/xml/XPathFunctionTest.java | 83 ++
.../src/test/resources/xml/data.n3 | 102 ++
.../src/test/resources/xml/quiz.xml | 110 ++
ldpath/ldpath-template-linkeddata/.classpath | 8 +
ldpath/ldpath-template-linkeddata/.project | 23 +
.../.settings/org.eclipse.core.resources.prefs | 3 +
.../.settings/org.eclipse.jdt.core.prefs | 5 +
.../.settings/org.eclipse.m2e.core.prefs | 4 +
ldpath/ldpath-template-linkeddata/pom.xml | 47 +
.../at/newmedialab/ldpath/template/LDTemplate.java | 165 +++
.../src/test/resources/city-html.ftl | 22 +
ldpath/ldpath-template/.classpath | 7 +
ldpath/ldpath-template/.project | 24 +
.../.settings/org.eclipse.core.resources.prefs | 2 +
.../.settings/org.eclipse.jdt.core.prefs | 5 +
.../.settings/org.eclipse.m2e.core.prefs | 4 +
.../.settings/org.eclipse.pde.core.prefs | 2 +
ldpath/ldpath-template/pom.xml | 115 ++
.../ldpath/template/engine/LDPathDirective.java | 200 +++
.../ldpath/template/engine/LDPathMethod.java | 131 ++
.../ldpath/template/engine/NamespaceDirective.java | 104 ++
.../ldpath/template/engine/TemplateEngine.java | 131 ++
.../model/freemarker/TemplateNodeModel.java | 108 ++
.../model/freemarker/TemplateStackModel.java | 51 +
.../model/freemarker/TemplateWrapperModel.java | 54 +
.../transformers/TemplateBooleanTransformer.java | 54 +
.../transformers/TemplateDateTransformer.java | 67 +
.../transformers/TemplateDoubleTransformer.java | 54 +
.../transformers/TemplateFloatTransformer.java | 54 +
.../transformers/TemplateIntegerTransformer.java | 54 +
.../transformers/TemplateLongTransformer.java | 54 +
.../transformers/TemplateScalarTransformer.java | 55 +
.../ldpath/template/util/FormatUtil.java | 53 +
ldpath/pom.xml | 278 ++++
279 files changed, 18476 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/32a909f7/ldpath/.project
----------------------------------------------------------------------
diff --git a/ldpath/.project b/ldpath/.project
new file mode 100644
index 0000000..d2d67fd
--- /dev/null
+++ b/ldpath/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>ldpath-parent</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.m2e.core.maven2Nature</nature>
+ </natures>
+</projectDescription>
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/32a909f7/ldpath/.settings/org.eclipse.m2e.core.prefs
----------------------------------------------------------------------
diff --git a/ldpath/.settings/org.eclipse.m2e.core.prefs b/ldpath/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/ldpath/.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/32a909f7/ldpath/ldpath-api/.classpath
----------------------------------------------------------------------
diff --git a/ldpath/ldpath-api/.classpath b/ldpath/ldpath-api/.classpath
new file mode 100644
index 0000000..1b28ee5
--- /dev/null
+++ b/ldpath/ldpath-api/.classpath
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/classes" path="src/main/java"/>
+ <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/32a909f7/ldpath/ldpath-api/.project
----------------------------------------------------------------------
diff --git a/ldpath/ldpath-api/.project b/ldpath/ldpath-api/.project
new file mode 100644
index 0000000..c3f1a76
--- /dev/null
+++ b/ldpath/ldpath-api/.project
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>ldpath-api</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.zeroturnaround.eclipse.rebelXmlBuilder</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.pde.PluginNature</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>
+ <nature>org.zeroturnaround.eclipse.jrebelNature</nature>
+ </natures>
+</projectDescription>
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/32a909f7/ldpath/ldpath-api/.settings/org.eclipse.core.resources.prefs
----------------------------------------------------------------------
diff --git a/ldpath/ldpath-api/.settings/org.eclipse.core.resources.prefs b/ldpath/ldpath-api/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..2b76340
--- /dev/null
+++ b/ldpath/ldpath-api/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+encoding//src/main/java=UTF-8
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/32a909f7/ldpath/ldpath-api/.settings/org.eclipse.jdt.core.prefs
----------------------------------------------------------------------
diff --git a/ldpath/ldpath-api/.settings/org.eclipse.jdt.core.prefs b/ldpath/ldpath-api/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..69c31cd
--- /dev/null
+++ b/ldpath/ldpath-api/.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/32a909f7/ldpath/ldpath-api/.settings/org.eclipse.m2e.core.prefs
----------------------------------------------------------------------
diff --git a/ldpath/ldpath-api/.settings/org.eclipse.m2e.core.prefs b/ldpath/ldpath-api/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/ldpath/ldpath-api/.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/32a909f7/ldpath/ldpath-api/.settings/org.eclipse.pde.core.prefs
----------------------------------------------------------------------
diff --git a/ldpath/ldpath-api/.settings/org.eclipse.pde.core.prefs b/ldpath/ldpath-api/.settings/org.eclipse.pde.core.prefs
new file mode 100644
index 0000000..ba582c2
--- /dev/null
+++ b/ldpath/ldpath-api/.settings/org.eclipse.pde.core.prefs
@@ -0,0 +1,2 @@
+BUNDLE_ROOT_PATH=target/classes
+eclipse.preferences.version=1
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/32a909f7/ldpath/ldpath-api/.settings/org.eclipse.wst.common.component
----------------------------------------------------------------------
diff --git a/ldpath/ldpath-api/.settings/org.eclipse.wst.common.component b/ldpath/ldpath-api/.settings/org.eclipse.wst.common.component
new file mode 100644
index 0000000..e7883fe
--- /dev/null
+++ b/ldpath/ldpath-api/.settings/org.eclipse.wst.common.component
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project-modules id="moduleCoreId" project-version="1.5.0">
+ <wb-module deploy-name="ldpath-api">
+ <wb-resource deploy-path="/" source-path="/src/main/java"/>
+ </wb-module>
+</project-modules>
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/32a909f7/ldpath/ldpath-api/.settings/org.eclipse.wst.common.project.facet.core.xml
----------------------------------------------------------------------
diff --git a/ldpath/ldpath-api/.settings/org.eclipse.wst.common.project.facet.core.xml b/ldpath/ldpath-api/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100644
index 0000000..c78d932
--- /dev/null
+++ b/ldpath/ldpath-api/.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/32a909f7/ldpath/ldpath-api/LICENSE
----------------------------------------------------------------------
diff --git a/ldpath/ldpath-api/LICENSE b/ldpath/ldpath-api/LICENSE
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/ldpath/ldpath-api/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/incubator-marmotta/blob/32a909f7/ldpath/ldpath-api/pom.xml
----------------------------------------------------------------------
diff --git a/ldpath/ldpath-api/pom.xml b/ldpath/ldpath-api/pom.xml
new file mode 100644
index 0000000..76b781b
--- /dev/null
+++ b/ldpath/ldpath-api/pom.xml
@@ -0,0 +1,76 @@
+<?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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>at.newmedialab.ldpath</groupId>
+ <artifactId>ldpath-parent</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
+ <relativePath>../</relativePath>
+ </parent>
+
+ <name>LDPath API</name>
+ <artifactId>ldpath-api</artifactId>
+ <packaging>bundle</packaging>
+
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Bundle-Name>LDPath API</Bundle-Name>
+ <!-- Enable this for including your enhancement chain configuration -->
+ <!-- <Install-Path>config</Install-Path> -->
+ <Export-Package>
+ at.newmedialab.ldpath.api;version=${project.version},
+ at.newmedialab.ldpath.api.backend;version=${project.version},
+ at.newmedialab.ldpath.api.functions;version=${project.version},
+ at.newmedialab.ldpath.api.selectors;version=${project.version},
+ at.newmedialab.ldpath.api.tests;version=${project.version},
+ at.newmedialab.ldpath.api.transformers;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>Salzburg Research</service.vendor>
+ </properties>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+
+</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/32a909f7/ldpath/ldpath-api/src/main/java/at/newmedialab/ldpath/api/LDPathConstruct.java
----------------------------------------------------------------------
diff --git a/ldpath/ldpath-api/src/main/java/at/newmedialab/ldpath/api/LDPathConstruct.java b/ldpath/ldpath-api/src/main/java/at/newmedialab/ldpath/api/LDPathConstruct.java
new file mode 100644
index 0000000..29b4d6a
--- /dev/null
+++ b/ldpath/ldpath-api/src/main/java/at/newmedialab/ldpath/api/LDPathConstruct.java
@@ -0,0 +1,34 @@
+/**
+ * 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 at.newmedialab.ldpath.api;
+
+import at.newmedialab.ldpath.api.backend.RDFBackend;
+
+/**
+ * Add file description here!
+ * <p/>
+ * Author: Sebastian Schaffert
+ */
+public interface LDPathConstruct<Node> {
+ /**
+ * Return the representation of the NodeFunction or NodeSelector in the RDF Path Language
+ *
+ * @return
+ * @param backend
+ */
+ public String getPathExpression(RDFBackend<Node> backend);
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/32a909f7/ldpath/ldpath-api/src/main/java/at/newmedialab/ldpath/api/backend/RDFBackend.java
----------------------------------------------------------------------
diff --git a/ldpath/ldpath-api/src/main/java/at/newmedialab/ldpath/api/backend/RDFBackend.java b/ldpath/ldpath-api/src/main/java/at/newmedialab/ldpath/api/backend/RDFBackend.java
new file mode 100644
index 0000000..e20a117
--- /dev/null
+++ b/ldpath/ldpath-api/src/main/java/at/newmedialab/ldpath/api/backend/RDFBackend.java
@@ -0,0 +1,274 @@
+/**
+ * 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 at.newmedialab.ldpath.api.backend;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.net.URI;
+import java.util.Collection;
+import java.util.Date;
+import java.util.Locale;
+import java.util.concurrent.ThreadPoolExecutor;
+
+/**
+ * A generic API for RDF models and triple stores; provides the testing and navigation functions needed for LDPath.
+ * Implementations exist for Sesame, LMF, Jena and Clerezza. The API is somewhat typesafe by making use of a generic
+ * for nodes.
+ * <p/>
+ * Author: Sebastian Schaffert
+ */
+public interface RDFBackend<Node> {
+
+
+ /**
+ * Return true if the underlying backend supports the parallel execution of queries.
+ *
+ * @return
+ */
+ public boolean supportsThreading();
+
+
+ /**
+ * In case the backend supports threading, this method should return the ExecutorService representing the
+ * thread pool. LDPath lets the backend manage the thread pool to avoid excessive threading.
+ * @return
+ */
+ public ThreadPoolExecutor getThreadPool();
+
+ /**
+ * Test whether the node passed as argument is a literal
+ * @param n the node to check
+ * @return true if the node is a literal
+ */
+ public boolean isLiteral(Node n);
+
+ /**
+ * Test whether the node passed as argument is a URI
+ * @param n the node to check
+ * @return true if the node is a URI
+ */
+ public boolean isURI(Node n);
+
+ /**
+ * 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
+ */
+ public boolean isBlank(Node 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
+ */
+ public Locale getLiteralLanguage(Node 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
+ */
+ public URI getLiteralType(Node n);
+
+
+
+ /**
+ * Create a literal node with the content passed as argument
+ * @param content string content to represent inside the literal
+ * @return a literal node in using the model used by this backend
+ */
+ public Node createLiteral(String content);
+
+ /**
+ * Create a literal node with the content passed as argument
+ * @param content string content to represent inside the literal
+ * @return a literal node in using the model used by this backend
+ */
+ public Node createLiteral(String content, Locale language, URI type);
+
+ /**
+ * Create a URI mode with the URI passed as argument
+ * @param uri URI of the resource to create
+ * @return a URI node using the model used by this backend
+ */
+ public Node createURI(String uri);
+
+
+ /**
+ * Return the lexial representation 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 node
+ * @return
+ */
+ public String stringValue(Node node);
+
+ /**
+ * Return the double value of a literal node. Depending on the backend implementing this method,
+ * the value can be retrieved directly or must be parsed from the string representation. The method can throw
+ * a NumberFormatException or ArithmeticException indicating that the value cannot be represented as double, and an
+ * IllegalArgumentException, indicating that the passed node is not a literal
+ *
+ * @param node the literal node for which to return the double value
+ * @return double value of the literal node
+ * @throws NumberFormatException in case the literal cannot be represented as double value
+ * @throws ArithmeticException in case the literal cannot be represented as double value
+ * @throws IllegalArgumentException in case the node passed as argument is not a literal
+ */
+ public Double doubleValue(Node node);
+
+
+ /**
+ * Return the long value of a literal node. Depending on the backend implementing this method,
+ * the value can be retrieved directly or must be parsed from the string representation. The method can throw
+ * a NumberFormatException or ArithmeticException indicating that the value cannot be represented as long, and an
+ * IllegalArgumentException, indicating that the passed node is not a literal
+ *
+ * @param node the literal node for which to return the long value
+ * @return long value of the literal node
+ * @throws NumberFormatException in case the literal cannot be represented as long value
+ * @throws ArithmeticException in case the literal cannot be represented as long value
+ * @throws IllegalArgumentException in case the node passed as argument is not a literal
+ */
+ public Long longValue(Node node);
+
+
+ /**
+ * Return the boolean value of a literal node. Depending on the backend implementing this method,
+ * the value can be retrieved directly or must be parsed from the string representation.
+ * TODO: Define:<ul>
+ * <li> Do we also support '0' '1', 'yes', 'no'; whats about case insensitive
+ * such as TRUE, False
+ * <li> should we throw an RuntimeException of not an boolean value or return
+ * false as {@link Boolean#parseBoolean(String)}
+ * </ul>
+ * @param node the literal node for which to return the boolean value
+ * @return long value of the literal node
+ * @throws IllegalArgumentException in case the node passed as argument is not a literal
+ */
+ public Boolean booleanValue(Node node);
+
+ /**
+ * TODO
+ * @param node the literal node for which to return the dateTime value
+ * @return long value of the literal node
+ * @throws IllegalArgumentException in case the node passed as argument is not a literal
+ */
+ public Date dateTimeValue(Node node);
+
+ /**
+ * TODO
+ * @param node the literal node for which to return the date value
+ * @return long value of the literal node
+ * @throws IllegalArgumentException in case the node passed as argument is not a literal
+ */
+ public Date dateValue(Node node);
+
+ /**
+ * TODO
+ * @param node the literal node for which to return the time value
+ * @return long value of the literal node
+ * @throws IllegalArgumentException in case the node passed as argument is not a literal
+ */
+ public Date timeValue(Node node);
+
+ /**
+ * Return the float value of a literal node. Depending on the backend implementing this method,
+ * the value can be retrieved directly or must be parsed from the string representation. The method can throw
+ * a NumberFormatException or ArithmeticException indicating that the value cannot be represented as float, and an
+ * IllegalArgumentException, indicating that the passed node is not a literal
+ *
+ * @param node the literal node for which to return the float value
+ * @return long value of the literal node
+ * @throws NumberFormatException in case the literal cannot be represented as float value
+ * @throws ArithmeticException in case the literal cannot be represented as float value
+ * @throws IllegalArgumentException in case the node passed as argument is not a literal
+ */
+ public Float floatValue(Node node);
+
+ /**
+ * Return the 32bit integer value of a literal node. Depending on the backend implementing this method,
+ * the value can be retrieved directly or must be parsed from the string representation. The method can throw
+ * a NumberFormatException or ArithmeticException indicating that the value cannot be represented as integer, and an
+ * IllegalArgumentException, indicating that the passed node is not a literal.
+ * <p>
+ * Note that this is restricted to 32bit singed integer values as defined by
+ * xsd:int and {@link Integer}. For bigger nuber one might want to use
+ * xsd:integer represented by {@link BigInteger}.
+ *
+ * @param node the literal node for which to return the Integer (xsd:int) value
+ * @return long value of the literal node
+ * @throws NumberFormatException in case the literal cannot be represented as 32 bit integer value
+ * @throws ArithmeticException in case the literal cannot be represented as 32 bit integer value
+ * @throws IllegalArgumentException in case the node passed as argument is not a literal
+ */
+ public Integer intValue(Node node);
+
+ /**
+ * Return the arbitrary length integer value of a literal node. Depending on the backend implementing this method,
+ * the value can be retrieved directly or must be parsed from the string representation. The method can throw
+ * a NumberFormatException or ArithmeticException indicating that the value cannot be represented as integer, and an
+ * IllegalArgumentException, indicating that the passed node is not a literal.
+ *
+ * @param node the literal node for which to return the {@link BigInteger xsd:integer} value
+ * @return long value of the literal node
+ * @throws NumberFormatException in case the literal cannot be represented as integer value
+ * @throws ArithmeticException in case the literal cannot be represented as long value
+ * @throws IllegalArgumentException in case the node passed as argument is integer a literal
+ */
+ public BigInteger integerValue(Node node);
+
+ /**
+ * Return the decimal number of a literal node. Depending on the backend implementing this method,
+ * the value can be retrieved directly or must be parsed from the string representation. The method can throw
+ * a NumberFormatException or ArithmeticException indicating that the value cannot be represented as decimal, and an
+ * IllegalArgumentException, indicating that the passed node is not a literal.
+ *
+ * @param node the literal node for which to return the xsd:decimal value
+ * @return long value of the literal node
+ * @throws NumberFormatException in case the literal cannot be represented as decimal value
+ * @throws ArithmeticException in case the literal cannot be represented as decimal value
+ * @throws IllegalArgumentException in case the node passed as argument is not a literal
+ */
+ public BigDecimal decimalValue(Node node);
+
+ /**
+ * List the objects of triples in the triple store underlying this backend that have the subject and
+ * property given as argument.
+ *
+ * @param subject the subject of the triples to look for
+ * @param property the property of the triples to look for, <code>null</code> is interpreted as wildcard
+ * @return all objects of triples with matching subject and property
+ */
+ public Collection<Node> listObjects(Node subject, Node property);
+
+
+ /**
+ * List the subjects of triples in the triple store underlying this backend that have the object and
+ * property given as argument.
+ *
+ * @param object the object of the triples to look for
+ * @param property the property of the triples to look for, <code>null</code> is interpreted as wildcard
+ * @return all subjects of triples with matching object and property
+ * @throws UnsupportedOperationException in case reverse selection is not supported (e.g. when querying Linked Data)
+ */
+ public Collection<Node> listSubjects(Node property, Node object);
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/32a909f7/ldpath/ldpath-api/src/main/java/at/newmedialab/ldpath/api/functions/NodeFunction.java
----------------------------------------------------------------------
diff --git a/ldpath/ldpath-api/src/main/java/at/newmedialab/ldpath/api/functions/NodeFunction.java b/ldpath/ldpath-api/src/main/java/at/newmedialab/ldpath/api/functions/NodeFunction.java
new file mode 100644
index 0000000..d93b2c6
--- /dev/null
+++ b/ldpath/ldpath-api/src/main/java/at/newmedialab/ldpath/api/functions/NodeFunction.java
@@ -0,0 +1,59 @@
+/**
+ * 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 at.newmedialab.ldpath.api.functions;
+
+import at.newmedialab.ldpath.api.LDPathConstruct;
+import at.newmedialab.ldpath.api.backend.RDFBackend;
+import at.newmedialab.ldpath.api.selectors.NodeSelector;
+
+import java.util.Collection;
+
+/**
+ * A function applied to nodes.
+ *
+ * @param <T> the return type of the function
+ * @param <Node> the node type of the function
+ * <p/>
+ * Author: Sebastian Schaffert <se...@salzburgresearch.at>
+ */
+public interface NodeFunction<T,Node> extends LDPathConstruct<Node> {
+
+ /**
+ * Apply the function to the list of nodes passed as arguments and return the result as type T.
+ * Throws IllegalArgumentException if the function cannot be applied to the nodes passed as argument
+ * or the number of arguments is not correct.
+ *
+ * @param context the context of the execution. Same as using the
+ * {@link NodeSelector} '.' as parameter.
+ * @param args a nested list of KiWiNodes
+ * @return
+ */
+ public T apply(RDFBackend<Node> backend, Node context, Collection<Node>... args) throws IllegalArgumentException;
+
+ /**
+ * A string describing the signature of this node function, e.g. "fn:content(uris : Nodes) : Nodes". The
+ * syntax for representing the signature can be chosen by the implementer. This method is for informational
+ * purposes only.
+ * @return
+ */
+ public String getSignature();
+
+ /**
+ * A short human-readable description of what the node function does.
+ * @return
+ */
+ public String getDescription();
+}
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/32a909f7/ldpath/ldpath-api/src/main/java/at/newmedialab/ldpath/api/functions/SelectorFunction.java
----------------------------------------------------------------------
diff --git a/ldpath/ldpath-api/src/main/java/at/newmedialab/ldpath/api/functions/SelectorFunction.java b/ldpath/ldpath-api/src/main/java/at/newmedialab/ldpath/api/functions/SelectorFunction.java
new file mode 100644
index 0000000..0310502
--- /dev/null
+++ b/ldpath/ldpath-api/src/main/java/at/newmedialab/ldpath/api/functions/SelectorFunction.java
@@ -0,0 +1,37 @@
+/**
+ * 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 at.newmedialab.ldpath.api.functions;
+
+import at.newmedialab.ldpath.api.backend.RDFBackend;
+
+import java.util.Collection;
+
+/**
+ * Intermediate Interface for {@link NodeFunction}s used in the
+ * FunctionSelector
+ *
+ * @author Jakob Frank <ja...@salzburgresearch.at>
+ *
+ */
+public abstract class SelectorFunction<Node> implements NodeFunction<Collection<Node>, Node> {
+
+ @Override
+ public String getPathExpression(RDFBackend<Node> backend) {
+ return getLocalName();
+ }
+
+ protected abstract String getLocalName();
+}
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/32a909f7/ldpath/ldpath-api/src/main/java/at/newmedialab/ldpath/api/functions/TestFunction.java
----------------------------------------------------------------------
diff --git a/ldpath/ldpath-api/src/main/java/at/newmedialab/ldpath/api/functions/TestFunction.java b/ldpath/ldpath-api/src/main/java/at/newmedialab/ldpath/api/functions/TestFunction.java
new file mode 100644
index 0000000..aef0387
--- /dev/null
+++ b/ldpath/ldpath-api/src/main/java/at/newmedialab/ldpath/api/functions/TestFunction.java
@@ -0,0 +1,29 @@
+/**
+ * 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 at.newmedialab.ldpath.api.functions;
+
+import at.newmedialab.ldpath.api.backend.RDFBackend;
+
+public abstract class TestFunction<Node> implements NodeFunction<Boolean, Node> {
+
+ @Override
+ public String getPathExpression(RDFBackend<Node> backend) {
+ return getLocalName();
+ }
+
+ public abstract String getLocalName();
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/32a909f7/ldpath/ldpath-api/src/main/java/at/newmedialab/ldpath/api/selectors/NodeSelector.java
----------------------------------------------------------------------
diff --git a/ldpath/ldpath-api/src/main/java/at/newmedialab/ldpath/api/selectors/NodeSelector.java b/ldpath/ldpath-api/src/main/java/at/newmedialab/ldpath/api/selectors/NodeSelector.java
new file mode 100644
index 0000000..5ebda82
--- /dev/null
+++ b/ldpath/ldpath-api/src/main/java/at/newmedialab/ldpath/api/selectors/NodeSelector.java
@@ -0,0 +1,56 @@
+/**
+ * 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 at.newmedialab.ldpath.api.selectors;
+
+import at.newmedialab.ldpath.api.LDPathConstruct;
+import at.newmedialab.ldpath.api.backend.RDFBackend;
+
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * A node selector takes as argument a KiWiNode and returns a collection of selected
+ * <p/>
+ * Author: Sebastian Schaffert <se...@salzburgresearch.at>
+ */
+public interface NodeSelector<Node> extends LDPathConstruct<Node> {
+
+ /**
+ * Apply the selector to the context node passed as argument and return the collection
+ * of selected nodes in appropriate order.
+ *
+ * @param context the node where to start the selection
+ * @param path the path leading to and including the context node in the current evaluation of LDPath; may be null,
+ * in which case path tracking is disabled
+ * @param resultPaths a map where each of the result nodes maps to a path leading to the result node in the LDPath evaluation;
+ * if null, path tracking is disabled and the path argument is ignored
+ * @return the collection of selected nodes
+ */
+ public Collection<Node> select(RDFBackend<Node> backend, Node context, List<Node> path, Map<Node,List<Node>> resultPaths);
+
+
+ /**
+ * Return a name for this selector to be used as the name for the whole path if not explicitly
+ * specified. In complex selector expressions, this is typically delegated to the first
+ * occurrence of an atomic selector.
+ * <p/>
+ * Implementations can throw UnsupportedOperationException in case returning a name is not reasonable or ambiguous.
+ *
+ * @throws UnsupportedOperationException in case returning a name is not reasonable
+ */
+ public String getName(RDFBackend<Node> backend);
+}
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/32a909f7/ldpath/ldpath-api/src/main/java/at/newmedialab/ldpath/api/tests/NodeTest.java
----------------------------------------------------------------------
diff --git a/ldpath/ldpath-api/src/main/java/at/newmedialab/ldpath/api/tests/NodeTest.java b/ldpath/ldpath-api/src/main/java/at/newmedialab/ldpath/api/tests/NodeTest.java
new file mode 100644
index 0000000..f918541
--- /dev/null
+++ b/ldpath/ldpath-api/src/main/java/at/newmedialab/ldpath/api/tests/NodeTest.java
@@ -0,0 +1,44 @@
+/**
+ * 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 at.newmedialab.ldpath.api.tests;
+
+import at.newmedialab.ldpath.api.backend.RDFBackend;
+import at.newmedialab.ldpath.api.functions.NodeFunction;
+
+import java.util.Collection;
+
+/**
+ * Node tests take a node as argument and return a boolean if the node matches the test.
+ * <p/>
+ * Author: Sebastian Schaffert <se...@salzburgresearch.at>
+ */
+public abstract class NodeTest<Node> implements NodeFunction<Boolean, Node> {
+
+ @Override
+ public final Boolean apply(RDFBackend<Node> backend, Node context, Collection<Node>... args)
+ throws IllegalArgumentException {
+
+ if (args.length != 1 || args[0].isEmpty()) { throw new IllegalArgumentException("a test only takes one parameter"); }
+ if (args[0].size() != 1) { throw new IllegalArgumentException("a test can only be applied to a single node"); }
+
+ Node node = args[0].iterator().next();
+
+ return accept(backend, context, node);
+ }
+
+ public abstract boolean accept(RDFBackend<Node> backend, Node context, Node candidate) throws IllegalArgumentException;
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/32a909f7/ldpath/ldpath-api/src/main/java/at/newmedialab/ldpath/api/transformers/NodeTransformer.java
----------------------------------------------------------------------
diff --git a/ldpath/ldpath-api/src/main/java/at/newmedialab/ldpath/api/transformers/NodeTransformer.java b/ldpath/ldpath-api/src/main/java/at/newmedialab/ldpath/api/transformers/NodeTransformer.java
new file mode 100644
index 0000000..43e7919
--- /dev/null
+++ b/ldpath/ldpath-api/src/main/java/at/newmedialab/ldpath/api/transformers/NodeTransformer.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 at.newmedialab.ldpath.api.transformers;
+
+import at.newmedialab.ldpath.api.backend.RDFBackend;
+
+/**
+ * Implementations of this interface allow to transform KiWiNode objects into the type T. This is
+ * currently required by the indexer to map KiWiNodes to the Java types corresponding to the
+ * respective XML Schema datatypes.
+ *
+ * <p/>
+ * Author: Sebastian Schaffert <se...@salzburgresearch.at>
+ */
+public interface NodeTransformer<T,Node> {
+
+ /**
+ * Transform the KiWiNode node into the datatype T. In case the node cannot be transformed to
+ * the respective datatype, throws an IllegalArgumentException that needs to be caught by the class
+ * carrying out the transformation.
+ *
+ * @param node
+ * @return
+ */
+ public T transform(RDFBackend<Node> backend, Node node) throws IllegalArgumentException;
+
+}
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/32a909f7/ldpath/ldpath-backend-file/.classpath
----------------------------------------------------------------------
diff --git a/ldpath/ldpath-backend-file/.classpath b/ldpath/ldpath-backend-file/.classpath
new file mode 100644
index 0000000..c90fef9
--- /dev/null
+++ b/ldpath/ldpath-backend-file/.classpath
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/classes" path="src/main/java"/>
+ <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"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/32a909f7/ldpath/ldpath-backend-file/.project
----------------------------------------------------------------------
diff --git a/ldpath/ldpath-backend-file/.project b/ldpath/ldpath-backend-file/.project
new file mode 100644
index 0000000..4463de9
--- /dev/null
+++ b/ldpath/ldpath-backend-file/.project
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>ldpath-backend-file</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.m2e.core.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <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/32a909f7/ldpath/ldpath-backend-file/.settings/org.eclipse.core.resources.prefs
----------------------------------------------------------------------
diff --git a/ldpath/ldpath-backend-file/.settings/org.eclipse.core.resources.prefs b/ldpath/ldpath-backend-file/.settings/org.eclipse.core.resources.prefs
new file mode 100644
index 0000000..0285a1b
--- /dev/null
+++ b/ldpath/ldpath-backend-file/.settings/org.eclipse.core.resources.prefs
@@ -0,0 +1,4 @@
+eclipse.preferences.version=1
+encoding//src/main/java=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/32a909f7/ldpath/ldpath-backend-file/.settings/org.eclipse.jdt.core.prefs
----------------------------------------------------------------------
diff --git a/ldpath/ldpath-backend-file/.settings/org.eclipse.jdt.core.prefs b/ldpath/ldpath-backend-file/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..60105c1
--- /dev/null
+++ b/ldpath/ldpath-backend-file/.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/32a909f7/ldpath/ldpath-backend-file/.settings/org.eclipse.m2e.core.prefs
----------------------------------------------------------------------
diff --git a/ldpath/ldpath-backend-file/.settings/org.eclipse.m2e.core.prefs b/ldpath/ldpath-backend-file/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..f897a7f
--- /dev/null
+++ b/ldpath/ldpath-backend-file/.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/32a909f7/ldpath/ldpath-backend-file/pom.xml
----------------------------------------------------------------------
diff --git a/ldpath/ldpath-backend-file/pom.xml b/ldpath/ldpath-backend-file/pom.xml
new file mode 100644
index 0000000..372d12d
--- /dev/null
+++ b/ldpath/ldpath-backend-file/pom.xml
@@ -0,0 +1,120 @@
+<?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/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>at.newmedialab.ldpath</groupId>
+ <artifactId>ldpath-parent</artifactId>
+ <version>3.0.0-SNAPSHOT</version>
+ <relativePath>../</relativePath>
+ </parent>
+
+ <name>LDPath Backend: File</name>
+ <artifactId>ldpath-backend-file</artifactId>
+ <packaging>jar</packaging>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>at.newmedialab.ldpath</groupId>
+ <artifactId>ldpath-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>at.newmedialab.ldpath</groupId>
+ <artifactId>ldpath-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>at.newmedialab.ldpath</groupId>
+ <artifactId>ldpath-backend-sesame</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>at.newmedialab.ldpath</groupId>
+ <artifactId>ldpath-functions-html</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>at.newmedialab.ldpath</groupId>
+ <artifactId>ldpath-functions-xml</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.openrdf.sesame</groupId>
+ <artifactId>sesame-model</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.openrdf.sesame</groupId>
+ <artifactId>sesame-rio-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.openrdf.sesame</groupId>
+ <artifactId>sesame-repository-sail</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>commons-cli</groupId>
+ <artifactId>commons-cli</artifactId>
+ <version>1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>ch.qos.logback</groupId>
+ <artifactId>logback-classic</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+</project>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/32a909f7/ldpath/ldpath-backend-file/src/main/java/at/newmedialab/ldpath/backend/file/FileBackend.java
----------------------------------------------------------------------
diff --git a/ldpath/ldpath-backend-file/src/main/java/at/newmedialab/ldpath/backend/file/FileBackend.java b/ldpath/ldpath-backend-file/src/main/java/at/newmedialab/ldpath/backend/file/FileBackend.java
new file mode 100644
index 0000000..1d0c61b
--- /dev/null
+++ b/ldpath/ldpath-backend-file/src/main/java/at/newmedialab/ldpath/backend/file/FileBackend.java
@@ -0,0 +1,128 @@
+/**
+ * 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 at.newmedialab.ldpath.backend.file;
+
+import at.newmedialab.ldpath.backend.sesame.SesameRepositoryBackend;
+import org.openrdf.repository.Repository;
+import org.openrdf.repository.RepositoryConnection;
+import org.openrdf.repository.RepositoryException;
+import org.openrdf.repository.sail.SailRepository;
+import org.openrdf.rio.RDFFormat;
+import org.openrdf.rio.RDFParseException;
+import org.openrdf.sail.memory.MemoryStore;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+
+/**
+ * Add file description here!
+ * <p/>
+ * Author: Sebastian Schaffert
+ */
+public class FileBackend extends SesameRepositoryBackend {
+
+ private static final Logger log = LoggerFactory.getLogger(FileBackend.class);
+
+
+ public FileBackend(File file) {
+ this(file,null);
+ }
+
+ public FileBackend(File file, String mimetype) {
+ super();
+
+ RDFFormat format = null;
+
+ if(mimetype != null) {
+ format = RDFFormat.forMIMEType(mimetype);
+ }
+
+ try {
+ Repository repository = new SailRepository(new MemoryStore());
+ repository.initialize();
+ setRepository(repository);
+
+
+ RepositoryConnection connection = repository.getConnection();
+ try {
+ connection.add(file,null,format);
+ } finally {
+ connection.close();
+ }
+
+
+ } catch (RDFParseException e) {
+ log.error("error parsing RDF input data from file {}",file,e);
+ } catch (IOException e) {
+ log.error("I/O error while reading input data from file {}", file, e);
+ } catch (RepositoryException e) {
+ log.error("error initialising connection to Sesame in-memory repository",e);
+ }
+ }
+
+
+ /**
+ * Initialise a new sesame backend. Repository needs to be set using setRepository.
+ */
+ public FileBackend(String fileName) {
+ this(new File(fileName));
+ }
+
+ public FileBackend(String fileName, String mimetype) {
+ this(new File(fileName), mimetype);
+ }
+
+
+ public FileBackend(URL url) {
+ this(url,null);
+ }
+
+ public FileBackend(URL url, String mimetype) {
+ super();
+
+ RDFFormat format = null;
+
+ if(mimetype != null) {
+ format = RDFFormat.forMIMEType(mimetype);
+ }
+
+ try {
+ Repository repository = new SailRepository(new MemoryStore());
+ repository.initialize();
+ setRepository(repository);
+
+
+ RepositoryConnection connection = repository.getConnection();
+ try {
+ connection.add(url,null,format);
+ } finally {
+ connection.close();
+ }
+
+
+ } catch (RDFParseException e) {
+ log.error("error parsing RDF input data from url {}",url,e);
+ } catch (IOException e) {
+ log.error("I/O error while reading input data from url {}", url, e);
+ } catch (RepositoryException e) {
+ log.error("error initialising connection to Sesame in-memory repository",e);
+ }
+ }
+
+}