@Test public void testResolvableCustomAbbreviation() throws Exception { Set<String> names = getParserConfig(null, "pdf,opendoc", Collections.emptyMap(), Collections.singletonMap("opendoc", "org.apache.tika.parser.odf.OpenDocumentParser")).keySet(); assertEquals(2, names.size()); assertTrue(names.contains("org.apache.tika.parser.pdf.PDFParser")); assertTrue(names.contains("org.apache.tika.parser.odf.OpenDocumentParser")); }
private static List<TikaParserParameter> getParserConfig(String parserName, Map<String, String> parserParamMap) { List<TikaParserParameter> parserParams = new LinkedList<>(); if (parserParamMap != null) { for (Map.Entry<String, String> entry : parserParamMap.entrySet()) { String paramName = unhyphenate(entry.getKey()); String paramType = getParserParamType(parserName, paramName); parserParams.add(new TikaParserParameter(paramName, entry.getValue(), paramType)); } } return parserParams; }
TikaProcessor { private static List<TikaParserParameter> getParserConfig(String parserName, Map<String, String> parserParamMap) { List<TikaParserParameter> parserParams = new LinkedList<>(); if (parserParamMap != null) { for (Map.Entry<String, String> entry : parserParamMap.entrySet()) { String paramName = unhyphenate(entry.getKey()); String paramType = getParserParamType(parserName, paramName); parserParams.add(new TikaParserParameter(paramName, entry.getValue(), paramType)); } } return parserParams; } }
TikaProcessor { private static List<TikaParserParameter> getParserConfig(String parserName, Map<String, String> parserParamMap) { List<TikaParserParameter> parserParams = new LinkedList<>(); if (parserParamMap != null) { for (Map.Entry<String, String> entry : parserParamMap.entrySet()) { String paramName = unhyphenate(entry.getKey()); String paramType = getParserParamType(parserName, paramName); parserParams.add(new TikaParserParameter(paramName, entry.getValue(), paramType)); } } return parserParams; }  }
TikaProcessor { private static List<TikaParserParameter> getParserConfig(String parserName, Map<String, String> parserParamMap) { List<TikaParserParameter> parserParams = new LinkedList<>(); if (parserParamMap != null) { for (Map.Entry<String, String> entry : parserParamMap.entrySet()) { String paramName = unhyphenate(entry.getKey()); String paramType = getParserParamType(parserName, paramName); parserParams.add(new TikaParserParameter(paramName, entry.getValue(), paramType)); } } return parserParams; }  @BuildStep void registerRuntimeInitializedClasses(BuildProducer<RuntimeInitializedClassBuildItem> resource); @BuildStep void registerTikaCoreResources(BuildProducer<NativeImageResourceBuildItem> resource); @BuildStep void registerTikaParsersResources(BuildProducer<NativeImageResourceBuildItem> resource); @BuildStep void registerPdfBoxResources(BuildProducer<NativeImageResourceDirectoryBuildItem> resource); static Map<String, List<TikaParserParameter>> getSupportedParserConfig(Optional<String> tikaConfigPath,
            Optional<String> requiredParsers,
            Map<String, Map<String, String>> parserParamMaps,
            Map<String, String> parserAbbreviations); static String unhyphenate(String paramName); }
TikaProcessor { private static List<TikaParserParameter> getParserConfig(String parserName, Map<String, String> parserParamMap) { List<TikaParserParameter> parserParams = new LinkedList<>(); if (parserParamMap != null) { for (Map.Entry<String, String> entry : parserParamMap.entrySet()) { String paramName = unhyphenate(entry.getKey()); String paramType = getParserParamType(parserName, paramName); parserParams.add(new TikaParserParameter(paramName, entry.getValue(), paramType)); } } return parserParams; }  @BuildStep void registerRuntimeInitializedClasses(BuildProducer<RuntimeInitializedClassBuildItem> resource); @BuildStep void registerTikaCoreResources(BuildProducer<NativeImageResourceBuildItem> resource); @BuildStep void registerTikaParsersResources(BuildProducer<NativeImageResourceBuildItem> resource); @BuildStep void registerPdfBoxResources(BuildProducer<NativeImageResourceDirectoryBuildItem> resource); static Map<String, List<TikaParserParameter>> getSupportedParserConfig(Optional<String> tikaConfigPath,
            Optional<String> requiredParsers,
            Map<String, Map<String, String>> parserParamMaps,
            Map<String, String> parserAbbreviations); static String unhyphenate(String paramName);  }