owl

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

how to associate a resource to an other using Jena API

六月ゝ 毕业季﹏ 提交于 2019-12-08 09:00:26
问题 I have created an ontology containing two classes, the first one is named Father and the second is a subclass named Son . I would like to set the following conditions to the class father using Jena Has only son. Has some son. Then I would do the same for class Son : has exactly some father. My second issue is that I don't know how to associate the instance of class Son to the class Father using also Jena. I know it's possible to manipulate my classes using Protégé, but I want to explore Jena.

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

Why is owl:Restriction reasoning not working in Blazegraph?

一笑奈何 提交于 2019-12-08 08:04:16
问题 With the following RDF in Blazegraph (taken from this answer): :eats rdf:type owl:ObjectProperty . :Vegetable rdf:type owl:Class ; rdfs:subClassOf owl:Thing . :Vegetarian rdf:type owl:Class ; owl:equivalentClass [ rdf:type owl:Restriction ; owl:onProperty :eats ; owl:someValuesFrom :Vegetable ] . :Carrot rdf:type :Vegetable , owl:NamedIndividual . :John rdf:type owl:NamedIndividual , owl:Thing ; :eats :carrot . the following SPARQL is returning blank: select ?who where { ?who a :Vegetarian .

Modelling sequence order in OWL-DL ontology

心已入冬 提交于 2019-12-08 07:46:51
问题 As by default sequence order is not maintained in an OWL ontology. How can i model sequence in an OWL-DL ontology ? 回答1: One way to model a sequence and order its elements is to just introduc a hasNext property to capture sequence order: Class: SequenceItem EquivalentTo: hasNext only SequenceItem ObjectProperty: hasNext Domain: SequenceItem Range: SequenceItem InverseOf: hasPrevious Then, assuming the items you want to sequence in order are represented as instances, you can capture their

Require individual's property values to be a superset of another's?

谁都会走 提交于 2019-12-08 07:21:15
问题 I have defined an ontology with the following classes, properties, and individuals with object property assertions: Class: Employee > Individuals: { EmployeeA } Class: Skill > Individuals: { Skill1, Skill2, Skill3 } Class: Job > Individuals: { DBA } hasSkill > Domain (Employee) and Range (Skill) isAskillBy > Domain (Skill) and Range (Employee) <inverse of hasSkill> requireSkill > Domain (Job) and Range (Skill) isAskillrequiredBy > Domain (Skill) and Range (Job) <inverse of requireSkill>

Narrowing down on SPARQL query

蓝咒 提交于 2019-12-08 04:57:30
问题 I want to make a query that returns only the items where person1(David) and person2(Charles) appears together. My query is: SELECT ?item ?par ?mod ?hon ?firstName ?lastName WHERE { ?item sci:itemTitle ?title. {?item sci:hasParticipant ?par. {?par sci:firstName "Charles".}UNION{?par sci:firstName "David".}} UNION {?item sci:hasModerator ?mod. {?mod sci:firstName "Charles".}UNION{?mod sci:firstName "David".}} UNION {?item sci:hasGuestOfHonor ?hon. {?hon sci:firstName "Charles".}UNION{?hon sci

Get Inferred Object Property Assertions Hermit Reasoner

倖福魔咒の 提交于 2019-12-08 04:28:33
问题 Say that I have some ontology created in Protege and there is an instance of a class with some object property, and a list of object properties, has shown in the following pictures: The hierarchy of object properties is as follows: Now, when I turn the Reasoner on (Hermit), I get the following assert object properties for this same individual: When I click in the explanations for the inferred object property "dependsUp" customer, I get: My question is how can I generate this using Java? I can