Ok I have found the reason for the problem. There seems to be two different URI for lubm univ-bench.owl from the LUBM site. The one that is used in the ontology file is http://swat.cse.lehigh.edu/onto/univ-bench.owl, while the one I had used to generate data and that is used as prefix in test queries is http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl.

That makes it imposible to query just ontology properties after loading it. Changing all to same URI and reloading corrected ontology solved all.

Thank you very much,

Özgür Eroğlu

On 10/17/2013 12:08 AM, Andy Seaborne wrote:
On 16/10/13 18:26, Özgür EROĞLU wrote:
I have removed the TDB and reloaded it first with ontology. I think, at
his point, before installing the generated data I should see some
results to

SELECT *
{ ub:subOrganizationOf ?p ?o }

as in the ontology  I have the following triples

<http://swat.cse.lehigh.edu/onto/univ-bench.owl#subOrganizationOf>

In your query example in your first message you had:

PREFIX ub: <http://www.lehigh.edu/~zhp2/2004/0401/univ-bench.owl#>

so ub:subOrganizationOf is a different URI.

    Andy

<http://www.w3.org/1999/02/22-rdf-syntax-ns#type>
<http://www.w3.org/2002/07/owl#TransitiveProperty> .
<http://swat.cse.lehigh.edu/onto/univ-bench.owl#subOrganizationOf>
<http://www.w3.org/2000/01/rdf-schema#label> "is part of" .
<http://swat.cse.lehigh.edu/onto/univ-bench.owl#subOrganizationOf>
<http://www.w3.org/2000/01/rdf-schema#domain>
<http://swat.cse.lehigh.edu/onto/univ-bench.owl#Organization> .
<http://swat.cse.lehigh.edu/onto/univ-bench.owl#subOrganizationOf>
<http://www.w3.org/2000/01/rdf-schema#range>
<http://swat.cse.lehigh.edu/onto/univ-bench.owl#Organization> .

but I get no results. So I  do not understand why this is happening.
Should not I see the predicates and objects of the above triples?

I am trying to load it with the command

s-put http://localhost:3030/ds/data default /JenaTest/ont/univ-bench.nt

After this command I load the generated data with again s-put

s-put http://localhost:3030/ds/data default /JenaTest/data/all.nt

Now I get results both to

SELECT *
{ ub:subOrganizationOf ?p ?o }

and

SELECT *
{?X rdf:type ub:ResearchGroup .
   ?X ub:subOrganizationOf* <http://www.University0.edu>}

But still no results if I use ?X ub:subOrganizationOf
<http://www.University0.edu> insted of ?X ub:subOrganizationOf*
<http://www.University0.edu>




On 10/16/2013 05:51 PM, Andy Seaborne wrote:
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








Reply via email to