weka.core.converters
Class ClassTreeFileParser

java.lang.Object
  extended byweka.core.converters.AbstractClassHierarchyParser
      extended byweka.core.converters.ClassTreeParser
          extended byweka.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.
 
Fields inherited from class weka.core.converters.ClassTreeParser
ILLEGAL_ARGUMENT, LEFT, RIGHT, SEPARATOR
 
Constructor Summary
ClassTreeFileParser()
           
 
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 weka.core.converters.ClassTreeParser
getClassHierarchy, init, main, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

encodingFile

private java.lang.String encodingFile
Keeps the name of file providing the hierarchy String.

Constructor Detail

ClassTreeFileParser

public ClassTreeFileParser()
Method Detail

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