Package org.apache.any23.extractor.yaml
Class YAMLExtractor
- java.lang.Object
-
- org.apache.any23.extractor.yaml.YAMLExtractor
-
- All Implemented Interfaces:
Extractor<InputStream>,Extractor.ContentExtractor
public class YAMLExtractor extends Object implements Extractor.ContentExtractor
- Author:
- Jacek Grzebyta (grzebyta.dev [at] gmail.com)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.any23.extractor.Extractor
Extractor.BlindExtractor, Extractor.ContentExtractor, Extractor.TagSoupDOMExtractor
-
-
Constructor Summary
Constructors Constructor Description YAMLExtractor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExtractorDescriptiongetDescription()Returns aExtractorDescriptionof this extractor.voidrun(ExtractionParameters extractionParameters, ExtractionContext context, 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
-
setStopAtFirstError
public void setStopAtFirstError(boolean f)
Description copied from interface:Extractor.ContentExtractorIftrue, the extractor will stop at first parsing error, iffalsethe extractor will attempt to ignore all parsing errors.- Specified by:
setStopAtFirstErrorin interfaceExtractor.ContentExtractor- Parameters:
f- tolerance flag.
-
run
public void run(ExtractionParameters extractionParameters, ExtractionContext context, InputStream in, ExtractionResult out) throws IOException, ExtractionException
Description copied from interface:ExtractorExecutes the extractor. Will be invoked only once, extractors are not reusable.- Specified by:
runin interfaceExtractor<InputStream>- Parameters:
extractionParameters- the parameters to be applied during the extraction.context- 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.
-
getDescription
public ExtractorDescription getDescription()
Description copied from interface:ExtractorReturns aExtractorDescriptionof this extractor.- Specified by:
getDescriptionin interfaceExtractor<InputStream>- Returns:
- the object representing the extractor description.
-
-