Stardog archetypes

I was thinking that the archetypes feature came out a loooong time ago and hasn't gotten much love so I thought that I'd remedy that and put some together. I'm just finishing up putting together a couple dozen of the most popular ontologies into a plugin. Obviously I'm just working on getting some unit tests written and it will be done.

I also came across this issue that someone had posted to the Stardog-examples repo 'Explanation missing as to what the benefits are of an archetype · Issue #21 · stardog-union/stardog-examples · GitHub "Explanation missing as to what the benefits are of an archetype" and I thought I'd share my recent experience.

First, convenience. After having to go and track down a couple of dozen ontologies it's a little bit of a pain. Not a big pain mind you but sometimes it's the little things that count. You can also bundle multiple files, and constraints as well.

The second thing I came across that I found a little bit surprising is that the statements loaded as an archetype are not included in the database. It's in there but you can't get to it. They get loaded into the "extracted schema" so you don't have direct access to the via sparql queries and I don't think they'd be included in an export. I suppose the good thing about that is you don't have to worry about someone accidentally deleting the schema. On the down side I noticed that if your ontology includes any ABOX items they might be in there but they might as well not exist so you'd have to load it anyway if you wanted to get them. That's the part that was a little surprising. It makes sense once you think about how archetypes work. It might be nice if they were thrown into a named graph or something.

Hope that helps someone. Keep and eye out and I'll post the archetypes plugin shortly.

1 Like

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