java.lang.Object
com.pervasive.datarush.operators.io.textfile.ARFFAnalyzer
An analyzer for ARFF files. The file is read up to the first data
record to provide information about the contents.
The following information is provided as a result of analyzing
a file:
- The relation described in the file.
- Any comments prior to the data section of the file.
- The schema of data records contained in the file and their representation mode.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classContains the results of analyzing an ARFF file. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionanalyze(Path file, CharsetEncoding encoding) Analyze the specified ARFF file expecting the described character set encoding.analyze(Path file, CharsetEncoding encoding, FileClient client) Analyze the specified ARFF file expecting the described character set encoding.Analyze the given character stream as ARFF data.analyze(String file, CharsetEncoding encoding) Analyze the specified ARFF file expecting the described character set encoding.
-
Constructor Details
-
ARFFAnalyzer
public ARFFAnalyzer()
-
-
Method Details
-
analyze
public ARFFAnalyzer.Analysis analyze(String file, CharsetEncoding encoding) throws IOException, ParseException Analyze the specified ARFF file expecting the described character set encoding.- Parameters:
file- the file to analyze. This value will be interpreted usingPaths.asPath(String).encoding- a specification of the character set encoding of the file- Returns:
- the resulting analysis
- Throws:
IOException- if any I/O errors occur while reading the source fileParseException- if the file cannot be parsed as ARFF or is otherwise malformed
-
analyze
public ARFFAnalyzer.Analysis analyze(Path file, CharsetEncoding encoding) throws IOException, ParseException Analyze the specified ARFF file expecting the described character set encoding.- Parameters:
file- the file to analyzeencoding- a specification of the character set encoding of the file- Returns:
- the resulting analysis
- Throws:
IOException- if any I/O errors occur while reading the source fileParseException- if the file cannot be parsed as ARFF or is otherwise malformed
-
analyze
public ARFFAnalyzer.Analysis analyze(Path file, CharsetEncoding encoding, FileClient client) throws IOException, ParseException Analyze the specified ARFF file expecting the described character set encoding.- Parameters:
file- the file to analyzeencoding- a specification of the character set encoding of the fileclient- the authorization context to use for accessing the file- Returns:
- the resulting analysis
- Throws:
IOException- if any I/O errors occur while reading the source fileParseException- if the file cannot be parsed as ARFF or is otherwise malformed
-
analyze
Analyze the given character stream as ARFF data.- Parameters:
input- the data stream to analyze- Returns:
- the resulting analysis of the input
- Throws:
IOException- if any I/O errors occur while reading the source fileParseException- if the file cannot be parsed as ARFF or is otherwise malformed
-