Created
February 21, 2012 14:10
-
-
Save stain/1876732 to your computer and use it in GitHub Desktop.
OWL2 RL checker - needs OWL api
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package no.s11.owlapi; | |
import java.io.File; | |
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 | |
.loadOntologyFromOntologyDocument(file); | |
OWL2RLProfile p = new OWL2RLProfile(); | |
OWLProfileReport report = p.checkOntology(o); | |
for (OWLProfileViolation v : report.getViolations()) { | |
System.out.println(v); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment