Questions tagged [owl-api]

The OWL API is a Java API and reference implementation for creating, manipulating and serializing OWL ontologies.

The OWL API is a Java API and reference implementation for creating, manipulating and serializing OWL ontologies. The latest version of the API is focused towards OWL 2.

The OWL API is open source and is available under either the LGPL or Apache Licenses.

496 questions
28
votes
1 answer

OWL API, Jena API, Protege API, which one to use

I am trying to implement an eclipse based application working with ontologies. (My topic is semantic annotation). I will need to display the ontology to the user (as a tree) and to establish links between ontology classes and some schema. As I only…
Sabina
  • 306
  • 1
  • 4
  • 6
8
votes
1 answer

How can I import .OWL file into Neo4J?

I have been playing with Neo4J to get a feel on how easy it is to work with related data. so far I have work with the Neo4J community browser to create nodes and build relationship between them. I have developed an ontology using protege a link!.…
kxmehdi
  • 81
  • 1
  • 2
6
votes
1 answer

UnloadableImportException: Could not load imported ontology

I have an ontology created in Protege 4.3.0 and stored in an OWL file. In order to load this ontology using the OWL API, I use the following code sample. public class MySampleClass { private final OWLOntologyManager manager =…
enzom83
  • 8,080
  • 10
  • 68
  • 114
5
votes
2 answers

OWL API V5 read ontology from local file

in the current documentation example at the link: https://github.com/owlcs/owlapi/blob/version5/contract/src/test/java/org/semanticweb/owlapi/examples/Examples.java There is no example of how to load an ontology from a local file. There is only a…
user3781976
  • 119
  • 1
  • 11
5
votes
1 answer

OWLAPI : how load ontology having import works?

I have ontology which has another ontology imported in it. I want to know how OWLOntologyManager's loadOntologyFromOntologyDocument(OWLOntologyDocumentSource documentSource, OWLOntologyLoaderConfiguration config) works internally. I have used…
SuhasD
  • 728
  • 2
  • 7
  • 20
4
votes
1 answer

OWLAPI : HermiT reasoner shows incorrect result and NO explanation

I have following ontology created through Protege. Ontology :
SuhasD
  • 728
  • 2
  • 7
  • 20
4
votes
1 answer

Does OWL punning treats class and individual with same name as SAME semantically?

According to the original OWL definition of OWL DL, we can't give the same name to a class and an individual (which is a clear difference between OWL DL and OWL Full). "Punning" is introduced in OWL 2 and removes this restriction. So I can give same…
SuhasD
  • 728
  • 2
  • 7
  • 20
4
votes
4 answers

Using OWL API, how to get class or individual name

I can get OWLClass and access the information. The classes and individuals are along with prefix. Is there any method to get rid of prefix? For example: OWLClass cls = factory.getOWLClass(":Person", pm); for (OWLIndividual indiv :…
crazytomcat
  • 607
  • 1
  • 7
  • 12
4
votes
2 answers

OWL api find properties of class

I've an ontology file and I can obtain all classes in its (I'm using OWL-API). Well, I should retrieve, for each classes, data properties and object properties present into my file .owl, there is any way to get them with OWL-API?
Claudio Pomo
  • 2,392
  • 7
  • 42
  • 71
4
votes
2 answers

How to make a deep copy of an OWLOntology

In my program I need to make a deep copy of an instance of OWLOntology. I suppose I need to create a new OWLOntologyManager: ontologyManager = OWLManager.createOWLOntologyManager(); now I want to add an ontology to the manager which is a DEEP copy…
PieterDB
  • 285
  • 4
  • 14
4
votes
2 answers

How to add RDF triples to an OWLOntology?

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,…
casualcoder
  • 480
  • 4
  • 17
3
votes
1 answer

don't know how to get object property from ontology in java with Hermit

I'm trying to get an object property from a class, in particular: I'm trying to understand when a class is a part of some other class (the construct used could be seen in the screenshot). I've already tried to use the OWL-api function…
DiegLuthor
  • 195
  • 1
  • 14
3
votes
2 answers

Dependency issue creating SWRL Rule with SWRL API using gradle

I am trying to add a SWRL rule to my Ontology using SWRLAPI and OWLAPI. I am trying to use OWLAPI's version which is compatible with SWRLAPI. However, I still get errors when creating a rule. It seems to be a problem with the dependency management.…
Bruno Pessanha
  • 2,874
  • 4
  • 24
  • 35
3
votes
1 answer

Hermit Reasoner - SPARQL Query

I'm using Hermit Reasoner with OWL-API 5 as follows: OWLOntologyManager manager= OWLManager.createOWLOntologyManager(); //create the manager OWLOntology ontology=manager.loadOntologyFromOntologyDocument(new File("ontologies/E1G1.owl")); …
Discipulos
  • 423
  • 8
  • 23
3
votes
1 answer

How to save owl ontology in json-ld format?

OWLDocumentFormat ontologyFormat = new RDFJsonLDDocumentFormat(); OWLOntologyManager manager = OWLManager.createOWLOntologyManager(); OWLOntology ontology = manager.loadOntologyFromOntologyDocument(inputstream); manager.saveOntology( ontology,…
Shreshtha Garg
  • 165
  • 1
  • 2
  • 10
1
2 3
33 34