Search code examples
rdfstardog

Can't definine classes and properties in Stardog


I am starting using Stardog Database and at the very beginning I came across problem I an unable to solve.

I Have created database and then by typing : enter image description here

I imported existing ontology into this database. I am able to see those triples in Stardog enter image description here

However when I want to browse this database to see properties and classes I see only Thing and when I try to use either class or property I see "No matches fount" info: enter image description here

Could anyone give me a hint How can I add some classes to my model?


Solution

  • Stardog (and thus the web console) limits which parts of the database it obtains the schema information from by default.

    From the Stardog documentation a database has a reasoning.schema.graphs option which is described as follows:

    Determines which, if any, named graph or graphs contains the "tbox", i.e., the schema part of the data.

    And if we look at the associated Javadoc for that property we can see the default for it:

    Option to specify the location where the schema should be extracted from. Expected to be a list of the graph URIs which are the context names schema axioms should be extracted from. The default value is the default (no context) graph

    So Stardog is by default only considering the default unnamed graph when extracting the schema for the database.

    However in your example you explicitly load your ontology into a named graph so Stardog will not automatically extract the schema from it. To fix this you can do one of two things:

    1. Load your ontology into the default graph
    2. Edit the reasoning.schema.graphs option for your database to point to include the named graph with your ontology

    Please refer to the aforementioned Stardog documentation for how to change the configuration options for a database.