commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philippe Poulard <Philippe.Poul...@sophia.inria.fr>
Subject Re: [VFS] FallbackFileObject
Date Mon, 08 Aug 2005 11:16:27 GMT
Mario Ivankovits wrote:
> Hi Philippe!
> 
>> i have to deal with some schemes that are not necessary registered to 
>> the VFS manager ; in fact, i don't really know in advance if an URI 
>> has a scheme known by VFS
>>
> ...
> 
>> -supply a FallbackFileObject (for which one can't access the content, 
>> of course)
> 
> But what will you do with such kind of fileObject?

this is used for example to retrieve resources in a catalog

> 
> However. The DefaultFileSystemManager knows something like a 
> defaultProvider. You can override to default defaultProvider ;-) using 
> DefaultFileSystemManager.setDefaultProvider.
> If you provide something like FallbackFileProvider you should be able to 
> return a FallbackFileObject.
> 
> The default defaultProvider is the UrlFileProvider, if you need its 
> functionality (which is guess you dont) you have to wrap it in your 
> FallbackFileObject.
> Unhappily there is no getDefaultProvider now.
> 
> Might this fit your needs?

in fact, the default FSM and the fallback FSM are not really the same :
the former is used when a file is expressed relatively (which denotes 
that we are in a hierarchical URI), whereas the latter for absolute URIs 
for which the scheme is not registered to VFS (that can be opaque URIs, 
such as "urn:schemas-microsoft-com:office:office", or 
"mailto:john.doe@acme.com")

anyway, i understand that the tip is to set my own default provider, 
that could use either the UrlFileProvider, or the FallbackFileProvider

thanks for your reply, Mario

-- 
Cordialement,

            ///
           (. .)
  -----ooO--(_)--Ooo-----
|   Philippe Poulard    |
  -----------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message