marmotta-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sschaff...@apache.org
Subject [2/3] git commit: added LDPath Linked Data Backend to release artifacts
Date Wed, 13 Mar 2013 14:23:31 GMT
added LDPath Linked Data Backend to release artifacts


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

Branch: refs/heads/master
Commit: 23f0eaf3b0afb14a8ba5553821e18b7e6977e128
Parents: 19a098b
Author: Sebastian Schaffert <sschaffert@apache.org>
Authored: Wed Mar 13 15:12:58 2013 +0100
Committer: Sebastian Schaffert <sschaffert@apache.org>
Committed: Wed Mar 13 15:12:58 2013 +0100

----------------------------------------------------------------------
 .../ldpath/ldpath-backend-linkeddata/README.txt    |   96 ++++++++++++++-
 .../ldpath/ldpath-backend-linkeddata/assembly.xml  |   56 ++++++++
 libraries/ldpath/ldpath-backend-linkeddata/pom.xml |  101 +++++++++++----
 .../ldpath/parser/DefaultConfiguration.java        |    1 +
 pom.xml                                            |    2 +
 5 files changed, 226 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/23f0eaf3/libraries/ldpath/ldpath-backend-linkeddata/README.txt
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-backend-linkeddata/README.txt b/libraries/ldpath/ldpath-backend-linkeddata/README.txt
index 86e3f9c..d772784 100644
--- a/libraries/ldpath/ldpath-backend-linkeddata/README.txt
+++ b/libraries/ldpath/ldpath-backend-linkeddata/README.txt
@@ -1,7 +1,99 @@
 LDPath Linked Data Backend
 ==========================
 
+LDPath is a query language designed for querying the Linked Data Cloud. It
+gives you the possibility to navigate between interlinked resources by
+following path expressions.
+
 This module provides a simple command-line application for querying the
