private boolean parseDirectXref(Clause cl) { parseZeroOrMoreWs(); String id = getParseUntil("\",]!{", true); id = id.trim(); if (id.contains(" ")) { warn("accepting bad xref with spaces:<" + id + '>'); } id = id.replaceAll(" +\\Z", ""); Xref xref = new Xref(id); cl.addValue(xref); parseZeroOrMoreWs(); if (stream.peekCharIs('"')) { stream.consume("\""); xref.setAnnotation(getParseUntilAdv("\"")); } return true; }
private boolean parseDirectXref(Clause cl) { parseZeroOrMoreWs(); String id = getParseUntil("\",]!{", true); id = id.trim(); if (id.contains(" ")) { warn("accepting bad xref with spaces:<" + id + '>'); } id = id.replaceAll(" +\\Z", ""); Xref xref = new Xref(id); cl.addValue(xref); parseZeroOrMoreWs(); if (stream.peekCharIs('"')) { stream.consume("\""); xref.setAnnotation(getParseUntilAdv("\"")); } return true; }
private boolean parseDirectXref(Clause cl) { parseZeroOrMoreWs(); String id = getParseUntil("\",]!{", true); id = id.trim(); if (id.contains(" ")) { warn("accepting bad xref with spaces:<" + id + '>'); } id = id.replaceAll(" +\\Z", ""); Xref xref = new Xref(id); cl.addValue(xref); parseZeroOrMoreWs(); if (stream.peekCharIs('"')) { stream.consume("\""); xref.setAnnotation(getParseUntilAdv("\"")); } return true; }
private boolean parseDirectXref(Clause cl) { parseZeroOrMoreWs(); String id = getParseUntil("\",]!{", true); id = id.trim(); if (id.contains(" ")) { warn("accepting bad xref with spaces:<" + id + '>'); } id = id.replaceAll(" +\\Z", ""); Xref xref = new Xref(id); cl.addValue(xref); parseZeroOrMoreWs(); if (stream.peekCharIs('"')) { stream.consume("\""); xref.setAnnotation(getParseUntilAdv("\"")); } return true; }
private boolean parseDirectXref(Clause cl) { parseZeroOrMoreWs(); String id = getParseUntil("\",]!{", true); if (id != null) { id = id.trim(); if (id.contains(" ")) { warn("accepting bad xref with spaces:<"+id+">"); } id = id.replaceAll(" +\\Z", ""); Xref xref = new Xref(id); cl.addValue(xref); parseZeroOrMoreWs(); if (s.peekCharIs('"')) { s.consume("\""); xref.setAnnotation(getParseUntilAdv("\"")); } return true; } return false; }
protected void parseWs() throws OBOFormatParserException { if (s.eol()) { error("Expected at least one white space, but found end of line at pos: "+s.pos); } if (s.eof()) { error("Expected at least one white space, but found end of file."); } if (s.peekChar() == ' ') { s.advance(1); } else { warn("Expected white space at pos: "+s.pos); } }
private boolean parseQual(Clause cl) { parseZeroOrMoreWs(); String rest = stream.rest(); if (!rest.contains("=")) { error( "Missing '=' in trailing qualifier block. This might happen for not properly escaped '{', '}' chars in comments."); } String q = getParseUntilAdv("="); parseZeroOrMoreWs(); String v; if (stream.consume("\"")) { v = getParseUntilAdv("\""); } else { v = getParseUntil(" ,}"); warn("qualifier values should be enclosed in quotes. You have: " + q + '=' + stream .rest()); } if (v.isEmpty()) { warn("Empty value for qualifier in trailing qualifier block."); v = ""; } QualifierValue qv = new QualifierValue(q, v); cl.addQualifierValue(qv); parseZeroOrMoreWs(); return true; }
protected void parseWs() { if (stream.eol()) { error("Expected at least one white space, but found end of line at pos: " + stream.pos); } if (stream.eof()) { error("Expected at least one white space, but found end of file."); } if (stream.peekChar() == ' ') { stream.advance(1); } else { warn("Expected white space at pos: " + stream.pos); } }
protected void parseWs() { if (stream.eol()) { error("Expected at least one white space, but found end of line at pos: " + stream.pos); } if (stream.eof()) { error("Expected at least one white space, but found end of file."); } if (stream.peekChar() == ' ') { stream.advance(1); } else { warn("Expected white space at pos: " + stream.pos); } }
protected void parseWs() { if (stream.eol()) { error("Expected at least one white space, but found end of line at pos: " + stream.pos); } if (stream.eof()) { error("Expected at least one white space, but found end of file."); } if (stream.peekChar() == ' ') { stream.advance(1); } else { warn("Expected white space at pos: " + stream.pos); } }
private boolean parseQual(Clause cl) { parseZeroOrMoreWs(); String rest = stream.rest(); if (!rest.contains("=")) { error( "Missing '=' in trailing qualifier block. This might happen for not properly escaped '{', '}' chars in comments."); } String q = getParseUntilAdv("="); parseZeroOrMoreWs(); String v; if (stream.consume("\"")) { v = getParseUntilAdv("\""); } else { v = getParseUntil(" ,}"); warn("qualifier values should be enclosed in quotes. You have: " + q + '=' + stream .rest()); } if (v.isEmpty()) { warn("Empty value for qualifier in trailing qualifier block."); v = ""; } QualifierValue qv = new QualifierValue(q, v); cl.addQualifierValue(qv); parseZeroOrMoreWs(); return true; }
protected void parseWs() { if (stream.eol()) { error("Expected at least one white space, but found end of line at pos: " + stream.pos); } if (stream.eof()) { error("Expected at least one white space, but found end of file."); } if (stream.peekChar() == ' ') { stream.advance(1); } else { warn("Expected white space at pos: " + stream.pos); } }
private boolean parseQual(Clause cl) { parseZeroOrMoreWs(); String rest = stream.rest(); if (!rest.contains("=")) { error( "Missing '=' in trailing qualifier block. This might happen for not properly escaped '{', '}' chars in comments."); } String q = getParseUntilAdv("="); parseZeroOrMoreWs(); String v; if (stream.consume("\"")) { v = getParseUntilAdv("\""); } else { v = getParseUntil(" ,}"); warn("qualifier values should be enclosed in quotes. You have: " + q + '=' + stream .rest()); } if (v.isEmpty()) { warn("Empty value for qualifier in trailing qualifier block."); v = ""; } QualifierValue qv = new QualifierValue(q, v); cl.addQualifierValue(qv); parseZeroOrMoreWs(); return true; }
private boolean parseQual(Clause cl) throws OBOFormatParserException { parseZeroOrMoreWs(); String rest = s.rest(); if (rest.contains("=") == false) { error("Missing '=' in trailing qualifier block. This might happen for not properly escaped '{', '}' chars in comments."); } String q = getParseUntilAdv("="); if (q != null) { parseZeroOrMoreWs(); String v; if (s.consume("\"")) { v = getParseUntilAdv("\""); } else { v = getParseUntil(" ,}"); warn("qualifier values should be enclosed in quotes. You have: "+q+"="+s.rest()); } if (v == null || v.length() == 0) { warn("Empty value for qualifier in trailing qualifier block."); v = ""; } QualifierValue qv = new QualifierValue(q,v); cl.addQualifierValue(qv); parseZeroOrMoreWs(); return true; } return false; }
private boolean parseQual(Clause cl) { parseZeroOrMoreWs(); String rest = stream.rest(); if (!rest.contains("=")) { error( "Missing '=' in trailing qualifier block. This might happen for not properly escaped '{', '}' chars in comments."); } String q = getParseUntilAdv("="); parseZeroOrMoreWs(); String v; if (stream.consume("\"")) { v = getParseUntilAdv("\""); } else { v = getParseUntil(" ,}"); warn("qualifier values should be enclosed in quotes. You have: " + q + '=' + stream .rest()); } if (v.isEmpty()) { warn("Empty value for qualifier in trailing qualifier block."); v = ""; } QualifierValue qv = new QualifierValue(q, v); cl.addQualifierValue(qv); parseZeroOrMoreWs(); return true; }
private boolean parseXref(Clause cl) { parseZeroOrMoreWs(); String id = getParseUntil("\",]!{", true); if (!id.isEmpty()) { id = removeTrailingWS(id); if (id.contains(" ")) { warn("accepting bad xref with spaces:" + id); } Xref xref = new Xref(id); cl.addXref(xref); parseZeroOrMoreWs(); if (stream.peekCharIs('"')) { stream.consume("\""); xref.setAnnotation(getParseUntilAdv("\"")); } return true; } return false; }
private boolean parseXref(Clause cl) { parseZeroOrMoreWs(); String id = getParseUntil("\",]!{", true); if (id != null && !id.equals("")) { id = removeTrailingWS(id); if (id.contains(" ")) { warn("accepting bad xref with spaces:"+id); } Xref xref = new Xref(id); cl.addXref(xref); parseZeroOrMoreWs(); if (s.peekCharIs('"')) { s.consume("\""); xref.setAnnotation(getParseUntilAdv("\"")); } return true; } return false; }
private boolean parseXref(Clause cl) { parseZeroOrMoreWs(); String id = getParseUntil("\",]!{", true); if (!id.isEmpty()) { id = removeTrailingWS(id); if (id.contains(" ")) { warn("accepting bad xref with spaces:" + id); } Xref xref = new Xref(id); cl.addXref(xref); parseZeroOrMoreWs(); if (stream.peekCharIs('"')) { stream.consume("\""); xref.setAnnotation(getParseUntilAdv("\"")); } return true; } return false; }
private boolean parseXref(Clause cl) { parseZeroOrMoreWs(); String id = getParseUntil("\",]!{", true); if (!id.isEmpty()) { id = removeTrailingWS(id); if (id.contains(" ")) { warn("accepting bad xref with spaces:" + id); } Xref xref = new Xref(id); cl.addXref(xref); parseZeroOrMoreWs(); if (stream.peekCharIs('"')) { stream.consume("\""); xref.setAnnotation(getParseUntilAdv("\"")); } return true; } return false; }
private boolean parseXref(Clause cl) { parseZeroOrMoreWs(); String id = getParseUntil("\",]!{", true); if (!id.isEmpty()) { id = removeTrailingWS(id); if (id.contains(" ")) { warn("accepting bad xref with spaces:" + id); } Xref xref = new Xref(id); cl.addXref(xref); parseZeroOrMoreWs(); if (stream.peekCharIs('"')) { stream.consume("\""); xref.setAnnotation(getParseUntilAdv("\"")); } return true; } return false; }