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 type TLcdAIXM51AbstractAIXMMessage that represents a collection of AIXM 5.1 features, or
  • an ILcdModel object of type ILcdModelTreeNode, containing child models of type TLcdAIXM51AbstractAIXMMessage, 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 Details

    • TLcdAIXM51ModelEncoder

      public TLcdAIXM51ModelEncoder()
      Constructs a new TLcdAIXM51ModelEncoder.
  • 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 is null.
      IOException - if an I/O error occurs during encoding
    • canSave

      public boolean canSave(ILcdModel aModel)
      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

      public String getDisplayName()
      Description copied from interface: ILcdModelEncoder
      Returns a short, displayable name for the format this ILcdModelEncoder encodes to.
      Returns:
      the displayable name of this ILcdModelEncoder.
    • getEntityResolver

      public EntityResolver2 getEntityResolver()
      Description copied from class: ALcdXMLModelEncoder
      Returns the org.xml.sax.ext.EntityResolver2 that is used for creating input sources for XSD schemas.
      Specified by:
      getEntityResolver in class ALcdXMLModelEncoder
      Returns:
      the entity resolver to be used for creating input sources for XSD schemas.
    • getOutputStreamFactory

      public ILcdOutputStreamFactory getOutputStreamFactory()
      Description copied from class: ALcdXMLModelEncoder
      Returns the ILcdOutputStreamFactory that is used for creating output streams.
      Specified by:
      getOutputStreamFactory in interface ILcdOutputStreamFactoryCapable
      Specified by:
      getOutputStreamFactory in class ALcdXMLModelEncoder
      Returns:
      the ILcdOutputStreamFactory that is used for creating output streams.
      See Also:
    • getXMLOutputFactory

      public XMLOutputFactory getXMLOutputFactory()
      Description copied from class: ALcdXMLModelEncoder
      Returns the javax.xml.stream.XMLOutputFactory that is used by this encoder for creating javax.xml.stream.XMLStreamWriter instances.
      Specified by:
      getXMLOutputFactory in class ALcdXMLModelEncoder
      Returns:
      the javax.xml.stream.XMLOutputFactory that is used by this encoder for creating javax.xml.stream.XMLStreamWriter instances.
    • save

      public void save(ILcdModel aModel) throws IllegalArgumentException, IOException
      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

      public void setEntityResolver(EntityResolver2 aEntityResolver)
      Description copied from class: ALcdXMLModelEncoder
      Sets the 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.
      Specified by:
      setEntityResolver in class ALcdXMLModelEncoder
      Parameters:
      aEntityResolver - the entity resolver to be used for creating input sources for XSD schemas.
    • setOutputStreamFactory

      public void setOutputStreamFactory(ILcdOutputStreamFactory aOutputStreamFactory)
      Description copied from class: ALcdXMLModelEncoder
      Sets the 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.
      Specified by:
      setOutputStreamFactory in interface ILcdOutputStreamFactoryCapable
      Specified by:
      setOutputStreamFactory in class ALcdXMLModelEncoder
      Parameters:
      aOutputStreamFactory - the output stream factory to be used by this model encoder.
      See Also:
    • setXMLOutputFactory

      public void setXMLOutputFactory(XMLOutputFactory aXMLOutputFactory)
      Description copied from class: ALcdXMLModelEncoder
      Sets the javax.xml.stream.XMLOutputFactory to be used by this encoder for creating javax.xml.stream.XMLStreamWriter instances.
      Specified by:
      setXMLOutputFactory in class ALcdXMLModelEncoder
      Parameters:
      aXMLOutputFactory - the javax.xml.stream.XMLOutputFactory to be used by this encoder for creating javax.xml.stream.XMLStreamWriter instances.
    • canExport

      public boolean canExport(ILcdModel aModel, String aDestinationName)
      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

      public void export(ILcdModel aModel, String aDestinationName) throws IOException
      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

      public void export(ILcdModel aModel, Result aDestination) throws IOException

      Exports the given model to a destination result.

      Overrides:
      export in class ALcdXMLModelEncoder
      Parameters:
      aModel - the model to export
      aDestination - 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

      public ILcdModelReferenceFormatter getModelReferenceFormatter()
      Returns the model reference formatter that is used to format ILcdModelReference instances when encoding an srsName.
      Returns:
      the model reference formatter of this encoder
    • setModelReferenceFormatter

      public void setModelReferenceFormatter(ILcdModelReferenceFormatter aModelReferenceFormatter)
      Sets the formatter that is used to format ILcdModelReference instances when encoding an srsName.
      Parameters:
      aModelReferenceFormatter - the model reference formatter for this encoder