public class DODSNetcdfFile extends NetcdfFile
NetcdfFile| Modifier and Type | Field and Description |
|---|---|
static boolean |
debugAttributes |
static boolean |
debugCached |
static boolean |
debugCE |
static boolean |
debugCharArray |
static boolean |
debugConstruct |
static boolean |
debugConvertData |
static boolean |
debugDataResult |
static boolean |
debugOpenResult |
static boolean |
debugOpenTime |
static boolean |
debugPreload |
static boolean |
debugServerCall |
static boolean |
debugTime |
static boolean |
showNCfile |
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, reservedCdl, reservedFullName, reservedSectionSpec, rootGroup, showRequest, spi, title, variables| Constructor and Description |
|---|
DODSNetcdfFile(String datasetURL)
Open a DODS file.
|
DODSNetcdfFile(String datasetURL,
CancelTask cancelTask)
Open a DODS file, allow user control over preloading string arrays and making structure data
available through netcdf API.
|
| Modifier and Type | Method and Description |
|---|---|
static String |
canonicalURL(String urlName)
Create the canonical form of the URL.
|
void |
close() |
static int |
convertToDODSType(DataType dataType,
boolean isUnsigned)
Get the DODS data class corresponding to the Netcdf data type.
|
static DataType |
convertToNCType(BaseType dtype)
Get the Netcdf data type corresponding to the DODS BaseType class.
|
static DataType |
convertToNCType(int dodsDataType)
Get the Netcdf data type corresponding to the DODS data type.
|
void |
getDetailInfo(Formatter f) |
static String |
getDODSConstraintName(Variable var)
Return a variable name suitable for use in a DAP constraint expression.
|
String |
getFileTypeDescription() |
String |
getFileTypeId() |
static boolean |
isUnsigned(BaseType dtype)
Get whether this is an unsigned type.
|
static boolean |
isUnsigned(int dodsDataType)
Get whether this is an unsigned type.
|
static void |
main(String[] arg) |
protected int[] |
makeShape(DArray dodsArray) |
List<Array> |
readArrays(List<Variable> preloadVariables)
Make a single call to the DODS Server to read all the named variable's data
in one client/server roundtrip.
|
protected Array |
readData(Variable v,
Section section) |
Array |
readSection(String variableSection) |
long |
readToByteChannel(Variable v,
Section section,
WritableByteChannel channel) |
Array |
readWithCE(Variable v,
String CE) |
protected void |
reGroup()
Go thru the variables/structure-variables and their attributes
and move to the proper groups.
|
protected void |
reGroupVariable(Group rootgroup,
DODSVariable dodsv)
Deprecated.
|
protected void |
reGroupVariableAttributes(Group rootgroup,
Variable v) |
static void |
setAllowCompression(boolean b)
Set whether to allow messages to be compressed.
|
static void |
setAllowDeflate(boolean b)
Deprecated.
use setAllowCompression
|
static void |
setAllowSessions(boolean b)
Set whether to allow sessions by allowing cookies.
|
static void |
setCoordinateVariablePreloadSize(int size)
If preloading, set maximum size of coordinate variables to be preloaded.
|
static void |
setDebugFlags(DebugFlags debugFlag)
Debugging flags.
|
static void |
setPreload(boolean b)
Set whether small variables are preloaded; only turn off for debugging.
|
addAttribute, addDimension, addGroup, addStringVariable, addVariable, addVariable, addVariableAttribute, canOpen, empty, findAttribute, findAttValueIgnoreCase, findDimension, findGlobalAttribute, findGlobalAttributeIgnoreCase, findGroup, findVariable, findVariable, findVariableByAttribute, finish, getCacheName, getDetailInfo, getDimensions, getFileTypeVersion, getGlobalAttributes, getId, getIosp, getLastModified, getLocation, getRootGroup, getStructureIterator, getTitle, getUnlimitedDimension, getVariables, hasUnlimitedDimension, iospRegistered, makeFullName, makeFullName, makeFullNameSectionSpec, makeFullNameWithString, makeNameUnescaped, makeRecordStructure, makeRootGroup, makeValidCDLName, makeValidCdmObjectName, makeValidPathName, makeValidSectionSpecName, open, open, open, open, open, openInMemory, openInMemory, openInMemory, openInMemory, read, readAttributeDouble, readAttributeInteger, readToOutputStream, registerIOProvider, registerIOProvider, registerIOProvider, removeDimension, removeRecordStructure, removeVariable, sendIospMessage, setCacheName, setFileCache, setId, setImmutable, setLocation, setProperty, setTitle, showCached, showProxies, syncExtend, toString, toStringDebug, toStringEnd, toStringStart, toStringStart, writeCDL, writeCDL, writeCDL, writeNcML, writeNcMLpublic static boolean debugCE
public static boolean debugServerCall
public static boolean debugOpenResult
public static boolean debugDataResult
public static boolean debugCharArray
public static boolean debugConvertData
public static boolean debugConstruct
public static boolean debugPreload
public static boolean debugTime
public static boolean showNCfile
public static boolean debugAttributes
public static boolean debugCached
public static boolean debugOpenTime
public DODSNetcdfFile(String datasetURL) throws IOException
datasetURL - URL of the file. This should start with the protocol "dods:"
It may also start with protocol "http:".IOException - on io errorMalformedURLExceptionpublic DODSNetcdfFile(String datasetURL, CancelTask cancelTask) throws IOException
datasetURL - URL of the file. This should start with the protocol "dods:" or "http:".cancelTask - check if task is cancelled. may be null.IOException - on io errorMalformedURLExceptionpublic static void setAllowSessions(boolean b)
b - true or false. default is false.public static void setAllowDeflate(boolean b)
b - true or false.public static void setAllowCompression(boolean b)
b - true or false.public static void setDebugFlags(DebugFlags debugFlag)
debugFlag - set of debug flags.public static void setPreload(boolean b)
b - true if small variables are preloaded (default true)public static void setCoordinateVariablePreloadSize(int size)
size - maximum size of coordinate variables to be preloaded.public static String canonicalURL(String urlName)
urlName - the url stringpublic void close()
throws IOException
close in interface FileCacheableclose in class NetcdfFileIOExceptionprotected void reGroup()
throws DAP2Exception
DAP2Exception@Deprecated protected void reGroupVariable(Group rootgroup, DODSVariable dodsv) throws DAP2Exception
DAP2Exceptionprotected void reGroupVariableAttributes(Group rootgroup, Variable v) throws DAP2Exception
DAP2Exceptionprotected int[] makeShape(DArray dodsArray)
public static String getDODSConstraintName(Variable var)
var - The variable whose name will appear in the CEpublic static int convertToDODSType(DataType dataType, boolean isUnsigned)
dataType - Netcdf data type.isUnsigned - if its unsignedpublic static DataType convertToNCType(int dodsDataType)
dodsDataType - DODS type enum, from dods.dap.Attribute.XXXX.isUnsigned(int)public static boolean isUnsigned(int dodsDataType)
dodsDataType - DODS type enum, from dods.dap.Attribute.XXXX.public static DataType convertToNCType(BaseType dtype)
dtype - DODS BaseType.isUnsigned(int)public static boolean isUnsigned(BaseType dtype)
dtype - DODS BaseType.public List<Array> readArrays(List<Variable> preloadVariables) throws IOException
readArrays in class NetcdfFilepreloadVariables - list of type VariableIOException - on errorpublic Array readSection(String variableSection) throws IOException, InvalidRangeException
readSection in class NetcdfFileIOExceptionInvalidRangeExceptionprotected Array readData(Variable v, Section section) throws IOException, InvalidRangeException
readData in class NetcdfFileIOExceptionInvalidRangeExceptionpublic long readToByteChannel(Variable v, Section section, WritableByteChannel channel) throws IOException, InvalidRangeException
readToByteChannel in class NetcdfFileIOExceptionInvalidRangeExceptionpublic Array readWithCE(Variable v, String CE) throws IOException
IOExceptionpublic void getDetailInfo(Formatter f)
getDetailInfo in class NetcdfFilepublic String getFileTypeId()
getFileTypeId in class NetcdfFilepublic String getFileTypeDescription()
getFileTypeDescription in class NetcdfFilepublic static void main(String[] arg)
Copyright © 1999–2014 OPeNDAP. All rights reserved.