/** * Copies this instance and returns the copy. * @return The copy. */ @Override public LabelStyleCesiumWriter clone() { return new LabelStyleCesiumWriter(this); }
/** * Writes the value expressed as a {@code labelStyle}, which is the label style. * @param value The label style. */ public final void writeLabelStyle(@Nonnull CesiumLabelStyle value) { final String PropertyName = LabelStylePropertyName; if (getForceInterval()) { openIntervalIfNecessary(); } if (getIsInterval()) { getOutput().writePropertyName(PropertyName); } getOutput().writeValue(CesiumFormattingHelper.labelStyleToString(value)); }
/** * Writes the value expressed as a {@code reference}, which is the label style specified as a reference to another property. * @param value The reference. */ public final void writeReference(Reference value) { final String PropertyName = ReferencePropertyName; openIntervalIfNecessary(); getOutput().writePropertyName(PropertyName); CesiumWritingHelper.writeReference(getOutput(), value); }
@Test public final void labelStyleCanBeWrittenInsideInterval() { JulianDate startDate = new GregorianDate(2012, 6, 7, 12, 0, 0D).toJulianDate(); { final PacketCesiumWriter usingExpression_1 = (getPacket()); try { { LabelStyleCesiumWriter writer = new LabelStyleCesiumWriter("foo"); try { writer.open(getOutputStream()); writer.writeInterval(startDate, startDate.addSeconds(100.0)); writer.writeLabelStyle(CesiumLabelStyle.FILL_AND_OUTLINE); } finally { DisposeHelper.dispose(writer); } } } finally { DisposeHelper.dispose(usingExpression_1); } } Assert.assertEquals("{\"foo\":{\"interval\":\"20120607T12Z/20120607T120140Z\",\"labelStyle\":\"FILL_AND_OUTLINE\"}}", getStringWriter().toString()); }
@Test public final void labelStyleCanBeWrittenAsSimpleString() { { final PacketCesiumWriter usingExpression_10 = (getPacket()); try { { LabelStyleCesiumWriter writer = new LabelStyleCesiumWriter("foo"); try { writer.open(getOutputStream()); writer.writeLabelStyle(CesiumLabelStyle.FILL_AND_OUTLINE); } finally { DisposeHelper.dispose(writer); } } } finally { DisposeHelper.dispose(usingExpression_10); } } Assert.assertEquals("{\"foo\":\"FILL_AND_OUTLINE\"}", getStringWriter().toString()); }
/** * Writes a value for the {@code style} property as a {@code labelStyle} value. The {@code style} property specifies the style of the label. If not specified, the default value is FILL. * @param value The label style. */ public final void writeStyleProperty(@Nonnull CesiumLabelStyle value) { { cesiumlanguagewriter.LabelStyleCesiumWriter writer = openStyleProperty(); try { writer.writeLabelStyle(value); } finally { DisposeHelper.dispose(writer); } } }
/** * Writes a value for the {@code style} property as a {@code reference} value. The {@code style} property specifies the style of the label. If not specified, the default value is FILL. * @param identifier The identifier of the object which contains the referenced property. * @param propertyNames The hierarchy of properties to be indexed on the referenced object. */ public final void writeStylePropertyReference(String identifier, String[] propertyNames) { { cesiumlanguagewriter.LabelStyleCesiumWriter writer = openStyleProperty(); try { writer.writeReference(identifier, propertyNames); } finally { DisposeHelper.dispose(writer); } } }
@Test public final void labelStyleCanBeWrittenInsideInterval() { JulianDate startDate = new GregorianDate(2012, 6, 7, 12, 0, 0D).toJulianDate(); { final PacketCesiumWriter usingExpression_11 = (getPacket()); try { { LabelStyleCesiumWriter writer = new LabelStyleCesiumWriter("foo"); try { writer.open(getOutputStream()); writer.writeInterval(startDate, startDate.addSeconds(100.0)); writer.writeLabelStyle(CesiumLabelStyle.FILL_AND_OUTLINE); } finally { DisposeHelper.dispose(writer); } } } finally { DisposeHelper.dispose(usingExpression_11); } } Assert.assertEquals("{\"foo\":{\"interval\":\"20120607T12Z/20120607T120140Z\",\"labelStyle\":\"FILL_AND_OUTLINE\"}}", getStringWriter().toString()); }
@Test public final void labelStyleCanBeWrittenAsSimpleString() { { final PacketCesiumWriter usingExpression_0 = (getPacket()); try { { LabelStyleCesiumWriter writer = new LabelStyleCesiumWriter("foo"); try { writer.open(getOutputStream()); writer.writeLabelStyle(CesiumLabelStyle.FILL_AND_OUTLINE); } finally { DisposeHelper.dispose(writer); } } } finally { DisposeHelper.dispose(usingExpression_0); } } Assert.assertEquals("{\"foo\":\"FILL_AND_OUTLINE\"}", getStringWriter().toString()); }
/** * Writes the value expressed as a {@code reference}, which is the label style specified as a reference to another property. * @param identifier The identifier of the object which contains the referenced property. * @param propertyName The property on the referenced object. */ public final void writeReference(String identifier, String propertyName) { final String PropertyName = ReferencePropertyName; openIntervalIfNecessary(); getOutput().writePropertyName(PropertyName); CesiumWritingHelper.writeReference(getOutput(), identifier, propertyName); }
/** * Writes a value for the {@code style} property as a {@code reference} value. The {@code style} property specifies the style of the label. If not specified, the default value is FILL. * @param value The reference. */ public final void writeStylePropertyReference(Reference value) { { cesiumlanguagewriter.LabelStyleCesiumWriter writer = openStyleProperty(); try { writer.writeReference(value); } finally { DisposeHelper.dispose(writer); } } }
/** * Writes the value expressed as a {@code reference}, which is the label style specified as a reference to another property. * @param identifier The identifier of the object which contains the referenced property. * @param propertyNames The hierarchy of properties to be indexed on the referenced object. */ public final void writeReference(String identifier, String[] propertyNames) { final String PropertyName = ReferencePropertyName; openIntervalIfNecessary(); getOutput().writePropertyName(PropertyName); CesiumWritingHelper.writeReference(getOutput(), identifier, propertyNames); }
public cesiumlanguagewriter.LabelStyleCesiumWriter invoke() { return new LabelStyleCesiumWriter(StylePropertyName); } }, false);
/** * Writes a value for the {@code style} property as a {@code reference} value. The {@code style} property specifies the style of the label. If not specified, the default value is FILL. * @param value The earliest date of the interval. */ public final void writeStylePropertyReference(String value) { { cesiumlanguagewriter.LabelStyleCesiumWriter writer = openStyleProperty(); try { writer.writeReference(value); } finally { DisposeHelper.dispose(writer); } } }
/** * Writes the value expressed as a {@code reference}, which is the label style specified as a reference to another property. * @param value The earliest date of the interval. */ public final void writeReference(String value) { final String PropertyName = ReferencePropertyName; openIntervalIfNecessary(); getOutput().writePropertyName(PropertyName); CesiumWritingHelper.writeReference(getOutput(), value); }
@Override protected CesiumPropertyWriter<LabelStyleCesiumWriter> createPropertyWriter(String propertyName) { return new LabelStyleCesiumWriter(propertyName); }
/** * Writes a value for the {@code style} property as a {@code reference} value. The {@code style} property specifies the style of the label. If not specified, the default value is FILL. * @param identifier The identifier of the object which contains the referenced property. * @param propertyName The property on the referenced object. */ public final void writeStylePropertyReference(String identifier, String propertyName) { { cesiumlanguagewriter.LabelStyleCesiumWriter writer = openStyleProperty(); try { writer.writeReference(identifier, propertyName); } finally { DisposeHelper.dispose(writer); } } }