avalon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Unico Hommes" <Un...@hippo.nl>
Subject RE: [SourceResolve] need for mime-type mappings
Date Tue, 08 Jul 2003 08:17:50 GMT
 
Jörg Schaible wrote:
> 
> Hi Unico,
> 
> > I was thinking that we need a common way to map mime-types 
> in Avalon 
> > and that sourceresolve package is the place to put it. I 
> have two use 
> > cases that raise the need for such a utility both related to
> > sourceresolve: one is FTPSource where I need to determine what FTP 
> > transfer mode to use (ascii or binary) and the other is a 
> XML database 
> > backed Source that stores both DOM objects and Blob objects.
> > Depending on whether the location string identifies  one or 
> the other 
> > I want to the SourceFactory to return an XMLIzable Source 
> or a plain 
> > one.
> > 
> > Now in Cocoon there exists a utility class MIMEUtils that loads a 
> > mapping file for cases that the Cocoon Context object is not in the 
> > know about such things. I'd like to have a more general solution to 
> > this problem, and one that resides in the avalon namespace. 
> The fact 
> > that systems have existing ways of providing such a service 
> (Servlet 
> > API provides ServletContext.getMimeType() method and web.xml markup 
> > for declaring these mappings) suggests to me a service role 
> instead of 
> > a static utility class.
> [snip]
> 
> Seems like 
> http://nagoya.apache.org/wiki/apachewiki.cgi?AvalonFortressFAQ/ExtendingTheFortressConfiguration

Looks like :)
 
> You'll find a lot of these implementations googling for 
> Avalon and MimeType.

Found a MimeTypeService that resides inside Turbine wich looks more advanced than my proposal.

http://jakarta.apache.org/turbine/fulcrum/apidocs/org/apache/fulcrum/mimetype/MimeTypeService.html
If something like this would be part of Avalon all systems depending on it wouldn't need to
reinvent the wheel in their own code.

> 
> My concern would be the dependency on J2EE classes.

That should be optional.

Unico

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Mime
View raw message