Package com.luciad.format.aixm51.xml
Class TLcdAIXM51ModelEncoder
java.lang.Object
com.luciad.format.xml.bind.schema.ALcdXMLModelEncoder
com.luciad.format.aixm51.xml.TLcdAIXM51ModelEncoder
- All Implemented Interfaces:
ILcdOutputStreamFactoryCapable
,ILcdModelEncoder
,Serializable
@LcdService(service=ILcdModelEncoder.class,
priority=20000)
public class TLcdAIXM51ModelEncoder
extends ALcdXMLModelEncoder
This
ILcdModelEncoder
creates AIXM 5.1 files from
- an
ILcdModel
object of typeTLcdAIXM51AbstractAIXMMessage
that represents a collection of AIXM 5.1 features, or - an
ILcdModel
object of typeILcdModelTreeNode
, containing child models of typeTLcdAIXM51AbstractAIXMMessage
, or - an
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.
- Since:
- 10.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.void
Exports the given model to a destination result.void
exportFeature
(TLcdAIXM51AbstractAIXMFeature aFeature, String aDestination) Exports the given AIXM 5.1 feature to the specified destination.Returns a short, displayable name for the format thisILcdModelEncoder
encodes to.Returns theorg.xml.sax.ext.EntityResolver2
that is used for creating input sources for XSD schemas.Returns the model reference formatter that is used to formatILcdModelReference
instances when encoding an srsName.Returns theILcdOutputStreamFactory
that is used for creating output streams.Returns thejavax.xml.stream.XMLOutputFactory
that is used by this encoder for creatingjavax.xml.stream.XMLStreamWriter
instances.void
Saves the model to the location where it originally came from.void
setEntityResolver
(EntityResolver2 aEntityResolver) Sets theorg.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 formatILcdModelReference
instances when encoding an srsName.void
setOutputStreamFactory
(ILcdOutputStreamFactory aOutputStreamFactory) Sets theILcdOutputStreamFactory
to be used for creating output streams.void
setXMLOutputFactory
(XMLOutputFactory aXMLOutputFactory) Sets thejavax.xml.stream.XMLOutputFactory
to be used by this encoder for creatingjavax.xml.stream.XMLStreamWriter
instances.
-
Constructor Details
-
TLcdAIXM51ModelEncoder
public TLcdAIXM51ModelEncoder()Constructs a newTLcdAIXM51ModelEncoder
.
-
-
Method Details
-
exportFeature
public void exportFeature(TLcdAIXM51AbstractAIXMFeature aFeature, String aDestination) throws IOException Exports the given AIXM 5.1 feature to the specified destination.- Parameters:
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.- Throws:
NullPointerException
- if the specified feature or destination isnull
.IOException
- if an I/O error occurs during encoding
-
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.- 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:
-
getDisplayName
Description copied from interface:ILcdModelEncoder
Returns a short, displayable name for the format thisILcdModelEncoder
encodes to.- Returns:
- the displayable name of this
ILcdModelEncoder
.
-
getEntityResolver
Description copied from class:ALcdXMLModelEncoder
Returns theorg.xml.sax.ext.EntityResolver2
that is used for creating input sources for XSD schemas.- Specified by:
getEntityResolver
in classALcdXMLModelEncoder
- Returns:
- the entity resolver to be used for creating input sources for XSD schemas.
-
getOutputStreamFactory
Description copied from class:ALcdXMLModelEncoder
Returns theILcdOutputStreamFactory
that is used for creating output streams.- Specified by:
getOutputStreamFactory
in interfaceILcdOutputStreamFactoryCapable
- Specified by:
getOutputStreamFactory
in classALcdXMLModelEncoder
- Returns:
- the
ILcdOutputStreamFactory
that is used for creating output streams. - See Also:
-
getXMLOutputFactory
Description copied from class:ALcdXMLModelEncoder
Returns thejavax.xml.stream.XMLOutputFactory
that is used by this encoder for creatingjavax.xml.stream.XMLStreamWriter
instances.- Specified by:
getXMLOutputFactory
in classALcdXMLModelEncoder
- Returns:
- the
javax.xml.stream.XMLOutputFactory
that is used by this encoder for creatingjavax.xml.stream.XMLStreamWriter
instances.
-
save
Description copied from interface:ILcdModelEncoder
Saves the model to the location where it originally came from.- 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.
-
setEntityResolver
Description copied from class:ALcdXMLModelEncoder
Sets theorg.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.- Specified by:
setEntityResolver
in classALcdXMLModelEncoder
- Parameters:
aEntityResolver
- the entity resolver to be used for creating input sources for XSD schemas.
-
setOutputStreamFactory
Description copied from class:ALcdXMLModelEncoder
Sets theILcdOutputStreamFactory
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.- Specified by:
setOutputStreamFactory
in interfaceILcdOutputStreamFactoryCapable
- Specified by:
setOutputStreamFactory
in classALcdXMLModelEncoder
- Parameters:
aOutputStreamFactory
- the output stream factory to be used by this model encoder.- See Also:
-
setXMLOutputFactory
Description copied from class:ALcdXMLModelEncoder
Sets thejavax.xml.stream.XMLOutputFactory
to be used by this encoder for creatingjavax.xml.stream.XMLStreamWriter
instances.- Specified by:
setXMLOutputFactory
in classALcdXMLModelEncoder
- Parameters:
aXMLOutputFactory
- thejavax.xml.stream.XMLOutputFactory
to be used by this encoder for creatingjavax.xml.stream.XMLStreamWriter
instances.
-
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.- 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
Description copied from interface:ILcdModelEncoder
Exports the specified model to the specified destination.- 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:
IOException
- if an I/O error occurs during encoding.
-
export
Exports the given model to a destination result.
- Overrides:
export
in classALcdXMLModelEncoder
- Parameters:
aModel
- the model to exportaDestination
- the destination- Throws:
IOException
- if an I/O error occurs during encoding.UnsupportedOperationException
- in case the encoder is not able to write to the given result- See Also:
-
getModelReferenceFormatter
Returns the model reference formatter that is used to formatILcdModelReference
instances when encoding an srsName.- Returns:
- the model reference formatter of this encoder
-
setModelReferenceFormatter
Sets the formatter that is used to formatILcdModelReference
instances when encoding an srsName.- Parameters:
aModelReferenceFormatter
- the model reference formatter for this encoder
-