public class MatchEngineParameter extends uk.ac.starlink.task.Parameter<uk.ac.starlink.table.join.MatchEngine> implements ExtraParameter
MatchEngine
.Constructor and Description |
---|
MatchEngineParameter(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
static void |
configureTupleParameter(WordsParameter tupleParam,
uk.ac.starlink.table.join.MatchEngine matcher)
Configures a tuple parameter for use with a given MatchEngine.
|
uk.ac.starlink.table.join.MatchEngine |
createEngine(java.lang.String name)
Returns a new, unconfigured match engine given a short naming string.
|
WordsParameter |
createMatchTupleParameter(java.lang.String numLabel)
Creates a new parameter for specifying value tuples for a table,
suitable for use with this one.
|
java.lang.String |
getConfigUsage(uk.ac.starlink.table.join.MatchEngine engine,
uk.ac.starlink.task.Parameter wordsParam,
uk.ac.starlink.table.DescribedValue[] configs)
Returns a string giving the usage for a parameter with configuration
subparameters.
|
static java.lang.String[] |
getExampleValues()
Returns strings naming a set of example match engine parameter values.
|
java.lang.String |
getExtraUsage(TableEnvironment env)
Returns an extended usage message.
|
static java.lang.String |
getInfoUsage(uk.ac.starlink.table.ValueInfo info)
Returns a usage fragment appropriate to specifying a value on the
command line in accordance with the metadata given in a
ValueInfo object.
|
uk.ac.starlink.task.Parameter |
getMatchParametersParameter()
Returns the associated parameter which is used for specifying the
fixed value parameters for the engine supplied by this parameter.
|
uk.ac.starlink.table.ValueInfo |
getScoreInfo(uk.ac.starlink.task.Environment env)
Returns the match score metadata associated with this parameter.
|
uk.ac.starlink.task.Parameter |
getScoreParameter()
Returns the associated parameter which is used for specifying the
match score column metadata.
|
uk.ac.starlink.task.Parameter |
getTuningParametersParameter()
Returns the associated parameter which is used for specifying
optional tuning parameters for the engine supplied by this parameter.
|
java.lang.String |
getValuesUsage(uk.ac.starlink.table.join.MatchEngine engine,
int startLeng)
Returns a string giving the usage for the values parameter part
of the matching command line.
|
uk.ac.starlink.table.join.MatchEngine |
matchEngineValue(uk.ac.starlink.task.Environment env)
Returns the value of this parameter as a MatchEngine.
|
uk.ac.starlink.table.join.MatchEngine |
stringToObject(uk.ac.starlink.task.Environment env,
java.lang.String stringVal) |
clearValue, getDescription, getName, getPosition, getPreferExplicit, getPrompt, getStringDefault, getUsage, getValueClass, isNullPermitted, objectToString, objectValue, setDescription, setDescription, setName, setNullPermitted, setPosition, setPreferExplicit, setPrompt, setStringDefault, setUsage, setValue, setValueFromObject, setValueFromString, stringValue, toArray, toString
public java.lang.String getExtraUsage(TableEnvironment env)
ExtraParameter
getExtraUsage
in interface ExtraParameter
env
- execution envrionmentpublic uk.ac.starlink.task.Parameter getMatchParametersParameter()
public uk.ac.starlink.task.Parameter getTuningParametersParameter()
public uk.ac.starlink.task.Parameter getScoreParameter()
getScoreInfo(uk.ac.starlink.task.Environment)
.public uk.ac.starlink.table.ValueInfo getScoreInfo(uk.ac.starlink.task.Environment env) throws uk.ac.starlink.task.TaskException
env
- execution environmentuk.ac.starlink.task.TaskException
public WordsParameter createMatchTupleParameter(java.lang.String numLabel)
The supplied numLabel
parameter distinguishes the
parameter name if there are several; it is usually "1", "2", ...
or "N" for a generic number or "" if there is only one.
The autogenerated documentation will be adjusted accordingly.
numLabel
- identifier for the new parameterpublic static void configureTupleParameter(WordsParameter tupleParam, uk.ac.starlink.table.join.MatchEngine matcher)
WordsParameter.wordsValue(uk.ac.starlink.task.Environment)
will
return an array of the correct size for the match engine.tupleParam
- tuple parameter to interrogate, probably generated
earlier by createMatchTupleParameter(java.lang.String)
matcher
- match engine which will be usedpublic uk.ac.starlink.table.join.MatchEngine matchEngineValue(uk.ac.starlink.task.Environment env) throws uk.ac.starlink.task.TaskException
env
- execution environmentuk.ac.starlink.task.TaskException
public uk.ac.starlink.table.join.MatchEngine stringToObject(uk.ac.starlink.task.Environment env, java.lang.String stringVal) throws uk.ac.starlink.task.TaskException
stringToObject
in class uk.ac.starlink.task.Parameter<uk.ac.starlink.table.join.MatchEngine>
uk.ac.starlink.task.TaskException
public uk.ac.starlink.table.join.MatchEngine createEngine(java.lang.String name) throws uk.ac.starlink.task.UsageException
name
- label to select match engine typeuk.ac.starlink.task.UsageException
public java.lang.String getValuesUsage(uk.ac.starlink.table.join.MatchEngine engine, int startLeng)
engine
- match enginestartLeng
- running line length at which the values part
begins on the outputpublic java.lang.String getConfigUsage(uk.ac.starlink.table.join.MatchEngine engine, uk.ac.starlink.task.Parameter wordsParam, uk.ac.starlink.table.DescribedValue[] configs)
engine
- match enginewordsParam
- parameter providing values for the subparametersconfigs
- modifiable subparameterspublic static java.lang.String getInfoUsage(uk.ac.starlink.table.ValueInfo info)
info
- value metadata specificationpublic static java.lang.String[] getExampleValues()
Copyright © 2017 Central Laboratory of the Research Councils. All Rights Reserved.