see http://www.unidata.ucar.edu/projects/THREDDS/tech/tutorial/Viewers.html and class thredds.servlet.ViewServlet.IDV Anne Wilson wrote:
Hi Marc, Tom, and John,I am not sure what the exact criteria are for IDV viewability, nor how to best implement that via THREDDS. (My experience in this area involves determining what access URLs to generate via the netcdf-java library, and I suspect there are other, probably better, methods than those.) Plus, I think there are some possibly subtle gotchas. Hence I'm forwarding this message on to John.John, how would you propose determining if a file is viewable by the IDV? How does the html writer code that generates the "Viewers" list in the html pages determine which viewers to list? Don mentioned an "isViewable" method - is that available?(John is traveling over the next few days, so there may be a delay in his response.)Thanks! Anne Marcus A Christie wrote:Tom Baltzer wrote:Hi Marc, This is what Don had to say about determining IDV viewability of a datafile. Hope this helps. I know Anne has worked with THREDDS libraries and may havesome comments so I'll cc her.So I could do this with netcdf-Java 2.2: ThreddsDataFactory tdf = new ThreddsDataFactory();ThreddsDataFactory.Result result = tdf.openDataType("http://chinkapin.cs.indiana.edu:8080/thredds/dodsC/data/mylead-repos/urn_uuid_add12e39-1101-4385-9257-2b1e0efa817b", null);boolean isViewable = false;if (result.dataType.equals(DataType.GRID) || result.dataType.equals(DataType.RADIAL)) {isViewable = true; } ?? Thanks, Marc-----Original Message----- From: Don Murray [mailto:address@hidden] Sent: Thursday, March 08, 2007 3:13 PM To: Tom BaltzerSubject: Re: Way to programatically determine if an opendap served file isIDV viewable? Hi Tom- Tom Baltzer wrote:So the IU folks are wondering if there is a way to programaticallydetermineif an opendap served file is IDV viewable. What would you suggest?From a THREDDS catalog: if (dataType.equals(DataType.GRID) || dataType.equals(DataType.RADIAL)) ;-) John was working on some method like "isViewable", but I'm not sure what that was all about. Don ************************************************************* Don Murray UCAR Unidata Program address@hidden P.O. Box 3000 (303) 497-8628 Boulder, CO 80307 http://www.unidata.ucar.edu/staff/donm *************************************************************