Hi @caeserk , looks like you're in an older version of n10s?
Restrictions were added in the latest release ( 18.104.22.168 for Neo4j 4.3.x or 22.214.171.124 for Neo4j 4.2.7 onward). Would it be possible for you to update to any of these?
You should get something similar to what I showed on my screen capture where you can see both the SubClassOf relationship (SCO) and the Restriction with all the details (including the reference to the
vin:hasMaker prop) as attributes of the relationship. I've highlighted them with the red arrow .
The reason why he went with a representation like this one is that it seems to be the one preferred by users, probably more intuitive for visualization? and is aligned with the one offered by other ontology viz libraries like WebOWL. It's actually a lot more compact than creating an intermediate node representing the restriction and linking to the node representing the
But in any case and answering your question there is no information loss, all elements in the Restriction definition are stored in the graph.
n10s.rdf.import.* approach, you get an exact replica of the way the Restriction is defined in RDF, including the intermediate blank nodes. To make it more obvious think of the N-Triples serialization of the ontology fragment. This is what the previous ttl fragment looks as N-Triples (*):
<http://www.w3.org/TR/2004/REC-owl-guide-20040210/wine#Wine> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Class> .
<http://www.w3.org/TR/2004/REC-owl-guide-20040210/wine#Wine> <http://www.w3.org/2000/01/rdf-schema#subClassOf> <http://www.w3.org/TR/2004/REC-owl-guide-20040210/wine#PotableLiquid> .
<http://www.w3.org/TR/2004/REC-owl-guide-20040210/wine#Wine> <http://www.w3.org/2000/01/rdf-schema#subClassOf> _:genid1 .
_:genid1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Restriction> .
_:genid1 <http://www.w3.org/2002/07/owl#onProperty> <http://www.w3.org/TR/2004/REC-owl-guide-20040210/wine#hasMaker> .
_:genid1 <http://www.w3.org/2002/07/owl#allValuesFrom> <http://www.w3.org/TR/2004/REC-owl-guide-20040210/wine#Winery> .
Here you can see that there is an intermediate blank node representing the Restriction. That's what I meant, the
n10s.onto.import.* produces a more "humane" view of the same information. But ultimately it's up to you which one makes more sense depending on what you're trying to achieve with the ontology.
I hope this helps.
What is the purpose of your experiment? Is it the visual exploration of the onto? Or are you planning to use it to automate some process based on it?
(*) You can actually try importing this version of the RDF instead, by just setting the second parameter of the
preview|import procedure to
"N-Triples" instead of