[jira] [Commented] (JENA-2230) Assembler for GeoSPARQL

2021-12-29 Thread Andy Seaborne (Jira)


[ 
https://issues.apache.org/jira/browse/JENA-2230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17466547#comment-17466547
 ] 

Andy Seaborne commented on JENA-2230:
-

Hi Greg,

I'm not sure the best way to hook into update in this case. In other places 
there is a dataset that wraps the base dataset so it sees "add(quad)" etc. e.g. 
 That might be the way here.

The changes intercepted in jena-text (which is quite old so there may be 
equivalent general ways elsewhere):

[https://github.com/apache/jena/blob/main/jena-text/src/main/java/org/apache/jena/query/text/changes/DatasetGraphTextMonitor.java]

DatasetGraphText is the query/search machinery.

DatasetGraphTextMonitor is a DatasetGraphWrapper But this does get entangled 
with transactions because a change may not happen for real.

To simplify that, the transaction support could be MRSW (Multiple reader OR 
Single Writer), not "AND Single Writer".

We can create some space for ourselves - the documentation for the assembler 
can initially say "read-only".

The other case is updating the TDB database offline. All we can do is say 
"delete the spatial.index" and it will be rebuilt on start-up. That isn't too 
bad.

 

 

 

> Assembler for GeoSPARQL
> ---
>
> Key: JENA-2230
> URL: https://issues.apache.org/jira/browse/JENA-2230
> Project: Apache Jena
>  Issue Type: New Feature
>  Components: GeoSPARQL
>Affects Versions: Jena 4.3.2
>Reporter: Andy Seaborne
>Assignee: Andy Seaborne
>Priority: Major
> Fix For: Jena 4.4.0
>
>
> An assembler for the GeoSPARQL engine.
> This is for {{jena-geosparql}}, making it a loadable module for Jena and 
> usable with any Fuseki server.
> jena-fuseki-geosparql and its command line are unchanged.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (JENA-2230) Assembler for GeoSPARQL

2021-12-29 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/JENA-2230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17466522#comment-17466522
 ] 

ASF subversion and git services commented on JENA-2230:
---

Commit 9517b3b52f978ebea1cf35ef595db8edc49d7c53 in jena's branch 
refs/heads/main from Andy Seaborne
[ https://gitbox.apache.org/repos/asf?p=jena.git;h=9517b3b ]

Merge pull request #1142 from afs/geosparql

JENA-2230: GeoSPARQL assembler

> Assembler for GeoSPARQL
> ---
>
> Key: JENA-2230
> URL: https://issues.apache.org/jira/browse/JENA-2230
> Project: Apache Jena
>  Issue Type: New Feature
>  Components: GeoSPARQL
>Affects Versions: Jena 4.3.2
>Reporter: Andy Seaborne
>Assignee: Andy Seaborne
>Priority: Major
> Fix For: Jena 4.4.0
>
>
> An assembler for the GeoSPARQL engine.
> This is for {{jena-geosparql}}, making it a loadable module for Jena and 
> usable with any Fuseki server.
> jena-fuseki-geosparql and its command line are unchanged.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (JENA-2230) Assembler for GeoSPARQL

2021-12-29 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/JENA-2230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17466518#comment-17466518
 ] 

ASF subversion and git services commented on JENA-2230:
---

Commit 57f5a9c425fd2eff000c2ca2b062fbeb769b984d in jena's branch 
refs/heads/main from Andy Seaborne
[ https://gitbox.apache.org/repos/asf?p=jena.git;h=57f5a9c ]

JENA-2230: Remove printing in tests


> Assembler for GeoSPARQL
> ---
>
> Key: JENA-2230
> URL: https://issues.apache.org/jira/browse/JENA-2230
> Project: Apache Jena
>  Issue Type: New Feature
>  Components: GeoSPARQL
>Affects Versions: Jena 4.3.2
>Reporter: Andy Seaborne
>Assignee: Andy Seaborne
>Priority: Major
> Fix For: Jena 4.4.0
>
>
> An assembler for the GeoSPARQL engine.
> This is for {{jena-geosparql}}, making it a loadable module for Jena and 
> usable with any Fuseki server.
> jena-fuseki-geosparql and its command line are unchanged.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (JENA-2230) Assembler for GeoSPARQL

2021-12-29 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/JENA-2230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17466519#comment-17466519
 ] 

