Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
OWL2 RL checker - needs OWL api
package no.s11.owlapi;
import org.semanticweb.owlapi.apibinding.OWLManager;
import org.semanticweb.owlapi.model.OWLOntology;
import org.semanticweb.owlapi.model.OWLOntologyCreationException;
import org.semanticweb.owlapi.model.OWLOntologyManager;
import org.semanticweb.owlapi.profiles.OWL2RLProfile;
import org.semanticweb.owlapi.profiles.OWLProfileReport;
import org.semanticweb.owlapi.profiles.OWLProfileViolation;
public class ProfileChecker {
public static void main(String[] args) throws OWLOntologyCreationException {
OWLOntologyManager m = OWLManager.createOWLOntologyManager();
File file = new File(args[0]);
OWLOntology o = m
OWL2RLProfile p = new OWL2RLProfile();
OWLProfileReport report = p.checkOntology(o);
for (OWLProfileViolation v : report.getViolations()) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.