You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Jukka Zitting (JIRA)" <ji...@apache.org> on 2011/03/30 20:08:05 UTC
[jira] [Created] (TIKA-626) Add a DefaultParser class
Add a DefaultParser class
-------------------------
Key: TIKA-626
URL: https://issues.apache.org/jira/browse/TIKA-626
Project: Tika
Issue Type: Improvement
Components: parser
Reporter: Jukka Zitting
Assignee: Jukka Zitting
Priority: Minor
The deprecated parse() method in the Parser interface causes quite a few repetitive method declarations in all parser classes, so to simplify things I'd like to introduce a DefaultParser class that provides reasonable default implementations of all Parser methods and can be used as the base class of any Parser implementation. It would be analogous to the DefaultHandler class in SAX, and would also make it easier for us to introduce new Parser methods if needed later on without necessarily breaking too many existing Parser classes.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (TIKA-626) Add an AbstractParser class
Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TIKA-626?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jukka Zitting resolved TIKA-626.
--------------------------------
Resolution: Fixed
Fix Version/s: 1.0
I added the class in revision 1087353.
> Add an AbstractParser class
> ---------------------------
>
> Key: TIKA-626
> URL: https://issues.apache.org/jira/browse/TIKA-626
> Project: Tika
> Issue Type: Improvement
> Components: parser
> Reporter: Jukka Zitting
> Assignee: Jukka Zitting
> Priority: Minor
> Fix For: 1.0
>
>
> The deprecated parse() method in the Parser interface causes quite a few repetitive method declarations in all parser classes, so to simplify things I'd like to introduce a BaseParser class that provides reasonable default implementations of all Parser methods and can be used as the base class of any Parser implementation. It would be analogous to the DefaultHandler class in SAX, and would also make it easier for us to introduce new Parser methods if needed later on without necessarily breaking too many existing Parser classes.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (TIKA-626) Add an AbstractParser class
Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TIKA-626?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jukka Zitting updated TIKA-626:
-------------------------------
Summary: Add an AbstractParser class (was: Add a BaseParser class)
Yes, AbstractParser makes more sense. At first I was thinking that this should be like the DefaultHandler class in SAX that implements all methods and thus isn't abstract. But after playing with this a bit I realized that all practical Parser classes need to implement both the getSupportedTypes() and parse() methods in any case, so there's little point in providing empty default implementations of them.
Besides, we already have such an empty parser class in EmptyParser. That class can't be used as a base class since it reduces the set of exceptions thrown from parse().
> Add an AbstractParser class
> ---------------------------
>
> Key: TIKA-626
> URL: https://issues.apache.org/jira/browse/TIKA-626
> Project: Tika
> Issue Type: Improvement
> Components: parser
> Reporter: Jukka Zitting
> Assignee: Jukka Zitting
> Priority: Minor
>
> The deprecated parse() method in the Parser interface causes quite a few repetitive method declarations in all parser classes, so to simplify things I'd like to introduce a BaseParser class that provides reasonable default implementations of all Parser methods and can be used as the base class of any Parser implementation. It would be analogous to the DefaultHandler class in SAX, and would also make it easier for us to introduce new Parser methods if needed later on without necessarily breaking too many existing Parser classes.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (TIKA-626) Add a BaseParser class
Posted by "Nick Burch (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TIKA-626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13013653#comment-13013653 ]
Nick Burch commented on TIKA-626:
---------------------------------
Or AbstractParser? The idea seems good to me though!
> Add a BaseParser class
> ----------------------
>
> Key: TIKA-626
> URL: https://issues.apache.org/jira/browse/TIKA-626
> Project: Tika
> Issue Type: Improvement
> Components: parser
> Reporter: Jukka Zitting
> Assignee: Jukka Zitting
> Priority: Minor
>
> The deprecated parse() method in the Parser interface causes quite a few repetitive method declarations in all parser classes, so to simplify things I'd like to introduce a BaseParser class that provides reasonable default implementations of all Parser methods and can be used as the base class of any Parser implementation. It would be analogous to the DefaultHandler class in SAX, and would also make it easier for us to introduce new Parser methods if needed later on without necessarily breaking too many existing Parser classes.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (TIKA-626) Add a BaseParser class
Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TIKA-626?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jukka Zitting updated TIKA-626:
-------------------------------
Description: The deprecated parse() method in the Parser interface causes quite a few repetitive method declarations in all parser classes, so to simplify things I'd like to introduce a BaseParser class that provides reasonable default implementations of all Parser methods and can be used as the base class of any Parser implementation. It would be analogous to the DefaultHandler class in SAX, and would also make it easier for us to introduce new Parser methods if needed later on without necessarily breaking too many existing Parser classes. (was: The deprecated parse() method in the Parser interface causes quite a few repetitive method declarations in all parser classes, so to simplify things I'd like to introduce a DefaultParser class that provides reasonable default implementations of all Parser methods and can be used as the base class of any Parser implementation. It would be analogous to the DefaultHandler class in SAX, and would also make it easier for us to introduce new Parser methods if needed later on without necessarily breaking too many existing Parser classes.)
Summary: Add a BaseParser class (was: Add a DefaultParser class)
Hmm, we already have a DefaultParser class. Renamed this issue to BaseParser.
> Add a BaseParser class
> ----------------------
>
> Key: TIKA-626
> URL: https://issues.apache.org/jira/browse/TIKA-626
> Project: Tika
> Issue Type: Improvement
> Components: parser
> Reporter: Jukka Zitting
> Assignee: Jukka Zitting
> Priority: Minor
>
> The deprecated parse() method in the Parser interface causes quite a few repetitive method declarations in all parser classes, so to simplify things I'd like to introduce a BaseParser class that provides reasonable default implementations of all Parser methods and can be used as the base class of any Parser implementation. It would be analogous to the DefaultHandler class in SAX, and would also make it easier for us to introduce new Parser methods if needed later on without necessarily breaking too many existing Parser classes.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira