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
ILcdModelobject of typeTLcdAIXM51AbstractAIXMMessagethat represents a collection of AIXM 5.1 features, or - an
ILcdModelobject of typeILcdModelTreeNode, containing child models of typeTLcdAIXM51AbstractAIXMMessage, or - an
TLcdAIXM51AbstractAIXMFeatureobject 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether this encoder can export the specified model to the specified destination.booleanReturns whether this model encoder can save the specified model to the location it originally came from.voidExports the specified model to the specified destination.voidExports the given model to a destination result.voidexportFeature(TLcdAIXM51AbstractAIXMFeature aFeature, String aDestination) Exports the given AIXM 5.1 feature to the specified destination.Returns a short, displayable name for the format thisILcdModelEncoderencodes to.Returns theorg.xml.sax.ext.EntityResolver2that is used for creating input sources for XSD schemas.Returns the model reference formatter that is used to formatILcdModelReferenceinstances when encoding an srsName.Returns theILcdOutputStreamFactorythat is used for creating output streams.Returns thejavax.xml.stream.XMLOutputFactorythat is used by this encoder for creatingjavax.xml.stream.XMLStreamWriterinstances.voidSaves the model to the location where it originally came from.voidsetEntityResolver(EntityResolver2 aEntityResolver) Sets theorg.xml.sax.ext.EntityResolver2to be used for creating input sources for XSD schemas.voidsetModelReferenceFormatter(ILcdModelReferenceFormatter aModelReferenceFormatter) Sets the formatter that is used to formatILcdModelReferenceinstances when encoding an srsName.voidsetOutputStreamFactory(ILcdOutputStreamFactory aOutputStreamFactory) Sets theILcdOutputStreamFactoryto be used for creating output streams.voidsetXMLOutputFactory(XMLOutputFactory aXMLOutputFactory) Sets thejavax.xml.stream.XMLOutputFactoryto be used by this encoder for creatingjavax.xml.stream.XMLStreamWriterinstances.
-
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:ILcdModelEncoderReturns 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:
trueif this encoder can save the model in the location where it originally came from,falseotherwise.- See Also:
-
getDisplayName
Description copied from interface:ILcdModelEncoderReturns a short, displayable name for the format thisILcdModelEncoderencodes to.- Returns:
- the displayable name of this
ILcdModelEncoder.
-
getEntityResolver
Description copied from class:ALcdXMLModelEncoderReturns theorg.xml.sax.ext.EntityResolver2that is used for creating input sources for XSD schemas.- Specified by:
getEntityResolverin classALcdXMLModelEncoder- Returns:
- the entity resolver to be used for creating input sources for XSD schemas.
-
getOutputStreamFactory
Description copied from class:ALcdXMLModelEncoderReturns theILcdOutputStreamFactorythat is used for creating output streams.- Specified by:
getOutputStreamFactoryin interfaceILcdOutputStreamFactoryCapable- Specified by:
getOutputStreamFactoryin classALcdXMLModelEncoder- Returns:
- the
ILcdOutputStreamFactorythat is used for creating output streams. - See Also:
-
getXMLOutputFactory
Description copied from class:ALcdXMLModelEncoderReturns thejavax.xml.stream.XMLOutputFactorythat is used by this encoder for creatingjavax.xml.stream.XMLStreamWriterinstances.- Specified by:
getXMLOutputFactoryin classALcdXMLModelEncoder- Returns:
- the
javax.xml.stream.XMLOutputFactorythat is used by this encoder for creatingjavax.xml.stream.XMLStreamWriterinstances.
-
save
Description copied from interface:ILcdModelEncoderSaves 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:ALcdXMLModelEncoderSets theorg.xml.sax.ext.EntityResolver2to be used for creating input sources for XSD schemas. This entity resolver is only used for retrieving runtime extension schemas.- Specified by:
setEntityResolverin classALcdXMLModelEncoder- Parameters:
aEntityResolver- the entity resolver to be used for creating input sources for XSD schemas.
-
setOutputStreamFactory
Description copied from class:ALcdXMLModelEncoderSets theILcdOutputStreamFactoryto 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:
setOutputStreamFactoryin interfaceILcdOutputStreamFactoryCapable- Specified by:
setOutputStreamFactoryin classALcdXMLModelEncoder- Parameters:
aOutputStreamFactory- the output stream factory to be used by this model encoder.- See Also:
-
setXMLOutputFactory
Description copied from class:ALcdXMLModelEncoderSets thejavax.xml.stream.XMLOutputFactoryto be used by this encoder for creatingjavax.xml.stream.XMLStreamWriterinstances.- Specified by:
setXMLOutputFactoryin classALcdXMLModelEncoder- Parameters:
aXMLOutputFactory- thejavax.xml.stream.XMLOutputFactoryto be used by this encoder for creatingjavax.xml.stream.XMLStreamWriterinstances.
-
canExport
Description copied from interface:ILcdModelEncoderReturns 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:
trueif this encoder can export the specified model to the specified location,falseotherwise.- See Also:
-
export
Description copied from interface:ILcdModelEncoderExports 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:
exportin 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 formatILcdModelReferenceinstances when encoding an srsName.- Returns:
- the model reference formatter of this encoder
-
setModelReferenceFormatter
Sets the formatter that is used to formatILcdModelReferenceinstances when encoding an srsName.- Parameters:
aModelReferenceFormatter- the model reference formatter for this encoder
-