throws ParserNotFound {
List<Parser> parsers = null;
List<Extension> parserExts = null;
ObjectCache objectCache = ObjectCache.get(conf);
// TODO once the MimeTypes is available
// parsers = getExtensions(MimeUtils.map(contentType));
// if (parsers != null) {
// return parsers;
// }
// Last Chance: Guess content-type from file url...
// parsers = getExtensions(MimeUtils.getMimeType(url));
parserExts = getExtensions(contentType);
if (parserExts == null) {
throw new ParserNotFound(url, contentType);
}
parsers = new Vector<Parser>(parserExts.size());
for (Iterator i=parserExts.iterator(); i.hasNext(); ){
Extension ext = (Extension) i.next();
Parser p = null;
try {
//check to see if we've cached this parser instance yet
p = (Parser) objectCache.getObject(ext.getId());
if (p == null) {
// go ahead and instantiate it and then cache it
p = (Parser) ext.getExtensionInstance();
objectCache.setObject(ext.getId(),p);
}
parsers.add(p);
} catch (PluginRuntimeException e) {
if (LOG.isWarnEnabled()) {
LOG.warn("ParserFactory:PluginRuntimeException when "