/** http://www.w3.org/ns/owl-profile/EL. **/ OWL2_EL ("EL", Elk, Snorocket, FaCTPlusPlus, HermiT, JFact, TrOWL, Pellet, MORe){ @Override public OWLProfile getOWLProfile() { return new OWL2ELProfile();} }, /** http://www.w3.org/ns/owl-profile/RL. **/ OWL2_RL ("RL", FaCTPlusPlus, HermiT, JFact, TrOWL, Pellet, MORe){ @Override public OWLProfile getOWLProfile() { return new OWL2RLProfile();} },
@Override public OWLProfileReport checkOntology(OWLOntology ontology) { return checkOntologyClosureInProfiles(ontology, Profiles.OWL2_DL, Profiles.OWL2_EL); }
OWL2ELProfile profile = new OWL2ELProfile(); OWLProfileReport report = profile.checkOntology(directOntology); if (!report.isInProfile()) {
public static OWLOntology readOWLELOntology(String filePath) throws OWLOntologyCreationException { OWLOntology ont = readOWLOntology(filePath); OWLOntologyManager elMan = OWLManager.createOWLOntologyManager(); OWLOntology elOnt = elMan.createOntology(); OWL2ELProfile el = new OWL2ELProfile(); OWLProfileReport report = el.checkOntology(ont); HashSet<OWLAxiom> violatingAxioms = new HashSet<>(); for (OWLProfileViolation violation : report.getViolations()) { violatingAxioms.add(violation.getAxiom()); } for (OWLAxiom axiom : ont.getLogicalAxioms()) { if (!violatingAxioms.contains(axiom)) { elMan.addAxiom(elOnt, axiom); } } // IRI physicalModuleIRI = IRI.create(new File("/tmp/smallis/el_module.owl")); // elMan.saveOntology(elOnt, new RDFXMLOntologyFormat(), physicalModuleIRI); logger.info("-Done-"); return elOnt; }
/** http://www.w3.org/ns/owl-profile/EL. **/ OWL2_EL ("EL", Elk, Snorocket, FaCTPlusPlus, HermiT, JFact, TrOWL, Pellet, MORe){ @Override public OWLProfile getOWLProfile() { return new OWL2ELProfile();} }, /** http://www.w3.org/ns/owl-profile/RL. **/ OWL2_RL ("RL", FaCTPlusPlus, HermiT, JFact, TrOWL, Pellet, MORe){ @Override public OWLProfile getOWLProfile() { return new OWL2RLProfile();} },
@Override public OWLProfileReport checkOntology(OWLOntology ontology) { return checkOntologyClosureInProfiles(ontology, Profiles.OWL2_DL, Profiles.OWL2_EL); }
/** http://www.w3.org/ns/owl-profile/EL. **/ OWL2_EL ("EL", Elk, Snorocket, FaCTPlusPlus, HermiT, JFact, TrOWL, Pellet, MORe){ @Override public OWLProfile getOWLProfile() { return new OWL2ELProfile();} }, /** http://www.w3.org/ns/owl-profile/RL. **/ OWL2_RL ("RL", FaCTPlusPlus, HermiT, JFact, TrOWL, Pellet, MORe){ @Override public OWLProfile getOWLProfile() { return new OWL2RLProfile();} },
@Override public OWLProfileReport checkOntology(OWLOntology ontology) { return checkOntologyClosureInProfiles(ontology, Profiles.OWL2_DL, Profiles.OWL2_EL); }
private OWLProfile getSelectedProfile() { if (owl2Button.isSelected()){ return new OWL2Profile(); } else if (owlDLButton.isSelected()){ return new OWL2DLProfile(); } else if (elPPButton.isSelected()){ return new OWL2ELProfile(); } return null; } }
private OWLProfile getSelectedProfile() { if (owl2Button.isSelected()){ return new OWL2Profile(); } else if (owlDLButton.isSelected()){ return new OWL2DLProfile(); } else if (elPPButton.isSelected()){ return new OWL2ELProfile(); } return null; } }
private OWLProfile getSelectedProfile() { if (owl2Button.isSelected()){ return new OWL2Profile(); } else if (owlDLButton.isSelected()){ return new OWL2DLProfile(); } else if (elPPButton.isSelected()){ return new OWL2ELProfile(); } return null; } }
private OWLProfile getSelectedProfile() { if (owl2Button.isSelected()){ return new OWL2Profile(); } else if (owlDLButton.isSelected()){ return new OWL2DLProfile(); } else if (elPPButton.isSelected()){ return new OWL2ELProfile(); } return null; } }
metrics.add(new ProfileMetricCalculator(rootOntology, new OWL2ELProfile())); metrics.add(new ProfileMetricCalculator(rootOntology, new OWL2QLProfile())); metrics.add(new ProfileMetricCalculator(rootOntology, new OWL2RLProfile()));
public static void main(String[] args) { try { DefaultPrefixManager pm = new DefaultPrefixManager("http://protege.cim3.net/file/pub/ontologies/tambis/tambis-full.owl#"); SimpleShortFormProvider sfp = new SimpleShortFormProvider(); // SimpleRenderer ren = new SimpleRenderer(); ManchesterOWLSyntaxOWLObjectRendererImpl ren = new ManchesterOWLSyntaxOWLObjectRendererImpl(); ren.setShortFormProvider(sfp); ToStringRenderer.getInstance().setRenderer(ren); OWLOntologyManager man = OWLManager.createOWLOntologyManager(); // OWLOntology ont = man.loadOntologyFromOntologyDocument(URI.create("http://www.co-ode.org/ontologies/pizza/pizza.owl")); OWLOntology ont = man.loadOntologyFromOntologyDocument(IRI.create("http://owl.cs.manchester.ac.uk/repository/download?ontology=http://protege.cim3.net/file/pub/ontologies/tambis/tambis-full.owl&format=RDF/XML")); System.out.println("Loaded ontology"); check(ont, new OWL2Profile()); check(ont, new OWL2DLProfile()); check(ont, new OWL2ELProfile()); check(ont, new OWL2QLProfile()); check(ont, new OWL2RLProfile()); } catch (OWLOntologyCreationException e) { e.printStackTrace(); } }