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.

Import WebProtégé Ontology

Hello all,

I want to import a WebProtege ontology into Neo4j with neosemantics. I am inspired by the following tutorial: QuickGraph#9 The fashion Knowledge Graph. Inferencing with Ontologies in Neo4j – Jesús Barrasa

I am using Neo4j Desktop version 1.3.4. I have neosemantics (version 4.2.0.0) installed, and I have already executed the following query: <call n10s.graphconfig.init()>

I downloaded from WebProtege the ontology and got a .ttl.zip file. From that I uploaded the .ttl file containing the ontology to GitHub and wanted to import it with the following statement:

<CALL n10s.rdf.import.fetch("OntologyTest/urn_webprotege_ontology_9626183d-e24b-4798-8670-cf395fe5ea8c.ttl at main · JohannaGmein...", "Turtle");>

I got the following result: "The following constraint is required for importing RDF. Please run 'CREATE CONSTRAINT n10s_unique_uri ON (r:Resource) ASSERT r.uri IS UNIQUE' and try again."

Thus, I executed the following query:
<CREATE CONSTRAINT n10s_unique_uri ON (r:Resource) ASSERT r.uri IS UNIQUE>

Then I tried the import again (<CALL n10s.rdf.import.fetch("OntologyTest/urn_webprotege_ontology_9626183d-e24b-4798-8670-cf395fe5ea8c.ttl at main · JohannaGmein...", "Turtle");>)

I got the following result and when I call the graph I can't see the ontology:

Has anyone ever worked with WebProtege or with a .ttl file and had a similar problem importing the ontology?

Any help would be greatly appreciated!

Kind regards
Johanna

1 REPLY 1

To import an ontology from the web it needs to be not formatted, could you try:

CALL n10s.rdf.import.fetch("https://raw.githubusercontent.com/JohannaGmeiner/OntologyTest/main/urn_webprotege_ontology_9626183d-e24b-4798-8670-cf395fe5ea8c.ttl", "Turtle");