weka.core.converters
Class ClassTreeFileParser
java.lang.Object
weka.core.converters.AbstractClassHierarchyParser
weka.core.converters.ClassTreeParser
weka.core.converters.ClassTreeFileParser
- All Implemented Interfaces:
- ClassHierarchyParser, java.io.Serializable
- Direct Known Subclasses:
- ClassTreeArffFileParser
- public class ClassTreeFileParser
- extends ClassTreeParser
Works as ClassTreeParser, but expects the encodedHierarchy to be provided by a file's first line.
- Author:
- Arthur Zimek
- See Also:
- Serialized Form
Field Summary |
private java.lang.String |
encodingFile
Keeps the name of file providing the hierarchy String. |
Method Summary |
java.lang.String |
getEncodedHierarchy()
Returns the name of the file providing the encodeHierarchy. |
protected java.lang.String |
parseFile(java.io.File file)
Parses the first line of the given file as encodedHierarchy |
void |
setEncodedHierarchy(java.lang.String encodingFile)
The given String is supposed to denote a file, which provides as first line an encodedHierarchy
suitable for ClassTreeParser. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
encodingFile
private java.lang.String encodingFile
- Keeps the name of file providing the hierarchy String.
ClassTreeFileParser
public ClassTreeFileParser()
getEncodedHierarchy
public java.lang.String getEncodedHierarchy()
- Returns the name of the file providing the encodeHierarchy.
- Specified by:
getEncodedHierarchy
in interface ClassHierarchyParser
- Overrides:
getEncodedHierarchy
in class ClassTreeParser
- See Also:
ClassHierarchyParser.getEncodedHierarchy()
setEncodedHierarchy
public void setEncodedHierarchy(java.lang.String encodingFile)
- The given String is supposed to denote a file, which provides as first line an encodedHierarchy
suitable for ClassTreeParser.
- Specified by:
setEncodedHierarchy
in interface ClassHierarchyParser
- Overrides:
setEncodedHierarchy
in class ClassTreeParser
- See Also:
ClassHierarchyParser.setEncodedHierarchy(java.lang.String)
parseFile
protected java.lang.String parseFile(java.io.File file)
- Parses the first line of the given file as encodedHierarchy
- Parameters:
file
- a file containing as first line an encoded hierarchy
- Returns:
- String ht eencodedHierarchy as provided by the given file