Class ALcyFormat

java.lang.Object
com.luciad.lucy.format.ALcyFormat
Direct Known Subclasses:
ALcyFormatWrapper, ALcyGeneralFormat

public abstract class ALcyFormat extends Object

This class provides the basic support facilities for adding another data format to Lucy. It defines factory methods, some abstract, some with a default implementation, that clients are supposed to implement for their specific data format. For instance there is a factory method for the model decoder and layer factory.

The createAll method calls all the factory methods and checks whether the created objects follow the documented rules. After this method has been called, all the created objects can be retrieved with the appropriate getters.

None of the implementations of the factory methods are expected to register the created objects with the Lucy backend. For that you are advised to use the TLcyFormatTool.

You are encouraged to only implement the core functionality of your format into a subclass of this ALcyFormat, and use one or more ALcyFormatWrapper wrappers to enable common functionality. For instance, the TLcyAsynchronousFormatWrapper can enable asynchronous painting for a certain ALcyFormat by wrapping that format.

You are discouraged to subclass this class directly, rather use one of the more specific extensions such as ALcyGeneralFormat.

See Also:
  • Constructor Details

    • ALcyFormat

      protected ALcyFormat()
      Creates a new ALcyFormat.
  • Method Details

    • getLucyEnv

      public abstract ILcyLucyEnv getLucyEnv()

      Returns the ILcyLucyEnv backend with which this ALcyFormat is associated.

      Returns:
      The ILcyLucyEnv backend. Must not be null.
    • getLongPrefix

      public abstract String getLongPrefix()

      Returns the long prefix of this format that can be used, for instance, to derive UID's. Typically this would be the fully qualified name of the addon.

      Returns:
      The long prefix that can be used to generate UID's. Must not be null.
    • getShortPrefix

      public abstract String getShortPrefix()

      Returns the short prefix of this format that can be used, for instance, to derive keys for a ALcyProperties instance. This would typically be the short classname of the addon.

      Returns:
      The short prefix of this format. Must not be null.
    • createAll

      public void createAll()

      Creates all the instances of the concepts of this class by calling all the abstract factory methods, and performs some validity checks on the created values. All created instances can later on be retrieved by calling the appropriate get<Concept> methods.

    • getBalloonContentProviders

      public final ILcdBalloonContentProvider[] getBalloonContentProviders()

      Returns the ILcdBalloonContentProviders created by this format. Should only be called after createAll() has been called.

      Returns:
      The ILcdBalloonContentProviders created by this format
    • getModelContentTypeProvider

      public final ILcyModelContentTypeProvider getModelContentTypeProvider()

      Returns the ILcyModelContentTypeProvider created by this format. Should only be called after createAll() has been called.

      Returns:
      The ILcyModelContentTypeProvider created by this format.
      See Also:
    • getModelFactory

      public final ILcdModelFactory getModelFactory()

      Returns the ILcdModelFactory created by this format. Should only be called after createAll() has been called.

      Returns:
      The ILcdModelFactory created by this format.
      See Also:
    • getDefaultModelDescriptorFactories

      public final ALcyDefaultModelDescriptorFactory[] getDefaultModelDescriptorFactories()

      Returns the array of ALcyDefaultModelDescriptorFactory instances created by this format. Should only be called after createAll() has been called.

      Returns:
      The array of ALcyDefaultModelDescriptorFactorys created by this format.
      See Also:
    • getModelDecoders

      public final ILcdModelDecoder[] getModelDecoders()

      Returns the array of ILcdModelDecoder instances created by this format. Should only be called after createAll() has been called.

      Returns:
      The array of ILcdModelDecoders created by this format.
      See Also:
    • getModelDecoderFileTypeDescriptors

      public final ALcyFileTypeDescriptor[] getModelDecoderFileTypeDescriptors()

      Returns the array of ALcyFileTypeDescriptor instances created by this format. Should only be called after createAll() has been called.

      Returns:
      The array of ALcyFileTypeDescriptor instances.
      See Also:
    • getModelDecoderFileTypeDescriptorGroups

      public final String[][] getModelDecoderFileTypeDescriptorGroups()

      Returns the ID's of the groups for the ALcyFileTypeDescriptor instances of the ILcdModelDecoder instances created by this format. Should only be called after createAll() has been called.

      Returns:
      The two-dimensional array of ID's of the groups for the ALcyFileTypeDescriptor instances.
      See Also:
    • getModelEncoders

      public final ILcdModelEncoder[] getModelEncoders()

      Returns the array ILcdModelEncoder instances created by this format. Should only be called after createAll() has been called.

      Returns:
      The array of ILcdModelEncoder instances.
    • getModelEncoderFileTypeDescriptors

      public final ALcyFileTypeDescriptor[] getModelEncoderFileTypeDescriptors()

      Returns the array of ALcyFileTypeDescriptor instances created by this format. Should only be called after createAll() has been called.

      Returns:
      The array of ALcyFileTypeDescriptor instances corresponding to the created ILcdModelEncoder instances.
      See Also:
    • getModelEncoderCustomizerPanelFactories

      public final ILcyCustomizerPanelFactory[] getModelEncoderCustomizerPanelFactories()

      Returns the array of ILcyCustomizerPanelFactory factories created by this format. Should only be called after createAll() has been called.

      The created ILcyCustomizerPanels should work with instances of TLcyModelEncoderContext in their setObject method.

      Returns:
      The array of ILcyCustomizerPanelFactory factories.
      See Also:
    • getModelEncoderCustomizerPanelWorkspaceCodecs

      public final ALcyWorkspaceObjectCodec[] getModelEncoderCustomizerPanelWorkspaceCodecs()

      Returns the ALcyWorkspaceObjectCodec codecs for the ILcyCustomizerPanel instances that customize the model encoders of this format. Should only be called after createAll() has been called.

      Returns:
      An array containing the ALcyWorkspaceObjectCodec instances. Must not be null, but may have length 0. Must not contain null.
      See Also:
    • getModelWorkspaceCodecs

      public final ALcyWorkspaceObjectCodec[] getModelWorkspaceCodecs()

      Returns the array of ALcyWorkspaceObjectCodec codecs created by this format that can encode the state of the ILcdModel instances produced by this format. Should only be called after createAll() has been called.

      Returns:
      The array of ALcyWorkspaceObjectCodec instances.
      See Also:
    • getDomainObjectWorkspaceCodecs

      public final ALcyWorkspaceObjectCodec[] getDomainObjectWorkspaceCodecs()

      Returns the array of ALcyWorkspaceObjectCodec codecs created by this format that can encode the domain objects produced by this format. Should only be called after createAll() has been called.

      Returns:
      The array of ALcyWorkspaceObjectCodec instances.
      See Also:
    • getModelCustomizerPanelWorkspaceCodecs

      public final ALcyWorkspaceObjectCodec[] getModelCustomizerPanelWorkspaceCodecs()

      Returns the array of ALcyWorkspaceObjectCodec codecs created by this format that can encode ILcdCustomizerPanel instances produced by this format. Should only be called after createAll() has been called.

      Returns:
      The array of ALcyWorkspaceObjectCodec instances.
      See Also:
    • getModelCustomizerPanelFactories

      public final ILcyCustomizerPanelFactory[] getModelCustomizerPanelFactories()

      Returns the ILcyCustomizerPanelFactory factories created by this format that can create ILcyCustomizerPanel instances for the models produced by the model decoders and model factories of this format. Should only be called after createAll() has been called.

      The created ILcyCustomizerPanels should work with instances of TLcyModelContext in their setObject method.

      Returns:
      The array of ILcyCustomizerPanelFactory factories.
      See Also:
    • getModelMetaDataCustomizerPanelFactories

      public final ILcyCustomizerPanelFactory[] getModelMetaDataCustomizerPanelFactories()

      Returns the ILcyCustomizerPanelFactory factories created by this format that can create ILcyCustomizerPanel instances to customize the meta data for the models produced by the model decoders and model factories of this format. Should only be called after createAll() has been called.

      The created ILcyCustomizerPanels should work with instances of TLcyModelMetaDataContext in their setObject method.

      Returns:
      The array of ILcyCustomizerPanelFactory factories.
      See Also:
    • getModelMetaDataCustomizerPanelWorkspaceCodecs

      public final ALcyWorkspaceObjectCodec[] getModelMetaDataCustomizerPanelWorkspaceCodecs()

      Returns the ALcyWorkspaceObjectCodec codecs for the ILcyCustomizerPanel instances that customize the meta data for the models created by this class. Should only be called after createAll() has been called.

      Returns:
      An array containing the ALcyWorkspaceObjectCodec instances. Must not be null, but may have length 0. Must not contain null.
      See Also:
    • getDomainObjectCustomizerPanelFactories

      public final ILcyCustomizerPanelFactory[] getDomainObjectCustomizerPanelFactories()

      Returns the ILcyCustomizerPanelFactory factories created by this format that can create ILcyCustomizerPanel instances for the domain objects produced by the model decoders of this format. Should only be called after createAll() has been called.

      The created ILcyCustomizerPanels should work with instances of TLcyDomainObjectContext in their setObject method.

      Returns:
      The array of ILcyCustomizerPanelFactory factories.
      See Also:
    • getDomainObjectCustomizerPanelWorkspaceCodecs

      public final ALcyWorkspaceObjectCodec[] getDomainObjectCustomizerPanelWorkspaceCodecs()

      Returns the ALcyWorkspaceObjectCodec codecs for the ILcyCustomizerPanel instances that customize the domain objects produced by the model decoders of this format. Should only be called after createAll() has been called.

      Returns:
      An array containing the ALcyWorkspaceObjectCodec instances. Must not be null, but may have length 0. Must not contain null.
      See Also:
    • getGXYLayerTypeProvider

      public final ILcyGXYLayerTypeProvider getGXYLayerTypeProvider()

      Returns the ILcyGXYLayerTypeProvider created by this format. Should only be called after createAll() has been called.

      Returns:
      The ILcyGXYLayerTypeProvider.
      See Also:
    • getGXYLayerFactory

      public final ILcdGXYLayerFactory getGXYLayerFactory()

      Returns the ILcdGXYLayerFactory created by this format. Should only be called after createAll() has been called.

      Returns:
      The ILcdGXYLayerFactory.
      See Also:
    • getGXYLayerStyleProvider

      public final ILcyLayerStyleProvider getGXYLayerStyleProvider()

      Returns the ILcdLayerStyleProvider created by this format. Should only be called after createAll() has been called.

      Returns:
      The ILcyLayerStyleProvider.
      See Also:
    • getGXYLayerDecoders

      public final ILcdGXYLayerDecoder[] getGXYLayerDecoders()

      Returns the ILcdGXYLayerDecoder decoders created by this format. Should only be called after createAll() has been called.

      Returns:
      The array of ILcdGXYLayerDecoder decoders.
      See Also:
    • getGXYLayerDecoderFileTypeDescriptors

      public final ALcyFileTypeDescriptor[] getGXYLayerDecoderFileTypeDescriptors()

      Returns the ALcyFileTypeDescriptor descriptors describing the file types of the ILcdGXYLayerDecoder instances created by this format. Should only be called after createAll() has been called.

      Returns:
      The array of ALcyFileTypeDescriptor descriptors.
      See Also:
    • getGXYLayerEncoders

      public final ILcdGXYLayerEncoder[] getGXYLayerEncoders()

      Returns the ILcdGXYLayerEncoder encoders that can encode the layers created by the layer factories of this format. Should only be called after createAll() has been called.

      Returns:
      The array of ILcdGXYLayerEncoder encoders.
      See Also:
    • getGXYLayerEncoderFileTypeDescriptors

      public final ALcyFileTypeDescriptor[] getGXYLayerEncoderFileTypeDescriptors()

      Returns the ALcyFileTypeDescriptor descriptors describing the files for the ILcdGXYLayerEncoder encoders created by this format. Should only be called after createAll() has been called.

      Returns:
      The array of ALcyFileTypeDescriptor descriptors.
      See Also:
    • getAsynchronousPaintHintProvider

      public final ILcyAsynchronousPaintHintProvider getAsynchronousPaintHintProvider()

      Returns the ILcyAsynchronousPaintHintProvider providing the TLcyAsynchronousPaintHint for the layers created by the layer factories of this format. Should only be called after createAll() has been called.

      Returns:
      The ILcyAsynchronousPaintHintProvider.
      See Also:
    • getGXYLayerWorkspaceCodecs

      public final ALcyWorkspaceObjectCodec[] getGXYLayerWorkspaceCodecs()

      Returns the ALcyWorkspaceObjectCodec codecs that can encode and decode the layers created by the layer factories of this format. Should only be called after createAll() has been called.

      Returns:
      The array of ALcyWorkspaceObjectCodec codecs.
      See Also:
    • getGXYLayerCustomizerPanelFactories

      public final ILcyCustomizerPanelFactory[] getGXYLayerCustomizerPanelFactories()

      Returns the ILcyCustomizerPanelFactorys that can create ILcyCustomizerPanel instances for the layers created by the layer factories of this format. Should only be called after createAll() has been called.

      The created ILcyCustomizerPanels should work with instances of TLcyLayerContext in their setObject method.

      Returns:
      The array of ILcyCustomizerPanelFactorys.
      See Also:
    • getGXYLayerCustomizerPanelWorkspaceCodecs

      public final ALcyWorkspaceObjectCodec[] getGXYLayerCustomizerPanelWorkspaceCodecs()

      Returns the ALcyWorkspaceObjectCodec codecs for the ILcyCustomizerPanel instances that customizer the layers created by the layer factories of this format. Should only be called after createAll() has been called.

      Returns:
      An array containing the ALcyWorkspaceObjectCodec instances. Must not be null, but may have length 0. Must not contain null.
      See Also:
    • getGXYLayerSelectionTransferHandlers

      public final ALcyLayerSelectionTransferHandler[] getGXYLayerSelectionTransferHandlers()

      Returns the ALcyLayerSelectionTransferHandler transfer handlers that can transfer the selection of the 2D layers created by the layer factories of this format. Should only be called after createAll() has been called.

      Returns:
      The array of ALcyLayerSelectionTransferHandler transfer handlers.
      See Also:
    • getFormatBarFactory

      public final ALcyFormatBarFactory getFormatBarFactory()

      Returns the ALcyFormatBarFactory that can create a bar to manipulate layers of this format. Should only be called after createAll() has been called.

      Returns:
      The ALcyFormatBarFactory.
      See Also:
    • getLayerHeightProviderFactory

      public final ILcdLayerHeightProviderFactory getLayerHeightProviderFactory()

      Returns the ILcdLayerHeightProviderFactory that can create an ILcdHeightProvider for this format. Should only be called after createAll() has been called.

      Returns:
      The ILcdLayerHeightProviderFactory
      See Also:
    • getModelHeightProviderFactory

      public final ILcdModelHeightProviderFactory getModelHeightProviderFactory()

      Returns the ILcdModelHeightProviderFactory that can create an ILcdHeightProvider for this format. Should only be called after createAll() has been called.

      Returns:
      The ILcdModelHeightProviderFactory
      See Also:
    • getLabelPlacementHintProvider

      public final ILcyGXYLabelPlacementHintProvider getLabelPlacementHintProvider()
      Returns the ILcyLabelPlacementHintProvider that can create a TLcyGXYLabelPlacementHint for a layer of this format. Should only be called after createAll() has been called.
      Returns:
      the ILcyLabelPlacementHintProvider.
      See Also:
    • createModelMeasureProviderFactory

      protected ILcdModelMeasureProviderFactory createModelMeasureProviderFactory()

      Creates the ILcdModelMeasureProviderFactory for this format.

      The default implementation returns null.

      Returns:
      the ILcdModelMeasureProviderFactory for this format. Can be null.
      See Also:
    • getModelMeasureProviderFactory

      public final ILcdModelMeasureProviderFactory getModelMeasureProviderFactory()
      Returns the ILcdModelMeasureProviderFactory created by this format. Should only be called after createAll() has been called.
      Returns:
      the ILcdModelMeasureProviderFactory created by this format.
      See Also:
    • createLayerMeasureProviderFactory

      protected ILcdLayerMeasureProviderFactory createLayerMeasureProviderFactory()

      Creates the ILcdLayerMeasureProviderFactory for this format.

      The default implementation returns null.

      Returns:
      the ILcdLayerMeasureProviderFactory for this format. Can be null.
      See Also:
    • getLayerMeasureProviderFactory

      public final ILcdLayerMeasureProviderFactory getLayerMeasureProviderFactory()
      Returns the ILcdLayerMeasureProviderFactory created by this format. Should only be called after createAll() has been called.
      Returns:
      the ILcdLayerMeasureProviderFactory created by this format.
      See Also:
    • isModelOfFormat

      public abstract boolean isModelOfFormat(ILcdModel aModel)
      Returns true if and only if the given model is a model of the current data format.
      Parameters:
      aModel - The model to check.
      Returns:
      true if and only if the given model is a model of the current data format.
    • createModelContentTypeProvider

      protected abstract ILcyModelContentTypeProvider createModelContentTypeProvider()

      Creates an ILcyModelContentTypeProvider for this format.

      Returns:
      the ILcyModelContentTypeProvider for this data format. May be null.
      See Also:
    • createBalloonContentProviders

      protected ILcdBalloonContentProvider[] createBalloonContentProviders()

      Creates the ILcdBalloonContentProviders for this format.

      The default implementation returns an empty array.

      Returns:
      the ILcdBalloonContentProviders for this format. Must not be null. The array may be empty but not contain null.
    • createModelFactory

      protected ILcdModelFactory createModelFactory()

      Creates the ILcdModelFactory for this data format. All newly created models of the add-on are expected to be constructed through this factory.

      Returns:
      The ILcdModelFactory for this data format. May be null.
    • createDefaultModelDescriptorFactories

      protected ALcyDefaultModelDescriptorFactory[] createDefaultModelDescriptorFactories()

      Creates the ALcyDefaultModelDescriptorFactorys for this data format.

      The default implementation returns a zero-length array.

      Returns:
      The ALcyDefaultModelDescriptorFactory (or multiple) for this data format. Must not be null, but the array may have length 0.
    • createModelDecoders

      protected abstract ILcdModelDecoder[] createModelDecoders()

      Creates the ILcdModelDecoder decoders for this data format.

      It's also the responsibility of this method to make sure that the given lucy environment listens to status events from the decoder. This method should not register the decoder to the lucy env.

      Note that TLcdStatusInputStreamFactory might be useful to implement this method.

      Returns:
      The ILcdModelDecoder (or multiple) for this data format. Must not be null, but the array may have length 0.
      See Also:
    • createModelDecoderFileTypeDescriptors

      protected abstract ALcyFileTypeDescriptor[] createModelDecoderFileTypeDescriptors()

      Creates the ALcyFileTypeDescriptor instances corresponding to the ILcdModelDecoder instances created by this format.

      Returns:
      The array of ALcyFileTypeDescriptor instances. Must not be null. Its length should be equal to the length of the array created by createModelDecoders. It may contain null.
    • createModelDecoderFileTypeDescriptorGroups

      protected String[][] createModelDecoderFileTypeDescriptorGroups()

      Creates file type descriptor groups for all decoders. The groups may be empty, but the group count must equal the decoder count.

      Returns:
      A two-dimensional array containing the groups for the ALcyFileTypeDescriptor instances of the ILcdModelDecoders. The first dimension must be equal to the length of the array of ILcdModelDecoder instances created by this format. It must not contain null, but may contain empty arrays.
    • createModelEncoders

      protected ILcdModelEncoder[] createModelEncoders()

      Creates the model encoders for this data format. It is the responsibility of this method to ensure that the given lucy environment listens to status events from the encoder. This method should not register the encoder to the lucy env.

      Note that TLcdStatusOutputStreamFactory might be useful to implement this method.

      Returns:
      An array of ILcdModelEncoder instances. Must not be null, but may have length 0. Must not contain null.
      See Also:
    • createModelEncoderFileTypeDescriptors

      protected ALcyFileTypeDescriptor[] createModelEncoderFileTypeDescriptors()

      Creates the array of ALcyFileTypeDescriptor instances for the ILcdModelEncoder instances created by this format.

      Returns:
      The array of ALcyFileTypeDescriptor instances. Must not be null and its length must be equal to the length of the array of ILcdModelEncoder instances created by this format. May contain null.
      See Also:
    • createModelEncoderCustomizerPanelFactories

      protected ILcyCustomizerPanelFactory[] createModelEncoderCustomizerPanelFactories()

      Creates the ILcyCustomizerPanelFactory instances for the ILcdModelEncoder instances created by this class.

      The created ILcyCustomizerPanels should work with instances of TLcyModelEncoderContext in their setObject method.

      Hint: When overriding this method, you should also consider overriding createModelEncoderCustomizerPanelWorkspaceCodecs(). This is needed if your ILcyCustomizerPanels need to store any specific state in the workspace.

      Returns:
      An array of ILcyCustomizerPanelFactory instances. Must not be null but may have length 0. Must not contain null.
      See Also:
    • createModelEncoderCustomizerPanelWorkspaceCodecs

      protected ALcyWorkspaceObjectCodec[] createModelEncoderCustomizerPanelWorkspaceCodecs()

      Creates the ALcyWorkspaceObjectCodec codecs for the ILcyCustomizerPanel that customize the model encoder instances created by this class.

      Returns:
      An array containing the ALcyWorkspaceObjectCodec instances. Must not be null, but may have length 0. Must not contain null.
      See Also:
    • createModelWorkspaceCodecs

      protected ALcyWorkspaceObjectCodec[] createModelWorkspaceCodecs()

      Creates the ALcyWorkspaceObjectCodec codecs that can encode and decode the ILcdModel instances produces by the model decoders of this format.

      Returns:
      An array containing the ALcyWorkspaceObjectCodec instances. Must not be null, but may have length 0. Must not contain null.
      See Also:
    • createDomainObjectWorkspaceCodecs

      protected ALcyWorkspaceObjectCodec[] createDomainObjectWorkspaceCodecs()

      Creates the ALcyWorkspaceObjectCodec that can encode and decode the ILcyCustomizerPanel instances for the domain objects produced by the model decoders of this format.

      Returns:
      An array of ALcyWorkspaceObjectCodec instances. Must not be null but may have length 0. Must not contain null.
      See Also:
    • createModelCustomizerPanelWorkspaceCodecs

      protected ALcyWorkspaceObjectCodec[] createModelCustomizerPanelWorkspaceCodecs()

      Creates the ALcyWorkspaceObjectCodec that can encode and decode the ILcyCustomizerPanel instances for the models produced by this format.

      Returns:
      An array of ALcyWorkspaceObjectCodec instances. Must not be null but may have length 0. Must not contain null.
      See Also:
    • createModelCustomizerPanelFactories

      protected ILcyCustomizerPanelFactory[] createModelCustomizerPanelFactories()

      Creates the ILcyCustomizerPanelFactory(s) that can create ILcyCustomizerPanel instances to customize the models produced by the model decoders and model factories of this format.

      The created ILcyCustomizerPanels should work with instances of TLcyModelContext in their setObject method.

      Hint: When overriding this method, you should also consider overriding createModelCustomizerPanelWorkspaceCodecs(). This is needed if your ILcyCustomizerPanels need to store any specific state in the workspace.

      Returns:
      An array containing the ILcyCustomizerPanelFactory instances. Must not be null but may have length 0. Must not contain null.
      See Also:
    • createModelMetaDataCustomizerPanelFactories

      protected ILcyCustomizerPanelFactory[] createModelMetaDataCustomizerPanelFactories()

      Creates the ILcyCustomizerPanelFactory(s) that can create ILcyCustomizerPanel instances to customize the meta data of the models produced by the model decoders and model factories of this format.

      The created ILcyCustomizerPanels should work with instances of TLcyModelMetaDataContext in their setObject method.

      Hint: When overriding this method, you should also consider overriding createModelMetaDataCustomizerPanelWorkspaceCodecs(). This is needed if your ILcyCustomizerPanels need to store any specific state in the workspace.

      Returns:
      An array containing the ILcyCustomizerPanelFactory instances. Must not be null but may have length 0. Must not contain null.
      See Also:
    • createModelMetaDataCustomizerPanelWorkspaceCodecs

      protected ALcyWorkspaceObjectCodec[] createModelMetaDataCustomizerPanelWorkspaceCodecs()

      Creates the ALcyWorkspaceObjectCodec codecs that can encode and decode the ILcyCustomizerPanel instances used to customize the meta data of the models produced by this format.

      Returns:
      An array of ALcyWorkspaceObjectCodec instances. Must not be null but may have length 0. Must not contain null.
      See Also:
    • createDomainObjectCustomizerPanelFactories

      protected ILcyCustomizerPanelFactory[] createDomainObjectCustomizerPanelFactories()

      Creates the ILcyCustomizerPanelFactory factories that can create ILcyCustomizerPanel instances for the domain objects created by the model decoders of this format.

      The created ILcyCustomizerPanels should work with instances of TLcyDomainObjectContext in their setObject method.

      Hint: When overriding this method, you should also consider overriding createDomainObjectCustomizerPanelWorkspaceCodecs(). This is needed if your ILcyCustomizerPanels need to store any specific state in the workspace.

      Returns:
      An array containing the ILcyCustomizerPanelFactory instances. Must not be null but may have length 0. Must not contain null.
      See Also:
    • createDomainObjectCustomizerPanelWorkspaceCodecs

      protected ALcyWorkspaceObjectCodec[] createDomainObjectCustomizerPanelWorkspaceCodecs()

      Creates the ALcyWorkspaceObjectCodec codecs for the ILcyCustomizerPanel instances for the domain objects created by the model decoders of this format.

      Returns:
      An array containing the ALcyWorkspaceObjectCodec instances. Must not be null, but may have length 0. Must not contain null.
      See Also:
    • createGXYLayerTypeProvider

      protected abstract ILcyGXYLayerTypeProvider createGXYLayerTypeProvider()

      Creates an ILcyGXYLayerTypeProvider for this format.

      Returns:
      A ILcyGXYLayerTypeProvider for this data format. May be null.
      See Also:
    • createGXYLayerFactory

      protected abstract ILcdGXYLayerFactory createGXYLayerFactory()

      Creates a ILcdGXYLayerFactory for this format.

      The factory can also configure label algorithms on the created layers.
      Returns:
      the ILcdGXYLayerFactory for this data format. May be null.
      See Also:
    • createGXYLayerStyleProvider

      protected ILcyLayerStyleProvider createGXYLayerStyleProvider()
      Creates the style provider that can retrieve and encode the style of the layers created by the layer factory of this format.
      Returns:
      the style provider to retrieve and encode the style of the layers. May be null
    • createAsynchronousPaintHintProvider

      protected abstract ILcyAsynchronousPaintHintProvider createAsynchronousPaintHintProvider()

      Creates a ILcyAsynchronousPaintHintProvider for this format.

      Returns:
      A ILcyAsynchronousPaintHintProvider for the layers created by the layer factories of this format. May be null.
      See Also:
    • createGXYLayerDecoders

      protected ILcdGXYLayerDecoder[] createGXYLayerDecoders()

      Creates the ILcdGXYLayerDecoder decoders that can decode layers for models created by the model decoders of this format.

      The default implementation returns a zero-length array.

      It is the responsibility of this method to make sure that the lucy environment listens to status events from the decoder. This method should not register the decoder to the lucy env.

      Note that TLcdStatusInputStreamFactory might be useful to implement this method.

      Returns:
      An array of layer decoders. It must not be null, but may have length 0. It must not contain null.
      See Also:
    • createGXYLayerDecoderFileTypeDescriptors

      protected ALcyFileTypeDescriptor[] createGXYLayerDecoderFileTypeDescriptors()

      Creates ALcyFileTypeDescriptors for the ILcdGXYLayerDecoders. The length of the returned array must be equal to that of createGXYLayerDecoders().

      An example usage of these ALcyFileTypeDescriptor instances could be to determine whether a style file is located next to source file of a layer, and apply that style when such a layer is created. Most of the default Lucy formats have such a mechanism in place in their layer factory: they look for a style file with the same name as the source file, but with an extension as specified by a non-null ALcyFileTypeDescriptor.

      The default implementation returns a zero-length array.

      Returns:
      An array of ALcyFileTypeDescriptor instances. Must not be null and its length must be equal to the length of the array of layer decoders created by this format. May contain null.
    • createGXYLayerEncoders

      protected ILcdGXYLayerEncoder[] createGXYLayerEncoders()

      Creates the ILcdGXYLayerEncoder encoders for the layers created by the layer factories of this format.

      The default implementation returns a zero-length array.

      It is the responsibility of this method to make sure that the lucy environment listens to status events from the encoder. This method should not register the encoder to the lucy env.

      Note that TLcdStatusOutputStreamFactory might be useful to implement this method.

      Returns:
      An array of ILcdGXYLayerEncoder instances. Must not be null but may have length 0. Must not contain null.
      See Also:
    • createGXYLayerEncoderFileTypeDescriptors

      protected ALcyFileTypeDescriptor[] createGXYLayerEncoderFileTypeDescriptors()

      Creates ALcyFileTypeDescriptors for the ILcdGXYLayerEncoders. The length of the returned array must be equal to that of createGXYLayerEncoders().

      An example usage of these ALcyFileTypeDescriptor instances is the File | Save layer style action which is available in Lucy. It allows to save the style of a layer to a file ending with an extension as specified by these ALcyFileTypeDescriptors. When no ALcyFileTypeDescriptors are available (or only null ALcyFileTypeDescriptors) it will not be possible to save the layer style to file.

      The default implementation returns a zero-length array.

      Returns:
      An array of ALcyFileTypeDescriptor instances. Must not be null and its length must be equal to the length of the array of layer encoders created by this format. May contain null.
      See Also:
    • createGXYLayerWorkspaceCodecs

      protected ALcyWorkspaceObjectCodec[] createGXYLayerWorkspaceCodecs()

      Creates the ALcyWorkspaceObjectCodec codecs that can encode and decode the layers created by the layer factories of this format.

      The default implementation returns a zero-length array.

      Returns:
      An array of ALcyWorkspaceObjectCodec instances. Must not be null but may have length 0. Must not contain null.
      See Also:
    • createGXYLayerCustomizerPanelFactories

      protected ILcyCustomizerPanelFactory[] createGXYLayerCustomizerPanelFactories()

      Creates the ILcyCustomizerPanelFactory factories that can create ILcyCustomizerPanel instances for the layers created by the layer factories of this format.

      The created ILcyCustomizerPanels should work with instances of TLcyLayerContext in their setObject method.

      The default implementation returns a zero-length array.

      Hint: When overriding this method, you should also consider overriding createGXYLayerCustomizerPanelWorkspaceCodecs(). This is needed if your ILcyCustomizerPanels need to store any specific state in the workspace.

      Returns:
      An array of ILcyCustomizerPanelFactory instances. Must not be null but may have length 0. Must not contain null.
      See Also:
    • createGXYLayerCustomizerPanelWorkspaceCodecs

      protected ALcyWorkspaceObjectCodec[] createGXYLayerCustomizerPanelWorkspaceCodecs()

      Creates the ALcyWorkspaceObjectCodec codecs for the ILcyCustomizerPanel instances for the layers created by the layer factories of this format.

      Returns:
      An array containing the ALcyWorkspaceObjectCodec instances. Must not be null, but may have length 0. Must not contain null.
      See Also:
    • createGXYLayerSelectionTransferHandlers

      protected ALcyLayerSelectionTransferHandler[] createGXYLayerSelectionTransferHandlers()

      Creates the ALcyLayerSelectionTransferHandler transfer handlers that can transfer the selection of the 2D layers created by the layer factories of this format.

      The default implementation returns a zero-length array.

      Returns:
      An array of ALcyLayerSelectionTransferHandler instances. Must not be null but may have length 0. Must not contain null.
      See Also:
    • createFormatBarFactory

      protected ALcyFormatBarFactory createFormatBarFactory()

      Creates the ALcyFormatBarFactory that can create a bar to manipulate layers of this format.

      The default implementation returns null.

      Returns:
      An ALcyFormatBarFactory. May be null.
      See Also:
    • createLayerHeightProviderFactory

      protected ILcdLayerHeightProviderFactory createLayerHeightProviderFactory()

      Creates the ILcdLayerHeightProviderFactory that can create an ILcdHeightProvider for this format.

      The default implementation returns null.

      Returns:
      An ILcdLayerHeightProviderFactory. May be null.
      See Also:
    • createModelHeightProviderFactory

      protected ILcdModelHeightProviderFactory createModelHeightProviderFactory()

      Creates the ILcdModelHeightProviderFactory that can create an ILcdHeightProvider for this format.

      The default implementation returns null.

      Returns:
      An ILcdModelHeightProviderFactory. May be null.
      See Also:
    • createLabelPlacementHintProvider

      protected ILcyGXYLabelPlacementHintProvider createLabelPlacementHintProvider()
      Creates the ILcyLabelPlacementHintProvider that can create a TLcyGXYLabelPlacementHint for layers of this format.

      The default implementation returns null.

      Returns:
      An ILcyLabelPlacementHintProvider. May be null.
      See Also:
    • createModelOfFormatFilter

      public final ILcdFilter createModelOfFormatFilter()

      Utility method to create a ILcdFilter that only accepts ILcdModels that are accepted by isModelOfFormat(com.luciad.model.ILcdModel) .

      Returns:
      The ILcdFilter. Never null.
    • createModelContextOfFormatFilter

      public final ILcdFilter createModelContextOfFormatFilter()

      Utility method to create a ILcdFilter that only accepts TLcyModelContexts whose model is accepted by isModelOfFormat(com.luciad.model.ILcdModel).

      Returns:
      The ILcdFilter.
    • isGXYLayerOfFormat

      public boolean isGXYLayerOfFormat(ILcdGXYLayer aGXYLayer)

      Returns true if and only if the given layer is a layer of the current data format.

      Parameters:
      aGXYLayer - The layer to check.
      Returns:
      true if and only if the given layer is a layer of the current data format.
    • createGXYLayerOfFormatFilter

      public final ILcdFilter createGXYLayerOfFormatFilter()

      Utility method to create a ILcdFilter that only accepts ILcdGXYLayers that are accepted by isGXYLayerOfFormat(com.luciad.view.gxy.ILcdGXYLayer).

      Returns:
      The ILcdFilter. Never null.
    • createLayerContextOfFormatFilter

      public final ILcdFilter createLayerContextOfFormatFilter(boolean aAcceptArrays)

      Utility method to create a ILcdFilter that only accepts TLcyLayerContexts whose layers are accepted by isGXYLayerOfFormat(com.luciad.view.gxy.ILcdGXYLayer).

      Parameters:
      aAcceptArrays - if true, the filter will also accept arrays of TLcyLayerContext
      Returns:
      The ILcdFilter.
    • createDataSourceHandlers

      protected ALcyDataSourceHandler[] createDataSourceHandlers()

      Creates ALcyDataSourceHandler(s) that are more general than ALcyFileTypeDescriptors.

      Returns:
      An array containing the ALcyDataSourceHandler instances. Must not be null but may have length 0. Must not contain null.
    • createDataSourceHandlerFileTypeDescriptors

      protected ALcyFileTypeDescriptor[] createDataSourceHandlerFileTypeDescriptors()

      Creates the ALcyFileTypeDescriptor instances corresponding to the ALcyFileTypeDescriptor instances created by this format.

      Returns:
      The array of ALcyFileTypeDescriptor instances. Must not be null. Its length should be equal to the length of the array created by createDataSourceHandlers. It may contain null.
    • createDataSourceHandlerFileTypeDescriptorGroups

      protected String[][] createDataSourceHandlerFileTypeDescriptorGroups()

      Creates file type descriptor groups for all decoders. The groups may be empty, but the group count must equal the decoder count.

      Returns:
      A two-dimensional array containing the groups for the ALcyFileTypeDescriptor instances of the ALcyFileTypeDescriptors. The first dimension must be equal to the length of the array of ALcyFileTypeDescriptor instances created by this format. It must not contain null, but may contain empty arrays.
    • createDataPropertyValueCustomizerPanelFactories

      protected ILcyCustomizerPanelFactory[] createDataPropertyValueCustomizerPanelFactories()

      Creates the ILcyCustomizerPanelFactory factories that can create ILcyCustomizerPanel instances to change the value of a single data property of the domain objects created by the model decoders of this format.

      These customizer panels can for instance be used in the Table view or the Object properties.

      The created ILcyCustomizerPanels should work with instances of TLcdDataPropertyValueContext in their setObject method.

      The default implementation returns a zero-length array.

      Returns:
      An array of ILcyCustomizerPanelFactory instances. Must not be null but may have length 0. Must not contain null.
    • getDataSourceHandlers

      public final ALcyDataSourceHandler[] getDataSourceHandlers()

      Returns the array of ALcyDataSourceHandler instances created by this format. Should only be called after createAll() has been called.

      Returns:
      The array of ALcyDataSourceHandlers created by this format.
      See Also:
    • getDataSourceHandlerFileTypeDescriptors

      public final ALcyFileTypeDescriptor[] getDataSourceHandlerFileTypeDescriptors()

      Returns the array of ALcyFileTypeDescriptor instances created by this format for data source handlers. Should only be called after createAll() has been called.

      Returns:
      The array of ALcyFileTypeDescriptor instances for data source handlers.
      See Also:
    • getDataSourceHandlerFileTypeDescriptorGroups

      public final String[][] getDataSourceHandlerFileTypeDescriptorGroups()

      Returns the ID's of the groups for the ALcyFileTypeDescriptor instances of the ALcyFileTypeDescriptor instances created by this format. Should only be called after createAll() has been called.

      Returns:
      The two-dimensional array of ID's of the groups for the ALcyFileTypeDescriptor instances.
      See Also:
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getDataPropertyValueCustomizerPanelFactories

      public final ILcyCustomizerPanelFactory[] getDataPropertyValueCustomizerPanelFactories()

      Creates the ILcyCustomizerPanelFactory factories that can create ILcyCustomizerPanel instances to change the value of a single data property of the domain objects created by the model decoders of this format. Should only be called aftercreateAll() has been called.

      Returns:
      The array of ILcyCustomizerPanelFactorys.
      See Also: