You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Eric Scott <er...@att.net> on 2011/09/14 01:35:20 UTC

Configuring assemblers to use inferencers

Hi all -

I'm having some trouble wrapping my head around assemblers that bring 
inferencers into the mix.

I have a minimal pair.

This works fine, and I can query the data set in Joseki (but for example 
subClassOf links only extend one degree):

<#myDB_RDFSService>
     rdf:type            joseki:Service;
     rdfs:label          "Service for MYDB data stored in TDB file, to 
which I hope to apply an rdfs inferencer.";
     joseki:serviceRef   "myDB_RDFS"; # web.xml must route this name to 
Joseki.
     joseki:dataset <#myDB>;  # defined below
     joseki:processor    joseki:ProcessorSPARQL_FixedDS ;
     .


<#myDB>  rdf:type    tdb:DatasetTDB;
     rdfs:label "The database";
     tdb:location "/home/escott/TDB/myDB";
.

This does not:

<#myDB_RDFSService>
     rdf:type            joseki:Service;
     rdfs:label          "Service for MYDB data stored in TDB file using 
RDFS inferencer";
     joseki:serviceRef   "myDB_RDFS"; # web.xml must route this name to 
Joseki.
     joseki:dataset <#myDB_rdfs>;  ## <-- THIS CHANGED
     joseki:processor    joseki:ProcessorSPARQL_FixedDS ;
     .

