Added: 
jena/trunk/jena-spatial/src/test/java/org/apache/jena/query/spatial/pfunction/solr/TestWestPFWithEmbeddedSolrSpatialIndex.java
URL: 
http://svn.apache.org/viewvc/jena/trunk/jena-spatial/src/test/java/org/apache/jena/query/spatial/pfunction/solr/TestWestPFWithEmbeddedSolrSpatialIndex.java?rev=1519358&view=auto
==============================================================================
--- 
jena/trunk/jena-spatial/src/test/java/org/apache/jena/query/spatial/pfunction/solr/TestWestPFWithEmbeddedSolrSpatialIndex.java
 (added)
+++ 
jena/trunk/jena-spatial/src/test/java/org/apache/jena/query/spatial/pfunction/solr/TestWestPFWithEmbeddedSolrSpatialIndex.java
 Mon Sep  2 06:46:19 2013
@@ -0,0 +1,49 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jena.query.spatial.pfunction.solr;
+
+import java.io.IOException;
+
+import org.apache.jena.query.spatial.SpatialIndexSolr;
+import org.apache.jena.query.spatial.SpatialQuery;
+import org.apache.jena.query.spatial.SpatialSearchUtil;
+import org.apache.jena.query.spatial.pfunction.AbstractTestWestPF;
+import org.junit.After;
+import org.junit.Before;
+
+/**
+ * This abstract class defines a setup configuration for a dataset with a 
Lucene
+ * index.
+ */
+public class TestWestPFWithEmbeddedSolrSpatialIndex extends
+               AbstractTestWestPF {
+
+       @Before
+       public void init() throws IOException {
+               dataset = 
SpatialSearchUtil.initInMemoryDatasetWithSolrSpatitalIndex();
+       }
+
+       @After
+       public void destroy() {
+               SpatialIndexSolr index = (SpatialIndexSolr) 
dataset.getContext().get(SpatialQuery.spatialIndex) ;
+               index.getServer().shutdown();
+               SpatialSearchUtil.deleteOldSolrDataDir();
+       }
+
+}

Propchange: 
jena/trunk/jena-spatial/src/test/java/org/apache/jena/query/spatial/pfunction/solr/TestWestPFWithEmbeddedSolrSpatialIndex.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: 
jena/trunk/jena-spatial/src/test/resources/SolrHome/SolrARQCollection/conf/schema.xml
URL: 
http://svn.apache.org/viewvc/jena/trunk/jena-spatial/src/test/resources/SolrHome/SolrARQCollection/conf/schema.xml?rev=1519358&view=auto
==============================================================================
--- 
jena/trunk/jena-spatial/src/test/resources/SolrHome/SolrARQCollection/conf/schema.xml
 (added)
+++ 
jena/trunk/jena-spatial/src/test/resources/SolrHome/SolrARQCollection/conf/schema.xml
 Mon Sep  2 06:46:19 2013
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<schema name="spatial" version="1.0">
+
+ <fields>
+        
+   <field name="uri" type="string" indexed="true" stored="true" 
required="true" multiValued="false" /> 
+
+   <field name="geo"  type="location_rpt"  indexed="true" stored="true"  
multiValued="true" /> 
+
+   <field name="_version_" type="long" indexed="true" stored="true" 
multiValued="false" />
+ </fields>
+
+
+ <!-- Field to use to determine and enforce document uniqueness. 
+      Unless this field is marked with required="false", it will be a required 
field
+   -->
+ <uniqueKey>uri</uniqueKey>
+
+ <types>
+    <!-- field type definitions. The "name" attribute is
+       just a label to be used by field definitions.  The "class"
+       attribute and any other attributes determine the real
+       behavior of the fieldType.
+         Class names starting with "solr" refer to java classes in a
+       standard package such as org.apache.solr.analysis
+    -->
+
+    <!-- The StrField type is not analyzed, but indexed/stored verbatim.
+       It supports doc values but in that case the field needs to be
+       single-valued and either required or have a default value.
+      -->
+    <fieldType name="string" class="solr.StrField" sortMissingLast="true" />
+
+    <fieldType name="location_rpt" 
class="solr.SpatialRecursivePrefixTreeFieldType"
+        geo="true" distErrPct="0.025" maxDistErr="0.000009" units="degrees" />
+
+    <fieldType name="long" class="solr.TrieLongField" precisionStep="0" 
positionIncrementGap="0"/>
+ </types>
+
+</schema>

