owl-api

Mapping from OWL ontology to OrientDB Graph Database

送分小仙女□ 提交于 2019-12-11 00:58:49
问题 I am working with OWL ontology and I have to import an owl ontology into OrientDB graph database. Is there a solution implemented to parse OWL ontology and map it to a OrientDB Graph or convert owl ontology to labeled property graph and import it into OrientDB? I know there are similar solutions for Neo4J graph database. https://github.com/flekschas/owl2neo4j https://neo4j.com/blog/using-owl-with-neo4j/ For OrientDB? 来源: https://stackoverflow.com/questions/46581663/mapping-from-owl-ontology

map owl to neo4j (java example)

こ雲淡風輕ζ 提交于 2019-12-08 13:02:30
问题 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 (

Getting superclasses in imported OWL ontology

一世执手 提交于 2019-12-08 11:52:21
问题 I'm trying to parse an ontology (complete including the imported ontology) to store it into a graph database. To do this, I first list all classes in the ontology and then link them to their respective super classes. The code works fine, except for imported super classes. I can link to super classes within my own ontology but not from a class whose superclass is in the imported ontology. The superclass exists, I can see it if I print it after the getClasesInSignature() method call because I

OWLAPI: Parser not found if run from Jar

∥☆過路亽.° 提交于 2019-12-08 11:47:49
问题 I wrote an ontology importer in Java to parse an RDF-formatted .owl file into a JSON-formatted string. More specifically, the static method parseOntologyObjectHierarchy parses the class hierarchy defined in the ontology into JSON. Everything works fine if I call the method from a JUnit test or the main method of a class (JUnit and the class main are invoked from IntelliJ IDEA Professional 2017). However, if I package my classes as a jar using gradle (including all dependencies), I get an org

Convert String in manchester syntax to OWLAxiom object using owlapi 3 in Java

拜拜、爱过 提交于 2019-12-08 08:16:26
问题 I'm writing a program in Java that exploits the OWL API version 3.1.0. I have a String that represents an axiom using the Manchester OWL Syntax, I would like to convert this string in a OWLAxiom object, because I need to add the resulting axiom into an ontology using the method addAxiom(OWLOntology owl, OWLAxiom axiom) (It's a method of OWLOntologyManager ). How can I do that? 回答1: How about something like the following Java code? Note that I'm parsing a complete, but small, ontology. If you

getting all individuals of a specific class using OWLAPi and JFact reasoner

北战南征 提交于 2019-12-04 16:12:51
Is there any way to get all individuals of a specific class using reasoner? Reasoner because i want to get all the inferred and assereted individuals of that class. I am using JFact reasoner, and i am trying for loops and if statement. And i want to find the individuals of class e.g "person". But i am unable to see the individuals. Any idea about below code or is there any method for this purpose? for (OWLClass c : myPizza.getClassesInSignature()) { NodeSet<OWLNamedIndividual> instances = reasoner.getInstances(c, true); System.out.println(c.getIRI().getFragment()); if (c.getIRI().getFragment()

How to add RDF triples to an OWLOntology?

◇◆丶佛笑我妖孽 提交于 2019-12-01 21:34:06
问题 I have some data coming in from a RabbitMQ. The data is formatted as triples, so a message from the queue could look something like this: :Tom foaf:knows :Anna where : is the standard namespace of the ontology into which I want to import the data, but other prefixes from imports are also possible. The triples consist of subject, property/predicate and object and I know in each message which is which. On the receiving side, I have a Java program with an OWLOntology object that represents the

How to add RDF triples to an OWLOntology?

与世无争的帅哥 提交于 2019-12-01 18:23:26
I have some data coming in from a RabbitMQ. The data is formatted as triples, so a message from the queue could look something like this: :Tom foaf:knows :Anna where : is the standard namespace of the ontology into which I want to import the data, but other prefixes from imports are also possible. The triples consist of subject, property/predicate and object and I know in each message which is which. On the receiving side, I have a Java program with an OWLOntology object that represents the ontology where the newly arriving triples should be stored temporarily for reasoning and other stuff. I

How to properly merge 2 ontologies with OWL API 4 or 3.5

扶醉桌前 提交于 2019-12-01 12:03:26
in my master thesis project I want to merge several ontologies (filled only with individuals) having different namespaces, but sharing the same imports and some individuals(e.G ontologyA#Harold & ontologyB#Harold). I'm trying to gain a new merged ontology where: the ontology header's information of the 2 ontologies are preserved (like in Protege 5 with OWL API 3.5.1). Individuals from merged ontologies are "merged" despite their different namespaces The merged ontology has only 1 namespace My code for the merging private ArrayList<Ontology> ontologies; private OWLOntologyManager man; private

How to properly merge 2 ontologies with OWL API 4 or 3.5

旧城冷巷雨未停 提交于 2019-12-01 09:57:46
问题 in my master thesis project I want to merge several ontologies (filled only with individuals) having different namespaces, but sharing the same imports and some individuals(e.G ontologyA#Harold & ontologyB#Harold). I'm trying to gain a new merged ontology where: the ontology header's information of the 2 ontologies are preserved (like in Protege 5 with OWL API 3.5.1). Individuals from merged ontologies are "merged" despite their different namespaces The merged ontology has only 1 namespace My