public void expect() throws IOException { writeIndicator(":", false, false, false); states.push(new ExpectFlowMappingKey()); expectNode(false, true, false); } }
public void expect() throws IOException { writeIndicator(":", false, false, false); states.push(new ExpectBlockMappingKey(false)); expectNode(false, true, false); } }
private void writeDoubleQuoted(String text, boolean split) throws IOException { writeIndicator("\"", true, false, false); int start = 0; int end = 0; writeIndicator("\"", false, false, false);
public void expect() throws IOException { if (canonical || (column > bestWidth) || prettyFlow) { writeIndent(); } writeIndicator(":", true, false, false); states.push(new ExpectFlowMappingKey()); expectNode(false, true, false); } }
public void expect() throws IOException { writeIndent(); writeIndicator(":", true, false, true); states.push(new ExpectBlockMappingKey(false)); expectNode(false, true, false); } }
private void processAnchor(String indicator) throws IOException { NodeEvent ev = (NodeEvent) event; if (ev.getAnchor() == null) { preparedAnchor = null; return; } if (preparedAnchor == null) { preparedAnchor = prepareAnchor(ev.getAnchor()); } writeIndicator(indicator + preparedAnchor, true, false, false); preparedAnchor = null; }
private void expectFlowMapping() throws IOException { writeIndicator("{", true, true, false); flowLevel++; increaseIndent(true, false); if (prettyFlow) { writeIndent(); } state = new ExpectFirstFlowMappingKey(); }
private void expectFlowSequence() throws IOException { writeIndicator("[", true, true, false); flowLevel++; increaseIndent(true, false); if (prettyFlow) { writeIndent(); } state = new ExpectFirstFlowSequenceItem(); }
public void expect() throws IOException { if (event instanceof SequenceEndEvent) { indent = indents.pop(); flowLevel--; if (canonical) { writeIndicator(",", false, false, false); writeIndent(); } writeIndicator("]", false, false, false); if (prettyFlow) { writeIndent(); } state = states.pop(); } else { writeIndicator(",", false, false, false); if (canonical || (column > bestWidth && splitLines) || prettyFlow) { writeIndent(); } states.push(new ExpectFlowSequenceItem()); expectNode(false, false, false); } } }
public void expect() throws IOException { if (event instanceof MappingEndEvent) { indent = indents.pop(); flowLevel--; if (canonical) { writeIndicator(",", false, false, false); writeIndent(); } if (prettyFlow) { writeIndent(); } writeIndicator("}", false, false, false); state = states.pop(); } else { writeIndicator(",", false, false, false); if (canonical || (column > bestWidth && splitLines) || prettyFlow) { writeIndent(); } if (!canonical && checkSimpleKey()) { states.push(new ExpectFlowMappingSimpleValue()); expectNode(false, true, true); } else { writeIndicator("?", true, false, false); states.push(new ExpectFlowMappingValue()); expectNode(false, true, false); } } } }
private void writeSingleQuoted(String text, boolean split) throws IOException { writeIndicator("'", true, false, false); boolean spaces = false; boolean breaks = false; writeIndicator("'", false, false, false);
void writeLiteral(String text) throws IOException { String hints = determineBlockHints(text); writeIndicator("|" + hints, true, false, false); if (hints.length() > 0 && (hints.charAt(hints.length() - 1)) == '+') { openEnded = true;
public void expect() throws IOException { if (event instanceof MappingEndEvent) { indent = indents.pop(); flowLevel--; writeIndicator("}", false, false, false); state = states.pop(); } else { if (canonical || (column > bestWidth && splitLines) || prettyFlow) { writeIndent(); } if (!canonical && checkSimpleKey()) { states.push(new ExpectFlowMappingSimpleValue()); expectNode(false, true, true); } else { writeIndicator("?", true, false, false); states.push(new ExpectFlowMappingValue()); expectNode(false, true, false); } } } }
public void expect() throws IOException { if (!this.first && event instanceof SequenceEndEvent) { indent = indents.pop(); state = states.pop(); } else { writeIndent(); writeWhitespace(indicatorIndent); writeIndicator("-", true, false, true); states.push(new ExpectBlockSequenceItem(false)); expectNode(false, false, false); } } }
void writeFolded(String text, boolean split) throws IOException { String hints = determineBlockHints(text); writeIndicator(">" + hints, true, false, false); if (hints.length() > 0 && (hints.charAt(hints.length() - 1) == '+')) { openEnded = true;
public void expect() throws IOException { if (event instanceof SequenceEndEvent) { indent = indents.pop(); flowLevel--; writeIndicator("]", false, false, false); state = states.pop(); } else { if (canonical || (column > bestWidth && splitLines) || prettyFlow) { writeIndent(); } states.push(new ExpectFlowSequenceItem()); expectNode(false, false, false); } } }
public void expect() throws IOException { if (event instanceof DocumentEndEvent) { writeIndent(); if (((DocumentEndEvent) event).getExplicit()) { writeIndicator("...", true, false, false); writeIndent(); } flushStream(); state = new ExpectDocumentStart(false); } else { throw new EmitterException("expected DocumentEndEvent, but got " + event); } } }
DocumentStartEvent ev = (DocumentStartEvent) event; if ((ev.getVersion() != null || ev.getTags() != null) && openEnded) { writeIndicator("...", true, false, false); writeIndent(); if (!implicit) { writeIndent(); writeIndicator("---", true, false, false); if (canonical) { writeIndent();
public void expect() throws IOException { if (!this.first && event instanceof MappingEndEvent) { indent = indents.pop(); state = states.pop(); } else { writeIndent(); if (checkSimpleKey()) { states.push(new ExpectBlockMappingSimpleValue()); expectNode(false, true, true); } else { writeIndicator("?", true, false, true); states.push(new ExpectBlockMappingValue()); expectNode(false, true, false); } } } }
preparedTag = prepareTag(tag); writeIndicator(preparedTag, true, false, false); preparedTag = null;