public class RenameRelation extends Filter implements StreamableFilter, WeightedAttributesHandler, WeightedInstancesHandler
| Constructor and Description | 
|---|
| RenameRelation() | 
| Modifier and Type | Method and Description | 
|---|---|
| Capabilities | getCapabilities()Returns the Capabilities of this filter. | 
| java.lang.String | getModificationText()Get the modification text to apply | 
| weka.filters.RenameRelation.ModType | getModType()Get the modification type to apply | 
| java.lang.String | getRegexMatch()Get the match string for regex modifications | 
| boolean | getReplaceAll()Get whether to replace all regular expression matches, or just the first. | 
| java.lang.String | getRevision()Returns the revision string. | 
| java.lang.String | globalInfo()Returns a string describing this filter | 
| boolean | input(Instance instance)Input an instance for filtering. | 
| static void | main(java.lang.String[] argv)Main method for testing this class. | 
| boolean | setInputFormat(Instances instanceInfo)Sets the format of the input instances. | 
| void | setModificationText(java.lang.String text)Set the modification text to apply | 
| void | setModType(weka.filters.RenameRelation.ModType mod)Set the modification type to apply | 
| void | setRegexMatch(java.lang.String match)Set the match string for regex modifications | 
| void | setReplaceAll(boolean replaceAll)Set whether to replace all regular expression matches, or just the first. | 
batchFilterFile, batchFinished, debugTipText, doNotCheckCapabilitiesTipText, filterFile, getCapabilities, getCopyOfInputFormat, getDebug, getDoNotCheckCapabilities, getOptions, getOutputFormat, isFirstBatchDone, isNewBatch, isOutputFormatDefined, listOptions, makeCopies, makeCopy, mayRemoveInstanceAfterFirstBatchDone, numPendingOutput, output, outputPeek, postExecution, preExecution, run, runFilter, setDebug, setDoNotCheckCapabilities, setOptions, toString, useFilter, wekaStaticWrapperequals, getClass, hashCode, notify, notifyAll, wait, wait, waitmakeCopypublic java.lang.String globalInfo()
public Capabilities getCapabilities()
getCapabilities in interface CapabilitiesHandlergetCapabilities in class FilterCapabilities@OptionMetadata(displayName="Text to use", description="The text to modify the relation name with", commandLineParamName="modify", commandLineParamSynopsis="-modify <string>", displayOrder=0) public void setModificationText(java.lang.String text)
text - the text to applypublic java.lang.String getModificationText()
@OptionMetadata(displayName="Relation name modification type", description="The type of modification to apply (default = REPLACE)", commandLineParamName="mod-type", commandLineParamSynopsis="-mod-type <REPLACE | PREPEND | APPEND | REGEX>", displayOrder=1) public void setModType(weka.filters.RenameRelation.ModType mod)
mod - the modification type to applypublic weka.filters.RenameRelation.ModType getModType()
@OptionMetadata(displayName="Regular expression", description="Regular expression to use for matching when performing a REGEX modification (default = ([\\s\\S]+))", commandLineParamName="find", commandLineParamSynopsis="-find <pattern>", displayOrder=2) public void setRegexMatch(java.lang.String match)
match - the regular expression to apply for matchingpublic java.lang.String getRegexMatch()
@OptionMetadata(displayName="Replace all regex matches", description="Replace all matching occurrences if set to true, or just the first match if set to false", commandLineParamName="replace-all", commandLineParamSynopsis="-replace-all", commandLineParamIsFlag=true, displayOrder=3) public void setReplaceAll(boolean replaceAll)
replaceAll - true to replace all regex matchespublic boolean getReplaceAll()
public boolean setInputFormat(Instances instanceInfo) throws java.lang.Exception
setInputFormat in class FilterinstanceInfo - an Instances object containing the input instance
          structure (any instances contained in the object are ignored -
          only the structure is required).java.lang.Exception - if something goes wrongpublic boolean input(Instance instance)
Filterpublic java.lang.String getRevision()
getRevision in interface RevisionHandlergetRevision in class Filterpublic static void main(java.lang.String[] argv)
argv - should contain arguments to the filter: use -h for help