Propchange: 
jena/trunk/jena-spatial/src/test/resources/SolrHome/SolrARQCollection/conf/schema.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: 
jena/trunk/jena-spatial/src/test/resources/SolrHome/SolrARQCollection/conf/solrconfig.xml
URL: 
http://svn.apache.org/viewvc/jena/trunk/jena-spatial/src/test/resources/SolrHome/SolrARQCollection/conf/solrconfig.xml?rev=1519358&view=auto
==============================================================================
--- 
jena/trunk/jena-spatial/src/test/resources/SolrHome/SolrARQCollection/conf/solrconfig.xml
 (added)
+++ 
jena/trunk/jena-spatial/src/test/resources/SolrHome/SolrARQCollection/conf/solrconfig.xml
 Mon Sep  2 06:46:19 2013
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<config>
+
+  <luceneMatchVersion>LUCENE_43</luceneMatchVersion>
+
+
+
+  <!-- Request Handlers 
+
+       http://wiki.apache.org/solr/SolrRequestHandler
+
+       Incoming queries will be dispatched to a specific handler by name
+       based on the path specified in the request.
+
+       Legacy behavior: If the request path uses "/select" but no Request
+       Handler has that name, and if handleSelect="true" has been specified in
+       the requestDispatcher, then the Request Handler is dispatched based on
+       the qt parameter.  Handlers without a leading '/' are accessed this way
+       like so: http://host/app/[core/]select?qt=name  If no qt is
+       given, then the requestHandler that declares default="true" will be
+       used or the one named "standard".
+
+       If a Request Handler is declared with startup="lazy", then it will
+       not be initialized until the first request that uses it.
+
+    -->
+  <!-- SearchHandler
+
+       http://wiki.apache.org/solr/SearchHandler
+
+       For processing Search Queries, the primary Request Handler
+       provided with Solr is "SearchHandler" It delegates to a sequent
+       of SearchComponents (see below) and supports distributed
+       queries across multiple shards
+    -->
+  <requestHandler name="/select" class="solr.SearchHandler">
+  </requestHandler>
+ 
+  <!-- Update Request Handler.  
+       
+       http://wiki.apache.org/solr/UpdateXmlMessages
+
+       The canonical Request Handler for Modifying the Index through
+       commands specified using XML, JSON, CSV, or JAVABIN
+
+       Note: Since solr1.1 requestHandlers requires a valid content
+       type header if posted in the body. For example, curl now
+       requires: -H 'Content-type:text/xml; charset=utf-8'
+       
+       To override the request content type and force a specific 
+       Content-type, use the request parameter: 
+         ?update.contentType=text/csv
+       
+       This handler will pick a response format to match the input
+       if the 'wt' parameter is not explicit
+    -->
+  <requestHandler name="/update" class="solr.UpdateRequestHandler">
+  </requestHandler>
+
+</config>

Propchange: 
jena/trunk/jena-spatial/src/test/resources/SolrHome/SolrARQCollection/conf/solrconfig.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: jena/trunk/jena-spatial/src/test/resources/SolrHome/solr.xml
URL: 
http://svn.apache.org/viewvc/jena/trunk/jena-spatial/src/test/resources/SolrHome/solr.xml?rev=1519358&view=auto
==============================================================================
--- jena/trunk/jena-spatial/src/test/resources/SolrHome/solr.xml (added)
+++ jena/trunk/jena-spatial/src/test/resources/SolrHome/solr.xml Mon Sep  2 
06:46:19 2013
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<solr persistent="true">
+<cores adminPath="/admin/cores" defaultCoreName="SolrARQCollection">
+<core name="SolrARQCollection" instanceDir="SolrARQCollection" />
+</cores>
+</solr>
\ No newline at end of file

