public class CzmlDocument extends Object implements ICzmlDocument
Constructor and Description |
---|
CzmlDocument()
Initializes a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addSamplingError(EventHandler<SamplingErrorEventArgs> value)
An event that is raised when a non-fatal sampling error occurs during CZML generation.
|
CzmlDocumentPacketizer |
createStreamingDocument()
Creates a
CzmlDocumentPacketizer that can be used to stream CZML incrementally to a client. |
CzmlDocumentPacketizer |
createStreamingDocument(Writer writer)
Creates a
CzmlDocumentPacketizer that can be used to stream CZML incrementally to a client. |
ArrayList<CesiumSource> |
getCesiumSources()
Gets the collection of
CesiumSource instances used to generate CZML. |
Clock |
getClock()
Gets the initial clock settings to be used when loading the document.
|
String |
getDescription()
Gets the document description.
|
boolean |
getEnableAutomaticReferencing()
Gets a value indicating whether to enable automatic CZML reference creation for objects with the same definition.
|
EvaluatorGroup |
getEvaluatorGroup()
Gets the
EvaluatorGroup to use when evaluating. |
Integer |
getMaximumDataPointsPerPacket()
Gets the maximum number of data points to store in each CZML packet.
|
String |
getName()
Gets the name of the document.
|
ServiceProviderCollection |
getObjectsToWrite()
Gets the collection of instances to be written to CZML.
|
boolean |
getPrettyFormatting()
Gets a value indicating whether the resulting CZML file is formatted using whitespace for
easy readability, which will produce a significantly larger file.
|
TimeInterval |
getRequestedInterval()
Gets the interval for which to write data.
|
Duration |
getStep()
Gets the step size to be used for sampling properties.
|
boolean |
getTerminateOnSamplingError()
Gets a value indicating whether CZML generation halts when a sampling error occurs;
for example if a TLE fails to propagate at the desired time.
|
void |
removeSamplingError(EventHandler<SamplingErrorEventArgs> value)
An event that is raised when a non-fatal sampling error occurs during CZML generation.
|
void |
setClock(Clock value)
Sets the initial clock settings to be used when loading the document.
|
void |
setDescription(String value)
Sets the document description.
|
void |
setEnableAutomaticReferencing(boolean value)
Sets a value indicating whether to enable automatic CZML reference creation for objects with the same definition.
|
void |
setEvaluatorGroup(EvaluatorGroup value)
Sets the
EvaluatorGroup to use when evaluating. |
void |
setMaximumDataPointsPerPacket(Integer value)
Sets the maximum number of data points to store in each CZML packet.
|
void |
setName(String value)
Sets the name of the document.
|
void |
setPrettyFormatting(boolean value)
Sets a value indicating whether the resulting CZML file is formatted using whitespace for
easy readability, which will produce a significantly larger file.
|
void |
setRequestedInterval(TimeInterval value)
Sets the interval for which to write data.
|
void |
setStep(Duration value)
Sets the step size to be used for sampling properties.
|
void |
setTerminateOnSamplingError(boolean value)
Sets a value indicating whether CZML generation halts when a sampling error occurs;
for example if a TLE fails to propagate at the desired time.
|
void |
writeDocument(CesiumOutputStream outputStream)
Writes the document to the provided output stream.
|
void |
writeDocument(Writer writer)
Writes the document to the provided writer.
|
public final String getName()
public final void setName(String value)
public final String getDescription()
public final void setDescription(String value)
public final Clock getClock()
public final void setClock(Clock value)
public final boolean getEnableAutomaticReferencing()
true
.public final void setEnableAutomaticReferencing(boolean value)
true
.@Nonnull public final Duration getStep()
ICesiumFixedStepService
.
By default, this is set to 60 seconds.public final void setStep(@Nonnull Duration value)
ICesiumFixedStepService
.
By default, this is set to 60 seconds.public final TimeInterval getRequestedInterval()
public final void setRequestedInterval(TimeInterval value)
public final boolean getPrettyFormatting()
false
.public final void setPrettyFormatting(boolean value)
false
.@Nullable public final Integer getMaximumDataPointsPerPacket()
null
, meaning that there is no
limit on how many data points will be written in each packet.public final void setMaximumDataPointsPerPacket(@Nullable Integer value)
null
, meaning that there is no
limit on how many data points will be written in each packet.public final boolean getTerminateOnSamplingError()
true
,
exceptions are thrown immediately and no further CZML will be written. When false
,
CZML generation will continue until finished and any exceptions are
raised via the SamplingError
(add
/ remove
) event.
By default, this is set to true
.public final void setTerminateOnSamplingError(boolean value)
true
,
exceptions are thrown immediately and no further CZML will be written. When false
,
CZML generation will continue until finished and any exceptions are
raised via the SamplingError
(add
/ remove
) event.
By default, this is set to true
.public final void addSamplingError(EventHandler<SamplingErrorEventArgs> value)
public final void removeSamplingError(EventHandler<SamplingErrorEventArgs> value)
public final EvaluatorGroup getEvaluatorGroup()
EvaluatorGroup
to use when evaluating.
By default, a new group is created for each document.public final void setEvaluatorGroup(EvaluatorGroup value)
EvaluatorGroup
to use when evaluating.
By default, a new group is created for each document.@Nonnull public final ArrayList<CesiumSource> getCesiumSources()
CesiumSource
instances used to generate CZML.@Nonnull public final ServiceProviderCollection getObjectsToWrite()
@Nonnull public final CzmlDocumentPacketizer createStreamingDocument(@Nonnull Writer writer)
CzmlDocumentPacketizer
that can be used to stream CZML incrementally to a client.
The returned instance is immutable and any further changes to this class will not affect the resulting CZML.writer
- The writer to use.CzmlDocumentPacketizer
for this document.@Nonnull public final CzmlDocumentPacketizer createStreamingDocument()
Creates a CzmlDocumentPacketizer
that can be used to stream CZML incrementally to a client.
The returned instance is immutable and any further changes to this class will not affect the resulting CZML.
The resulting CzmlDocumentPacketizer
must be given a writer to write each packet to
by calling CzmlDocumentPacketizer.generateNextPacket(Writer)
.
CzmlDocumentPacketizer
for this document.public final void writeDocument(Writer writer)
writeDocument
in interface ICzmlDocument
writer
- The writer to use.public final void writeDocument(CesiumOutputStream outputStream)
writeDocument
in interface ICzmlDocument
outputStream
- The output stream to use.