NCBI2OWL extends NCBIConverter { public static String[] parseLine(String line, int lineNumber) { String[] parts = line.split(":", 2); if (parts.length == 2 && parts[0].trim().length() > 0 && parts[1].trim().length() > 0) { return new String[] { parts[0].trim().toLowerCase(), parts[1].trim() }; } else { logger.warn("Bad line " + lineNumber + ": " + line); return null; } }  static void main(String[] args); static void error(String msg); static OWLOntology convertToOWL(String inputPath, Map<String, String> uniqueNames); static OWLOntology convertToOWL(String inputPath,
			String outputPath,
			Map<String, String> uniqueNames); static OWLOntology convertToOWL(String inputPath,
			String outputPath, InputStream mergeInfo,
			InputStream citationInfo,
			Map<String, String> uniqueNames); static String[] parseLine(String line, int lineNumber); static void checkAxioms(String inputPath, String outputPath); static void printAxioms(OWLOntology ontology, String outputPath);  }
@Test public void testParseLine() { testGoodLine("ID : 2", "id", "2"); testGoodLine("PARENT ID : 131567", "parent id", "131567"); testGoodLine("PARENT ID: 131567", "parent id", "131567"); testGoodLine("PARENT ID:131567", "parent id", "131567"); testGoodLine("RANK : superkingdom", "rank", "superkingdom"); testGoodLine("GC ID : 11", "gc id", "11"); testGoodLine("SCIENTIFIC NAME: Bacteria", "scientific name", "Bacteria"); testGoodLine("GENBANK COMMON NAME : eubacteria", "genbank common name", "eubacteria"); testGoodLine("SYNONYM : not Bacteria Haeckel 1894", "synonym", "not Bacteria Haeckel 1894"); testGoodLine("IN-PART: Prokaryota ", "in-part", "Prokaryota"); testGoodLine("BLAST NAME \t\t : eubacteria\t", "blast name", "eubacteria"); org.apache.log4j.Level level = NCBI2OWL.logger.getLevel(); NCBI2OWL.logger.setLevel(org.apache.log4j.Level.OFF); testBadLine(""); testBadLine("ID"); testBadLine("ID ; 1"); testBadLine(": 1"); testBadLine(" : 1"); testBadLine("ID: "); testBadLine("ID:"); NCBI2OWL.logger.setLevel(level); }