Propchange: jena/trunk/jena-spatial/src/test/resources/SolrHome/solr.xml
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: jena/trunk/jena-spatial/src/test/resources/geoarq-data-1.ttl
URL: 
http://svn.apache.org/viewvc/jena/trunk/jena-spatial/src/test/resources/geoarq-data-1.ttl?rev=1519358&view=auto
==============================================================================
--- jena/trunk/jena-spatial/src/test/resources/geoarq-data-1.ttl (added)
+++ jena/trunk/jena-spatial/src/test/resources/geoarq-data-1.ttl Mon Sep  2 
06:46:19 2013
@@ -0,0 +1,86 @@
+@prefix : <http://localhost/jena_example/#> .
+@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
+
+@prefix dbp: <http://dbpedia.org/resource/> .
+@prefix airports: <http://airports.dataincubator.org/airports/> .
+@prefix airports_sc: <http://airports.dataincubator.org/schema/> .
+
+@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> .
+@prefix wkt: <http://www.opengis.net/ont/geosparql#> .
+
+airports:EGBB rdf:type airports_sc:LargeAirport ;
+    geo:lat "52.4539"^^xsd:float ;
+    geo:long "-1.74803"^^xsd:float ;
+    rdfs:label "Birmingham International Airport"
+    .
+
+airports:EGBB__Pair_1 rdf:type airports_sc:LargeAirport ;
+    :latitude_1 "52.4539"^^xsd:float ;
+    :longitude_1 "-1.74803"^^xsd:float ;
+    rdfs:label "Birmingham International Airport (Pair_1)"
+    .
+
+airports:EGBB_Pair_2 rdf:type airports_sc:LargeAirport ;
+    :latitude_2 "52.4539"^^xsd:float ;
+    :longitude_2 "-1.74803"^^xsd:float ;
+    rdfs:label "Birmingham International Airport (Pair_2)"
+    .
+
+airports:EGBB_WKT rdf:type airports_sc:LargeAirport ;
+    wkt:asWKT "POINT(-1.74803 52.4539)"^^wkt:wktLiteral ;
+    rdfs:label "Birmingham International Airport (wktLiteral)"
+    .
+
+airports:EGBB_WKT_1 rdf:type airports_sc:LargeAirport ;
+    :wkt_1 "POINT(-1.74803 52.4539)"^^wkt:wktLiteral ;
+    rdfs:label "Birmingham International Airport (wktLiteral_1)"
+    .
+
+airports:EGBB_WKT_2 rdf:type airports_sc:LargeAirport ;
+    :wkt_2 "POINT(-1.74803 52.4539)"^^wkt:wktLiteral ;
+    rdfs:label "Birmingham International Airport (wktLiteral_2)"
+    .
+
+airports:EGBB_String rdf:type airports_sc:LargeAirport ;
+    geo:lat "52.4539" ;
+    geo:long "-1.74803" ;
+    rdfs:label "Birmingham International Airport (String)"
+    .
+
+airports:EGFF rdf:type airports_sc:LargeAirport ;
+    geo:lat "51.3967"^^xsd:float ;
+    geo:long "-3.34333"^^xsd:float ;
+    rdfs:label "Cardiff International Airport"
+    .
+
+airports:EGGD rdf:type airports_sc:LargeAirport ;
+    geo:lat "51.3827"^^xsd:float ;
+    geo:long "-2.71909"^^xsd:float ;
+    rdfs:label "Bristol International Airport"
+    .
+
+airports:EGKK rdf:type airports_sc:LargeAirport ;
+    geo:lat "51.1481"^^xsd:float ;
+    geo:long "-0.190278"^^xsd:float ;
+    rdfs:label "London Gatwick Airport"
+    .
+
+airports:EGSS rdf:type airports_sc:LargeAirport ;
+    geo:lat "51.885"^^xsd:float ;
+    geo:long "0.235"^^xsd:float ;
+    rdfs:label "London Stansted Airport"
+    .
+
+airports:EGBB_Fake_In_Box rdf:type airports_sc:LargeAirport ;
+    wkt:asWKT "Polygon ((-2.0000 51.2000, 1.0000 51.2000, 1.0000 51.8000, 
-2.0000 51.8000, -2.0000 51.2000))"^^wkt:wktLiteral ;
+    rdfs:label "Fake in Box Airport (wktLiteral)"
+    .
+
+airports:EGBB_Fake_out_of_Box rdf:type airports_sc:LargeAirport ;
+    wkt:asWKT "Polygon ((-2.0000 50.2000, 1.0000 50.2000, 1.0000 50.8000, 
-2.0000 50.8000, -2.0000 50.2000))"^^wkt:wktLiteral ;
+    rdfs:label "Fake out of Box Airport (wktLiteral)"
+    .
+
+

