Package org.apache.any23.extractor.csv
Class CSVExtractor
- java.lang.Object
- 
- org.apache.any23.extractor.csv.CSVExtractor
 
- 
- All Implemented Interfaces:
- Extractor<InputStream>,- Extractor.ContentExtractor
 
 public class CSVExtractor extends Object implements Extractor.ContentExtractor This extractor produces RDF from a CSV file . It automatically detects fields delimiter. If not able uses the one provided in the Any23 configuration.- Author:
- Davide Palmisano ( dpalmisano@gmail.com )
- See Also:
- CSVReaderBuilder
 
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from interface org.apache.any23.extractor.ExtractorExtractor.BlindExtractor, Extractor.ContentExtractor, Extractor.TagSoupDOMExtractor
 
- 
 - 
Constructor SummaryConstructors Constructor Description CSVExtractor()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description ExtractorDescriptiongetDescription()Returns aExtractorDescriptionof this extractor.voidrun(ExtractionParameters extractionParameters, ExtractionContext extractionContext, InputStream in, ExtractionResult out)Executes the extractor.voidsetStopAtFirstError(boolean f)Iftrue, the extractor will stop at first parsing error, iffalsethe extractor will attempt to ignore all parsing errors.
 
- 
- 
- 
Method Detail- 
setStopAtFirstErrorpublic void setStopAtFirstError(boolean f) Iftrue, the extractor will stop at first parsing error, iffalsethe extractor will attempt to ignore all parsing errors.- Specified by:
- setStopAtFirstErrorin interface- Extractor.ContentExtractor
- Parameters:
- f- tolerance flag.
 
 - 
runpublic void run(ExtractionParameters extractionParameters, ExtractionContext extractionContext, InputStream in, ExtractionResult out) throws IOException, ExtractionException Executes the extractor. Will be invoked only once, extractors are not reusable.- Specified by:
- runin interface- Extractor<InputStream>
- Parameters:
- extractionParameters- the parameters to be applied during the extraction.
- extractionContext- The document context.
- in- The extractor input data.
- out- the collector for the extracted data.
- Throws:
- IOException- On error while reading from the input stream.
- ExtractionException- On other error, such as parse errors.
 
 - 
getDescriptionpublic ExtractorDescription getDescription() Returns aExtractorDescriptionof this extractor.- Specified by:
- getDescriptionin interface- Extractor<InputStream>
- Returns:
- the object representing the extractor description.
 
 
- 
 
-