water.api
Class RequestArguments

java.lang.Object
  extended by water.Iced
      extended by water.api.Constants
          extended by water.api.RequestStatics
              extended by water.api.RequestArguments
All Implemented Interfaces:
java.lang.Cloneable, Freezable
Direct Known Subclasses:
RequestQueries

public class RequestArguments
extends RequestStatics

All arguments related classes are defined in this guy. Argument is the base class for all arguments, which then branches to different still abstract subclasses that specify how are any given HTML input elements being drawn. From these a proper Arguments that define particular value types are then subclassed. When an argument is created, its pointer is stored in the _arguments array list so that the request knows how many arguments and in which order it has. Because request objects and therefore also argument objects one per application, while the codepath can be multithreaded (server decides this), the argument state is not preserved in the argument itself, but in the Record static object that is kept thread local and must be properly initialized at each iteration by calling reset() method on the argument. See the respective classes for more details. NOTE add more arguments to this class as they are needed and keep them here.


Nested Class Summary
 class RequestArguments.Argument<T>
           
 class RequestArguments.Bool
           
 class RequestArguments.CaseModeSelect
           
 class RequestArguments.CaseSelect
           
 class RequestArguments.ClassifyBool
           
 class RequestArguments.EnumArgument<T extends java.lang.Enum<T>>
           
 class RequestArguments.ExistingFile
           
 class RequestArguments.FrameClassVec
          A Class Vec/Column within a Frame.
 class RequestArguments.FrameKeyMultiVec
           
 class RequestArguments.FrameKeyVec
          A Fluid Vec, via a column name in a Frame
 class RequestArguments.H2OCategoryStrata
           
 class RequestArguments.H2OCategoryWeights
           
 class RequestArguments.H2OExistingKey
           
 class RequestArguments.H2OGLMModelKey
           
 class RequestArguments.H2OHexKey
           
 class RequestArguments.H2OHexKeyCol
           
 class RequestArguments.H2OKey
           
 class RequestArguments.H2OKey2
           
 class RequestArguments.H2OKMeansModelKey
           
 class RequestArguments.H2OModelKey<TM extends OldModel,TK extends TypeaheadKeysRequest>
           
 class RequestArguments.H2OPCAModelKey
           
 class RequestArguments.HexAllColumnSelect
           
 class RequestArguments.HexColumnSelect
           
 class RequestArguments.HexKeyClassCol
           
 class RequestArguments.HexNonClassColumnSelect
           
 class RequestArguments.HexNonConstantColumnSelect
           
 class RequestArguments.HexPCAColumnSelect
           
 class RequestArguments.InputCheckBox
          A boolean argument that is represented as the checkbox.
 class RequestArguments.InputSelect<T>
          Select element from the list of options.
 class RequestArguments.InputText<T>
          Argument that uses simple text input to define its value.
 class RequestArguments.Int
           
 class RequestArguments.LongInt
           
 class RequestArguments.MultipleSelect<T>
          Displays multiple checkboxes for different values.
 class RequestArguments.MultipleText<T>
           
 class RequestArguments.NTree
           
static class RequestArguments.NumberSequence
           
 class RequestArguments.Real
           
protected static class RequestArguments.Record<T>
          Argument state record.
 class RequestArguments.RFModelKey
           
 class RequestArguments.RSeq
           
 class RequestArguments.Str
          A string value.
 class RequestArguments.StringList
           
 class RequestArguments.TypeaheadInputText<T>
          Typeahead enabled text input.
 
Nested classes/interfaces inherited from class water.api.RequestStatics
RequestStatics.RequestType
 
Nested classes/interfaces inherited from class water.api.Constants
Constants.Extensions, Constants.Schemes, Constants.Suffixes
 
Field Summary
protected  java.util.ArrayList<RequestArguments.Argument> _arguments
          List of arguments for the request.
