You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Simon Bin <sb...@informatik.uni-leipzig.de> on 2023/01/12 09:52:00 UTC

Adding endpoints to DataServices with Fuseki main + multiple mods

Hi,

we are trying to do 2 things

 * replicate the fuseki-webapp with fuseki main, keep different data
   services in separate ttl files in the configuration directory
 * externally from another module, enrich each data services with a
   geoindex operation

for the 1st step, we added 

FusekiConfig.readConfigurationDirectory(FusekiWebapp.dirConfiguration.toString())
 .forEach((dap) -> builder.add(dap.getName(), DataService.newBuilder(dap.getDataService())));

to the FusekiModule.prepare lifecycle.

This works fine!

for the 2nd step, what we want to do is something like:

 datasetNames.forEach(name -> builder.addEndpoint(name, "spatial", spatialOperation));

however, if we try to do this in another module's prepare method, the
datasets aren't there yet. So maybe to it from the
FusekiModule.configured method? But there, the DataAccessPoints are
already finished building.

For now, we remove all DAPs and register new copies of them, but I was
wondering if you see a better way? Could it be worth to / or does there
exist another hook which we missed?

Thanks,

Re: Re: Adding endpoints to DataServices with Fuseki main + multiple mods

Posted by Simon Bin <sb...@informatik.uni-leipzig.de>.
On Thu, 2023-01-12 at 12:10 +0000, Andy Seaborne wrote:
> Why not change the configurations to put in the enhanced before 
> capability before calling readConfigurationDirectory?

The ConfigDirLayout module should not need to know anything about the
spatial service module (and work whether present or not), so I don't
quite grasp how I could achieve this?

Maybe I also don't quite understand what you meant by "enhanced before
capability"....

Thanks again,

Re: Adding endpoints to DataServices with Fuseki main + multiple mods

Posted by Andy Seaborne <an...@apache.org>.

On 12/01/2023 09:52, Simon Bin wrote:
> Hi,
> 
> we are trying to do 2 things
> 
>   * replicate the fuseki-webapp with fuseki main, keep different data
>     services in separate ttl files in the configuration directory

You've already found the WIP on modules for a full Fuseki using Fuseki 
main + modules.


Readers: the idea is that "sometime" the Fuseki general download is
Fuseki main+some Fuseki modules as the distribution, UI included.

The WAR file version would remain, functionality as it is today.

Unrelated:

The WAR file version will have to go through a version bump because of 
the javax.*->jakarta.* transition of servlets and webapp to work in 
Tomcat 10.

Unless anyone has tried the automated tool for transation war file from 
Tomcat 9 (javax) to Tomcat 10 (jakarta)?

>   * externally from another module, enrich each data services with a
>     geoindex operation
> 
> for the 1st step, we added
> 
> FusekiConfig.readConfigurationDirectory(FusekiWebapp.dirConfiguration.toString())
>   .forEach((dap) -> builder.add(dap.getName(), DataService.newBuilder(dap.getDataService())));
> 
> to the FusekiModule.prepare lifecycle.
> 
> This works fine!
> 
> for the 2nd step, what we want to do is something like:
> 
>   datasetNames.forEach(name -> builder.addEndpoint(name, "spatial", spatialOperation));
> 
> however, if we try to do this in another module's prepare method, the
> datasets aren't there yet.
 >
> So maybe to it from the
> FusekiModule.configured method? But there, the DataAccessPoints are
> already finished building.

Possibly - there are several lifecycle points to hook into.

Fusekis module are collaborative - but it means you have to take care.

> For now, we remove all DAPs and register new copies of them, but I was
> wondering if you see a better way? Could it be worth to / or does there
> exist another hook which we missed?

Why not change the configurations to put in the enhanced before 
capability before calling readConfigurationDirectory?

     Andy

> 
> Thanks,