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 Link icon

    • ALcyFormat Link icon

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

    • getLucyEnv Link icon

      public abstract ILcyLucyEnv getLucyEnv()

      Returns the ILcyLucyEnv backend with which this ALcyFormat is associated.

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

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      protected abstract ILcyModelContentTypeProvider createModelContentTypeProvider()

      Creates an ILcyModelContentTypeProvider for this format.

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

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      protected abstract ILcyGXYLayerTypeProvider createGXYLayerTypeProvider()

      Creates an ILcyGXYLayerTypeProvider for this format.

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

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

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

      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: