com.univocity.parsers.common
Interface EntityParserInterface<R extends ResultRecord<C>,C extends com.univocity.parsers.common.Context,T extends Result<R,C>>

All Known Subinterfaces:
RemoteEntityParserInterface<R,C,T>

public interface EntityParserInterface<R extends ResultRecord<C>,C extends com.univocity.parsers.common.Context,T extends Result<R,C>>

An interface used by parsers that support multiple entities. All parsers should work with a concrete implementation of a EntityParserSettings object that provides configuration options for the given parser. The definition of entities and their configuration should be managed by an implementation of EntityList, which provides individual EntitySettings to allow user to configure how the records of each individual entity should be handled. Concrete parser implementations may provide additional operations.

Author:
uniVocity Software Pty Ltd - dev@univocity.com
See Also:
EntityList, EntityParserSettings, EntitySettings, ReaderProvider, FileProvider, Record

Method Summary
 Results<T> parse(File file)
          Given a File, parses all records of all entities defined in the EntityList of this parser, submitting them to the Processor implementation associated with each entity (through EntitySettings.setProcessor(Processor).
 Results<T> parse(File file, Charset encoding)
          Given a File, parses all records of all entities defined in the EntityList of this parser, submitting them to the Processor implementation associated with each entity (through EntitySettings.setProcessor(Processor).
 Results<T> parse(com.univocity.api.io.FileProvider fileProvider)
          Given an input, made available from a FileProvider, parses all records of all entities defined in the EntityList of this parser, submitting them to the Processor implementation associated with each entity (through EntitySettings.setProcessor(Processor).
 Results<T> parse(File file, String encoding)
          Given a File, parses all records of all entities defined in the EntityList of this parser, submitting them to the Processor implementation associated with each entity (through EntitySettings.setProcessor(Processor).
 Results<T> parse(InputStream inputStream)
          Given an InputStream, parses all records of all entities defined in the EntityList of this parser, submitting them to the Processor implementation associated with each entity (through EntitySettings.setProcessor(Processor).
 Results<T> parse(InputStream inputStream, Charset encoding)
          Given an InputStream, parses all records of all entities defined in the EntityList of this parser, submitting them to the Processor implementation associated with each entity (through EntitySettings.setProcessor(Processor).
 Results<T> parse(InputStream inputStream, String encoding)
          Given an InputStream, parses all records of all entities defined in the EntityList of this parser, submitting them to the Processor implementation associated with each entity (through EntitySettings.setProcessor(Processor).
 Results<T> parse(Reader reader)
          Given a Reader, parses all records of all entities defined in the EntityList of this parser, submitting them to the Processor implementation associated with each entity (through EntitySettings.setProcessor(Processor).
 Results<T> parse(com.univocity.api.io.ReaderProvider readerProvider)
          Given an input, made available from a ReaderProvider, parses all records of all entities defined in the EntityList of this parser, submitting them to the Processor implementation associated with each entity (through EntitySettings.setProcessor(Processor).
 

Method Detail

parse

Results<T> parse(com.univocity.api.io.ReaderProvider readerProvider)
Given an input, made available from a ReaderProvider, parses all records of all entities defined in the EntityList of this parser, submitting them to the Processor implementation associated with each entity (through EntitySettings.setProcessor(Processor). The Processor implementation will handle the rows as they come, in its Processor.rowProcessed(String[], Context) method which can accumulate/transform the rows on demand. The behavior and way to collect results is determined by the Processor implementation used.

Parameters:
readerProvider - an input provider with content to be parsed
Returns:
the Results of parsing the given input

parse

Results<T> parse(com.univocity.api.io.FileProvider fileProvider)
Given an input, made available from a FileProvider, parses all records of all entities defined in the EntityList of this parser, submitting them to the Processor implementation associated with each entity (through EntitySettings.setProcessor(Processor). The Processor implementation will handle the rows as they come, in its Processor.rowProcessed(String[], Context) method which can accumulate/transform the rows on demand. The behavior and way to collect results is determined by the Processor implementation used.

Parameters:
fileProvider - the input file with content to be parsed
Returns:
the Results of parsing the given input

parse

Results<T> parse(Reader reader)
Given a Reader, parses all records of all entities defined in the EntityList of this parser, submitting them to the Processor implementation associated with each entity (through EntitySettings.setProcessor(Processor). The Processor implementation will handle the rows as they come, in its Processor.rowProcessed(String[], Context) method which can accumulate/transform the rows on demand. The behavior and way to collect results is determined by the Processor implementation used.

Parameters:
reader - the input with content to be parsed
Returns:
the Results of parsing the given input

parse

Results<T> parse(InputStream inputStream)
Given an InputStream, parses all records of all entities defined in the EntityList of this parser, submitting them to the Processor implementation associated with each entity (through EntitySettings.setProcessor(Processor). The Processor implementation will handle the rows as they come, in its Processor.rowProcessed(String[], Context) method which can accumulate/transform the rows on demand. The behavior and way to collect results is determined by the Processor implementation used. The default system encoding will be used to read text from the given input.

Parameters:
inputStream - the input with content to be parsed
Returns:
the Results of parsing the given input

parse

Results<T> parse(InputStream inputStream,
                 Charset encoding)
Given an InputStream, parses all records of all entities defined in the EntityList of this parser, submitting them to the Processor implementation associated with each entity (through EntitySettings.setProcessor(Processor). The Processor implementation will handle the rows as they come, in its Processor.rowProcessed(String[], Context) method which can accumulate/transform the rows on demand. The behavior and way to collect results is determined by the Processor implementation used.

Parameters:
inputStream - the input with content to be parsed
encoding - the encoding to be used when reading text from the given input.
Returns:
the Results of parsing the given input

parse

Results<T> parse(InputStream inputStream,
                 String encoding)
Given an InputStream, parses all records of all entities defined in the EntityList of this parser, submitting them to the Processor implementation associated with each entity (through EntitySettings.setProcessor(Processor). The Processor implementation will handle the rows as they come, in its Processor.rowProcessed(String[], Context) method which can accumulate/transform the rows on demand. The behavior and way to collect results is determined by the Processor implementation used.

Parameters:
inputStream - the input with content to be parsed
encoding - the encoding to be used when reading text from the given input.
Returns:
the Results of parsing the given input

parse

Results<T> parse(File file)
Given a File, parses all records of all entities defined in the EntityList of this parser, submitting them to the Processor implementation associated with each entity (through EntitySettings.setProcessor(Processor). The Processor implementation will handle the rows as they come, in its Processor.rowProcessed(String[], Context) method which can accumulate/transform the rows on demand. The behavior and way to collect results is determined by the Processor implementation used. The default system encoding will be used to read text from the given input.

Parameters:
file - the input with content to be parsed
Returns:
the Results of parsing the given input

parse

Results<T> parse(File file,
                 Charset encoding)
Given a File, parses all records of all entities defined in the EntityList of this parser, submitting them to the Processor implementation associated with each entity (through EntitySettings.setProcessor(Processor). The Processor implementation will handle the rows as they come, in its Processor.rowProcessed(String[], Context) method which can accumulate/transform the rows on demand. The behavior and way to collect results is determined by the Processor implementation used.

Parameters:
file - the input with content to be parsed
encoding - the encoding to be used when reading text from the given input.
Returns:
the Results of parsing the given input

parse

Results<T> parse(File file,
                 String encoding)
Given a File, parses all records of all entities defined in the EntityList of this parser, submitting them to the Processor implementation associated with each entity (through EntitySettings.setProcessor(Processor). The Processor implementation will handle the rows as they come, in its Processor.rowProcessed(String[], Context) method which can accumulate/transform the rows on demand. The behavior and way to collect results is determined by the Processor implementation used.

Parameters:
file - the input with content to be parsed
encoding - the encoding to be used when reading text from the given input.
Returns:
the Results of parsing the given input


Copyright © 2018 uniVocity Software Pty Ltd. All rights reserved.