private void parseIdRef(Clause cl, boolean optional) { String id = getParseUntil(" !{"); if (!optional && id.length() < 1) { error(""); } cl.addValue(id); }
private void parseIdRef(Clause cl, boolean optional) { String id = getParseUntil(" !{"); if (!optional && id.length() < 1) { error(""); } cl.addValue(id); }
private void parseIdRef(Clause cl, boolean optional) { String id = getParseUntil(" !{"); if (!optional && id.length() < 1) { error(""); } cl.addValue(id); }
private void parseIdRef(Clause cl, boolean optional) throws OBOFormatParserException { String id = getParseUntil(" !{"); if (!optional) { if (id == null || id.length() < 1) { error(""); } } cl.addValue(id); }
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 void parseBoolean(Clause cl) { if (stream.consume("true")) { cl.setValue(Boolean.TRUE); } else if (stream.consume("false")) { cl.setValue(Boolean.FALSE); } else { error("Could not parse boolean value."); } }
private void parseBoolean(Clause cl) { if (stream.consume("true")) { cl.setValue(Boolean.TRUE); } else if (stream.consume("false")) { cl.setValue(Boolean.FALSE); } else { error("Could not parse boolean value."); } }
private void parseBoolean(Clause cl) { if (stream.consume("true")) { cl.setValue(Boolean.TRUE); } else if (stream.consume("false")) { cl.setValue(Boolean.FALSE); } else { error("Could not parse boolean value."); } }
private void parseQualifierBlock(Clause cl) throws OBOFormatParserException { if (s.consume("{")) { parseZeroOrMoreQuals(cl); parseZeroOrMoreWs(); boolean success = s.consume("}"); if (!success) { error("Missing closing '}' for trailing qualifier block."); } } }
private void parseBoolean(Clause cl) throws OBOFormatParserException { if (s.consume("true")) { cl.setValue(true); } else if (s.consume("false")) { cl.setValue(false); } else { error("Could not parse boolean value."); } }
private void parseDef(Clause cl) { if (stream.consume("\"")) { String def = getParseUntilAdv("\""); cl.setValue(def); parseZeroOrMoreWs(); parseXrefList(cl, true); } else { error("Definitions should always be a quoted string."); } }
protected void forceParseNlOrEof() { parseZeroOrMoreWs(); if (stream.eol()) { stream.advanceLine(); return; } if (stream.eof()) { return; } error("expected newline or end of line but found: " + stream.rest()); }
protected void forceParseNlOrEof() throws OBOFormatParserException { parseZeroOrMoreWs(); if (s.eol()) { s.advanceLine(); return; } if (s.eof()) { return; } error("expected newline or end of line but found: "+s.rest()); }
private void parseDef(Clause cl) { if (stream.consume("\"")) { String def = getParseUntilAdv("\""); cl.setValue(def); parseZeroOrMoreWs(); parseXrefList(cl, true); } else { error("Definitions should always be a quoted string."); } }
protected void forceParseNlOrEof() { parseZeroOrMoreWs(); if (stream.eol()) { stream.advanceLine(); return; } if (stream.eof()) { return; } error("expected newline or end of line but found: " + stream.rest()); }
private void parseDef(Clause cl) { if (stream.consume("\"")) { String def = getParseUntilAdv("\""); cl.setValue(def); parseZeroOrMoreWs(); parseXrefList(cl, true); } else { error("Definitions should always be a quoted string."); } }
private void parseOwlDef(Clause cl) throws OBOFormatParserException { if (s.consume("\"")) { String def = getParseUntilAdv("\""); cl.setValue(def); parseZeroOrMoreWs(); parseXrefList(cl, true); } else { error("The "+cl.getTag()+" clause is always a quoted string."); } }
private void parseOwlDef(Clause cl) { if (stream.consume("\"")) { String def = getParseUntilAdv("\""); cl.setValue(def); parseZeroOrMoreWs(); parseXrefList(cl, true); } else { error("The " + cl.getTag() + " clause is always a quoted string."); } }
private void parseSubsetdef(Clause cl) { parseIdRef(cl); parseOneOrMoreWs(); if (stream.consume("\"")) { String desc = getParseUntilAdv("\""); cl.addValue(desc); } else { error(""); } parseZeroOrMoreWs(); parseQualifierBlock(cl); parseHiddenComment(); }