Class Reference

Object
AnchorBean<ChannelProvider>
InitializableBean<ChannelProvider, ImageInitialization>
ImageBean<ChannelProvider>
BeanProviderAsStackBase<ChannelProvider, Channel>
ChannelProvider
Reference
All Implemented Interfaces:
Provider<Channel>, ProviderAsStack

public class Reference extends ChannelProvider
Provides a channel by referencing it from a a set of named-channels.

This class extends ChannelProvider to retrieve a channel by its ID from a named provider. It also offers an option to duplicate the retrieved channel.

  • Constructor Summary

    Constructors
    Constructor
    Description
     
    Creates a new instance with a specified channel ID.
  • Method Summary

    Modifier and Type
    Method
    Description
    Channel
    get()
     
    The ID of the channel to retrieve from the named-provider.
    boolean
    If true, the channel is duplicated after it is retrieved, to prevent overwriting existing data.
    void
    setDuplicate(boolean duplicate)
    If true, the channel is duplicated after it is retrieved, to prevent overwriting existing data.
    void
    The ID of the channel to retrieve from the named-provider.

    Methods inherited from class org.anchoranalysis.image.bean.provider.ChannelProvider

    getAsStack

    Methods inherited from class org.anchoranalysis.bean.initializable.InitializableBean

    getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized, onInitialization

    Methods inherited from class org.anchoranalysis.bean.AnchorBean

    checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Reference

      public Reference(String id)
      Creates a new instance with a specified channel ID.
      Parameters:
      id - the ID of the channel to retrieve
    • Reference

      public Reference()
  • Method Details

    • get

      public Channel get() throws ProvisionFailedException
      Throws:
      ProvisionFailedException
    • getId

      public String getId()
      The ID of the channel to retrieve from the named-provider.
    • setId

      public void setId(String id)
      The ID of the channel to retrieve from the named-provider.
    • isDuplicate

      public boolean isDuplicate()
      If true, the channel is duplicated after it is retrieved, to prevent overwriting existing data.

      This is a shortcut to avoid embedding beans in a ChannelProviderDuplicate.

    • setDuplicate

      public void setDuplicate(boolean duplicate)
      If true, the channel is duplicated after it is retrieved, to prevent overwriting existing data.

      This is a shortcut to avoid embedding beans in a ChannelProviderDuplicate.