private static OBODoc loadObo(OBORunnerConfiguration config, String iri, Logger logger) throws IOException, OBOFormatDanglingReferenceException, OBOFormatParserException { OBOFormatParser p = new OBOFormatParser(); p.setFollowImports(config.followImports.getValue()); OBODoc obodoc = p.parseURL(iri); List<String> errors= p.checkDanglingReferences(obodoc); for(String error: errors){ logger.log(Level.SEVERE, "Dangling Reference Error: " + error); } if(!config.allowDangling.getValue() && !errors.isEmpty()){ throw new OBOFormatDanglingReferenceException("Dangling references are found during conversion"); } String defaultOntology = config.defaultOnt.getValue(); if(defaultOntology == null || defaultOntology.trim().length()==0){ defaultOntology = iri; } if (defaultOntology != null) { obodoc.addDefaultOntologyHeader(defaultOntology); } return obodoc; }