On 16/10/13 13:37, Özgür EROĞLU wrote:
Hi,
Yes, when I run queries that does not require inference, I get results.
I think my problem is related to your second question. How can I load
the ontology into TDB? I load the generated lubm data with s-put, should
I merge data and ontology before loading? At some of the configurations
I have seen on web, there was a line which was smt. like "ja:scheme
<#sch>" in the fuseki inf-model section of the configuration. Is that
related?
Yes.
SELECT *
{?X rdf:type ub:ResearchGroup .
?X ub:subOrganizationOf* <http://www.University0.edu>}
returns nothing,
that query imitates transitivity of ub:subOrganizationOf. If it returns
nothing then maybe there is something else going on, not inference
related. You seem to have some inference judging by thw results below.
Break the query up into parts, like
SELECT * {?X rdf:type ub:ResearchGroup .} LIMIT 10
SELECT * { ?X ub:subOrganizationOf <http://www.University0.edu>} LIMIT 10
but
SELECT *
{ ub:subOrganizationOf ?p ?o }
returns
----------------------------------------------------------------------------------------------------------
| p |
o |
==========================================================================================================
| rdf:type |
rdf:Property |
| rdf:type |
<http://www.w3.org/2000/01/rdf-schema#Resource> |
| <http://www.w3.org/2000/01/rdf-schema#subPropertyOf> |
ub:subOrganizationOf |
----------------------------------------------------------------------------------------------------------
ub:subOrganizationOf isn't declared to be transitive
Özgür Eroğlu
On 10/16/2013 03:08 PM, Andy Seaborne wrote:
Hi there,
When you run a query that does not require inferenc, do you get any
results?
Is the ontology loaded into the TDB store?
Does this query return anything:
SELECT *
{?X rdf:type ub:ResearchGroup .
?X ub:subOrganizationOf* <http://www.University0.edu>}
and this one:
SELECT *
{ ub:subOrganizationOf ?p ?o }
Andy
On 15/10/13 20:05, Özgür EROĞLU wrote:
Hi all,
I am trying to configure Fuseki with inference and TDB and using a LUBM
generated data for testing. I have searched for similar configurations
(one of which is here) and read the documentation for Fuseki
configuration .
Following is my Fuseki configuration :
#------------------------------------------------------------------------------------------------------
# Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
@prefix : <#> .
@prefix fuseki: <http://jena.apache.org/fuseki#> .
@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#> .
[] rdf:type fuseki:Server ;
fuseki:services (
<#service1>
) .
# Custom code.
[] ja:loadClass "com.hp.hpl.jena.tdb.TDB" .LUBM
# TDB
tdb:DatasetTDB rdfs:subClassOf ja:RDFDataset .
tdb:GraphTDB rdfs:subClassOf ja:Model .
## ---------------------------------------------------------------
## Service with only SPARQL query on an inference model.
## Inference model bbase data in TDB.
<#service1> rdf:type fuseki:Service ;
fuseki:name "ds" ; # http://host/inf
fuseki:serviceQuery "sparql" ; # SPARQL query service
fuseki:serviceUpdate "update" ;
fuseki:serviceQuery "query" ;
fuseki:serviceUpload "upload" ;
fuseki:serviceReadWriteGraphStore "data" ;
fuseki:serviceReadGraphStore "get" ;
fuseki:dataset <#dataset> ;
.
<#dataset> rdf:type ja:RDFDataset ;
ja:defaultGraph <#model_inf> ;
.
<#model_inf> a ja:InfModel ;
ja:baseModel <#tdbGraph> ;
ja:reasoner [
ja:reasonerURL
<http://jena.hpl.hp.com/2003/OWLFBRuleReasoner>;
]
.
<#tdbDataset> rdf:type tdb:DatasetTDB ;
tdb:location "/tdb/" ;
.
<#tdbGraph> rdf:type tdb:GraphTDB ;
tdb:dataset <#tdbDataset>
.
#------------------------------------------------------------------------------------------------------
I load a dataset which was generated with LUBM data generator. The
generator is UBA1.7 and the ontology is an owl file named Univ-Bench.
My problem here is that when I run a sparql query that requires
inference, I get no result. For example, although the data includes
triples like
#------------------------------------------------------------------------------------------------------
<http://www.Department14.University0.edu/ResearchGroup0>
<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#ResearchGroup> .
<http://www.Department14.University0.edu/ResearchGroup0>
<http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#subOrganizationOf>
<http://www.Department14.University0.edu> .
<http://www.Department14.University0.edu>
<http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#subOrganizationOf>
<http://www.University0.edu> .
#------------------------------------------------------------------------------------------------------
when I run the following sparql query, I get no result(empty resultset).
#------------------------------------------------------------------------------------------------------
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX ub: <http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#>
SELECT ?X
WHERE
{?X rdf:type ub:ResearchGroup .
?X ub:subOrganizationOf <http://www.University0.edu>}
#------------------------------------------------------------------------------------------------------
I think Fuseki somehow should know about the ontology (univ-bench). Also
I am not sure whether my Fuseki configuration is ok or not for inference
(e.g. if my reasoner is the right one).
Could someone explain what I am missing here and why I could not get
correct results?
Regards,
Özgür Eroğlu