OWLOntologyCreationException {
if (iri == null && source == null) {
throw new IllegalArgumentException(
"iri and source annot both be null");
}
OBOFormatParser p = new OBOFormatParser();
OBODoc obodoc = null;
if (iri != null) {
obodoc = p.parse(iri.toURI().toURL());
} else {
if (source.isReaderAvailable()) {
obodoc = p.parse(new BufferedReader(source.getReader()));
} else if (source.isInputStreamAvailable()) {
obodoc = p.parse(new BufferedReader(new InputStreamReader(
source.getInputStream())));
} else {
return parse(source.getDocumentIRI(), null, in);
}
}