private String getMismatchedImportMessage() { StringBuilder sb = new StringBuilder(); sb.append("<html><body>"); sb.append("The imports URI:<br>"); sb.append("<font color=\"blue\">"); sb.append(decl.getURI()); sb.append("</font>"); sb.append("<br>"); sb.append("does not match the URI of the ontology that has been imported:<br>"); sb.append("<font color=\"blue\">"); OWLOntology ont = eKit.getOWLModelManager().getOWLOntologyManager().getImportedOntology(decl); // @@TODO what about anonymous ontologies? sb.append(ont == null ? "(Not loaded)" : ont.getOntologyID().getDefaultDocumentIRI()); sb.append("</font><br><br>"); sb.append("Do you want to fix the mismatch by modifying the imports statement?"); sb.append("</body></html>"); return sb.toString(); }
private String getMismatchedImportMessage() { StringBuilder sb = new StringBuilder(); sb.append("<html><body>"); sb.append("The imports URI:<br>"); sb.append("<font color=\"blue\">"); sb.append(decl.getURI()); sb.append("</font>"); sb.append("<br>"); sb.append("does not match the URI of the ontology that has been imported:<br>"); sb.append("<font color=\"blue\">"); OWLOntology ont = eKit.getOWLModelManager().getOWLOntologyManager().getImportedOntology(decl); // @@TODO what about anonymous ontologies? sb.append(ont == null ? "(Not loaded)" : ont.getOntologyID().getDefaultDocumentIRI()); sb.append("</font><br><br>"); sb.append("Do you want to fix the mismatch by modifying the imports statement?"); sb.append("</body></html>"); return sb.toString(); }
@Override public void visit(OWLOntology ontology) { for (OWLImportsDeclaration decl : ontology.getImportsDeclarations()) { writer.writeStartElement(IMPORT); writer.writeTextContent(decl.getURI().toString()); writer.writeEndElement(); } for (OWLAnnotation annotation : ontology.getAnnotations()) { annotation.accept(this); } List<OWLAxiom> axioms = new ArrayList<OWLAxiom>(ontology.getAxioms()); Collections.sort(axioms); for (OWLAxiom ax : axioms) { ax.accept(this); } }
public void visit(OWLOntology ontology) { for (OWLImportsDeclaration decl : ontology.getImportsDeclarations()) { writer.writeStartElement(IMPORT); writer.writeTextContent(decl.getURI().toString()); writer.writeEndElement(); } for(OWLAnnotation annotation : ontology.getAnnotations()) { annotation.accept(this); } List<OWLAxiom> axioms = new ArrayList<OWLAxiom>(ontology.getAxioms()); Collections.sort(axioms); for (OWLAxiom ax : axioms) { ax.accept(this); } }
private OWLOntology loadImports(OWLImportsDeclaration declaration) throws OWLOntologyCreationException { importsLoadCount++; OWLOntology ont = null; try { ont = loadOntology(declaration.getIRI()); } catch (OWLOntologyCreationException e) { if (!silentMissingImportsHandling) { throw e; } else { // Silent MissingImportEvent evt = new MissingImportEvent(declaration.getURI(), e); fireMissingImportEvent(evt); } } finally { importsLoadCount--; } return ont; }
writeSpace(); fireSectionRenderingStarted(IMPORT.toString()); writeFullURI(decl.getURI().toString()); writeNewLine(); fireSectionRenderingFinished(IMPORT.toString());
for (OWLImportsDeclaration decl : ontology1.getImportsDeclarations()) { write("Imports: "); write(decl.getURI().toString()); write("\n");
writeSpace(); fireSectionRenderingStarted(IMPORT.toString()); writeFullURI(decl.getURI().toString()); writeNewLine(); fireSectionRenderingFinished(IMPORT.toString());