ucar.nc2.stream
Class CdmRemote

java.lang.Object
  extended by ucar.nc2.NetcdfFile
      extended by ucar.nc2.stream.CdmRemote
All Implemented Interfaces:
FileCacheable

public class CdmRemote
extends NetcdfFile

A remote CDM dataset, using ncstream to communicate. Supports full CDM / netcdf-4 data model.

Since:
Feb 7, 2009
Author:
caron

Field Summary
static String SCHEME
           
 
Fields inherited from class ucar.nc2.NetcdfFile
cache, cacheName, debugCompress, debugSPI, dimensions, gattributes, id, IOSP_MESSAGE_ADD_RECORD_STRUCTURE, IOSP_MESSAGE_CONVERT_RECORD_STRUCTURE, IOSP_MESSAGE_RANDOM_ACCESS_FILE, IOSP_MESSAGE_REMOVE_RECORD_STRUCTURE, location, reserved, reservedCdl, reservedSectionSpec, rootGroup, spi, title, unlocked, variables
 
Constructor Summary
CdmRemote(String _remoteURI)
           
 
Method Summary
static String canonicalURL(String urlName)
          Create the canonical form of the URL.
 void close()
          Close all resources (files, sockets, etc) associated with this file.
 String getFileTypeDescription()
          Get a human-readable description for this file type.
 String getFileTypeId()
          Get the file type id for the underlying data source.
protected  StructureDataIterator getStructureIterator(Structure s, int bufferSize)
           
protected  Array readData(Variable v, Section section)
           
static InputStream sendQuery(String remoteURI, String query)
           
static void setDebugFlags(DebugFlags debugFlag)
           
 void writeToFile(String filename)
           
 
Methods inherited from class ucar.nc2.NetcdfFile
addAttribute, addDimension, addGroup, addStringVariable, addVariable, addVariable, addVariableAttribute, canOpen, empty, escapeName, escapeNameCDL, escapeNameSectionSpec, findAttValueIgnoreCase, findDimension, findGlobalAttribute, findGlobalAttributeIgnoreCase, findGroup, findVariable, finish, getCacheName, getDetailInfo, getDetailInfo, getDimensions, getFileTypeVersion, getGlobalAttributes, getId, getIosp, getLocation, getRootGroup, getTitle, getUnlimitedDimension, getVariables, hasUnlimitedDimension, isUnlocked, main, makeFullName, makeFullName, makeFullNameEscaped, makeFullNameEscapedSectionSpec, makeFullNameWithString, makeRecordStructure, makeRootGroup, makeValidCdmObjectName, open, open, open, open, open, openInMemory, openInMemory, openInMemory, openInMemory, read, readArrays, readAttributeDouble, readAttributeInteger, readSection, readToByteChannel, registerIOProvider, registerIOProvider, removeDimension, removeRecordStructure, removeVariable, sendIospMessage, setCacheName, setFileCache, setId, setImmutable, setLocation, setProperty, setTitle, showCached, showProxies, sync, syncExtend, toString, toStringDebug, toStringEnd, toStringStart, unescapeName, writeCDL, writeCDL, writeNcML, writeNcML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SCHEME

public static final String SCHEME
See Also:
Constant Field Values
Constructor Detail

CdmRemote

public CdmRemote(String _remoteURI)
          throws IOException
Throws:
IOException
Method Detail

setDebugFlags

public static void setDebugFlags(DebugFlags debugFlag)

canonicalURL

public static String canonicalURL(String urlName)
Create the canonical form of the URL. If the urlName starts with "http:", change it to start with "dods:", otherwise leave it alone.

Parameters:
urlName - the url string
Returns:
canonical form

readData

protected Array readData(Variable v,
                         Section section)
                  throws IOException,
                         InvalidRangeException
Overrides:
readData in class NetcdfFile
Throws:
IOException
InvalidRangeException

getStructureIterator

protected StructureDataIterator getStructureIterator(Structure s,
                                                     int bufferSize)
                                              throws IOException
Overrides:
getStructureIterator in class NetcdfFile
Throws:
IOException

sendQuery

public static InputStream sendQuery(String remoteURI,
                                    String query)
                             throws IOException
Throws:
IOException

getFileTypeId

public String getFileTypeId()
Description copied from class: NetcdfFile
Get the file type id for the underlying data source.

Overrides:
getFileTypeId in class NetcdfFile
Returns:
registered id of the file type
See Also:
"http://www.unidata.ucar.edu/software/netcdf-java/formats/FileTypes.html"

getFileTypeDescription

public String getFileTypeDescription()
Description copied from class: NetcdfFile
Get a human-readable description for this file type.

Overrides:
getFileTypeDescription in class NetcdfFile
Returns:
description of the file type
See Also:
"http://www.unidata.ucar.edu/software/netcdf-java/formats/FileTypes.html"

writeToFile

public void writeToFile(String filename)
                 throws IOException
Throws:
IOException

close

public void close()
           throws IOException
Description copied from class: NetcdfFile
Close all resources (files, sockets, etc) associated with this file. If the underlying file was acquired, it will be released, otherwise closed. if isClosed() already, nothing will happen

Specified by:
close in interface FileCacheable
Overrides:
close in class NetcdfFile
Throws:
IOException


Copyright © 1999-2011 UCAR/Unidata. All Rights Reserved.