/** * Writes a {@link JulianDate} as an ISO 8601 interval string. * @param output The stream to which to write the value. * @param date The date to write. */ public static void writeDate(CesiumOutputStream output, @Nonnull JulianDate date) { output.writeValue(CesiumFormattingHelper.toIso8601(date, output.getPrettyFormatting() ? Iso8601Format.EXTENDED : Iso8601Format.COMPACT)); }
private final void startNewValue() { if (!m_firstInContainer) { TextWriterHelper.write(m_writer, ','); } if (!m_inProperty && getPrettyFormatting() && m_nextValueOnNewLine) { TextWriterHelper.writeLine(m_writer); writeIndent(); m_nextValueOnNewLine = false; } }
/** * Writes the end of a sequence. */ public final void writeEndSequence() { m_firstInContainer = false; m_indent -= IndentLevel; if (getPrettyFormatting()) { TextWriterHelper.writeLine(m_writer); writeIndent(); } TextWriterHelper.write(m_writer, ']'); }
/** * Writes the end of an object. */ public final void writeEndObject() { m_firstInContainer = false; m_indent -= IndentLevel; if (getPrettyFormatting()) { TextWriterHelper.writeLine(m_writer); writeIndent(); } TextWriterHelper.write(m_writer, '}'); }
JulianDate epoch = dates.get(startIndex); output.writePropertyName("epoch"); output.writeValue(CesiumFormattingHelper.toIso8601(epoch, output.getPrettyFormatting() ? Iso8601Format.EXTENDED : Iso8601Format.COMPACT)); return epoch; } else {
/** * Writes a {@link TimeInterval} as an ISO 8601 interval string. * @param output The stream to which to write the value. * @param interval The interval to write. */ public static void writeTimeInterval(CesiumOutputStream output, TimeInterval interval) { output.writeValue(CesiumFormattingHelper.toIso8601Interval(interval.getStart(), interval.getStop(), output.getPrettyFormatting() ? Iso8601Format.EXTENDED : Iso8601Format.COMPACT)); }
/** * Writes the actual interval of time covered by this CZML interval. * @param interval The interval. */ public final void writeInterval(@Nonnull TimeInterval interval) { if (interval == null) { throw new ArgumentNullException("interval"); } openIntervalIfNecessary(); getOutput().writePropertyName("interval"); getOutput().writeValue(CesiumFormattingHelper.toIso8601Interval(interval.getStart(), interval.getStop(), getOutput().getPrettyFormatting() ? Iso8601Format.EXTENDED : Iso8601Format.COMPACT)); }