Am Dienstag, den 06.11.2007, 14:46 +0100 schrieb Carsten Ziegeler: > Felix Meschberger wrote: > > Am Dienstag, den 06.11.2007, 08:06 +0100 schrieb Carsten Ziegeler: > >> Felix Meschberger wrote: > >>> Am Montag, den 05.11.2007, 19:50 +0100 schrieb Bertrand Delacretaz: > >>>> On 11/5/07, Felix Meschberger <[EMAIL PROTECTED]> wrote: > >>>> > >>>>> Am Freitag, den 02.11.2007, 09:49 +0100 schrieb Bertrand Delacretaz: > >>>>>> On 11/2/07, Felix Meschberger <[EMAIL PROTECTED]> wrote: > >>>>>>> ...One simple (stupid ?) solution would be to add a getInputStream() > >>>>>>> method > >>>>>>> to the resource... > >>>>>> Could we make that a sub-interface? Maybe StreamableResource,... > >>>>> ...I am not sure, whether it is worth it having a separate interface for > >>>>> that. What would be the advantage of NOT adding the getInputStream > >>>>> method to the Resource interface... > >>>> If it's just one method, ok. But if we need more than one method for > >>>> StreamableResources, I think that should be a separate interface. > >>> On second thought, I doubt whether a getReader method would be needed, > >>> getInputStream would probably suffice it. > >>> > >> Yes, getInputStream is enough, but I think we need a getContentType() as > >> well - or add it as a predefined constant to the ResourceMetadata. > > > > Not sure, whether Content Type is what we really need. To create a > > reader the character encoding would be required. Adding such a constant > > to the resource metadata (default to UTF-8 if missing) sounds > > reasonable. > > > Hmm, yes, for character encoding makes sense for this; but I thought of > content type :) So I have a chance to detect if it's either text, xml, > an image etc.
How about defining metadata properties for the nt:folder/nt:file/nt:resource metadata information: creation time, last modification time, character encoding, content type. For nt:file nodes, this could be deduced from the respective properties while for other nodes it is up to the implementation whether such properties exist or not. Now, this gets long :-) Regards Felix