[ 
https://issues.apache.org/jira/browse/TIKA-1986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15327847#comment-15327847
 ] 

Tim Allison commented on TIKA-1986:
-----------------------------------

bq. That would be okay. How about this 
http://stackoverflow.com/q/20354943/1506477, is it better ?
Would that go on the individual parser's setters or somewhere else?  If on the 
setters, I think the standard javadocs should be sufficient.  If elsewhere, y, 
that'd make sense...very cool.

bq. Does that mean we have to remove void configure(ParseContext context) ; 
method as well?
I think we will need this call, IMO this is how we can tell a 
Parser/translator/langdetector that we are done binding ALL the parameters and 
it is now a good time to initialize and possibly raise exception if something 
is not okay.

Ah, ok. I hadn't thought about that.  I was figuring that individual setting 
would be sufficient.  Do we have use cases where we need to set multiple 
settings and then initialize?  I can imagine some...  The reason I'd like to 
get rid of configure(ParseContext context) is that it adds yet another way to 
configure the parsers.  If the user can easily touch the actual parser 
programmatically (i.e. it isn't wrapped in the AutoDetectParser), they'd now 
have three ways of configuring a parser: a) directly with setters, configuring 
something in the ParseContext and b) then submitting that in the call to 
parse(...) or c) the configure() method. 

bq. The way parameters are specified in XML file is local to each parser (the 
params is wrapped inside parser tag, which means the map of params is not 
global and not shared by other parsers.

Right, I agree completely about how the XML file works, but if a user is 
calling the AutoDetectParser programmatically, they have a single ParseContext 
for every parser. Or am I missing something about how configure is intended to 
work?

Thank you, again!

> support parser parameters with type (int, double, etc) in configuration XML 
> file
> --------------------------------------------------------------------------------
>
>                 Key: TIKA-1986
>                 URL: https://issues.apache.org/jira/browse/TIKA-1986
>             Project: Tika
>          Issue Type: Sub-task
>          Components: config
>            Reporter: Thamme Gowda
>             Fix For: 1.14
>
>
> Tika Configuration should be enhanced to support for basic types like int, 
> double, boolean, url, file.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to