<#myDB_rdfs> ja:baseModel <#myDB>; # defined as above
              ja:reasoner [ja:reasonerURL
<http://jena.hpl.hp.com/2003/RDFSExptRuleReasoner>]

.

This last clause I'm taking more or less verbatim from the assembler how-to.

What am I missing?

Thanks for any help!

Regards,


Re: Configuring assemblers to use inferencers

Posted by Eric Scott <er...@att.net>.
Got it. I was not sufficiently mindful of the distinction (and 
non-coerce-ability) between a model and a dataset.

Everything worked when I made these declarations:

(after ja:loadClass "com.hp.hpl.jena.tdb.TDB")

tdb:GraphTDB rdfs:subclassOf ja:Model.

<#myDB_graph> rdf:type tdb:GraphTDB;
    tdb:location "path/to/tdb-file".

<#my_rdfs_graph> ja:baseModel <#myDB_graph>
     ja:reasoner [ja:reasonerURL
<http://jena.hpl.hp.com/2003/RDFSExptRuleReasoner>].

<#my_rdfs_dataset> rdf:type ja:RDFDataset;
   ja:defaultGraph <#my_rdfs_graph>.

And then pointed the service at the dataset.

Thanks Andy!


On 09/14/2011 05:11 AM, Andy Seaborne wrote:
> Fuseki is easier to use.
>
> On 14/09/11 12:52, Eric Scott wrote:
>> Oh. I should add that the error I get is this:
>>
>> Query execution error: com.hp.hpl.jena.query.QueryExecException:
>>
>> No dataset description for query
>
> That happens where there is no dataset for the execution and no 
> description (FROM/FROM NAMED - and you have that turned off by using 
> ProcessorSPARQL_FixedDS).
>
> What does the Joseki log file say?
>
>
>
>>
>>
>> On 09/13/2011 04:35 PM, Eric Scott wrote:
>>> Hi all -
>>>
>>> I'm having some trouble wrapping my head around assemblers that bring
>>> inferencers into the mix.
>>>
>>> I have a minimal pair.
>>>
>>> This works fine, and I can query the data set in Joseki (but for
>>> example subClassOf links only extend one degree):
>>>
>>> <#myDB_RDFSService>
>>> rdf:type joseki:Service;
>>> rdfs:label "Service for MYDB data stored in TDB file, to which I hope
>>> to apply an rdfs inferencer.";
>>> joseki:serviceRef "myDB_RDFS"; # web.xml must route this name to 
>>> Joseki.
>>> joseki:dataset <#myDB>; # defined below
>>> joseki:processor joseki:ProcessorSPARQL_FixedDS ;
>>> .
>>>
>>>
>>> <#myDB> rdf:type tdb:DatasetTDB;
>>> rdfs:label "The database";
>>> tdb:location "/home/escott/TDB/myDB";
>>> .
>>>
>>> This does not:
>>>
>>> <#myDB_RDFSService>
>>> rdf:type joseki:Service;
>>> rdfs:label "Service for MYDB data stored in TDB file using RDFS
>>> inferencer";
>>> joseki:serviceRef "myDB_RDFS"; # web.xml must route this name to 
>>> Joseki.
>>> joseki:dataset <#myDB_rdfs>; ## <-- THIS CHANGED
>>> joseki:processor joseki:ProcessorSPARQL_FixedDS ;
>>> .
>>>
>
> Ithink you need you need to include  rdf:type ja:RDFDataset ;
>
> <#myDBwithRDFS> rdf:type ja:RDFDataset ;
>     ja:defaultGraph <#myRDFS> ;
>     .
>
> <#myRDFS> ja:baseModel <#myDB>; # defined as above
>           ja:reasoner [ja:reasonerURL
> <http://jena.hpl.hp.com/2003/RDFSExptRuleReasoner>]
>
> .
>
>
> The log file should show nothing happening for <#myDB_rdfs>
>
>
>     Andy
>
>>> <#myDB_rdfs> ja:baseModel <#myDB>; # defined as above
>>> ja:reasoner [ja:reasonerURL
>>> <http://jena.hpl.hp.com/2003/RDFSExptRuleReasoner>]
>>>
>>> .
>>>
>>> This last clause I'm taking more or less verbatim from the assembler
>>> how-to.
>>>
>>> What am I missing?
>>>
>>> Thanks for any help!
>>>
>>> Regards,
>>>
>>>
>>
>


Re: Configuring assemblers to use inferencers

Posted by Andy Seaborne <an...@epimorphics.com>.
Fuseki is easier to use.

On 14/09/11 12:52, Eric Scott wrote:
> Oh. I should add that the error I get is this:
>
> Query execution error: com.hp.hpl.jena.query.QueryExecException:
>
> No dataset description for query

That happens where there is no dataset for the execution and no 
description (FROM/FROM NAMED - and you have that turned off by using 
ProcessorSPARQL_FixedDS).

What does the Joseki log file say?



>
>
> On 09/13/2011 04:35 PM, Eric Scott wrote:
>> Hi all -
>>
>> I'm having some trouble wrapping my head around assemblers that bring
>> inferencers into the mix.
>>
>> I have a minimal pair.
>>
>> This works fine, and I can query the data set in Joseki (but for
>> example subClassOf links only extend one degree):
>>
>> <#myDB_RDFSService>
>> rdf:type joseki:Service;
>> rdfs:label "Service for MYDB data stored in TDB file, to which I hope
>> to apply an rdfs inferencer.";
>> joseki:serviceRef "myDB_RDFS"; # web.xml must route this name to Joseki.
>> joseki:dataset <#myDB>; # defined below
>> joseki:processor joseki:ProcessorSPARQL_FixedDS ;
>> .
>>
>>
>> <#myDB> rdf:type tdb:DatasetTDB;
>> rdfs:label "The database";
>> tdb:location "/home/escott/TDB/myDB";
>> .
>>
>> This does not:
>>
>> <#myDB_RDFSService>
>> rdf:type joseki:Service;
>> rdfs:label "Service for MYDB data stored in TDB file using RDFS
>> inferencer";
>> joseki:serviceRef "myDB_RDFS"; # web.xml must route this name to Joseki.
>> joseki:dataset <#myDB_rdfs>; ## <-- THIS CHANGED
>> joseki:processor joseki:ProcessorSPARQL_FixedDS ;
>> .
>>

Ithink you need you need to include  rdf:type ja:RDFDataset ;

<#myDBwithRDFS> rdf:type ja:RDFDataset ;
     ja:defaultGraph    <#myRDFS> ;
     .

<#myRDFS> ja:baseModel <#myDB>; # defined as above
           ja:reasoner [ja:reasonerURL
<http://jena.hpl.hp.com/2003/RDFSExptRuleReasoner>]

.


The log file should show nothing happening for <#myDB_rdfs>


	Andy

>> <#myDB_rdfs> ja:baseModel <#myDB>; # defined as above
>> ja:reasoner [ja:reasonerURL
>> <http://jena.hpl.hp.com/2003/RDFSExptRuleReasoner>]
>>
>> .
>>
>> This last clause I'm taking more or less verbatim from the assembler
>> how-to.
>>
>> What am I missing?
>>
>> Thanks for any help!
>>
>> Regards,
>>
>>
>

Re: Configuring assemblers to use inferencers

Posted by Eric Scott <er...@att.net>.
Oh. I should add that the error I get is this:

Query execution error: com.hp.hpl.jena.query.QueryExecException:

No dataset description for query


On 09/13/2011 04:35 PM, Eric Scott wrote:
> Hi all -
>
> I'm having some trouble wrapping my head around assemblers that bring 
> inferencers into the mix.
>
> I have a minimal pair.
>
> This works fine, and I can query the data set in Joseki (but for 
> example subClassOf links only extend one degree):
>
> <#myDB_RDFSService>
>     rdf:type            joseki:Service;
>     rdfs:label          "Service for MYDB data stored in TDB file, to 
> which I hope to apply an rdfs inferencer.";
>     joseki:serviceRef   "myDB_RDFS"; # web.xml must route this name to 
> Joseki.
>     joseki:dataset <#myDB>;  # defined below
>     joseki:processor    joseki:ProcessorSPARQL_FixedDS ;
>     .
>
>
> <#myDB>  rdf:type    tdb:DatasetTDB;
>     rdfs:label "The database";
>     tdb:location "/home/escott/TDB/myDB";
> .
>
> This does not:
>
> <#myDB_RDFSService>
>     rdf:type            joseki:Service;
>     rdfs:label          "Service for MYDB data stored in TDB file 
> using RDFS inferencer";
>     joseki:serviceRef   "myDB_RDFS"; # web.xml must route this name to 
> Joseki.
>     joseki:dataset <#myDB_rdfs>;  ## <-- THIS CHANGED
>     joseki:processor    joseki:ProcessorSPARQL_FixedDS ;
>     .
>
> <#myDB_rdfs> ja:baseModel <#myDB>; # defined as above
>              ja:reasoner [ja:reasonerURL
> <http://jena.hpl.hp.com/2003/RDFSExptRuleReasoner>]
>
> .
>
> This last clause I'm taking more or less verbatim from the assembler 
> how-to.
>
> What am I missing?
>
> Thanks for any help!
>
> Regards,
>
>