Class CsvSplitter
java.lang.Object
com.norconex.importer.handler.splitter.AbstractDocumentSplitter<CsvSplitterConfig>
com.norconex.importer.handler.splitter.impl.CsvSplitter
- All Implemented Interfaces:
Configurable<CsvSplitterConfig>,ConfigurableDocHandler<CsvSplitterConfig>,DocHandler
Split files with Coma-Separated values (or any other characters, like tab) into one document per line.
Can be used both as a pre-parse (text documents) or post-parse handler documents.
Given this sample CSV file content...
'clientId','clientName','clientOrg','orgDesc' '123','Joe Dalton','ACME Inc.','Organization\'s description' '345','Avrel Dalton','Daisy Town','Another one'
... the above example will split the file into two documents (one for each row after the header row):
- See Also:
-
Field Summary
Fields inherited from interface com.norconex.commons.lang.config.Configurable
PROPERTYFields inherited from interface com.norconex.importer.handler.DocHandler
NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleaninthashCode()voidsplit(DocHandlerContext docCtx) toString()Methods inherited from class com.norconex.importer.handler.splitter.AbstractDocumentSplitter
handleMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.norconex.importer.handler.DocHandler
close, init
-
Constructor Details
-
CsvSplitter
public CsvSplitter()
-
-
Method Details
-
split
- Specified by:
splitin classAbstractDocumentSplitter<CsvSplitterConfig>- Throws:
IOException
-
getConfiguration
-
equals
- Overrides:
equalsin classAbstractDocumentSplitter<CsvSplitterConfig>
-
canEqual
- Overrides:
canEqualin classAbstractDocumentSplitter<CsvSplitterConfig>
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractDocumentSplitter<CsvSplitterConfig>
-
toString
- Overrides:
toStringin classAbstractDocumentSplitter<CsvSplitterConfig>
-