Package adams.flow.rest.text
Class RatsTextUpload
- java.lang.Object
-
- adams.core.logging.LoggingObject
-
- adams.core.logging.CustomLoggingLevelObject
-
- adams.core.option.AbstractOptionHandler
-
- adams.flow.rest.AbstractRESTPlugin
-
- adams.flow.rest.text.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.
- Author:
- FracPete (fracpete at waikato dot ac dot nz)
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected RatInput
m_RatInput
the rat input.
-
Constructor Summary
Constructors Constructor Description RatsTextUpload()
-
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.flow.rest.AbstractRESTPlugin
getAdditionalInformation
-
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
-
-
-
-
Field Detail
-
m_RatInput
protected RatInput m_RatInput
the rat input.
-
-
Method Detail
-
globalInfo
public String globalInfo()
Returns a string describing the object.- Specified by:
globalInfo
in interfaceadams.core.GlobalInfoSupporter
- Specified by:
globalInfo
in classadams.core.option.AbstractOptionHandler
- Returns:
- a description suitable for displaying in the gui
-
setRatInput
public void setRatInput(RatInput value)
Sets the rat input to use.- Specified by:
setRatInput
in interfaceRatInputUser
- Parameters:
value
- the rat input
-
getRatInput
public RatInput getRatInput()
Returns the rat input in use.- Specified by:
getRatInput
in interfaceRatInputUser
- Returns:
- the rat input, null if none set
-
upload
@POST @Path("/rats/text/upload") public void upload(@FormParam("content") String content)
For uploading text to be processed in a Rat actor.- Parameters:
content
- the text
-
-