ASF subversion and git services commented on JENA-2230:
---

Commit 5e7bbd80f904dabca471e47dc5fb775365364cf9 in jena's branch 
refs/heads/main from Andy Seaborne
[ https://gitbox.apache.org/repos/asf?p=jena.git;h=5e7bbd8 ]

JENA-2230: GeoSPARQL assembler


> Assembler for GeoSPARQL
> ---
>
> Key: JENA-2230
> URL: https://issues.apache.org/jira/browse/JENA-2230
> Project: Apache Jena
>  Issue Type: New Feature
>  Components: GeoSPARQL
>Affects Versions: Jena 4.3.2
>Reporter: Andy Seaborne
>Assignee: Andy Seaborne
>Priority: Major
> Fix For: Jena 4.4.0
>
>
> An assembler for the GeoSPARQL engine.
> This is for {{jena-geosparql}}, making it a loadable module for Jena and 
> usable with any Fuseki server.
> jena-fuseki-geosparql and its command line are unchanged.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (JENA-2230) Assembler for GeoSPARQL

2021-12-29 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/JENA-2230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17466520#comment-17466520
 ] 

ASF subversion and git services commented on JENA-2230:
---

Commit b7fd4697b51364dbc75f7d56d0d46e1e92927e9d in jena's branch 
refs/heads/main from Andy Seaborne
[ https://gitbox.apache.org/repos/asf?p=jena.git;h=b7fd469 ]

JENA-2230: GeoSPARQL integration tests


> Assembler for GeoSPARQL
> ---
>
> Key: JENA-2230
> URL: https://issues.apache.org/jira/browse/JENA-2230
> Project: Apache Jena
>  Issue Type: New Feature
>  Components: GeoSPARQL
>Affects Versions: Jena 4.3.2
>Reporter: Andy Seaborne
>Assignee: Andy Seaborne
>Priority: Major
> Fix For: Jena 4.4.0
>
>
> An assembler for the GeoSPARQL engine.
> This is for {{jena-geosparql}}, making it a loadable module for Jena and 
> usable with any Fuseki server.
> jena-fuseki-geosparql and its command line are unchanged.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (JENA-2230) Assembler for GeoSPARQL

2021-12-28 Thread Greg Albiston (Jira)


[ 
https://issues.apache.org/jira/browse/JENA-2230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17466110#comment-17466110
 ] 

Greg Albiston commented on JENA-2230:
-

Thank you for adding this in. It is a big step closer to {{fuseki-geosparql}} 
not being needed (and possibly the data loading command moving to {{jena-cmd 
}}or equivalent).

About GeoSPARQL's handling of update, it is only the spatial index that is a 
concern. The rest of the functionality checks the dataset on-demand as part of 
the SPARQL query engine's property and filter functions.

When setting up the {{fuseki-geosparql}} application, it wasn't clear, or 
documented as far as I could tell, how to hook into update queries to add or 
remove geometries to the spatial index.  At the time, the JTS library only 
offered a read-only (after setup) StrTree and a write QuadTree (with the latter 
requiring additional filter checks for validity). Since Fuseki at the time 
required a restart when using inferencing with updates, the same approach was 
followed for the use of spatial indexes and the StrTree selected.

The JTS spatial indexes have a common interface, so switching to one of the 
alternatives should be straightforward and several more have been implemented 
since (see {{{}org.apache.jena.geosparql.spatial.SpatialIndex in GeoSPARQL 
module and org.locationtech.jts.index [JTS 
library|https://locationtech.github.io/jts/javadoc/org/locationtech/jts/index/package-frame.html]{}}}).

It then just comes down to how the SPARQL query engine notifies of update 
queries, so these can be passed to the spatial index. The spatial index is 
stored in the Dataset Context during setup and provided to the property and 
filter functions during querying.

If I can be pointed in the right direction then I can look to resolve updating 
the spatial index?

> Assembler for GeoSPARQL
> ---
>
> Key: JENA-2230
> URL: https://issues.apache.org/jira/browse/JENA-2230
> Project: Apache Jena
>  Issue Type: New Feature
>  Components: GeoSPARQL
>Affects Versions: Jena 4.3.2
>Reporter: Andy Seaborne
>Assignee: Andy Seaborne
>Priority: Major
> Fix For: Jena 4.4.0
>
>
> An assembler for the GeoSPARQL engine.
> This is for {{jena-geosparql}}, making it a loadable module for Jena and 
> usable with any Fuseki server.
> jena-fuseki-geosparql and its command line are unchanged.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (JENA-2230) Assembler for GeoSPARQL

2021-12-27 Thread Andy Seaborne (Jira)


[ 
https://issues.apache.org/jira/browse/JENA-2230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17465729#comment-17465729
 ] 

Andy Seaborne commented on JENA-2230:
-

Yes, you can wrap a TDB dataset to add GeoSPARQL capability, or indeed any 
other kind of dataset.
The {{spatial.index}} file is generated if it does not exist or is empty, or 
built on startup each time. I'm still not clear what happens in GeoSPARQL about 
update.

Most of {{DatasetOperations}} is concerned with setting up the base data. The 
steps to setup the dataset, uncoupled from command line {{ArgsConfig}} are done 
in the assembler. There didn't seem to be much opportunity to share code so for 
simplicity and a smooth transition {{jena-fuseki-geosparql}} has been left 
alone.

A simple setup:
{noformat}
<#geo_ds> rdf:type geosparql:geosparqlDataset ;
geosparql:inference true;
geosparql:spatialIndexFile"DB2/spatial.index";
geosparql:dataset <#baseDataset> .

<#baseDataset> rdf:type tdb2:DatasetTDB2 ;
tdb2:location "DB2" .
{noformat}

Temporary: development code:
[GeoAssembler|https://github.com/afs/jena/blob/geosparql/jena-geosparql/src/main/java/org/apache/jena/geosparql/system/GeoAssembler.java]

BTW: You can add Shiro to Fuseki main if you really want to. 
{{ExFusekiMain_2_AddShiro}} -- and now it should be considerably shorter with 
FusekiModules hooking in as the server starts up.  Separate conversation!

> Assembler for GeoSPARQL
> ---
>
> Key: JENA-2230
> URL: https://issues.apache.org/jira/browse/JENA-2230
> Project: Apache Jena
>  Issue Type: New Feature
>  Components: GeoSPARQL
>Affects Versions: Jena 4.3.2
>Reporter: Andy Seaborne
>Assignee: Andy Seaborne
>Priority: Major
> Fix For: Jena 4.4.0
>
>
> An assembler for the GeoSPARQL engine.
> This is for {{jena-geosparql}}, making it a loadable module for Jena and 
> usable with any Fuseki server.
> jena-fuseki-geosparql and its command line are unchanged.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)


[jira] [Commented] (JENA-2230) Assembler for GeoSPARQL

2021-12-26 Thread Jira


[ 
https://issues.apache.org/jira/browse/JENA-2230?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17465568#comment-17465568
 ] 

Lorenz Bühmann commented on JENA-2230:
--

Nice, definitely something that is missing for a long time. So far there is no 
way to wrap a dataset with GeoSPARQL support, or at least I could no find it. 
And using the {{jena-fuseki-geosparql}} as a server prevents using it in 
combination with
 * e.g. a text index
 * Apache Shiro security as it is only an embedded Fuseki in the end

 

So does it mean, we can wrap in an assembler file a TDB dataset in a GeoSPARQL 
dataset? Otherwise we would still have to work on the index spatial index setup 
as it is done in {{GeosparqlServer}} class via {{DatasetOperations}} class.

> Assembler for GeoSPARQL
> ---
>
> Key: JENA-2230
> URL: https://issues.apache.org/jira/browse/JENA-2230
> Project: Apache Jena
>  Issue Type: New Feature
>  Components: GeoSPARQL
>Affects Versions: Jena 4.3.2
>Reporter: Andy Seaborne
>Assignee: Andy Seaborne
>Priority: Major
> Fix For: Jena 4.4.0
>
>
> An assembler for the GeoSPARQL engine.
> This is for {{jena-geosparql}}, making it a loadable module for Jena and 
> usable with any Fuseki server.
> jena-fuseki-geosparql and its command line are unchanged.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)