Class Filter

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, EventListener, Accessible, BeanCommon, ConfigurationProducer, DataSource, DataSourceListener, EventConstraints, InstanceListener, TestSetListener, TestSetProducer, TrainingSetListener, TrainingSetProducer, UserRequestAcceptor, Visible, WekaWrapper

A wrapper bean for Weka filters
Version:
$Revision: 10220 $
Author:
Mark Hall
See Also:
  • Constructor Details

    • Filter

      public Filter()
  • Method Details

    • globalInfo

      public String globalInfo()
      Global info (if it exists) for the wrapped filter
      Returns:
      the global info
    • setCustomName

      public void setCustomName(String name)
      Set a custom (descriptive) name for this bean
      Specified by:
      setCustomName in interface BeanCommon
      Parameters:
      name - the name to use
    • getCustomName

      public String getCustomName()
      Get the custom (descriptive) name for this bean (if one has been set)
      Specified by:
      getCustomName in interface BeanCommon
      Returns:
      the custom name (or the default name)
    • setFilter

      public void setFilter(Filter c)
      Set the filter to be wrapped by this bean
      Parameters:
      c - a weka.filters.Filter value
    • getFilter

      public Filter getFilter()
    • setWrappedAlgorithm

      public void setWrappedAlgorithm(Object algorithm)
      Set the filter to be wrapped by this bean
      Specified by:
      setWrappedAlgorithm in interface WekaWrapper
      Parameters:
      algorithm - a weka.filters.Filter
      Throws:
      IllegalArgumentException - if an error occurs
    • getWrappedAlgorithm

      public Object getWrappedAlgorithm()
      Get the filter wrapped by this bean
      Specified by:
      getWrappedAlgorithm in interface WekaWrapper
      Returns:
      an Object value
    • acceptTrainingSet

      public void acceptTrainingSet(TrainingSetEvent e)
      Accept a training set
      Specified by:
      acceptTrainingSet in interface TrainingSetListener
      Parameters:
      e - a TrainingSetEvent value
    • acceptInstance

      public void acceptInstance(InstanceEvent e)
      Accept an instance for processing by StreamableFilters only
      Specified by:
      acceptInstance in interface InstanceListener
      Parameters:
      e - an InstanceEvent value
    • acceptTestSet

      public void acceptTestSet(TestSetEvent e)
      Accept a test set
      Specified by:
      acceptTestSet in interface TestSetListener
      Parameters:
      e - a TestSetEvent value
    • acceptDataSet

      public void acceptDataSet(DataSetEvent e)
      Accept a data set
      Specified by:
      acceptDataSet in interface DataSourceListener
      Parameters:
      e - a DataSetEvent value
    • setVisual

      public void setVisual(BeanVisual newVisual)
      Set the visual appearance of this bean
      Specified by:
      setVisual in interface Visible
      Parameters:
      newVisual - a BeanVisual value
    • getVisual

      public BeanVisual getVisual()
      Get the visual appearance of this bean
      Specified by:
      getVisual in interface Visible
      Returns:
      a BeanVisual value
    • useDefaultVisual

      public void useDefaultVisual()
      Use the default visual appearance
      Specified by:
      useDefaultVisual in interface Visible
    • addTrainingSetListener

      public void addTrainingSetListener(TrainingSetListener tsl)
      Add a training set listener
      Specified by:
      addTrainingSetListener in interface TrainingSetProducer
      Parameters:
      tsl - a TrainingSetListener value
    • removeTrainingSetListener

      public void removeTrainingSetListener(TrainingSetListener tsl)
      Remove a training set listener
      Specified by:
      removeTrainingSetListener in interface TrainingSetProducer
      Parameters:
      tsl - a TrainingSetListener value
    • addTestSetListener

      public void addTestSetListener(TestSetListener tsl)
      Add a test set listener
      Specified by:
      addTestSetListener in interface TestSetProducer
      Parameters:
      tsl - a TestSetListener value
    • removeTestSetListener

      public void removeTestSetListener(TestSetListener tsl)
      Remove a test set listener
      Specified by:
      removeTestSetListener in interface TestSetProducer
      Parameters:
      tsl - a TestSetListener value
    • addDataSourceListener

      public void addDataSourceListener(DataSourceListener dsl)
      Add a data source listener
      Specified by:
      addDataSourceListener in interface DataSource
      Parameters:
      dsl - a DataSourceListener value
    • removeDataSourceListener

      public void removeDataSourceListener(DataSourceListener dsl)
      Remove a data source listener
      Specified by:
      removeDataSourceListener in interface DataSource
      Parameters:
      dsl - a DataSourceListener value
    • addInstanceListener

      public void addInstanceListener(InstanceListener tsl)
      Add an instance listener
      Specified by:
      addInstanceListener in interface DataSource
      Parameters:
      tsl - an InstanceListener value
    • removeInstanceListener

      public void removeInstanceListener(InstanceListener tsl)
      Remove an instance listener
      Specified by:
      removeInstanceListener in interface DataSource
      Parameters:
      tsl - an InstanceListener value
    • addConfigurationListener

      public void addConfigurationListener(ConfigurationListener cl)
      We don't have to keep track of configuration listeners (see the documentation for ConfigurationListener/ConfigurationEvent).
      Specified by:
      addConfigurationListener in interface ConfigurationProducer
      Parameters:
      cl - a ConfigurationListener.
    • removeConfigurationListener

      public void removeConfigurationListener(ConfigurationListener cl)
      We don't have to keep track of configuration listeners (see the documentation for ConfigurationListener/ConfigurationEvent).
      Specified by:
      removeConfigurationListener in interface ConfigurationProducer
      Parameters:
      cl - a ConfigurationListener.
    • connectionAllowed

      public boolean connectionAllowed(String eventName)
      Returns true if, at this time, the object will accept a connection with respect to the supplied event name
      Specified by:
      connectionAllowed in interface BeanCommon
      Parameters:
      eventName - the event
      Returns:
      true if the object will accept a connection
    • connectionAllowed

      public boolean connectionAllowed(EventSetDescriptor esd)
      Returns true if, at this time, the object will accept a connection according to the supplied EventSetDescriptor
      Specified by:
      connectionAllowed in interface BeanCommon
      Parameters:
      esd - the EventSetDescriptor
      Returns:
      true if the object will accept a connection
    • connectionNotification

      public void connectionNotification(String eventName, Object source)
      Notify this object that it has been registered as a listener with a source with respect to the supplied event name
      Specified by:
      connectionNotification in interface BeanCommon
      Parameters:
      eventName -
      source - the source with which this object has been registered as a listener
    • disconnectionNotification

      public void disconnectionNotification(String eventName, Object source)
      Notify this object that it has been deregistered as a listener with a source with respect to the supplied event name
      Specified by:
      disconnectionNotification in interface BeanCommon
      Parameters:
      eventName - the event
      source - the source with which this object has been registered as a listener
    • stop

      public void stop()
      Stop all action if possible
      Specified by:
      stop in interface BeanCommon
    • isBusy

      public boolean isBusy()
      Returns true if. at this time, the bean is busy with some (i.e. perhaps a worker thread is performing some calculation).
      Specified by:
      isBusy in interface BeanCommon
      Returns:
      true if the bean is busy.
    • setLog

      public void setLog(Logger logger)
      Set a logger
      Specified by:
      setLog in interface BeanCommon
      Parameters:
      logger - a Logger value
    • enumerateRequests

      public Enumeration<String> enumerateRequests()
      Return an enumeration of user requests
      Specified by:
      enumerateRequests in interface UserRequestAcceptor
      Returns:
      an Enumeration value
    • performRequest

      public void performRequest(String request)
      Perform the named request
      Specified by:
      performRequest in interface UserRequestAcceptor
      Parameters:
      request - a String value
      Throws:
      IllegalArgumentException - if an error occurs
    • eventGeneratable

      public boolean eventGeneratable(String eventName)
      Returns true, if at the current time, the named event could be generated. Assumes that supplied event names are names of events that could be generated by this bean.
      Specified by:
      eventGeneratable in interface EventConstraints
      Parameters:
      eventName - the name of the event in question
      Returns:
      true if the named event could be generated at this point in time