/** This method gets an OWL ontology used as an input for the supplied rule. */ private OWLOntology getInputOntologyForRule(IRI iri) throws OWLOntologyCreationException { if (iri.getScheme().equals(PREFIX)) { iri = getOntologyIRIForRuleName(iri.toString().substring(PREFIX.length())); } final OWLOntologyManager m = controller.getOWLOntologyManager(); OWLOntology o; if (m.contains(iri)) { o = m.getOntology(iri); } else { o = m.loadOntology(iri); } return o; }
/** * Determines whether an IRI that represents an annotation value can be opened in a web browser. * i.e. wherther or not the IRI represents a web link. * * @param iri The iri to be tested. * @return <code>true</code> if the IRI represents a web link, other wise <code>false</code>. */ private boolean isLinkableAddress(IRI iri) { String scheme = iri.getScheme(); return scheme != null && scheme.startsWith("http"); }