Class TLcdASTERIXFinalModelEncoder
- All Implemented Interfaces:
ILcdOutputStreamFactoryCapable
,ILcdModelEncoder
,Serializable
Encoder for ASTERIX trajectory models.
This model encoder can only encode models decoded by the TLcdASTERIXModelDecoder. Specifically, the
model descriptor should be a TLcdASTERIXTrajectoryModelDescriptor
or
TLcdASTERIXPlotModelDescriptor
, TLcdASTERIXWeatherModelDescriptor
or a TLcdModelList containing these kinds of models. This encoder
does not allow to encode models from other formats to be encoded. For instance, you cannot encode ESRI Shape
models with this encoder.
Any changes made to the properties of the ASTERIX trajectories, weather pictures or plots are saved by this encoder. For instance, if you filled in a missing callsign for a trajectory of category 30, this encoder will save that callsign in the encoded file.
The encoder only encodes the trajectories, weather pictures or plots that are available in the model. This means you can delete trajectories or plots which you are not interested in from the model, before passing it to this encoder.
The output is written in the ASTERIX final
or raw ASTERIX
format, depending on the name of the destination
file.
- Since:
- 2013.0
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns whether this encoder can export the specified model to the specified destination.boolean
Returns whether this model encoder can save the specified model to the location it originally came from.void
Exports the specified model to the specified destination.Returns a short, displayable name for the format thisILcdModelEncoder
encodes to.Returns the output stream factory that is used.void
Saves the model to the location where it originally came from.void
setOutputStreamFactory
(ILcdOutputStreamFactory aOutputStreamFactory) Sets the output stream factory to be used.
-
Constructor Details
-
TLcdASTERIXFinalModelEncoder
public TLcdASTERIXFinalModelEncoder()
-
-
Method Details
-
getDisplayName
Description copied from interface:ILcdModelEncoder
Returns a short, displayable name for the format thisILcdModelEncoder
encodes to.- Specified by:
getDisplayName
in interfaceILcdModelEncoder
- Returns:
- the displayable name of this
ILcdModelEncoder
.
-
setOutputStreamFactory
Description copied from interface:ILcdOutputStreamFactoryCapable
Sets the output stream factory to be used.- Specified by:
setOutputStreamFactory
in interfaceILcdOutputStreamFactoryCapable
- Parameters:
aOutputStreamFactory
- the output stream factory to be used.
-
getOutputStreamFactory
Description copied from interface:ILcdOutputStreamFactoryCapable
Returns the output stream factory that is used.- Specified by:
getOutputStreamFactory
in interfaceILcdOutputStreamFactoryCapable
- Returns:
- the output stream factory that is used.
-
canSave
Description copied from interface:ILcdModelEncoder
Returns whether this model encoder can save the specified model to the location it originally came from. Often this will only be a simple test, for example checking the type of the model's model descriptor.- Specified by:
canSave
in interfaceILcdModelEncoder
- Parameters:
aModel
- the model to be verified.- Returns:
true
if this encoder can save the model in the location where it originally came from,false
otherwise.- See Also:
-
save
Description copied from interface:ILcdModelEncoder
Saves the model to the location where it originally came from.- Specified by:
save
in interfaceILcdModelEncoder
- Parameters:
aModel
- the model to be saved.- Throws:
IllegalArgumentException
- if the model cannot be saved by this encoder (!canSave(aModel)
).IOException
- if an I/O error occurs during encoding.
-
canExport
Description copied from interface:ILcdModelEncoder
Returns whether this encoder can export the specified model to the specified destination. This method will typically check whether the contents of the specified model are compatible with the format this encoder is written for.- Specified by:
canExport
in interfaceILcdModelEncoder
- Parameters:
aModel
- the model to be verified.aDestinationName
- the location where the model should be exported to.- Returns:
true
if this encoder can export the specified model to the specified location,false
otherwise.- See Also:
-
export
public void export(ILcdModel aModel, String aDestinationName) throws IllegalArgumentException, IOException Description copied from interface:ILcdModelEncoder
Exports the specified model to the specified destination.- Specified by:
export
in interfaceILcdModelEncoder
- Parameters:
aModel
- the model to be exported.aDestinationName
- the location where the model should be saved. Typically, this is a name for the output file, but it can also point to a file containing the required properties to create a set of data files.- Throws:
IllegalArgumentException
- if the model cannot be saved by this encoder (!canExport(aModel, aDestinationName)
).IOException
- if an I/O error occurs during encoding.
-