@Test public void testGOTermList() throws Exception { SplitList<String> goList; StringBuilder sb = new StringBuilder(); goList = parseGOTermList(sb.toString()); assertTrue(goList.size() == 0); sb.append("GO:0005515"); goList = parseGOTermList(sb.toString()); assertTrue(goList.size() == 1); sb.append(",GO:0008270, GO:0043167"); goList = parseGOTermList(sb.toString()); assertTrue(goList.size() == 3); sb.append(",GO:000, 8270, GO:0043167"); goList = parseGOTermList(sb.toString()); assertTrue(goList.size() == 0); }
public static SplitList<String> parseGOTermList(String target) { SplitList<String> list = parseStringList(COMMA, target); SplitList<String> goList = new SplitList<String>(COMMA); for (String item : list) { item = parseString(item); if (item.startsWith("GO:")) { goList.add(item); } else { goList.clear(); break; } } return goList; }
MZTabUtils { public static SplitList<String> parseGOTermList(String target) { SplitList<String> list = parseStringList(COMMA, target); SplitList<String> goList = new SplitList<String>(COMMA); for (String item : list) { item = parseString(item); if (item.startsWith("GO:")) { goList.add(item); } else { goList.clear(); break; } } return goList; } }
MZTabUtils { public static SplitList<String> parseGOTermList(String target) { SplitList<String> list = parseStringList(COMMA, target); SplitList<String> goList = new SplitList<String>(COMMA); for (String item : list) { item = parseString(item); if (item.startsWith("GO:")) { goList.add(item); } else { goList.clear(); break; } } return goList; }  }
MZTabUtils { public static SplitList<String> parseGOTermList(String target) { SplitList<String> list = parseStringList(COMMA, target); SplitList<String> goList = new SplitList<String>(COMMA); for (String item : list) { item = parseString(item); if (item.startsWith("GO:")) { goList.add(item); } else { goList.clear(); break; } } return goList; }  static boolean isEmpty(String s); static String parseString(String target); static String printDouble(Double value); static Param parseParam(String target); static SplitList<String> parseStringList(char splitChar, String target); static SplitList<Param> parseParamList(String target); static SplitList<String> parseGOTermList(String target); static Integer parseInteger(String target); static Double parseDouble(String target); static SplitList<Double> parseDoubleList(String target); static String parseUnitId(String target); static URL parseURL(String target); static URI parseURI(String target); static SplitList<PublicationItem> parsePublicationItems(String target); static SplitList<SpecRef> parseSpecRefList(Unit unit, String target); static Modification parseModification(Section section, String target); static SplitList<Modification> parseModificationList(Section section, String target); }
MZTabUtils { public static SplitList<String> parseGOTermList(String target) { SplitList<String> list = parseStringList(COMMA, target); SplitList<String> goList = new SplitList<String>(COMMA); for (String item : list) { item = parseString(item); if (item.startsWith("GO:")) { goList.add(item); } else { goList.clear(); break; } } return goList; }  static boolean isEmpty(String s); static String parseString(String target); static String printDouble(Double value); static Param parseParam(String target); static SplitList<String> parseStringList(char splitChar, String target); static SplitList<Param> parseParamList(String target); static SplitList<String> parseGOTermList(String target); static Integer parseInteger(String target); static Double parseDouble(String target); static SplitList<Double> parseDoubleList(String target); static String parseUnitId(String target); static URL parseURL(String target); static URI parseURI(String target); static SplitList<PublicationItem> parsePublicationItems(String target); static SplitList<SpecRef> parseSpecRefList(Unit unit, String target); static Modification parseModification(Section section, String target); static SplitList<Modification> parseModificationList(Section section, String target);  }