[jira] [Commented] (TIKA-853) java.io.IOException with TikaGUI and testMP4.m4a

2012-01-30 Thread Nick Burch (Commented) (JIRA)
[ https://issues.apache.org/jira/browse/TIKA-853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13196077#comment-13196077 ] Nick Burch commented on TIKA-853: - Ah, we weren't closing the stream in all cases. This is h

Sharing metadata logic between parsers

2012-01-30 Thread Nick Burch
Hi All With the MP4 Parser, I've just found myself writing a piece of code for the third time, to turn the number of channels as an Int into the XMPDM channel type strings (mono, stereo, 5.1 etc). What I'm not sure on is where the best place is to put that code so it can be re-used? Options

Re: Sharing metadata logic between parsers

2012-01-30 Thread Jukka Zitting
Hi, On Mon, Jan 30, 2012 at 3:40 PM, Nick Burch wrote: > What do people think is the best way to handle this sort of thing? I'd go with XMPDM, as that's already a dependency of the described piece of code. BR, Jukka Zitting

Re: Sharing metadata logic between parsers

2012-01-30 Thread Nick Burch
On Mon, 30 Jan 2012, Jukka Zitting wrote: On Mon, Jan 30, 2012 at 3:40 PM, Nick Burch wrote: What do people think is the best way to handle this sort of thing? I'd go with XMPDM, as that's already a dependency of the described piece of code. OK. Any thoughts on how it should work? The two t

Re: Sharing metadata logic between parsers

2012-01-30 Thread Jukka Zitting
Hi, On Mon, Jan 30, 2012 at 3:59 PM, Nick Burch wrote: > OK. Any thoughts on how it should work? The two things that spring to mind > are: >   String toAudioChannelType(int numberOfChannels) >   void setAudioChannelType(int numberOfChannels, Metadata metadata) > > Do you think we should be buildi

Re: Sharing metadata logic between parsers

2012-01-30 Thread Nick Burch
On Mon, 30 Jan 2012, Jukka Zitting wrote: What we might also consider as an extra convenience, are Metadata methods like: int getNumberOfAudioChannels(); void getNumberOfAudioChannels(int channels); and String getAudioChannelType(); void setAudioChannelType(String type); based on

Re: Sharing metadata logic between parsers

2012-01-30 Thread Jukka Zitting
Hi, On Mon, Jan 30, 2012 at 4:20 PM, Nick Burch wrote: > On Mon, 30 Jan 2012, Jukka Zitting wrote: >> What we might also consider as an extra convenience, are Metadata methods >> like: [...] > > If we're doing that sort of thing, then I'd rather we put the logic onto the > Property for that. The

Re: Sharing metadata logic between parsers

2012-01-30 Thread Ray Gauss II
I personally like Nick's 3rd idea: Extending the Property class to support a converter. Even in the case described here the Metadata property setters could be modified to something like: public void set(Property property, int value) { if(property.getPropertyType() != Property.PropertyTy

[jira] [Commented] (TIKA-853) java.io.IOException with TikaGUI and testMP4.m4a

2012-01-30 Thread John Mastarone (Commented) (JIRA)
[ https://issues.apache.org/jira/browse/TIKA-853?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13196544#comment-13196544 ] John Mastarone commented on TIKA-853: - I updated and tried again; still no luck. The CL