public class LookupTableAttributeGenerator extends BaseAttributeGenerator
Lookup table should follow the format:
entry attributeName1 attributeName2 [...] [string describing entry #1] [attribute 1 value] [...]
When supplied with a dataset, the dataset is first used to parse
the strings describing each entry. These are then match to appropriate entries
in that dataset. If no matching entry in the lookup table is found for an
entry in the dataset, its attributes are set to NaN.
Usage: <path>
| Constructor and Description |
|---|
LookupTableAttributeGenerator() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAttributes(Dataset data)
Generate new attributes for a dataset.
|
java.lang.String |
printDescription(boolean htmlFormat)
Print out description of attributes.
|
java.lang.String |
printUsage()
Print out required format for options.
|
void |
readAttributeTable(java.lang.String path)
Read in lookup table containing attribute names and values for selected entries.
|
void |
setOptions(java.util.List<java.lang.Object> Options)
Set any options for this object.
|
runCommandpublic void setOptions(java.util.List<java.lang.Object> Options)
throws java.lang.Exception
OptionsOptions - Array of options as Objects - can be nulljava.lang.Exception - if problem with inputspublic java.lang.String printUsage()
Optionspublic void readAttributeTable(java.lang.String path)
throws java.io.IOException
path - Path to lookup tablejava.io.IOExceptionpublic void addAttributes(Dataset data) throws java.lang.Exception
BaseAttributeGeneratoraddAttributes in class BaseAttributeGeneratordata - Dataset to be added tojava.lang.ExceptionDataset.addAttribute(java.lang.String, double[])public java.lang.String printDescription(boolean htmlFormat)
BaseAttributeGeneratorImplementation Notes
Format should look like
[Full Name of generator]: (Number of attributes) Text description of what these attributes are
For HTML format, omit the ":".
printDescription in class BaseAttributeGeneratorhtmlFormat - Whether to print in HTML format