owlapi | OWL API main repository | REST library
kandi X-RAY | owlapi Summary
kandi X-RAY | owlapi Summary
OWL API main repository
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Writes the equivalence classes of the given axioms
- Writes an IRI attribute
- Write an IRI element to the output file
- Write the sub - property chain of the given axiom
- Writes an IRI attribute
- Write an IRI element to the output file
- Outputs the sub - annotation property of the axiom
- Writes an IRI attribute
- Write an IRI element to the output file
- Serialize a SWRLObjectProperty atom
- Writes an IRI attribute
- Write an IRI element to the output file
- Outputs an OWLObjectPropertyDomain
- Writes an IRI attribute
- Write an IRI element to the output file
- Visit an OWLObjectMininal
- Writes an IRI attribute
- Write an IRI element to the output file
- Visit the OWLObjectMaxinal
- Writes an IRI attribute
- Write an IRI element to the output file
- Visit a ObjectExactCardinal
- Writes an IRI attribute
- Write an IRI element to the output file
- Outputs an OWLObjectPropertyRangeAxiom
- Writes an IRI attribute
- Write an IRI element to the output file
- Outputs the given axiom
- Writes an IRI attribute
- Write an IRI element to the output file
- Outputs a negative integer property assertion
- Writes an IRI attribute
- Write an IRI element to the output file
- Outputs a negative data - property assertion
- Writes an IRI attribute
- Write an IRI element to the output file
- Renders a hasKeyAxiom
- Writes an IRI attribute
- Write an IRI element to the output file
- Output data property assertion
- Writes an IRI attribute
- Write an IRI element to the output file
- Outputs a annotation assertion
- Writes an IRI attribute
- Write an IRI element to the output file
- Render the ontology declarations
- Writes an IRI attribute
- Write an IRI element to the output file
- Outputs a sub - object property of the given axiom
- Writes an IRI attribute
- Write an IRI element to the output file
- Visit a FacetRestriction
- Writes an IRI attribute
- Write an IRI element to the output file
- Write the equivaletric Object properties
- Writes an IRI attribute
- Write an IRI element to the output file
- Writes the properties of an equivalency object
- Writes an IRI attribute
- Write an IRI element to the output file
- Write a SWRLVariable instance
- Writes an IRI attribute
- Write an IRI element to the output file
- Serialization of an ASymmetric object property
- Writes an IRI attribute
- Write an IRI element to the output file
- Writes a DisjointObjectPropertiesAxiom
- Writes an IRI attribute
- Write an IRI element to the output file
- Outputs a DisjointDataPropertiesAxiom
- Writes an IRI attribute
- Write an IRI element to the output file
- Writes the declaration axis information
- Writes an IRI attribute
- Write an IRI element to the output file
- Render the OWLDat restrictions
- Writes an IRI attribute
- Write an IRI element to the output file
- This method collects the dataSomeValues from the stream
- Writes an IRI attribute
- Write an IRI element to the output file
- Outputs a FunctionObjectPropertyAxiom
- Writes an IRI attribute
- Write an IRI element to the output file
- Processes the OWLDataAllValues from the stream
- Writes an IRI attribute
- Write an IRI element to the output file
- Write data hasValue
- Writes an IRI attribute
- Write an IRI element to the output file
- Outputs the subclass of the axiom
- Writes an IRI attribute
- Write an IRI element to the output file
owlapi Key Features
owlapi Examples and Code Snippets
Q: Why do requests against my application seem to take forever, but then after a bit they all run much quicker?
A: This is because mod_wsgi by default performs lazy loading of any application. That is, an application is only loaded the fi
implicit none
integer, parameter :: n=500
integer :: k
real :: d2(n,n)
real :: d3(n,n,n)
contains
! Iteration
subroutine benchmark_a(res)
real, intent(out) :: res(n,n,n)
do k = 1, size(d3,3)
res(:,:,k) = d2*d3
double[] doubleValues;
BigDecimal[] bdValues;
@Setup
public void beforeEach() {
numbersAsStrings = new String[NUMBER_COUNT];
doubleValues = new double[NUMBER_COUNT];
bdValues = new BigDecimal[NUMBER_COUNT];
double current
const Benchmarks = ({ indicator_name , indicator_desc, indicator_bench, indicator_approx_date, indicator_avg_field, detail_link,handleClick, showModal}) => {
if(showModal) {
return
}
return(
{in
Community Discussions
Trending Discussions on owlapi
QUESTION
I have a question about querying the object properties that can be defined between classes.I have created triples using the protege ontological approach where,I have created two classes named "A" and "B" with instances A1, A2, A3, and B1, B2, and B3 respectively.
I have added an object property "aToB". Now I want to write a Query that can query the instances under each class using the object property.for which I have written the following QUERY
...ANSWER
Answered 2022-Apr-03 at 18:52The prefix in your query is missing the closing #.
QUESTION
I have the following made up example class hierarchy for clearing my doubt.
The class of Dog
and Human
are subclasses of Animal
. Also present is the class Leash
.
I have modelled the Dog class as a Defined Class with a property restriction on an object property wearsLeash
as shown.
I have modelled the Human class as the complement of the Dog class as shown
I have three individuals for these classes as below. Leo
is supposed to be the Dog
and David
the Human
I have asserted that Leo wearsLeash RedLeash
as shown.
On running the built-in reasoner, Leo
gets classified
as a Dog
but David
doesn't get classified as a Human
. My questions is why is it that David
not inferred as an individual of Human
as the class of animals that are not dogs? Is it due to the Open world assumption ? What other ways do I have to automatically infer David
as Human
using this logic?
Thanks!
EDIT: OWL file
...ANSWER
Answered 2022-Mar-15 at 12:18In the ontology Human
is defined as the intersection of Animal
and the complement of Dog
, which, for the purpose of classifying Human
instances, is equivalent to defining Animal
as the disjoint union of Dog
and Human
.
This means that anything that is defined as being an Animal
will be either a Dog
or a Human
; an instance can be classified as a Dog
if it is known to wear a leash.
The problem here is that David
is not known to wear a leash and is not known not to wear a leash; Open World Assumption means that the reasoner cannot choose either possibility and cannot, therefore decide whether David
is a Dog
or a Human
. To obtain what you want it's necessary to add more information to the ontology, such as that David
belongs to a class that is outside the domain of wearsLeash
.
QUESTION
I have built a small ontology in Protege to test punning with a SPARQL query. The Ontology is:
...ANSWER
Answered 2022-Mar-11 at 14:06Harry is a GE, from your assertions. GE is both a class and an individual; so GE appears in other statements as well, and that's multiplying the answers you're seeing. It's analogous as joining across tables where the join value matches multiple rows in one of the tables involved.
QUESTION
I'm developing a Java application using owl-api. For testing I want to use a TestDataProvider to provide test data for unit-testing.
I'm using version 5.0.0 because the tutorial I read is using this version too. I plan to update later.
...ANSWER
Answered 2022-Feb-19 at 15:13By default, an ontology is saved in the same place it was loaded from - in this case it was loaded from a remote IRI, and there's currently no support for saving an ontology directly to a remote URL.
You can work around this by specifying a target for your saveOntology()
call, e.g.,
QUESTION
I am trying to call an OWL API java program through terminal and it crashes, while the exact same code is running ok when I run it in IntelliJ.
The exception that rises in my main code is this:
...ANSWER
Answered 2022-Jan-31 at 10:43As can be seen in the comments of the post, my problem is fixed, so I thought I'd collect a closing answer here to not leave the post pending.
The actual solution: As explained here nicely by @UninformedUser, the issue was that I had conflicting maven package versions in my dependencies. Bringing everything in sync with each other solved the issue.
Incidental solution: As I wrote in the comments above, specifically defining 3.3.0
for the maven-assembly-plugin
happened to solve the issue. But this was only chance, as explained here by @Ignazio, just because the order of "assembling" things changed, overwriting the conflicting package.
Huge thanks to both for the help.
QUESTION
I want to programmatically get explanations for inferred axioms in consistent ontologies, in a similar manner that one can do in the Protégé UI. I cannot find any straightforward way. I have found the owlexplanation repo, but I cannot for the life of me solve the dependency issues to set up the owlexplanation
environment. I have also browsed the javadoc of owlapi regarding explanations (to avoid the other repo altogether), but I don't see anything useful beyond what I can already see browsing the Java source code.
I have thought of simply negating the inferred axiom, to get explanations through inconsistencies, but I would prefer something cleaner, and I am not sure this approach is correct anyway.
Other (possibly) useful context:
- I had used some Java years ago, but I now primarily use Python (I try to use OWL API with JPype and OWL in general with Owlready2).
- I am using HermiT reasoner (again through JPype) (according to build.xml file, latest stable version 1.3.8).
- I have managed to get explanations for unsatisfiability and inconsistency in my setup, without
owlexplanation
, following this example from the HermiT source code. - I fell in the rabbit hole wanting to make a usable
.jar
file forowlexplanation
, in order to add it in my JPype classpath. My plan went sideways when I couldn't get the Java project to build in the first place. - I am using Intellij IDE.
I would appreciate any insight or tips.
UPDATE Jan 6, 2022:
I decided to try once more with the owlexplanation
code with a clean head so here is where I am at:
- Downloaded the source code from github and extracted the zip.
- Started IntelliJ and instead from "Creating a project from Existing sources", I clicked "Open" and selected the extracted directory.
- I built the project and it did successfully.
- From Maven tools, I run clean, validate, compile and test succesfully.
- If I run "package" Maven action, it throws as error that "The environment variable JAVA_HOME is not correctly set". The thing is that if I go File>Project Structure, I see that SDK is set to 11, it's not empty.
- Additionally, from the
pom.xml
file I get these problems:Plugin 'org.apache.maven.plugins:maven-gpg-plugin:1.5' not found
Plugin 'org.sonatype.plugins:nexus-staging-maven-plugin:1.6.6' not found
UPDATE Jan 8, 2022: (Trying @Ignazio's answer)
I created a new IntelliJ project, and added the Maven dependencies @Ignazio mentioned (plus some others like slf4j
etc) and I got a working example (I think). Moving to my main project (using JPype), I had to manually download some .jars to include in the classpath (as maven can't be used here). These are the ones downloaded so far:
ANSWER
Answered 2022-Jan-07 at 20:52You're not just using the projects but actually building them from scratch, which requires more setup than using the published artifacts.
Shortcut that uses Maven available jars (via Maven Central, although other public repositories should do just as well)
Java code:
QUESTION
I tried to create different individual axiom using OWLAPI 5 in Java. What I want is simple triple using vocab owl:differentFrom like:
...ANSWER
Answered 2021-Dec-23 at 13:03There is an alternative implementation of OWLAPI-v5 that provides a direct way to work with underlying RDF data - ONT-API (by the way, RDF based Protege version also exists). If working via OWLAPI interface for two operands it produces a single triple.
Also it is possible to copy ontology between ont-api manager and owl-api-impl managers, if you prefer to store the data in the form of OWL axioms and need to solve only this particular problem with serialization.
example:
QUESTION
I trying to get reasoning explanations using getInstanceExplanations method:
...ANSWER
Answered 2021-Oct-16 at 13:36Pellet 2.3.2 relies on OWLAPI 3.x.x and is not compatible with OWLAPI 4.x.x
There is a build compatible with OWLAPI 4 available on Maven Central https://search.maven.org/search?q=v:2.4.0-ignazio1977
There is also a much more recent build for OWLAPI 5, under the Openllet fork: https://search.maven.org/artifact/com.github.galigator.openllet/openllet-parent/2.6.4/pom
(2.6.4 is compatible with Java 8, same as the versions you're currently using.)
QUESTION
I tried to save my ontology as NTriples format using owlapi. This error appear when I try to save my ontology:
...ANSWER
Answered 2021-May-26 at 11:41The exception is a bug (please report it, as recommended in the comment), however note that those are not legal OWL axioms. The syntax and semantic specification shows sameAs as requiring two arguments at least.
(Consider that the axiom is supposed to allow definition of synonym individuals; one argument only offers no new information)
If the axioms are generated by an inferred axiom generator, looks like that code has a bug as well.
QUESTION
How can I reproduce the way Protege load ontology using owlapi in java? Like when I use:
...ANSWER
Answered 2021-May-08 at 20:07The axioms parsed from your example ontology are as follows:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install owlapi
You can use owlapi like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the owlapi component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page