How to delete inserted data only but not model ontology?

I am inserting triples into a graph (not the default one) via HTTP API. I have also created classes in Studio - I can see them in Text Editor.

But when I issue:

CLEAR GRAPH atk:graph

both data and model classes are gone.

  • How do I delete just the data from atk:grph?


As far as I see, as both might contain blank nodes, which are quite cumbersome to delete, I suggest separating the data from the model into two different graphs.

I second keeping the ontology in its own graph.

Hm .. that doesn't make sense - dat in one graph and ontology in a different graph?

How will data get its types?

Example please.

Thank you,

No problem with that. In most cases just need to query from your "data" graph - in some cases, you will need to additional FROM or FROM NAMED. However, the edges will be followed into any other graph.
For some cases of visualization in Studio, you might need to switch to "stardog:context:named" or "stardog:context:all".

Model and data:

:model {
    :MyClass a owl:Class.
    :myProperty a owl:DataProperty;

:data {
    :x1 a :MyClass; :myProperty "123"^^xsd:integer.


select * from :data {?s a :MyClass; :myProperty ?o}

1 Like

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