Hi,

On Mon, Jan 30, 2012 at 3:59 PM, Nick Burch <nick.bu...@alfresco.com> 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 building the value, or building the value and
> setting the property?

It's probably cleanest to avoid a dependency from XMPDM to Metadata
(even though they're in the same package) so I'd go with the first
signature.

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 code and constants in the XMPDM class (and with defaults like
0 and null for non-audio documents).

Opening the Metadata class for convenience methods like these can be a
Pandora's box, but it would also simplify quite a bit of code both on
the client and the parser side.

BR,

Jukka Zitting

Reply via email to