-Linked Data Cloud with LDPath (using LDClient and LDCache). To get an overview
-over the available command line options, run:
+Linked Data Cloud with LDPath (using LDClient and LDCache). It will
+transparently fetch resources and triples as needed as long as they conform
+to the Linked Data principles or are supported by one of our LDClient
+providers (currently Facebook, YouTube, Vimeo, Wikipedia).
+
+To get an overview over the available command line options, run:
+
+java -jar ldpath-${project.version}.jar
+
+
+1. Basic Usage
+--------------
+
+For the basic usage, you need to provide the URI of a Linked Data resource
+(e.g. http://dbpedia.org/resource/Salzburg) and an LDPath expression (e.g.
+rdfs:label). The following query would give you the Spanish label for
+Salzburg:
+
+java -jar ldpath-${project.version}.jar \
+     -context http://dbpedia.org/resource/Salzburg \
+     -path "rdfs:label[@es]"
+
+LDPath allows for very complex path expression. The full language documen-
+tation is available at:
+
+http://marmotta.incubator.apache.org/ldpath/language.html
+
+
+2. Path Programs
+----------------
+
+In addition to simple path expressions, it is also possible to run complete
+path programs as queries against resources. A path program consists of
+several field definitions, e.g.
+
+@prefix dbp: <http://dbpedia.org/ontology/>
+title       = rdfs:label[@en];
+description = dbp:abstract[@en];
+country     = dbp:country / rdfs:label[@en];
+type        = rdf:type / rdfs:label[@en];
+
+will retrieve the label, short description, name of the country and names
+of the types associated with the resource. LDPath programs need to be
+stored in a file and can be executed using:
+
+java -jar ldpath-${project.version}.jar \
+     -context http://dbpedia.org/resource/Salzburg \
+     -program <filename>
+
+
+
+3. Querying Non-Linked Data Resources
+-------------------------------------
+
+The Apache Marmotta LDClient library also supports some common non-linked
+data resources by mapping their proprietary data structures to RDF, among
+them Facebook, YouTube, Vimeo and Wikipedia. For example, the label of
+Salzburg can also be retrieved from Wikipedia:
+
+java -jar ldpath-${project.version}.jar \
+     -context http://en.wikipedia.org/wiki/Salzburg \
+     -path "dct:title"
+
+... or from Facebook:
+
+java -jar ldpath-${project.version}.jar \
+     -context http://graph.facebook.com/102189213155511 \
+     -path "dct:title"
+
+A full list of supported providers with usage instructions is given on:
+
+http://marmotta.incubator.apache.org/ldclient/modules.html
+
+
+
+4. Local Caching
+----------------
+
+The Linked Data Backend also bundles Apache Marmotta's LDCache library for
+locally caching data that has already been retrieved. By default, the cached
+data will only exist during execution of the query. If you want to create
+a persistent cache, you can pass a cache directory on the command line:
+
+java -jar ldpath-${project.version}.jar \
+     -store /tmp/ldcache \
+     -context http://graph.facebook.com/102189213155511 \
+     -path "dct:title"
+
+
+
 

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/23f0eaf3/libraries/ldpath/ldpath-backend-linkeddata/assembly.xml
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-backend-linkeddata/assembly.xml b/libraries/ldpath/ldpath-backend-linkeddata/assembly.xml
new file mode 100644
index 0000000..c1b27ea
--- /dev/null
+++ b/libraries/ldpath/ldpath-backend-linkeddata/assembly.xml
@@ -0,0 +1,56 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one or more
+  ~ contributor license agreements.  See the NOTICE file distributed with
+  ~ this work for additional information regarding copyright ownership.
+  ~ The ASF licenses this file to You under the Apache License, Version 2.0
+  ~ (the "License"); you may not use this file except in compliance with
+  ~ the License.  You may obtain a copy of the License at
+  ~
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+          xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
http://maven.apache.org/xsd/assembly-1.1.2.xsd">
+
+    <id>ldpath</id>
+
+    <formats>
+        <format>zip</format>
+        <format>tar.gz</format>
+    </formats>
+
+    <!-- unpack to apache-marmotta-x.x.x directory -->
+    <includeBaseDirectory>true</includeBaseDirectory>
+
+
+    <files>
+        <file>
+            <source>${project.basedir}/../../../LICENSE.txt</source>
+            <outputDirectory>/</outputDirectory>
+            <fileMode>0644</fileMode>
+        </file>
+        <file>
+            <source>${project.basedir}/README.txt</source>
+            <outputDirectory>/</outputDirectory>
+            <fileMode>0644</fileMode>
+            <filtered>true</filtered>
+        </file>
+        <file>
+            <source>${project.basedir}/../../../NOTICE.txt</source>
+            <outputDirectory>/</outputDirectory>
+            <fileMode>0644</fileMode>
+        </file>
+        <file>
+            <source>${project.build.directory}/ldpath-${project.version}.jar</source>
+            <outputDirectory>/</outputDirectory>
+            <fileMode>0644</fileMode>
+        </file>
+    </files>
+</assembly>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/23f0eaf3/libraries/ldpath/ldpath-backend-linkeddata/pom.xml
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-backend-linkeddata/pom.xml b/libraries/ldpath/ldpath-backend-linkeddata/pom.xml
index fdcb023..82838af 100644
--- a/libraries/ldpath/ldpath-backend-linkeddata/pom.xml
+++ b/libraries/ldpath/ldpath-backend-linkeddata/pom.xml
@@ -29,34 +29,59 @@
     <artifactId>ldpath-backend-linkeddata</artifactId>
     <packaging>jar</packaging>
 
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-jar-plugin</artifactId>
-                <configuration>
-                    <archive>
-                        <manifest>
-                            <mainClass>org.apache.marmotta.ldpath.backend.linkeddata.LDQuery</mainClass>
-                        </manifest>
-                    </archive>
-                </configuration>
-            </plugin>
-            <plugin>
-                <groupId>com.jolira</groupId>
-                <artifactId>onejar-maven-plugin</artifactId>
-                <version>1.4.4</version>
-                <executions>
-                    <execution>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>one-jar</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
+    <profiles>
+        <profile>
+            <id>marmotta-release</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-jar-plugin</artifactId>
+                        <configuration>
+                            <archive>
+                                <manifest>
+                                    <mainClass>org.apache.marmotta.ldpath.backend.linkeddata.LDQuery</mainClass>
+                                </manifest>
+                            </archive>
+                        </configuration>
+                    </plugin>
+                    <plugin>
+                        <groupId>com.jolira</groupId>
+                        <artifactId>onejar-maven-plugin</artifactId>
+                        <version>1.4.4</version>
+                        <executions>
+                            <execution>
+                                <phase>package</phase>
+                                <goals>
+                                    <goal>one-jar</goal>
+                                </goals>
+                                <configuration>
+                                    <filename>ldpath-${project.version}.jar</filename>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    <plugin>
+                        <artifactId>maven-assembly-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <goals>
+                                    <goal>single</goal>
+                                </goals>
+                                <phase>package</phase>
+                                <configuration>
+                                    <descriptors>
+                                        <descriptor>assembly.xml</descriptor>
+                                    </descriptors>
+                                    <finalName>apache-marmotta-${project.version}</finalName>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
 
     <dependencies>
 