protected static java.lang.String _queryHtml
           
 
Fields inherited from class water.api.Constants
ALPHA, ARGUMENTS, AUC, BASE, BEST_THRESHOLD, BETA_EPS, BIN_LIMIT, BROWSE, BUCKET, BUILT_IN_KEY_JOBS, CANCELLED, CASE, CASE_MODE, CHUNK, CLASS, CLOUD_NAME, CLOUD_SIZE, CLUSTERS, COEFFICIENTS, COLS, COLUMNS_DISPLAY, CONSENSUS, CONTENTS, COUNT, DATA_KEY, DEPTH, DESCRIPTION, DEST_KEY, DTHRESHOLDS, END_TIME, ENUM_DOMAIN_SIZE, ERROR, ESCAPE_NAN, EXCLUSIVE_SPLIT_LIMIT, EXPRESSION, FAILED, FAMILY, FEATURES, FILE, FILES, FILTER, FIRST_CHUNK, FJ_QUEUE_HI, FJ_QUEUE_LO, FJ_THREADS_HI, FJ_THREADS_LO, FREE_DISK, FREE_MEM, HEADER, HEIGHT, HELP, IGNORE, ITEMS, ITERATIVE_CM, JOB, JOB_KEY, JOBS, JSON_H2O, KEY, KEYS, LAMBDA, LAST_CONTACT, LIMIT, LINK, LOCKED, MAX, MAX_DISK, MAX_ITER, MAX_MEM, MAX_ROWS, MEAN, MIN, MODEL_KEY, MODELS, MORE, MTRY, MTRY_NODES, NAME, NEG_X, NO_CM, NODE, NODE_NAME, NODES, NORMALIZE, NUM_COLS, NUM_CPUS, NUM_FAILED, NUM_KEYS, NUM_MISSING_VALUES, NUM_ROWS, NUM_SUCCEEDED, NUM_TREES, OBJECT, OFFSET, OOBEE, PARALLEL, PARSER_TYPE, PATH, PREVIEW, PREVIOUS_MODEL_KEY, PROGRESS, PROGRESS_KEY, PROGRESS_TOTAL, REDIRECT, REDIRECT_ARGS, REPLICATION_FACTOR, REQUEST_TIME, RESPONSE, RHO, ROW, ROW_SIZE, ROWS, RPCS, SAMPLE, SAMPLING_STRATEGY, SCALE, SEED, SENT_ROWS, SEPARATOR, SIZE, SOURCE_KEY, STACK_TRACES, START_TIME, STAT_TYPE, STATUS, STEP, STRATA_SAMPLES, SUCCEEDED, SYSTEM_LOAD, TASK_KEY, TCPS_ACTIVE, TCPS_DUTY, TIME, TOT_MEM, TREE_COUNT, TREE_DEPTH, TREE_LEAVES, TREE_NUM, TREES, TWEEDIE_POWER, TYPE, URL, USE_NON_LOCAL_DATA, VALUE, VALUE_SIZE, VALUE_TYPE, VARIANCE, VERSION, VIEW, WARNINGS, WEIGHT, WEIGHTS, WIDTH, X, XVAL, Y
 
Constructor Summary
RequestArguments()
           
 
Method Summary
 java.util.ArrayList<RequestArguments.Argument> arguments()
           
protected  com.google.gson.JsonObject argumentsToJson()
          Returns a json object containing all arguments specified to the page.
protected static int frameColumnNameToIndex(Frame fr, java.lang.String input, boolean namesOnly)
           
protected static java.lang.String[] vaCategoryNames(ValueArray.Column col, int maxClasses)
           
protected static java.lang.String[] vaCategoryNames(ValueArray.Column modelCol, ValueArray.Column dataCol, int maxClasses)
          Compute union of categories in model column and data column.
protected static int vaColumnNameToIndex(ValueArray va, java.lang.String input)
          This rule of searching for matching names, and only if that fails do we attempt a number parse for a zero-based column id, is used exactly for defining selected columns in the JSON 'cols' argument.
 
Methods inherited from class water.api.RequestStatics
checkJsonName, encodeRedirectArgs, JSON2HTML, jsonError, requestName, Str2JSON
 
Methods inherited from class water.Iced
clone, frozenType, init, newInstance, read, toDocField, write, writeJSON, writeJSONFields
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_arguments

protected transient java.util.ArrayList<RequestArguments.Argument> _arguments
List of arguments for the request. Automatically filled in by the argument constructors.


_queryHtml

protected static final java.lang.String _queryHtml
See Also:
Constant Field Values
Constructor Detail

RequestArguments

public RequestArguments()
Method Detail

argumentsToJson

protected com.google.gson.JsonObject argumentsToJson()
Returns a json object containing all arguments specified to the page. Useful for redirects and polling.


vaColumnNameToIndex

protected static int vaColumnNameToIndex(ValueArray va,
                                         java.lang.String input)
This rule of searching for matching names, and only if that fails do we attempt a number parse for a zero-based column id, is used exactly for defining selected columns in the JSON 'cols' argument.


frameColumnNameToIndex

protected static int frameColumnNameToIndex(Frame fr,
                                            java.lang.String input,
                                            boolean namesOnly)

vaCategoryNames

protected static java.lang.String[] vaCategoryNames(ValueArray.Column modelCol,
                                                    ValueArray.Column dataCol,
                                                    int maxClasses)
                                             throws java.lang.IllegalArgumentException
Compute union of categories in model column and data column. The result is ordered and the values are unique.

Throws:
java.lang.IllegalArgumentException

vaCategoryNames

protected static java.lang.String[] vaCategoryNames(ValueArray.Column col,
                                                    int maxClasses)
                                             throws java.lang.IllegalArgumentException
Throws:
java.lang.IllegalArgumentException

arguments

public java.util.ArrayList<RequestArguments.Argument> arguments()