@Test public void testConfiguredMetadataProvider() { Assert.assertTrue( MetadataExtractorFactory.create(DefaultMetadataExtractor.class.getName()) instanceof DefaultMetadataExtractor); }
public static MetadataExtractor create(String metadataClassName) { String metadataExtractorClassName = metadataClassName; try { LOGGER.info("Instantiating MetadataExtractor class {}", metadataExtractorClassName); MetadataExtractor metadataExtractor = (MetadataExtractor) Class.forName(metadataExtractorClassName).newInstance(); return metadataExtractor; } catch (Exception e) { LOGGER.warn("No metadata extractor class passed in, using default"); return new DefaultMetadataExtractor(); } }
MetadataExtractorFactory { public static MetadataExtractor create(String metadataClassName) { String metadataExtractorClassName = metadataClassName; try { LOGGER.info("Instantiating MetadataExtractor class {}", metadataExtractorClassName); MetadataExtractor metadataExtractor = (MetadataExtractor) Class.forName(metadataExtractorClassName).newInstance(); return metadataExtractor; } catch (Exception e) { LOGGER.warn("No metadata extractor class passed in, using default"); return new DefaultMetadataExtractor(); } } }
MetadataExtractorFactory { public static MetadataExtractor create(String metadataClassName) { String metadataExtractorClassName = metadataClassName; try { LOGGER.info("Instantiating MetadataExtractor class {}", metadataExtractorClassName); MetadataExtractor metadataExtractor = (MetadataExtractor) Class.forName(metadataExtractorClassName).newInstance(); return metadataExtractor; } catch (Exception e) { LOGGER.warn("No metadata extractor class passed in, using default"); return new DefaultMetadataExtractor(); } } private  MetadataExtractorFactory(); }
MetadataExtractorFactory { public static MetadataExtractor create(String metadataClassName) { String metadataExtractorClassName = metadataClassName; try { LOGGER.info("Instantiating MetadataExtractor class {}", metadataExtractorClassName); MetadataExtractor metadataExtractor = (MetadataExtractor) Class.forName(metadataExtractorClassName).newInstance(); return metadataExtractor; } catch (Exception e) { LOGGER.warn("No metadata extractor class passed in, using default"); return new DefaultMetadataExtractor(); } } private  MetadataExtractorFactory(); static MetadataExtractor create(String metadataClassName); }
MetadataExtractorFactory { public static MetadataExtractor create(String metadataClassName) { String metadataExtractorClassName = metadataClassName; try { LOGGER.info("Instantiating MetadataExtractor class {}", metadataExtractorClassName); MetadataExtractor metadataExtractor = (MetadataExtractor) Class.forName(metadataExtractorClassName).newInstance(); return metadataExtractor; } catch (Exception e) { LOGGER.warn("No metadata extractor class passed in, using default"); return new DefaultMetadataExtractor(); } } private  MetadataExtractorFactory(); static MetadataExtractor create(String metadataClassName); static final Logger LOGGER; }