List<String> comments = new ArrayList<String>();
List<String> synonyms = new ArrayList<String>();
String dataSource = null;
String genericRegistryName = null;
boolean nonStandardBond = false;
PrunePubChemSynonyms ppcs = new PrunePubChemSynonyms();
for(String line=br.readLine();line!=null;line=br.readLine()) {
//System.out.println(line);
if(line.matches("> <PUBCHEM_CID_ASSOCIATIONS>")) {
//System.out.println("*****");
for(line=br.readLine();line.length()>0;line=br.readLine()) {
if(line.matches("\\d+\\s+1")) {
if(cid != null) System.out.println("Yikes!");
cid = line.split("\\s+")[0];
//System.out.println("****" + cid);
}
}
} else if(line.matches("> <PUBCHEM_SUBSTANCE_SYNONYM>")) {
//System.out.println("*****");
for(line=br.readLine();line.length()>0;line=br.readLine()) {
String s = line.trim();
if(s.length() > 0 && ppcs.isGoodName(s)) synonyms.add(line.trim());
}
} else if(line.matches("> <PUBCHEM_SUBSTANCE_ID>")) {
//System.out.println("*****");
sid = br.readLine().trim();
//System.out.println("****" + sid);