commons-rdf | Common Java interfaces for RDF-1.1 libraries | Data Manipulation library
kandi X-RAY | commons-rdf Summary
kandi X-RAY | commons-rdf Summary
Working repository for experimenting with idea of providing a common library for RDF 1.1 that could be implemented by the upcoming versions of the main Java toolkits (Jena 3.0 and Sesame 4.0) as well as wrappers for other JVM languages (Banana RDF and so on). The main motivation behind this simple library is revise an historical incompatibility issue. This library does not pretend to be a generic api wrapping those libraries, but a set of interfaces for the RDF 1.1 concepts that can be used to expose common RDF-1.1 concepts using common Java interfaces. In the initial phase commons-rdf is focused on a subset of the core concepts defined by RDF-1.1 (IRI, Blank Node, Literal, Triple, and Graph). In particular, commons RDF aims to provide a type-safe, non-general API that covers RDF 1.1. In a future phase we may define interfaces for Datasets and Quads.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Checks if this object equals the given object
- Returns the data type
- Get language tag
- Returns the lexical form of the element
- Compares this object to another
- Returns the URI of the IP attribute
- Returns a string representation of the triples
- Obtain a stream of triples for the given subject and object predicate
- Check if the triples contains an RDF term
- Returns true if the triples contain the given triple
- Create blank node
- Create a blank node
- Compares two blank nodes
- Returns an immutable hashCode of this object
- Returns an immutable hash code of this URI
- Removes all triples
- Returns a string representation of this triples
- Compares this object to another field
- This method returns a unique hash code
- Implementation of hashCode
- Returns the IIiString of this object
- Returns the hashCode of this field
- Get the number of triples in this field
- Returns the IRI for the given IRI
- Compares this trie for equality
- Returns a string representation of the field
commons-rdf Key Features
commons-rdf Examples and Code Snippets
Community Discussions
Trending Discussions on commons-rdf
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:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install commons-rdf
You can use commons-rdf 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 commons-rdf 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