@LcdService(service=ILcdModelEncoder.class, priority=20000) public class TLcdAIXM51ModelEncoder extends ALcdXMLModelEncoder
ILcdModelEncoder
creates AIXM 5.1 files from
ILcdModel
object of type TLcdAIXM51AbstractAIXMMessage
that represents
a collection of AIXM 5.1 features, or
ILcdModel
object of type ILcdModelTreeNode
, containing child models
of type TLcdAIXM51AbstractAIXMMessage
, or
TLcdAIXM51AbstractAIXMFeature
object that represents a stand-alone AIXM 5.1 feature.
A TLcdAIXM51AbstractAIXMFeature
is the general representation of an AIXM 5.1 feature,
which corresponds to a real-world aeronautical object like a navaid, airport, airspace, etc.
TLcdAIXM51AbstractAIXMMessage
,
TLcdAIXM51AbstractAIXMFeature
,
Serialized FormConstructor and Description |
---|
TLcdAIXM51ModelEncoder()
Constructs a new
TLcdAIXM51ModelEncoder . |
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,
Result aDestination)
Exports the given model to a destination result.
|
void |
export(ILcdModel aModel,
String aDestinationName)
Exports the specified model to the specified destination.
|
void |
exportFeature(TLcdAIXM51AbstractAIXMFeature aFeature,
String aDestination)
Exports the given AIXM 5.1 feature to the specified destination.
|
String |
getDisplayName()
Returns a short, displayable name for the format this
ILcdModelEncoder encodes to. |
EntityResolver2 |
getEntityResolver()
Returns the
org.xml.sax.ext.EntityResolver2 that is used for creating input sources for
XSD schemas. |
ILcdModelReferenceFormatter |
getModelReferenceFormatter()
Returns the model reference formatter that is used to format
ILcdModelReference
instances when encoding an srsName. |
ILcdOutputStreamFactory |
getOutputStreamFactory()
Returns the
ILcdOutputStreamFactory that is used for creating output streams. |
XMLOutputFactory |
getXMLOutputFactory()
Returns the
javax.xml.stream.XMLOutputFactory that is used by this encoder for creating
javax.xml.stream.XMLStreamWriter instances. |
void |
save(ILcdModel aModel)
Saves the model to the location where it originally came from.
|
void |
setEntityResolver(EntityResolver2 aEntityResolver)
Sets the
org.xml.sax.ext.EntityResolver2 to be used for creating input sources for XSD
schemas. |
void |
setModelReferenceFormatter(ILcdModelReferenceFormatter aModelReferenceFormatter)
Sets the formatter that is used to format
ILcdModelReference instances
when encoding an srsName. |
void |
setOutputStreamFactory(ILcdOutputStreamFactory aOutputStreamFactory)
Sets the
ILcdOutputStreamFactory to be used for creating output streams. |
void |
setXMLOutputFactory(XMLOutputFactory aXMLOutputFactory)
Sets the
javax.xml.stream.XMLOutputFactory to be used by this encoder for creating
javax.xml.stream.XMLStreamWriter instances. |
public TLcdAIXM51ModelEncoder()
TLcdAIXM51ModelEncoder
.public void exportFeature(TLcdAIXM51AbstractAIXMFeature aFeature, String aDestination) throws IOException
aFeature
- the AIXM 5.1 feature to be exported.aDestination
- 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.NullPointerException
- if the specified feature or destination is null
.IOException
- if an I/O error occurs during encodingpublic boolean canSave(ILcdModel aModel)
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 String getDisplayName()
ILcdModelEncoder
ILcdModelEncoder
encodes to.ILcdModelEncoder
.public EntityResolver2 getEntityResolver()
ALcdXMLModelEncoder
org.xml.sax.ext.EntityResolver2
that is used for creating input sources for
XSD schemas.getEntityResolver
in class ALcdXMLModelEncoder
public ILcdOutputStreamFactory getOutputStreamFactory()
ALcdXMLModelEncoder
ILcdOutputStreamFactory
that is used for creating output streams.getOutputStreamFactory
in interface ILcdOutputStreamFactoryCapable
getOutputStreamFactory
in class ALcdXMLModelEncoder
ILcdOutputStreamFactory
that is used for creating output streams.ALcdXMLModelEncoder.setOutputStreamFactory(com.luciad.io.ILcdOutputStreamFactory)
public XMLOutputFactory getXMLOutputFactory()
ALcdXMLModelEncoder
javax.xml.stream.XMLOutputFactory
that is used by this encoder for creating
javax.xml.stream.XMLStreamWriter
instances.getXMLOutputFactory
in class ALcdXMLModelEncoder
javax.xml.stream.XMLOutputFactory
that is used by this encoder for creating
javax.xml.stream.XMLStreamWriter
instances.public void save(ILcdModel aModel) throws IllegalArgumentException, IOException
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 void setEntityResolver(EntityResolver2 aEntityResolver)
ALcdXMLModelEncoder
org.xml.sax.ext.EntityResolver2
to be used for creating input sources for XSD
schemas. This entity resolver is only used for retrieving runtime extension schemas.setEntityResolver
in class ALcdXMLModelEncoder
aEntityResolver
- the entity resolver to be used for creating input sources for XSD
schemas.public void setOutputStreamFactory(ILcdOutputStreamFactory aOutputStreamFactory)
ALcdXMLModelEncoder
ILcdOutputStreamFactory
to be used for creating output streams. This
output stream factory is used for output streams for both the data files and the XSD schemas.setOutputStreamFactory
in interface ILcdOutputStreamFactoryCapable
setOutputStreamFactory
in class ALcdXMLModelEncoder
aOutputStreamFactory
- the output stream factory to be used by this model encoder.ALcdXMLModelEncoder.setOutputStreamFactory(com.luciad.io.ILcdOutputStreamFactory)
public void setXMLOutputFactory(XMLOutputFactory aXMLOutputFactory)
ALcdXMLModelEncoder
javax.xml.stream.XMLOutputFactory
to be used by this encoder for creating
javax.xml.stream.XMLStreamWriter
instances.setXMLOutputFactory
in class ALcdXMLModelEncoder
aXMLOutputFactory
- the javax.xml.stream.XMLOutputFactory
to be used by this encoder
for creating javax.xml.stream.XMLStreamWriter
instances.public boolean canExport(ILcdModel aModel, String aDestinationName)
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 IOException
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.IOException
- if an I/O error occurs during encoding.public void export(ILcdModel aModel, Result aDestination) throws IOException
Exports the given model to a destination result.
export
in class ALcdXMLModelEncoder
aModel
- the model to exportaDestination
- the destinationIOException
- if an I/O error occurs during encoding.UnsupportedOperationException
- in case the encoder is not able to write to
the given resultILcdModelEncoder.export(ILcdModel, String)
public ILcdModelReferenceFormatter getModelReferenceFormatter()
ILcdModelReference
instances when encoding an srsName.public void setModelReferenceFormatter(ILcdModelReferenceFormatter aModelReferenceFormatter)
ILcdModelReference
instances
when encoding an srsName.aModelReferenceFormatter
- the model reference formatter for this encoder