Added: jena/trunk/jena-spatial/src/test/resources/geoarq-query-1.rq
URL: 
http://svn.apache.org/viewvc/jena/trunk/jena-spatial/src/test/resources/geoarq-query-1.rq?rev=1519358&view=auto
==============================================================================
--- jena/trunk/jena-spatial/src/test/resources/geoarq-query-1.rq (added)
+++ jena/trunk/jena-spatial/src/test/resources/geoarq-query-1.rq Mon Sep  2 
06:46:19 2013
@@ -0,0 +1,8 @@
+PREFIX : <http://example/>
+PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+PREFIX geoarq: <http://openjena.org/GeoARQ/property#>
+
+SELECT ?airport {
+    ?s geoarq:nearby (51.3000 -2.71000) .
+    ?s rdfs:label ?airport .
+}

Added: jena/trunk/jena-spatial/src/test/resources/log4j.properties
URL: 
http://svn.apache.org/viewvc/jena/trunk/jena-spatial/src/test/resources/log4j.properties?rev=1519358&view=auto
==============================================================================
--- jena/trunk/jena-spatial/src/test/resources/log4j.properties (added)
+++ jena/trunk/jena-spatial/src/test/resources/log4j.properties Mon Sep  2 
06:46:19 2013
@@ -0,0 +1,15 @@
+log4j.rootLogger=WARN, stdlog
+
+log4j.appender.stdlog=org.apache.log4j.ConsoleAppender
+## log4j.appender.stdlog.target=System.err
+log4j.appender.stdlog.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdlog.layout.ConversionPattern=%d{HH:mm:ss} %-5p %-25c{1} :: 
%m%n
+
+# Execution logging
+log4j.logger.com.hp.hpl.jena.arq.info=INFO
+log4j.logger.com.hp.hpl.jena.arq.exec=INFO
+
+## Solr can be noisy.
+log4j.logger.org.apache.solr=WARN
+log4j.logger.org.apache.solr.core.CoreContainer=FATAL
+log4j.logger.org.apache.solr.core.JmxMonitoredMap=FATAL

