Re: [netcdf-java] Questions about IOServiceProvider


Jon Blower wrote:
> Thanks, this looks like what I might want.  My issue with the current
> service-oriented approach to IOSP (although I completely understand
> why it works this way from a plugin point of view) is that it might be
> hard or expensive for an IOSP to detect a file of the correct format.
> If you can force the use of a given IOSP you can get around this.

yes, the question is who knows what IOSP to use?

BTW, one can specify the IOSP in NcML (at least in 4.0), which calls the open() 
method below.


> 
> Cheers, Jon
> 
> On Thu, Feb 14, 2008 at 5:36 PM, John Caron <caron@xxxxxxxxxxxxxxxx> wrote:
>> Im not sure what's the context, but this may be what you want:
>>
>>   static public NetcdfFile open(String location, String className, int 
>> bufferSize, CancelTask
>>  cancelTask, String iospClassName);
>>
>>  undocumented at the moment, but a look at the source should make it obvious.
>>
>>
>>
>>  Jon Blower wrote:
>>  > Hi John,
>>  >
>>  > Is it possible to explicitly specify the IOServiceProvider that should
>>  > be used when opening a Netcdf file/dataset?  In my case I will know
>>  > what IOSP to use in advance and coding the isValidFile() method could
>>  > be tricky in general.
>>  >
>>  > I guess I could use a single IOSP (whose isValidFile() always returns
>>  > true) and use the spiObject as a signal to work out the internal logic
>>  > (perhaps delegating to other IOSPs).
>>  >
>>  > Cheers, Jon
>>  >
>>  > On Sat, Jan 26, 2008 at 8:25 PM, John Caron <caron@xxxxxxxxxxxxxxxx> 
>> wrote:
>>  >>
>>  >>  Jon Blower wrote:
>>  >>  > Hi,
>>  >>  >
>>  >>  > I have a couple of questions about IOServiceProviders:
>>  >>  >
>>  >>  > 1) What happens if two IOServiceProviders return true for
>>  >>  > isValidFile()?  Which provider is used?
>>  >>
>>  >>  the first one thats asked. user-loaded iosps are loaded in front of the 
>> system ones, so users can override.
>>  >>
>>  >>
>>  >>
>>  >>  > 2) When does sync() get called?
>>  >>
>>  >>  sync is an attempt to deal with files that change after being opened. 
>> most IOSPs cant handle this, but we are curently trying to make it work for 
>> netcdf-3 record dimension growth and grib files.
>>  >>
>>  >>  the main case is from NetcdfFileCache, sync is called when a cached 
>> file is found. NcML aggregation also calls this.
>>  >>
>>  >>  >
>>  >>  > Thanks,
>>  >>  > Jon
>>  >>  >
>>  >>
>>  >
>>  >
>>  >
>>
> 
> 
> 


  • 2008 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-java archives: