Class Definition

Is there way to ensure the RDF triples adhere to a class definition? For example, if I define "Person" class having 4 data attributes Full Name, Sex, Age, Height and now I create a instance of Person - P1 as John Doe, Male, 45 and 6'2 as data attributes. I don't want someone enter a RDF triple with a random property :hairColor for John Doe. How do i stop this programmatically?


1 Like

Absolutely. See the docs section on data quality constraints.

1 Like

I learned something new today. Thanks!

Thank you. Is there any Sparql query that I can use to extract the Schema definition only, preferably in a visual form?

I have the vague idea bouncing around my brain that there used to be something like a stardog schema export command but I don't see it in there now so maybe I just dreamed it. For visualization you can use Stardog Studio or you might find Protege helpful.

You can use the reasoning schema CLI command to get the triples which constitute the schema: reasoning schema | Stardog Documentation 7.6.0

Stardog Studio can visualise the schema (go to Models on the left pane, then select the schema).


So it wasn't a dream. I just couldn't find it.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.