Propchange: jena/trunk/jena-spatial/src/test/resources/log4j.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: 
jena/trunk/jena-spatial/src/test/resources/spatial-config-spatialindexer.ttl
URL: 
http://svn.apache.org/viewvc/jena/trunk/jena-spatial/src/test/resources/spatial-config-spatialindexer.ttl?rev=1519358&view=auto
==============================================================================
--- 
jena/trunk/jena-spatial/src/test/resources/spatial-config-spatialindexer.ttl 
(added)
+++ 
jena/trunk/jena-spatial/src/test/resources/spatial-config-spatialindexer.ttl 
Mon Sep  2 06:46:19 2013
@@ -0,0 +1,49 @@
+## Example of a TDB dataset and spatial index
+
+@prefix :        <http://localhost/jena_example/#> .
+@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix tdb:     <http://jena.hpl.hp.com/2008/tdb#> .
+@prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .
+@prefix spatial: <http://jena.apache.org/spatial#> .
+
+# Spatial
+[] ja:loadClass "org.apache.jena.query.spatial.SpatialQuery" .
+spatial:SpatialtDataset  rdfs:subClassOf  ja:RDFDataset .
+#spatial:SpatialIndexSolr  rdfs:subClassOf  spatial:SpatialIndex .
+spatial:SpatialIndexLucene  rdfs:subClassOf   spatial:SpatialIndex .
+
+## ---------------------------------------------------------------
+## This URI must be fixed - it's used to assemble the spatial dataset.
+
+:spatial_dataset rdf:type     spatial:SpatialDataset ;
+    spatial:dataset   <#dataset> ;
+    ##spaital:index   <#indexSolr> ;
+    spatial:index     <#indexLucene> ;
+    .
+
+<#dataset> rdf:type ja:RDFDataset ;
+    ja:defaultGraph <#graph>;
+    .
+
+<#graph> rdf:type ja:MemoryModel ;
+    ja:content [ja:externalContent <file:geoarq-data-1.ttl> ] ;
+    .
+
+<#indexLucene> a spatial:SpatialIndexLucene ;
+    spatial:directory <file:Lucene> ;
+    #spatial:directory "mem" ;
+    spatial:definition <#definition> ;
+    .
+
+<#definition> a spatial:EntityDefinition ;
+    spatial:entityField      "uri" ;
+    spatial:geoField     "geo" ;
+    # custom geo predicates for 1) latitude/longitude
+    spatial:hasSpatialPredicatePairs (
+         [ spatial:latitude :latitude_1 ; spatial:longitude :longitude_1 ]
+         [ spatial:latitude :latitude_2 ; spatial:longitude :longitude_2 ]
+         ) ;
+    # custom geo predicates for 2) Well Known Text Literal
+    spatial:hasWKTPredicates (:wkt_1 :wkt_2) 
+    .

Added: jena/trunk/jena-spatial/src/test/resources/spatial-config.ttl
URL: 
http://svn.apache.org/viewvc/jena/trunk/jena-spatial/src/test/resources/spatial-config.ttl?rev=1519358&view=auto
==============================================================================
--- jena/trunk/jena-spatial/src/test/resources/spatial-config.ttl (added)
+++ jena/trunk/jena-spatial/src/test/resources/spatial-config.ttl Mon Sep  2 
06:46:19 2013
@@ -0,0 +1,51 @@
+## Example of a TDB dataset and spatial index
+
+@prefix :        <http://localhost/jena_example/#> .
+@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix tdb:     <http://jena.hpl.hp.com/2008/tdb#> .
+@prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .
+@prefix spatial: <http://jena.apache.org/spatial#> .
+
+# TDB
+[] ja:loadClass "com.hp.hpl.jena.tdb.TDB" .
+tdb:DatasetTDB  rdfs:subClassOf  ja:RDFDataset .
+tdb:GraphTDB    rdfs:subClassOf  ja:Model .
+
+# Spatial
+[] ja:loadClass "org.apache.jena.query.spatial.SpatialQuery" .
+spatial:SpatialtDataset  rdfs:subClassOf  ja:RDFDataset .
+#spatial:SpatialIndexSolr  rdfs:subClassOf  spatial:SpatialIndex .
+spatial:SpatialIndexLucene  rdfs:subClassOf   spatial:SpatialIndex .
+
+## ---------------------------------------------------------------
+## This URI must be fixed - it's used to assemble the spatial dataset.
+
+:spatial_dataset rdf:type     spatial:SpatialDataset ;
+    spatial:dataset   <#dataset> ;
+    ##spaital:index   <#indexSolr> ;
+    spatial:index     <#indexLucene> ;
+    .
+
+<#dataset> rdf:type      tdb:DatasetTDB ;
+    tdb:location "--mem--" ;
+    tdb:unionDefaultGraph true ;
+    .
+
+<#indexLucene> a spatial:SpatialIndexLucene ;
+    #spatial:directory <file:Lucene> ;
+    spatial:directory "mem" ;
+    spatial:definition <#definition> ;
+    .
+
+<#definition> a spatial:EntityDefinition ;
+    spatial:entityField      "uri" ;
+    spatial:geoField     "geo" ;
+    # custom geo predicates for 1) latitude/longitude
+    spatial:hasSpatialPredicatePairs (
+         [ spatial:latitude :latitude_1 ; spatial:longitude :longitude_1 ]
+         [ spatial:latitude :latitude_2 ; spatial:longitude :longitude_2 ]
+         ) ;
+    # custom geo predicates for 2) Well Known Text Literal
+    spatial:hasWKTPredicates (:wkt_1 :wkt_2) 
+    .

