I want to map ontology from OWL into Neo4j database. I have found some example here.
If I understand it well I need to create Java program with OWL API libraries included. I don't need any inference engine (according to this: Mapping from an OWL ontology to Neo4j graph database).
I have created project in Eclipse add OWL API (and oboformat) libraries and paste the code
private void importOntology(OWLOntology ontology) throws Exception {
OWLReasoner reasoner = new Reasoner(ontology);
if (!reasoner.isConsistent()) {
logger.error("Ontology is inconsistent");
// Throw your exception of choice here
throw new Exception("Ontology is inconsistent");
}
Transaction tx = db.beginTx();
try {
...
}
}
I have got an error in line: new Reasoner(ontology); - that there is no class Reasoner, I don't understand if I need to use some reasoner inference engine like Hermit or Pellet ?
I have got also error in line Transaction tx = db.beginTx();. Do I need use spring framework to run this example?
Ctrl+o
to let Eclipse automatically solve the imports. Btw. I don't think you will get many answers to a specific question like that. Also try a forum/mailinglist for OWL or Neo4j. That is more likely to solve your problem. – Glenoid