@@ -72,6 +97,26 @@
             <groupId>org.apache.marmotta</groupId>
             <artifactId>ldpath-backend-sesame</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.apache.marmotta</groupId>
+            <artifactId>ldpath-functions-text</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.marmotta</groupId>
+            <artifactId>ldpath-functions-xml</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.marmotta</groupId>
+            <artifactId>ldpath-functions-math</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.marmotta</groupId>
+            <artifactId>ldpath-functions-html</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.marmotta</groupId>
+            <artifactId>ldpath-functions-date</artifactId>
+        </dependency>
 
         <!-- LDClient and some of the more interesting providers -->
         <dependency>

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/23f0eaf3/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/parser/DefaultConfiguration.java
----------------------------------------------------------------------
diff --git a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/parser/DefaultConfiguration.java
b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/parser/DefaultConfiguration.java
index da60668..faba2d5 100644
--- a/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/parser/DefaultConfiguration.java
+++ b/libraries/ldpath/ldpath-core/src/main/java/org/apache/marmotta/ldpath/parser/DefaultConfiguration.java
@@ -60,6 +60,7 @@ public class DefaultConfiguration<Node> extends Configuration<Node>
{
         defNS.put("skos", "http://www.w3.org/2004/02/skos/core#");
         defNS.put("foaf", "http://xmlns.com/foaf/0.1/");
         defNS.put("dc", "http://purl.org/dc/elements/1.1/");
+        defNS.put("dct", "http://purl.org/dc/terms/");
         defNS.put("xsd", "http://www.w3.org/2001/XMLSchema#");
         defNS.put("lmf", "http://www.newmedialab.at/lmf/types/1.0/");
         defNS.put("fn", Constants.NS_LMF_FUNCS);

http://git-wip-us.apache.org/repos/asf/incubator-marmotta/blob/23f0eaf3/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index f5aed0b..a0e7429 100644
--- a/pom.xml
+++ b/pom.xml
@@ -282,10 +282,12 @@
                                                 <include name="target/*-src.zip*" />
                                                 <include name="launchers/marmotta-webapp/target/*-webapp.zip*"
/>
                                                 <include name="launchers/marmotta-installer/target/*-installer.zip*"
/>
+                                                <include name="libraries/ldpath/ldpath-backend-linkeddata/target/*-ldpath.zip*"
/>
 
                                                 <include name="target/*-src.tar.gz*" />
                                                 <include name="launchers/marmotta-webapp/target/*-webapp.tar.gz*"
/>
                                                 <include name="launchers/marmotta-installer/target/*-installer.tar.gz*"
/>
+                                                <include name="libraries/ldpath/ldpath-backend-linkeddata/target/*-ldpath.tar.gz*"
/>
                                                 <exclude name="*.asc.asc" />
                                             </fileset>
                                         </copy>


Mime
View raw message