cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Is it possible to import a DatatypeProperty as a property of the correspondent nodes

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

3 REPLIES 3

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:
2X_2_225b495f3a00a78b03e202b175b406de71f05ee2.png

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:
2X_3_341537975b74637daafe50b434a88b1853c76b40.png

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

Hi PaulHarnandez,

I am facing similar scenario,  wish to know your decision. did you create knowledge graph through class level?

Regards,

Paritosh

 

 

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online