stanbol-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marvin Luchs <>
Subject inference support when querying triple collection
Date Mon, 23 Sep 2013 12:30:44 GMT
Hello everybody,

for my master's thesis I'm working on a custom Stanbol Module. Its concrete purpose is not
important. Basically I...

1.       create a new triple collection using the TC Manager from Clerezza:


2.  import an Ontology which contains the ontology amongst others:

OWLOntologyManager manager = OWLManager.createOWLOntologyManager();

OWLOntology ontology = manager.loadOntologyFromOntologyDocument(content);


3.  import a whole bunch of RDF statements:

Parser parser = Parser.getInstance();

Graph rdfData = parser.parse(inputStream, format);

Up to this point everything works fine. However, I ran into an issue when I wanted to query
that triple collection using types from For example I have some entity which is
of type schema:Movie. My ontology states that schema:Movie is rfds:subClassOf schema:CreativeWork
which in turn is rfds:subClassOf schema:Thing. However it seems, that not there's no automatic
inference that schema:Movie is also a subclass of schema:Thing.

I tried it using this query:

PREFIX rdf:<>
PREFIX rdfs:<>
PREFIX schema:<>
SELECT ?type ?label {
       <> rdf:type ?type .
        ?type rdfs:subClassOf schema:Thing .
        ?type rdfs:label ?label .

... and this method:


Before I started implementing my project in Stanbol I imported my ontology as well as all
the RDF files into a Sesame repository. With that repository the query worked fine as Sesame
automatically inferred that SomeEntity is of type schema:Thing.

Is  there any way to configure an inference like this for the triple store that's used by
Clerezza (Jena I Think?) in this example?

Best regards,
Marvin Luchs

PS: @Reto Bachmann-Gmür: Thanks a lot for your "Instant Apache Stanbol" E-Book! I already
decided to implement my project independently of Stanbol, but your book came out just in time
to change my mind :-)

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message