Added: jena/trunk/jena-spatial/src/test/resources/spatial-solr-config.ttl
URL: 
http://svn.apache.org/viewvc/jena/trunk/jena-spatial/src/test/resources/spatial-solr-config.ttl?rev=1519358&view=auto
==============================================================================
--- jena/trunk/jena-spatial/src/test/resources/spatial-solr-config.ttl (added)
+++ jena/trunk/jena-spatial/src/test/resources/spatial-solr-config.ttl Mon Sep  
2 06:46:19 2013
@@ -0,0 +1,48 @@
+ ## Example of a TDB dataset and spatial index
+
+@prefix :        <http://localhost/jena_example/#> .
+@prefix rdf:     <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
+@prefix rdfs:    <http://www.w3.org/2000/01/rdf-schema#> .
+@prefix tdb:     <http://jena.hpl.hp.com/2008/tdb#> .
+@prefix ja:      <http://jena.hpl.hp.com/2005/11/Assembler#> .
+@prefix spatial: <http://jena.apache.org/spatial#> .
+
+# TDB
+[] ja:loadClass "com.hp.hpl.jena.tdb.TDB" .
+tdb:DatasetTDB  rdfs:subClassOf  ja:RDFDataset .
+tdb:GraphTDB    rdfs:subClassOf  ja:Model .
+
+# Spatial
+[] ja:loadClass "org.apache.jena.query.spatial.SpatialQuery" .
+spatial:SpatialDataset   rdfs:subClassOf   ja:RDFDataset .
+spatial:SpatialIndexSolr rdfs:subClassOf   spatial:SpatialIndex .
+
+## ---------------------------------------------------------------
+## This URI must be fixed - it's used to assemble the spatial dataset.
+
+:spatial_dataset rdf:type     spatial:SpatialDataset ;
+    spatial:dataset <#dataset> ;
+    spatial:index   <#indexSolr> ;
+    .
+
+<#dataset> rdf:type      tdb:DatasetTDB ;
+    tdb:location "--mem--" ;
+    .
+
+<#indexSolr> a spatial:SpatialIndexSolr ;
+    spatial:server <embedded:SolrARQCollection> ;
+    spatial:solrHome <file:SolrHome> ;
+    spatial:definition <#definition> ;
+    .
+
+<#definition> a spatial:EntityDefinition ;
+    spatial:entityField      "uri" ;
+    spatial:geoField     "geo" ;
+    # custom geo predicates for 1) latitude/longitude
+    spatial:hasSpatialPredicatePairs (
+         [ spatial:latitude :latitude_1 ; spatial:longitude :longitude_1 ]
+         [ spatial:latitude :latitude_2 ; spatial:longitude :longitude_2 ]
+         ) ;
+    # custom geo predicates for 2) Well Known Text Literal
+    spatial:hasWKTPredicates (:wkt_1 :wkt_2) ;
+    .


Reply via email to