Funly enough, I was thinking the other way around: could it be a
requirement for someone that two plugins parse the same content-type? 
One plugin does some parts of the parsing, then hands over the page to
another one, _à la_ Visitor.  But then there are several issues: 

- I looked quite briefly at the current code, so I could be wrong, but
the parsers are put into cache (in ParserFactory) in a Hashtable which
takes <content-type>+<extension> as a key.  One of the plugins will
overshadow the other, most likely the one which loaded last.  That
being said, we can end up in strange situations were a plugin handles
pps whilst another one handles ppt.
- Also, the way it now works, a plugin does the job on its own.  But if
two plugins were to do the parsing, wouldn't be the results deduped at
some point anyway?
- Last thing, I couldn't think of any convincing example.


So all in all, I had reached the same conclusion as Doug's, that is,
that the ParserFactory should probably handle all that.


Sébastien.

--- Andrzej Bialecki <[EMAIL PROTECTED]> a écrit :

> 
> However, what happens if more than one plugin claims that it can
> handle 
> any given content-type? E.g. html parser may claim that it supports 
> plaintext. but there is another plugin specifically for plaintext.
> Which 
> of them wins?
> 
> -- 
> Best regards,
> Andrzej Bialecki     <><
>   ___. ___ ___ ___ _ _   __________________________________
> [__ || __|__/|__||\/|  Information Retrieval, Semantic Web
> ___|||__||  \|  ||  |  Embedded Unix, System Integration
> http://www.sigram.com  Contact: info at sigram dot com
> 
> 



        

        
                
___________________________________________________________________________ 
Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger 
Téléchargez cette version sur http://fr.messenger.yahoo.com


-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Nutch-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nutch-general

Reply via email to