@LcdService(service=ILcdModelEncoder.class, priority=20000) public class TLcdASTERIXFinalModelEncoder extends Object implements ILcdModelEncoder, ILcdOutputStreamFactoryCapable
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.
Constructor and Description |
---|
TLcdASTERIXFinalModelEncoder() |
Modifier and Type | Method and Description |
---|---|
boolean |
canExport(ILcdModel aModel,
String aDestinationName)
Returns whether this encoder can export the specified model to the specified destination.
|
boolean |
canSave(ILcdModel aModel)
Returns whether this model encoder can save the specified model to the location it originally came from.
|
void |
export(ILcdModel aModel,
String aDestinationName)
Exports the specified model to the specified destination.
|
String |
getDisplayName()
Returns a short, displayable name for the format this
ILcdModelEncoder encodes to. |
ILcdOutputStreamFactory |
getOutputStreamFactory()
Returns the output stream factory that is used.
|
void |
save(ILcdModel aModel)
Saves the model to the location where it originally came from.
|
void |
setOutputStreamFactory(ILcdOutputStreamFactory aOutputStreamFactory)
Sets the output stream factory to be used.
|
public String getDisplayName()
ILcdModelEncoder
ILcdModelEncoder
encodes to.getDisplayName
in interface ILcdModelEncoder
ILcdModelEncoder
.public void setOutputStreamFactory(ILcdOutputStreamFactory aOutputStreamFactory)
ILcdOutputStreamFactoryCapable
setOutputStreamFactory
in interface ILcdOutputStreamFactoryCapable
aOutputStreamFactory
- the output stream factory to be used.public ILcdOutputStreamFactory getOutputStreamFactory()
ILcdOutputStreamFactoryCapable
getOutputStreamFactory
in interface ILcdOutputStreamFactoryCapable
public boolean canSave(ILcdModel aModel)
ILcdModelEncoder
canSave
in interface ILcdModelEncoder
aModel
- the model to be verified.true
if this encoder can save the model in the location where it originally came from,
false
otherwise.ILcdModelEncoder.save(com.luciad.model.ILcdModel)
public void save(ILcdModel aModel) throws IllegalArgumentException, IOException
ILcdModelEncoder
save
in interface ILcdModelEncoder
aModel
- the model to be saved.IllegalArgumentException
- if the model cannot be saved by this encoder (!canSave(aModel)
).IOException
- if an I/O error occurs during encoding.public boolean canExport(ILcdModel aModel, String aDestinationName)
ILcdModelEncoder
canExport
in interface ILcdModelEncoder
aModel
- the model to be verified.aDestinationName
- the location where the model should be exported to.true
if this encoder can export the specified model to the
specified location, false
otherwise.ILcdModelEncoder.export(com.luciad.model.ILcdModel, java.lang.String)
public void export(ILcdModel aModel, String aDestinationName) throws IllegalArgumentException, IOException
ILcdModelEncoder
export
in interface ILcdModelEncoder
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.IllegalArgumentException
- if the model cannot be saved by this encoder (!canExport(aModel, aDestinationName)
).IOException
- if an I/O error occurs during encoding.