Class RatsTextUpload

  • All Implemented Interfaces:
    adams.core.AdditionalInformationHandler, adams.core.Destroyable, adams.core.GlobalInfoSupporter, adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, adams.core.option.OptionHandler, adams.core.SizeOfHandler, RESTPlugin, RatInputUser, Serializable

    public class RatsTextUpload
    extends AbstractRESTPlugin
    implements RatInputUser
    Simple plugin for submitting text in plain-text format to RATS input.

    FracPete (fracpete at waikato dot ac dot nz)
    See Also:
    Serialized Form
    • Field Summary

      Modifier and Type Field Description
      protected RatInput m_RatInput
      the rat input.
      • Fields inherited from class adams.core.option.AbstractOptionHandler

      • Fields inherited from class adams.core.logging.LoggingObject

        m_Logger, m_LoggingIsEnabled, m_LoggingLevel
    • Constructor Summary

      Constructor Description
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      RatInput getRatInput()
      Returns the rat input in use.
      String globalInfo()
      Returns a string describing the object.
      void setRatInput​(RatInput value)
      Sets the rat input to use.
      void upload​(String content)
      For uploading text to be processed in a Rat actor.
      • Methods inherited from class adams.core.option.AbstractOptionHandler

        cleanUpOptions, defineOptions, destroy, finishInit, getDefaultLoggingLevel, getOptionManager, initialize, loggingLevelTipText, newOptionManager, reset, setLoggingLevel, toCommandLine, toString
      • Methods inherited from class adams.core.logging.LoggingObject

        configureLogger, getLogger, getLoggingLevel, initializeLogging, isLoggingEnabled, sizeOf
      • Methods inherited from interface adams.core.logging.LoggingLevelHandler

      • Methods inherited from interface adams.core.logging.LoggingSupporter

        getLogger, isLoggingEnabled
    • Field Detail

      • m_RatInput

        protected RatInput m_RatInput
        the rat input.
    • Constructor Detail

      • RatsTextUpload

        public RatsTextUpload()
    • Method Detail

      • globalInfo

        public String globalInfo()
        Returns a string describing the object.
        Specified by:
        globalInfo in interface adams.core.GlobalInfoSupporter
        Specified by:
        globalInfo in class adams.core.option.AbstractOptionHandler
        a description suitable for displaying in the gui
      • setRatInput

        public void setRatInput​(RatInput value)
        Sets the rat input to use.
        Specified by:
        setRatInput in interface RatInputUser
        value - the rat input
      • getRatInput

        public RatInput getRatInput()
        Returns the rat input in use.
        Specified by:
        getRatInput in interface RatInputUser
        the rat input, null if none set
      • upload

        public void upload​(@FormParam("content")
                           String content)
        For uploading text to be processed in a Rat actor.
        content - the text