Archetype and schema inline

Is there ever any reason that you wouldn't inline the schema in an archetype? I get why you would or wouldn't with a constraint but I can't tell you you might do that with a schema. Would the result just be that the schema doesn't get loaded?

I hadn't noticed that there was additional info in the docs. I was just looking at the info at

The documentation says that there's information in the github repo on how to make an archetype protected but I don't see that information in the github repo.

schema.protected and constraints.protected?

I was just about to point at the doc section you've already found. To answer your question, I'd say it is almost always better to inline the schema in a named graph and then use access control restrictions to protect the schema from unintended changes if needed. Protected archetypes is the legacy behavior but people mostly find that behavior confusing.

You can make the schema and the constraints protected separately by setting schema.inline and constraints.inline false in the file respectively. By default everything is inlined and thus not protected,


Thanks. I think I've got it. It makes more sense when you know the protected option. I think it's also a little confusing since constraints were protected until they weren't with SHACL.

One last thing, since Stardog doesn't follow owl:imports would you recommend including all referenced ontologies with the schema?

Yes, you can and probably should have a separate file for each import in the schema directory with nested directories if desired.


So it recurses into the schema directory? I probably should have been less specific and asked if I should include referenced ontologies and not just ontologies explicitly imported. I'm guessing yes since it would be reasonable to expect them to be there as well.

I have a bunch of archetype PR's on the way.

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