You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Arthur Vaïsse-Lesteven <ar...@yahoo.fr> on 2014/07/10 17:42:29 UTC
Jena Spatial - How to create a SpatialDataset
Hi everyone,
I present you my apologies in advance for the long text.
I searched for a while before asking to the mailing list how to instantiate a SpatialDataset, but I still fail my attempts of doing it.
Here is my problem : I have some RDF data with some that are localized geographically.
Here come an extract of RDF(N-TRIPLES) data that I have :
__________________________________________________________________________________________________________________
<http://www.thesis_project.org#1-2014-04> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://weblab.ow2.org/wookie#Anti-social_behaviour>.
<http://www.thesis_project.org#1-2014-04> <http://weblab.ow2.org/wookie#takesPlaceAt> <http://www.thesis_project.org#E01000914>.
<http://www.thesis_project.org#E01000914> <http://www.w3.org/2003/01/geo/wgs84_pos#lat> "51.518632"^^<http://www.w3.org/2001/XMLSchema#float>.
<http://www.thesis_project.org#E01000914> <http://www.w3.org/2003/01/geo/wgs84_pos#long> "-0.114954"^^<http://www.w3.org/2001/XMLSchema#float>.
__________________________________________________________________________________________________________________
I would like to use query such as :
__________________________________________________________________________________________________________________
#SELECT event in a radius of 100m of 51.3N,-0.75W
PREFIX spatial: <http://jena.apache.org/spatial#>
PREFIX
rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX wookie: <http://weblab.ow2.org/wookie#>
SELECT ?event
{
?event wookie:takesPlaceAt ?place .
?place spatial:query (51.51 -0.115 100 'm') .
}
__________________________________________________________________________________________________________________
I write the following code using the spatial query page as source of
inspiration ( http://jena.apache.org/documentation/query/spatial-query.html )
__________________________________________________________________________________________________________________
//imports have been skipped.
public class Main {
public static void main(String[] argv) throws FileNotFoundException, IOException {
String path ="path to a ntriple file";
Model eventInstance = ModelFactory.createDefaultModel();
RDFDataMgr.read(eventInstance, new FileInputStream(path), Lang.NTRIPLES);
Dataset spatialDataset = DatasetFactory.assemble("config.ttl", "<http://www.thesis_project.org#spatial_dataset>");//#1
spatialDataset.addNamedModel(null, eventInstance);//#2
EntityDefinition entDef = new EntityDefinition("entityField", "geoField");//#3
RAMDirectory directory = new RAMDirectory();//#4
SpatialIndex textIndex = SpatialDatasetFactory.createLuceneIndex(directory, entDef);//#5
//FAIL HERE
final Dataset spatialDataset =
SpatialDatasetFactory.create(spatialDataset, textIndex);//#5
String string = "PREFIX spatial: <http://jena.apache.org/spatial#>" +
"PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>" +
"PREFIX wookie: < <http://weblab.ow2.org/wookie#> "+
"SELECT ?event" +
" {" +
" ?event wookie:takesPlaceAt ?place"+
" ?place spatial:query (51.3 -0.75 100 'm') ." +
" }";
spatialDataset.begin(ReadWrite.READ);
final QueryExecution queryExec = QueryExecutionFactory.create(string, spatialDataset);
final ResultSet resultSet = queryExec.execSelect();
while (resultSet.hasNext()) {
System.out.println(resultSet.next().getResource("event"));
}
spatialDataset.end();
}
}
__________________________________________________________________________________________________________________
And I use the following config.ttl file :
__________________________________________________________________________________________________________________
## A config based on the example furnished with the tutorial at http://jena.apache.org/documentation/query/spatial-query.html
@prefix : <http://www.thesis_project.org#> .
@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#> .
@prefix wgs: <http://www.w3.org/2003/01/geo/wgs84_pos#>
# 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:SpatialIndexLucene rdfs:subClassOf spatial:SpatialIndex .
## ---------------------------------------------------------------
:spatial_dataset rdf:type spatial:SpatialDataset ;
spatial:dataset <#dataset> ;
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
Format
spatial:hasSpatialPredicatePairs ([ spatial:latitude wgs:lat ; spatial:longitude wgs:long ]) ;
.
__________________________________________________________________________________________________________________
I really don't understand what I'm missing.
As far as
I understood, the process consist in :
- create an index model ( here the standard one that use wsg84 lat/long properties of resources )[#3]
- define a binding between model attributes and RDF properties using the configuration file [#1]
- build a dataset that contains resources compliant with the index previously defined (loading my RDF data into a Model) + the binding[#2]
- give a storage space for the spatial index ( a "in memory" one in my case)[#4]
- fill the index the entity of the dataset[#5]
But This code fail with the following error :
Exception in thread "main"
com.hp.hpl.jena.assembler.exceptions.NoSpecificTypeException: the root
<http://www.thesis_project.org#spatial_dataset> has no most
specific type that is a subclass of ja:Object
at com.hp.hpl.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.open(AssemblerGroup.java:113)
at com.hp.hpl.jena.assembler.assemblers.AssemblerGroup$ExpandingAssemblerGroup.open(AssemblerGroup.java:81)
at com.hp.hpl.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:52)
at com.hp.hpl.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:48)
at
com.hp.hpl.jena.query.DatasetFactory.assemble(DatasetFactory.java:267)
at com.hp.hpl.jena.query.DatasetFactory.assemble(DatasetFactory.java:242)
at Main.main(Main.java:30)
I don't understand this error. Could someone explain me what is wrong in this "minimal" use case ?
Sincerely,
VAISSE-LESTEVEN Arthur.
Re: Jena Spatial - How to create a SpatialDataset
Posted by Andy Seaborne <an...@apache.org>.
On 11/07/14 14:08, Arthur Vaïsse-Lesteven wrote:
> Thank for the answer ANdy, but it only change the error to :
>
> Exception in thread "main"
> com.hp.hpl.jena.assembler.exceptions.NoSpecificTypeException: the root
> <http://www.thesis_project.org#spatial_dataset> has no most specific
> type that is a subclass of ja:Object
That's the same message as your original message, isn't it?
(PS better style:
@prefix : <http://www.thesis_project.org/#> .
)
> at
> com.hp.hpl.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.open(AssemblerGroup.java:113)
> at
> com.hp.hpl.jena.assembler.assemblers.AssemblerGroup$ExpandingAssemblerGroup.open(AssemblerGroup.java:81)
> at
> com.hp.hpl.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:52)
> at
> com.hp.hpl.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:48)
> at
> com.hp.hpl.jena.query.DatasetFactory.assemble(DatasetFactory.java:267)
> at
> com.hp.hpl.jena.query.DatasetFactory.assemble(DatasetFactory.java:242)
>
>
> It seems that it's an assembler relative problem/
> Considering this error message I read the documentation about assembler
> (Assembler quicksart/Assembler How to/inside assembler).
>
> It seems strange that I get this error message that inform me that my
> spatial dataset hasn't any specific type because as far as I understand
> assembler definition, this line of my config file :
>
> :spatial_dataset rdf:type spatial:SpatialDataset ;
>
> specify that it is a "spatial:SpatialDataset", and so is more specific
> than just a generic object.
>
> Did I miss mandatory properties that must be used ?
(catching up ..)
Could you please post the current complete assembler description?
Detail matter
The assembler mechanism by default does not know about spatial that's
why you need;
# Get the Spatial subsystem to initialize
[] ja:loadClass "org.apache.jena.query.spatial.SpatialQuery" .
# Tell assemblers that SpatialDataset isa kind of RDFDataset
spatial:SpatialDataset rdfs:subClassOf ja:RDFDataset .
# And lucene implements a spatial index
spatial:SpatialIndexLucene rdfs:subClassOf spatial:SpatialIndex .
Andy
> And also, do the spatial assembler has its own description ? I searched
> for a while about "http://jena.apache.org/spatial#" and dont find
> anything. I suppose so that this is only a link to a pure java class
> that is invoke behind the scene.
>
> VAISSE-LESTEVEN Arthur.
>
> ------------------------------------------------------------------------
> *De :* Andy Seaborne <an...@apache.org>
> *À :* "users@jena.apache.org" <us...@jena.apache.org>; Arthur
> Vaïsse-Lesteven <ar...@yahoo.fr>
> *Envoyé le :* Jeudi 10 juillet 2014 19h29
> *Objet :* Re: Jena Spatial - How to create a SpatialDataset
>
> Inline ...
>
> On 10 July 2014 16:42, Arthur Vaïsse-Lesteven <arthurvaisse@yahoo.fr
> <ma...@yahoo.fr>> wrote:
> > Hi everyone,
> > I present you my apologies in advance for the long text.
> >
> > I searched for a while before asking to the mailing list how to
> instantiate a SpatialDataset, but I still fail my attempts of doing it.
> >
> >
> > Here is my problem : I have some RDF data with some that are
> localized geographically.
> > Here come an extract of RDF(N-TRIPLES) data that I have :
> >
>
> ...
>
> > And I use the following config.ttl file :
> >
> __________________________________________________________________________________________________________________
> > ## A config based on the example furnished with the tutorial at
> http://jena.apache.org/documentation/query/spatial-query.html
> > @prefix : <http://www.thesis_project.org#
> <http://www.thesis_project.org/#>> .
> > @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#> .
> > @prefix wgs: <http://www.w3.org/2003/01/geo/wgs84_pos#>
> >
> > # 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 .
>
> Typo - not "SpatialtDataset" - but "SpatialDataset" (there is an extra
> "t" before "D" in your config file)
>
> I'm not in a position to test this but it does correlate to the error.
>
>
> > spatial:SpatialIndexLucene rdfs:subClassOf spatial:SpatialIndex .
> >
> > ## ---------------------------------------------------------------
> > :spatial_dataset rdf:type spatial:SpatialDataset ;
> > spatial:dataset <#dataset> ;
> >
> > 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
> > Format
> > spatial:hasSpatialPredicatePairs ([ spatial:latitude wgs:lat ;
> spatial:longitude wgs:long ]) ;
> > .
> >
> __________________________________________________________________________________________________________________
> >
> > I really don't understand what I'm missing.
> > As far as
> > I understood, the process consist in :
> > - create an index model ( here the standard one that use wsg84
> lat/long properties of resources )[#3]
> > - define a binding between model attributes and RDF properties
> using the configuration file [#1]
> > - build a dataset that contains resources compliant with the index
> previously defined (loading my RDF data into a Model) + the binding[#2]
> >
> > - give a storage space for the spatial index ( a "in memory" one
> in my case)[#4]
> > - fill the index the entity of the dataset[#5]
> >
> > But This code fail with the following error :
> >
> > Exception in thread "main"
> > com.hp.hpl.jena.assembler.exceptions.NoSpecificTypeException: the root
> > <http://www.thesis_project.org#spatial_dataset
> <http://www.thesis_project.org/#spatial_dataset>> has no most
> > specific type that is a subclass of ja:Object
> > at
> com.hp.hpl.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.open(AssemblerGroup.java:113)
> > at
> com.hp.hpl.jena.assembler.assemblers.AssemblerGroup$ExpandingAssemblerGroup.open(AssemblerGroup.java:81)
> > at
> com.hp.hpl.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:52)
> > at
> com.hp.hpl.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:48)
> > at
> > com.hp.hpl.jena.query.DatasetFactory.assemble(DatasetFactory.java:267)
> > at
> com.hp.hpl.jena.query.DatasetFactory.assemble(DatasetFactory.java:242)
> > at Main.main(Main.java:30)
> >
> > I don't understand this error. Could someone explain me what is wrong
> in this "minimal" use case ?
> >
> > Sincerely,
> > VAISSE-LESTEVEN Arthur.
>
>
Re: Jena Spatial - How to create a SpatialDataset
Posted by Arthur Vaïsse-Lesteven <ar...@yahoo.fr>.
Thank for the answer ANdy, but it only change the error to :
Exception in thread "main" com.hp.hpl.jena.assembler.exceptions.NoSpecificTypeException: the root <http://www.thesis_project.org#spatial_dataset> has no most specific type that is a subclass of ja:Object
at com.hp.hpl.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.open(AssemblerGroup.java:113)
at com.hp.hpl.jena.assembler.assemblers.AssemblerGroup$ExpandingAssemblerGroup.open(AssemblerGroup.java:81)
at com.hp.hpl.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:52)
at com.hp.hpl.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:48)
at com.hp.hpl.jena.query.DatasetFactory.assemble(DatasetFactory.java:267)
at com.hp.hpl.jena.query.DatasetFactory.assemble(DatasetFactory.java:242)
It seems that it's an assembler relative problem/
Considering this error message I read the documentation about assembler (Assembler quicksart/Assembler How to/inside assembler).
It seems strange that I get this error message that inform me that my spatial dataset hasn't any specific type because as far as I understand assembler definition, this line of my config file :
:spatial_dataset rdf:type spatial:SpatialDataset ;
specify that it is a "spatial:SpatialDataset", and so is more specific than just a generic object.
Did I miss mandatory properties that must be used ?
And also, do the spatial assembler has its own description ? I searched for a while about "http://jena.apache.org/spatial#" and dont find anything. I suppose so that this is only a link to a pure java class that is invoke behind the scene.
VAISSE-LESTEVEN Arthur.
________________________________
De : Andy Seaborne <an...@apache.org>
À : "users@jena.apache.org" <us...@jena.apache.org>; Arthur Vaïsse-Lesteven <ar...@yahoo.fr>
Envoyé le : Jeudi 10 juillet 2014 19h29
Objet : Re: Jena Spatial - How to create a SpatialDataset
Inline ...
On 10 July 2014 16:42, Arthur Vaïsse-Lesteven <ar...@yahoo.fr> wrote:
> Hi everyone,
> I present you my apologies in advance for the long text.
>
> I searched for a while before asking to the mailing list how to instantiate a SpatialDataset, but I still fail my attempts of doing it.
>
>
> Here is my problem : I have some RDF data with some
that are localized geographically.
> Here come an extract of RDF(N-TRIPLES) data that I have :
>
...
> And I use the following config.ttl file :
> __________________________________________________________________________________________________________________
> ## A config based on the example furnished with the tutorial at http://jena.apache.org/documentation/query/spatial-query.html
> @prefix : <http://www.thesis_project.org#> .
> @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#> .
> @prefix wgs: <http://www.w3.org/2003/01/geo/wgs84_pos#>
>
> # 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 .
Typo - not "SpatialtDataset" - but "SpatialDataset" (there is an extra
"t" before "D" in your config file)
I'm not in a position to test this but it does correlate to the error.
> spatial:SpatialIndexLucene rdfs:subClassOf spatial:SpatialIndex .
>
> ##
---------------------------------------------------------------
> :spatial_dataset rdf:type spatial:SpatialDataset ;
> spatial:dataset <#dataset> ;
>
> 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
> Format
> spatial:hasSpatialPredicatePairs ([ spatial:latitude wgs:lat ; spatial:longitude wgs:long ]) ;
> .
> __________________________________________________________________________________________________________________
>
> I really don't understand what I'm missing.
> As far as
> I understood, the process consist in :
> - create an index model ( here the standard one that use wsg84 lat/long properties of resources )[#3]
> - define a binding between model attributes and RDF properties using the configuration file [#1]
> - build a dataset that contains resources compliant with the index previously defined (loading my RDF data into a Model) + the binding[#2]
>
> - give a storage space for the spatial index ( a "in memory" one in my case)[#4]
> - fill the index the entity of the dataset[#5]
>
> But This code fail with the following error :
>
> Exception in thread "main"
> com.hp.hpl.jena.assembler.exceptions.NoSpecificTypeException: the root
> <http://www.thesis_project.org#spatial_dataset> has no most
> specific type that is a subclass of ja:Object
> at
com.hp.hpl.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.open(AssemblerGroup.java:113)
> at com.hp.hpl.jena.assembler.assemblers.AssemblerGroup$ExpandingAssemblerGroup.open(AssemblerGroup.java:81)
> at com.hp.hpl.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:52)
> at com.hp.hpl.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:48)
> at
> com.hp.hpl.jena.query.DatasetFactory.assemble(DatasetFactory.java:267)
> at com.hp.hpl.jena.query.DatasetFactory.assemble(DatasetFactory.java:242)
> at Main.main(Main.java:30)
>
> I don't understand this error. Could someone explain me what is wrong in this "minimal" use case ?
>
> Sincerely,
> VAISSE-LESTEVEN Arthur.
Re: Jena Spatial - How to create a SpatialDataset
Posted by Andy Seaborne <an...@apache.org>.
Inline ...
On 10 July 2014 16:42, Arthur Vaïsse-Lesteven <ar...@yahoo.fr> wrote:
> Hi everyone,
> I present you my apologies in advance for the long text.
>
> I searched for a while before asking to the mailing list how to instantiate a SpatialDataset, but I still fail my attempts of doing it.
>
>
> Here is my problem : I have some RDF data with some that are localized geographically.
> Here come an extract of RDF(N-TRIPLES) data that I have :
>
...
> And I use the following config.ttl file :
> __________________________________________________________________________________________________________________
> ## A config based on the example furnished with the tutorial at http://jena.apache.org/documentation/query/spatial-query.html
> @prefix : <http://www.thesis_project.org#> .
> @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#> .
> @prefix wgs: <http://www.w3.org/2003/01/geo/wgs84_pos#>
>
> # 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 .
Typo - not "SpatialtDataset" - but "SpatialDataset" (there is an extra
"t" before "D" in your config file)
I'm not in a position to test this but it does correlate to the error.
> spatial:SpatialIndexLucene rdfs:subClassOf spatial:SpatialIndex .
>
> ## ---------------------------------------------------------------
> :spatial_dataset rdf:type spatial:SpatialDataset ;
> spatial:dataset <#dataset> ;
>
> 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
> Format
> spatial:hasSpatialPredicatePairs ([ spatial:latitude wgs:lat ; spatial:longitude wgs:long ]) ;
> .
> __________________________________________________________________________________________________________________
>
> I really don't understand what I'm missing.
> As far as
> I understood, the process consist in :
> - create an index model ( here the standard one that use wsg84 lat/long properties of resources )[#3]
> - define a binding between model attributes and RDF properties using the configuration file [#1]
> - build a dataset that contains resources compliant with the index previously defined (loading my RDF data into a Model) + the binding[#2]
>
> - give a storage space for the spatial index ( a "in memory" one in my case)[#4]
> - fill the index the entity of the dataset[#5]
>
> But This code fail with the following error :
>
> Exception in thread "main"
> com.hp.hpl.jena.assembler.exceptions.NoSpecificTypeException: the root
> <http://www.thesis_project.org#spatial_dataset> has no most
> specific type that is a subclass of ja:Object
> at com.hp.hpl.jena.assembler.assemblers.AssemblerGroup$PlainAssemblerGroup.open(AssemblerGroup.java:113)
> at com.hp.hpl.jena.assembler.assemblers.AssemblerGroup$ExpandingAssemblerGroup.open(AssemblerGroup.java:81)
> at com.hp.hpl.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:52)
> at com.hp.hpl.jena.assembler.assemblers.AssemblerBase.open(AssemblerBase.java:48)
> at
> com.hp.hpl.jena.query.DatasetFactory.assemble(DatasetFactory.java:267)
> at com.hp.hpl.jena.query.DatasetFactory.assemble(DatasetFactory.java:242)
> at Main.main(Main.java:30)
>
> I don't understand this error. Could someone explain me what is wrong in this "minimal" use case ?
>
> Sincerely,
> VAISSE-LESTEVEN Arthur.