@Test public void testInitializationOfNonPrimitivesViaConfig() throws Exception { try (InputStream is = getClass().getResourceAsStream("/org/apache/tika/parser/pdf/tika-config-non-primitives.xml")) { assertNotNull(is); TikaConfig tikaConfig = new TikaConfig(is); AutoDetectParser p = new AutoDetectParser(tikaConfig); Map<MediaType, Parser> parsers = p.getParsers(); Parser composite = parsers.get(MediaType.application("pdf")); Parser pdfParser = ((CompositeParser)composite).getParsers().get(MediaType.application("pdf")); assertEquals("org.apache.tika.parser.pdf.PDFParser", pdfParser.getClass().getName()); assertEquals(PDFParserConfig.OCR_STRATEGY.OCR_ONLY, ((PDFParser)pdfParser).getPDFParserConfig().getOcrStrategy()); assertEquals(ImageType.RGB, ((PDFParser)pdfParser).getPDFParserConfig().getOcrImageType()); } }
public PDFParserConfig getPDFParserConfig() { return defaultConfig; }
PDFParser extends AbstractParser implements Initializable { public PDFParserConfig getPDFParserConfig() { return defaultConfig; } }
PDFParser extends AbstractParser implements Initializable { public PDFParserConfig getPDFParserConfig() { return defaultConfig; }  }
PDFParser extends AbstractParser implements Initializable { public PDFParserConfig getPDFParserConfig() { return defaultConfig; }  Set<MediaType> getSupportedTypes(ParseContext context); void parse(
            InputStream stream, ContentHandler handler,
            Metadata metadata, ParseContext context); PDFParserConfig getPDFParserConfig(); void setPDFParserConfig(PDFParserConfig config); boolean getEnableAutoSpace(); @Field void setEnableAutoSpace(boolean v); boolean getExtractAnnotationText(); void setExtractAnnotationText(boolean v); boolean getSuppressDuplicateOverlappingText(); @Field void setSuppressDuplicateOverlappingText(boolean v); boolean getSortByPosition(); @Field void setSortByPosition(boolean v); @Field void setOcrStrategy(String ocrStrategyString); @Field void setOcrImageType(String imageType); void setInitializableProblemHandler(InitializableProblemHandler initializableProblemHandler); @Field void setDropThreshold(float dropThreshold); @Field void setMaxMainMemoryBytes(long maxMainMemoryBytes); @Override void initialize(Map<String, Param> params); @Override void checkInitialization(InitializableProblemHandler handler); }
PDFParser extends AbstractParser implements Initializable { public PDFParserConfig getPDFParserConfig() { return defaultConfig; }  Set<MediaType> getSupportedTypes(ParseContext context); void parse(
            InputStream stream, ContentHandler handler,
            Metadata metadata, ParseContext context); PDFParserConfig getPDFParserConfig(); void setPDFParserConfig(PDFParserConfig config); boolean getEnableAutoSpace(); @Field void setEnableAutoSpace(boolean v); boolean getExtractAnnotationText(); void setExtractAnnotationText(boolean v); boolean getSuppressDuplicateOverlappingText(); @Field void setSuppressDuplicateOverlappingText(boolean v); boolean getSortByPosition(); @Field void setSortByPosition(boolean v); @Field void setOcrStrategy(String ocrStrategyString); @Field void setOcrImageType(String imageType); void setInitializableProblemHandler(InitializableProblemHandler initializableProblemHandler); @Field void setDropThreshold(float dropThreshold); @Field void setMaxMainMemoryBytes(long maxMainMemoryBytes); @Override void initialize(Map<String, Param> params); @Override void checkInitialization(InitializableProblemHandler handler); static final String PASSWORD; }