Hi everyone,
I would like to know if it's possible to convert a DatatypeProperty as property in the nodes of its Domain.
I have some classes with a large list of DatatypeProperty and I think they made the graph less comprehensive.
I can create also a model by myself but I we have a nice ontology library and would like to reuse it.
Tanks and best regards,
Paul
Hi @paulhernandez, I'm not 100% sure I get what you're trying to achieve.
Are you suggesting importing literals (datatypeproperty values) as separate nodes?
Something like this:
<neo4j://individual#12345> <neo4j://properties#name> "John Doe"@en
imported as
(:Resource { uri: "neo4j://individual#12345"})-[:neo_name]->(:Literal { value: "John Doe", lang: "en" })
or do you mean something completely different?
Cheers,
JB.
Hi Jesus,
thanks for your answer.
What I noticed is, when you import an ontology the Data Properties are converted to nodes.
Example: consider the following Data Property and Class
#################################################################
# Data Properties
#################################################################
### http://ontology.mydomain.com/sg-ldm-topology#OWLDataProperty_312a900b_c05a_4a71_9794_b8b9576f213f
:OWLDataProperty_312a900b_c05a_4a71_9794_b8b9576f213f rdf:type owl:DatatypeProperty ;
rdfs:domain :POWER_TRANSFORMER_END ;
rdfs:range xsd:decimal ;
rdfs:label "ratedKV"@de .
#################################################################
# Classes
#################################################################
### http://ontology.mydomain.com/sg-ldm-topology#POWER_TRANSFORMER_END
:POWER_TRANSFORMER_END rdf:type owl:Class ;
rdfs:subClassOf :CONDUCTING_EQUIPMENT ;
rdfs:label "POWER_TRANSFORMER_END" .
Importing it into neo4j using the n10s.onto.import.fetch procedure produces the following result:
That's is actually correct, since we are representing RDF triples in neo4j, but somehow would be better for my model to convert the "ratedKV" in a property of "POWER_TRANSFORMER_END": Something like this:
Some facts to considered:
- There are no nodes or relationships properties in RDF, therefore to covert the model back (export to RDF) could be difficult
- A Data Property in RDF exists on its own. That means, it is a triple (like everything in RDF) and is related to zero or many nodes.
- There is also inheritance for data properties in RDF
At the end I think the current behavior of the import is correct. I am still making up my mind about whether we need a knowledge graph or just a regular property graph database for our applications, or even both.
I hope that makes my point.
Best regards,
Paul