Author: wikier
Date: Fri Sep 11 13:05:14 2015
New Revision: 1702452

URL: http://svn.apache.org/r1702452
Log:
update the part of the site talking about the sparql extension, to have 
something where put the MARMOTTA-584 end-user documentation

Added:
    marmotta/site/trunk/content/markdown/kiwi/geosparql.md.vm
    marmotta/site/trunk/content/markdown/kiwi/sparql-extensions.md.vm
    marmotta/site/trunk/content/markdown/kiwi/sparql-full-text.md.vm
    marmotta/site/trunk/content/markdown/kiwi/sparql-mm.md.vm
    marmotta/site/trunk/content/markdown/kiwi/sparql-statistics.md.vm
Modified:
    marmotta/site/trunk/content/markdown/kiwi/sparql.md.vm
    marmotta/site/trunk/content/site.xml

Added: marmotta/site/trunk/content/markdown/kiwi/geosparql.md.vm
URL: 
http://svn.apache.org/viewvc/marmotta/site/trunk/content/markdown/kiwi/geosparql.md.vm?rev=1702452&view=auto
==============================================================================
--- marmotta/site/trunk/content/markdown/kiwi/geosparql.md.vm (added)
+++ marmotta/site/trunk/content/markdown/kiwi/geosparql.md.vm Fri Sep 11 
13:05:14 2015
@@ -0,0 +1,74 @@
+<head>
+  <title>GeoSPARQL</title> <!-- awaiting for 
https://jira.codehaus.org/browse/DOXIA-472 -->
+  <meta name="keywords" content="KiWi, Triple Store, Quadrupel Store, KiWi 
Triple Store, RDF, Sesame API, Sail, Database, relational Database, RDB, 
SPARQL, PostgreSQL, MySQL, H2, geospatial, geosparql" />
+</head>
+
+# GeoSPARQL #
+
+The [OGC GeoSPARQL](http://www.opengeospatial.org/standards/geosparql) 
standard supports representing and querying 
+geospatial data on the Semantic Web. GeoSPARQL defines a vocabulary for 
representing geospatial data in RDF, and it 
+defines an extension to the SPARQL query language for processing geospatial 
data. In addition, GeoSPARQL is designed 
+to accommodate systems based on qualitative spatial reasoning and systems 
based on quantitative spatial computations.
+
+In cooperation with the 
[GSoC2015](https://www.google-melange.com/gsoc/project/details/google/gsoc2015/fernandobac03/5707702298738688),
+in version `3.4.0` we have added GeoSPARQL support to our 
[SPARQL](sparql.html) implementation. 
+
+Further technical details can be found [in the 
wiki](https://wiki.apache.org/marmotta/GSoC/2015/MARMOTTA-584).
+
+
+Maven Artifact
+--------------
+
+The GeoSPARQL implementation is available in the `kiwi-geosparql` module. To
+include it in a project that uses the KiWi Triple Store, add the following
+dependency to your Maven project:
+
+     <dependency>
+         <groupId>org.apache.marmotta</groupId>
+         <artifactId>kiwi-geosparql</artifactId>
+         <version>${projectVersion}</version>
+     </dependency>
+
+
+Installation Considerations
+---------------------------
+
+Please, take into account that GeoSPARQL support is **only** available when 
you are using PostgreSQL as backend for KiWi.
+
+In PostgreSQL, it is necessary to install the [PostGIS](http://postgis.net/) 
extension into the Marmotta database. Depending 
+on your operating system and distribution, this might also require 
installation of additional software packages (under Debian: 
+`postgresql-9.3-postgis-scripts`). To install the `postgis` extension, connect 
to the database as superuser and run:
+
+    CREATE EXTENSION IF NOT EXISTS postgis;    
+
+
+Example
+-----
+
+The following query shows an example how to use the extension for the language:
+
+```SPARQL
+PREFIX geoes: <http://geo.marmotta.es/ontology#>
+PREFIX geo: <http://www.opengis.net/ont/geosparql#>
+PREFIX geof: <http://www.opengis.net/def/function/geosparql/>
+
+SELECT DISTINCT ?labelMunicipios 
+WHERE {  
+  ?subject a <http://geo.marmotta.es/ontology#provincia>.
+  ?subject rdfs:label "Madrid"@es.
+  ?subject geoes:hasExactGeometry ?geo.
+  ?geo geo:asWKT ?wkt.
+  
+  ?subject2 a <http://geo.marmotta.es/ontology#municipio>.
+  ?subject2 rdfs:label ?labelMunicipios.
+  ?subject2 geoes:hasExactGeometry ?geo2.
+  ?geo2 geo:asWKT ?wkt2.
+  
+  FILTER (geof:sfContains(?wkt, ?wkt2))
+} 
+ORDER BY ?labelMunicipios
+LIMIT 10
+```
+
+You can find more usage examples at the [user 
documentation](https://wiki.apache.org/marmotta/MARMOTTA-584/UserDocumentation).
+

Added: marmotta/site/trunk/content/markdown/kiwi/sparql-extensions.md.vm
URL: 
http://svn.apache.org/viewvc/marmotta/site/trunk/content/markdown/kiwi/sparql-extensions.md.vm?rev=1702452&view=auto
==============================================================================
--- marmotta/site/trunk/content/markdown/kiwi/sparql-extensions.md.vm (added)
+++ marmotta/site/trunk/content/markdown/kiwi/sparql-extensions.md.vm Fri Sep 
11 13:05:14 2015
@@ -0,0 +1,15 @@
+<head>
+  <title>SPARQL Extensions</title> <!-- awaiting for 
https://jira.codehaus.org/browse/DOXIA-472 -->
+  <meta name="keywords" content="KiWi, Triple Store, Quadrupel Store, KiWi 
Triple Store, RDF, Sesame API, Sail, Database, relational Database, RDB, 
SPARQL, PostgreSQL, MySQL, H2, stadistical, aggregation" />
+</head>
+
+# SPARQL Extensions #
+
+Starting with the development version of 3.2, Apache Marmotta also provides 
some extensions
+to [SPARQL 1.1](sparql.html):
+
+* [Full-text search and query](sparql-full-text.html)
+* [Statistical aggregation](sparql-statistics.html)
+* [GeoSPARQL](geosparql.html)
+* [SPARQL-MM](sparql-mm.html)
+

Added: marmotta/site/trunk/content/markdown/kiwi/sparql-full-text.md.vm
URL: 
http://svn.apache.org/viewvc/marmotta/site/trunk/content/markdown/kiwi/sparql-full-text.md.vm?rev=1702452&view=auto
==============================================================================
--- marmotta/site/trunk/content/markdown/kiwi/sparql-full-text.md.vm (added)
+++ marmotta/site/trunk/content/markdown/kiwi/sparql-full-text.md.vm Fri Sep 11 
13:05:14 2015
@@ -0,0 +1,51 @@
+<head>
+  <title>SPARQL Full-Text Extension</title> <!-- awaiting for 
https://jira.codehaus.org/browse/DOXIA-472 -->
+  <meta name="keywords" content="KiWi, Triple Store, Quadrupel Store, KiWi 
Triple Store, RDF, Sesame API, Sail, Database, relational Database, RDB, 
SPARQL, PostgreSQL, MySQL, H2, Full-Text" />
+</head>
+
+# SPARQL Full-Text Extension #
+
+Full-text search works over the literal values of nodes and differs from 
normal literal
+queries or regexp filters in that it applies language-specific lingustic 
processing (e.g.
+stemming and stop-word elimination).
+
+Full-text search currently offers two [SPARQL](sparql.html) functions that can 
be used in
+the `FILTER` part of a query and return boolean values (found or not found):
+
+* `fulltext-search(text, query, [language])`: searches "text" for the words
+  occurring in "query", optionally applying the language-specific processing 
for
+  the given language; query is a simple text literal (list of words) without 
any
+  boolean connectors; words are AND connected, i.e. all words have to be found
+  in the text for a successful match
+* `fulltext-query(text, query, [language])`: searches "text" using the boolean
+  query string passed in "query", optionally applying language-specific
+  processing for the given language; query is a boolean query string following
+  the [syntax used by 
PostgreSQL](http://www.postgresql.org/docs/9.3/static/textsearch-controls.html#TEXTSEARCH-PARSING-QUERIES).
+
+Note that full-text search is only available when using backend databases that
+support this functionality (currently only PostgreSQL and MySQL). Only
+PostgreSQL has real support for language specific processing. Also note that
+performance heavily depends on the availability of an appropriate full-text
+index in the database. The KiWi SPARQL module will automatically create
+full-text indexes for the languages configured in the KiWiConfiguration used 
for
+creating the triple store.
+
+The KiWi SPARQL module comes with its own these extensions:
+
+    PREFIX mm: <http://marmotta.apache.org/vocabulary/sparql-functions#>
+
+The following example searches for the word "software" occurring in the
+dc:description field of the resource using the literal language of
+dc:description:
+
+    PREFIX foaf: <http://xmlns.com/foaf/0.1/>
+    PREFIX dc: <http://purl.org/dc/elements/1.1/>
+    PREFIX mm: <http://marmotta.apache.org/vocabulary/sparql-functions#>
+
+    SELECT ?p1 ?fn ?age WHERE {
+        ?p1 foaf:name ?fn .
+        ?p1 foaf:age ?age .
+        ?p1 dc:description ?desc .
+        FILTER( mm:fulltext-search(str(?desc), "software", lang(?desc)) )
+    }
+

Added: marmotta/site/trunk/content/markdown/kiwi/sparql-mm.md.vm
URL: 
http://svn.apache.org/viewvc/marmotta/site/trunk/content/markdown/kiwi/sparql-mm.md.vm?rev=1702452&view=auto
==============================================================================
--- marmotta/site/trunk/content/markdown/kiwi/sparql-mm.md.vm (added)
+++ marmotta/site/trunk/content/markdown/kiwi/sparql-mm.md.vm Fri Sep 11 
13:05:14 2015
@@ -0,0 +1,102 @@
+<head>
+  <title>SPARQL-MM: Extending SPARQL to Multimedia</title> <!-- awaiting for 
https://jira.codehaus.org/browse/DOXIA-472 -->
+  <meta name="keywords" content="KiWi, Triple Store, Quadrupel Store, KiWi 
Triple Store, RDF, Sesame API, Sail, Database, relational Database, RDB, 
SPARQL, PostgreSQL, MySQL, H2, multimedia" />
+</head>
+
+[SPARQL-MM](https://github.com/tkurz/sparql-mm) is a multimedia-extension for 
[SPARQL 1.1](sparql.html) 
+implemented for [Sesame](http://www.openrdf.org/). By now it supports 
relation, aggregation and accessor functions for Media 
+Fragments [URI 1.0](http://www.w3.org/TR/media-frags/) - and features are 
constantly extended. It is still an unofficial extension 
+for Apache Marmotta, currently developed [at 
GitHub](https://github.com/tkurz/sparql-mm).
+
+SPARQL-MM can easily appended to any Sesame Triplestore via Java Class Loader 
Technology. The package is available on
+[Maven 
Central](http://search.maven.org/#artifactdetails%7Ccom.github.tkurz%7Csparql-mm%7C1.0%7Cjar).
+
+```XML
+<dependency>
+    <groupId>com.github.tkurz</groupId>
+    <artifactId>sparql-mm</artifactId>
+    <version>1.0</version>
+</dependency>
+```
+
+Here we just show a few functions that are supported. Get more examples within 
the 
[tests](https://github.com/tkurz/sparql-mm/blob/master/src/test/java/com/github/tkurz/sparqlmm).
+All list of all supported functions can be found 
[here](https://github.com/tkurz/sparql-mm/blob/master/ns/1.0.0/function/index.md).
+
+Temporal Relations
+------------------
+
+```SPARQL
+PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+PREFIX mm: <http://linkedmultimedia.org/sparql-mm/ns/1.0.0/function#>
+
+SELECT ?t1 ?t2 WHERE {
+    ?f1 rdfs:label ?t1.
+    ?f2 rdfs:label ?t2.
+    FILTER mm:precedes(?f1,?f2)
+} ORDER BY ?t1 ?t2
+```
+
+Temporal Aggregation
+--------------------
+
+```SPARQL
+PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+PREFIX mm:  <http://linkedmultimedia.org/sparql-mm/ns/1.0.0/function#>
+
+SELECT ?f1 ?f2 (mm:temporalIntermediate(?f1,?f2) AS ?box) WHERE {
+    ?f1 rdfs:label "a".
+    ?f2 rdfs:label "b".
+}
+```
+
+Spatial Relations
+-----------------
+
+```SPARQL
+PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+PREFIX mm: <http://linkedmultimedia.org/sparql-mm/ns/1.0.0/function#>
+
+SELECT ?t1 ?t2 WHERE {
+    ?f1 rdfs:label ?t1.
+    ?f2 rdfs:label ?t2.
+    FILTER mm:rightBeside(?f1,?f2)
+} ORDER BY ?t1 ?t2
+```
+
+Spatial Aggregation
+-------------------
+
+```SPARQL
+PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+PREFIX mm:  <http://linkedmultimedia.org/sparql-mm/ns/1.0.0/function#>
+
+SELECT ?f1 ?f2 (mm:spatialIntersection(?f1,?f2) AS ?box) WHERE {
+    ?f1 rdfs:label "a".
+    ?f2 rdfs:label "b".
+}
+```
+
+Combined Aggregation
+--------------------
+
+```SPARQL
+PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+PREFIX mm:  <http://linkedmultimedia.org/sparql-mm/ns/1.0.0/function#>
+
+SELECT ?f1 ?f2 (mm:boundingBox(?f1,?f2) AS ?box) WHERE {
+    ?f1 rdfs:label "a".
+    ?f2 rdfs:label "b".
+}
+```
+
+### Accessor Method
+
+```SPARQL
+PREFIX ma: <http://www.w3.org/ns/ma-ont#>
+PREFIX mm: <http://linkedmultimedia.org/sparql-mm/ns/1.0.0/function#>
+
+SELECT ?f1 WHERE {
+    ?f1 a ma:MediaFragment.
+} ORDER BY mm:duration(?f1)
+```
+

Added: marmotta/site/trunk/content/markdown/kiwi/sparql-statistics.md.vm
URL: 
http://svn.apache.org/viewvc/marmotta/site/trunk/content/markdown/kiwi/sparql-statistics.md.vm?rev=1702452&view=auto
==============================================================================
--- marmotta/site/trunk/content/markdown/kiwi/sparql-statistics.md.vm (added)
+++ marmotta/site/trunk/content/markdown/kiwi/sparql-statistics.md.vm Fri Sep 
11 13:05:14 2015
@@ -0,0 +1,13 @@
+<head>
+  <title>Statistical Aggregation Extension</title> <!-- awaiting for 
https://jira.codehaus.org/browse/DOXIA-472 -->
+  <meta name="keywords" content="KiWi, Triple Store, Quadrupel Store, KiWi 
Triple Store, RDF, Sesame API, Sail, Database, relational Database, RDB, 
SPARQL, PostgreSQL, MySQL, H2, stadistical, aggregation" />
+</head>
+
+# Statistical Aggregation Extension #
+
+Beyond the standard [SPARQL](sparql.html) functions, Apache Marmotta also 
supports the following 
+additional aggregation functions when using the PostgreSQL backend:
+
+* `mm:stddev(number)` (statistics) returns the standard deviation of its 
arguments
+* `mm:variance(number)` (statistics) returns the variance of its arguments
+

Modified: marmotta/site/trunk/content/markdown/kiwi/sparql.md.vm
URL: 
http://svn.apache.org/viewvc/marmotta/site/trunk/content/markdown/kiwi/sparql.md.vm?rev=1702452&r1=1702451&r2=1702452&view=diff
==============================================================================
--- marmotta/site/trunk/content/markdown/kiwi/sparql.md.vm (original)
+++ marmotta/site/trunk/content/markdown/kiwi/sparql.md.vm Fri Sep 11 13:05:14 
2015
@@ -35,6 +35,18 @@ dependency to your Maven project:
      </dependency>
 
 
+Marmotta Extensions
+-------------------
+
+Starting with the development version of 3.2, Apache Marmotta also provides 
some 
+[extensions](sparql-extensions.html) to SPARQL 1.1:
+
+* [Full-text search and query](sparql-full-text.html)
+* [Statistical aggregation](sparql-statistics.html)
+* [GeoSPARQL](geosparql.html)
+* [SPARQL-MM](sparql-mm.html)
+
+
 Crypto Extensions
 -----------------
 
@@ -60,69 +72,6 @@ You can also use a graphical UI like pga
 server).
 
 
-Marmotta Extensions
--------------------
-
-Starting with the development version of Apache Marmotta 3.2, there is also
-extended function support in SPARQL. The KiWi SPARQL module comes with its own
-namespace for SPARQL extensions:
-
-PREFIX mm: <http://marmotta.apache.org/vocabulary/sparql-functions#>
-
-### Full-Text Search (3.2 and above)
-
-Full-text search works over the literal values of nodes and differs from 
normal literal
-queries or regexp filters in that it applies language-specific lingustic 
processing (e.g.
-stemming and stop-word elimination).
-
-
-Full-text search currently offers two SPARQL functions that can be used in the
-FILTER part of a query and return boolean values (found or not found):
-
-* `fulltext-search(text, query, [language])`: searches "text" for the words
-  occurring in "query", optionally applying the language-specific processing 
for
-  the given language; query is a simple text literal (list of words) without 
any
-  boolean connectors; words are AND connected, i.e. all words have to be found
-  in the text for a successful match
-* `fulltext-query(text, query, [language])`: searches "text" using the boolean
-  query string passed in "query", optionally applying language-specific
-  processing for the given language; query is a boolean query string following
-  the [syntax used by PostgreSQL][2]
-
-[2]: 
http://www.postgresql.org/docs/9.3/static/textsearch-controls.html#TEXTSEARCH-PARSING-QUERIES
-
-Note that full-text search is only available when using backend databases that
-support this functionality (currently only PostgreSQL and MySQL). Only
-PostgreSQL has real support for language specific processing. Also note that
-performance heavily depends on the availability of an appropriate full-text
-index in the database. The KiWi SPARQL module will automatically create
-full-text indexes for the languages configured in the KiWiConfiguration used 
for
-creating the triple store.
-
-The following example searches for the word "software" occurring in the
-dc:description field of the resource using the literal language of
-dc:description:
-
-    PREFIX foaf: <http://xmlns.com/foaf/0.1/>
-    PREFIX dc: <http://purl.org/dc/elements/1.1/>
-    PREFIX mm: <http://marmotta.apache.org/vocabulary/sparql-functions#>
-
-    SELECT ?p1 ?fn ?age WHERE {
-        ?p1 foaf:name ?fn .
-        ?p1 foaf:age ?age .
-        ?p1 dc:description ?desc .
-        FILTER( mm:fulltext-search(str(?desc), "software", lang(?desc)) )
-    }
-
-### Aggregation Functions
-
-Beyond the standard SPARQL functions, Apache Marmotta also supports the 
following additional aggregation
-functions when using the PostgreSQL backend:
-
-* `mm:stddev(number)` (statistics) returns the standard deviation of its 
arguments
-* `mm:variance(number)` (statistics) returns the variance of its arguments
-
-
 
 Performance Considerations
 --------------------------

Modified: marmotta/site/trunk/content/site.xml
URL: 
http://svn.apache.org/viewvc/marmotta/site/trunk/content/site.xml?rev=1702452&r1=1702451&r2=1702452&view=diff
==============================================================================
--- marmotta/site/trunk/content/site.xml (original)
+++ marmotta/site/trunk/content/site.xml Fri Sep 11 13:05:14 2015
@@ -102,8 +102,14 @@
             <item name="KiWi Triple Store" href="kiwi" collapse="true">
                 <item name="Introduction" href="kiwi/index.html" />
                 <item name="Store" href="kiwi/triplestore.html" />
-                <item name="Transactions" href="kiwi/transactions.html" />
                 <item name="SPARQL" href="kiwi/sparql.html" />
+                <item name="SPARQL Extensions" 
href="kiwi/sparql-extensions.html" collapse="true">
+                    <item name="Full-text" href="kiwi/sparql-full-text.html" />
+                    <item name="Statistics" href="kiwi/sparql-statistics.html" 
/>
+                    <item name="GeoSPARQL" href="kiwi/geosparql.html" />
+                    <item name="SPARQL-MM" href="kiwi/sparql-mm.html" />
+                </item>
+                <item name="Transactions" href="kiwi/transactions.html" />
                 <item name="Triple Table" href="kiwi/tripletable.html" />
                 <item name="Reasoner" href="kiwi/reasoner.html" />
                 <item name="Versioning" href="kiwi/versioning.html" />


Reply via email to