@NotThreadSafe public class DODSNetcdfFile extends ucar.nc2.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, debugCompress, debugSPI, dimensions, gattributes, id, iosp, IOSP_MESSAGE_ADD_RECORD_STRUCTURE, IOSP_MESSAGE_CONVERT_RECORD_STRUCTURE, IOSP_MESSAGE_RANDOM_ACCESS_FILE, IOSP_MESSAGE_REMOVE_RECORD_STRUCTURE, location, rootGroup, showRequest, title, variables| Constructor and Description |
|---|
DODSNetcdfFile(String datasetURL)
Open a DODS file.
|
DODSNetcdfFile(String datasetURL,
ucar.nc2.util.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() |
protected static ucar.nc2.Attribute |
combineAxesAttrs(ucar.nc2.Attribute axis1,
ucar.nc2.Attribute axis2)
Safely combine the multiple axis attributes without duplication
|
static int |
convertToDODSType(ucar.ma2.DataType dataType)
Get the DODS data class corresponding to the Netcdf data type.
|
static ucar.ma2.DataType |
convertToNCType(BaseType dtype,
boolean isUnsigned)
Get the Netcdf data type corresponding to the DODS BaseType class.
|
static ucar.ma2.DataType |
convertToNCType(int dodsDataType,
boolean isUnsigned)
Get the Netcdf data type corresponding to the DODS data type.
|
void |
getDetailInfo(Formatter f) |
static String |
getDODSConstraintName(ucar.nc2.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.
|
protected int[] |
makeShape(DArray dodsArray) |
protected ucar.ma2.Array |
readData(ucar.nc2.Variable v,
ucar.ma2.Section section) |
ucar.ma2.Array |
readSection(String variableSection) |
long |
readToByteChannel(ucar.nc2.Variable v,
ucar.ma2.Section section,
WritableByteChannel channel) |
ucar.ma2.Array |
readWithCE(ucar.nc2.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(ucar.nc2.Group rootgroup,
DODSVariable dodsv)
Deprecated.
|
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(ucar.nc2.util.DebugFlags debugFlag)
Debugging flags.
|
static void |
setPreload(boolean b)
Set whether small variables are preloaded; only turn off for debugging.
|
addAttribute, addAttribute, addDimension, addGroup, addLocalFieldsToBuilder, addStringVariable, addVariable, addVariable, addVariableAttribute, builder, canonicalizeUriString, 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, iospDeRegister, iospRegistered, makeFullName, makeFullName, makeFullNameSectionSpec, makeFullNameWithString, makeNameUnescaped, makeRecordStructure, makeValidCDLName, makeValidCdmObjectName, makeValidPathName, makeValidSectionSpecName, open, open, open, open, open, open, openInMemory, openInMemory, openInMemory, openInMemory, reacquire, read, readArrays, readAttributeDouble, readAttributeInteger, readToOutputStream, registerIOProvider, registerIOProvider, registerIOProvider, registerIOProviderPreferred, release, removeDimension, removeRecordStructure, removeVariable, sendIospMessage, setCacheName, setFileCache, setId, setImmutable, setLocation, setProperty, setRootGroup, setTitle, showCached, showProxies, syncExtend, toBuilder, toNcML, toString, toStringDebug, 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, ucar.nc2.util.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(ucar.nc2.util.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 Closeableclose in interface AutoCloseableclose in interface ucar.nc2.util.cache.FileCacheableclose in class ucar.nc2.NetcdfFileIOExceptionprotected void reGroup()
throws DAP2Exception
DAP2Exception@Deprecated protected void reGroupVariable(ucar.nc2.Group rootgroup, DODSVariable dodsv)
protected static ucar.nc2.Attribute combineAxesAttrs(ucar.nc2.Attribute axis1,
ucar.nc2.Attribute axis2)
axis1 - axis attribute 1axis2 - axis attribute 2protected int[] makeShape(DArray dodsArray)
public static String getDODSConstraintName(ucar.nc2.Variable var)
var - The variable whose name will appear in the CEpublic static int convertToDODSType(ucar.ma2.DataType dataType)
dataType - Netcdf data type.public static ucar.ma2.DataType convertToNCType(int dodsDataType,
boolean isUnsigned)
dodsDataType - DODS type enum, from dods.dap.Attribute.XXXX.isUnsigned(opendap.dap.BaseType)public static ucar.ma2.DataType convertToNCType(BaseType dtype, boolean isUnsigned)
dtype - DODS BaseType.isUnsigned(opendap.dap.BaseType)public static boolean isUnsigned(BaseType dtype)
dtype - DODS BaseType.public ucar.ma2.Array readSection(String variableSection) throws IOException, ucar.ma2.InvalidRangeException
readSection in class ucar.nc2.NetcdfFileIOExceptionucar.ma2.InvalidRangeExceptionprotected ucar.ma2.Array readData(ucar.nc2.Variable v,
ucar.ma2.Section section)
throws IOException,
ucar.ma2.InvalidRangeException
readData in class ucar.nc2.NetcdfFileIOExceptionucar.ma2.InvalidRangeExceptionpublic long readToByteChannel(ucar.nc2.Variable v,
ucar.ma2.Section section,
WritableByteChannel channel)
throws IOException,
ucar.ma2.InvalidRangeException
readToByteChannel in class ucar.nc2.NetcdfFileIOExceptionucar.ma2.InvalidRangeExceptionpublic ucar.ma2.Array readWithCE(ucar.nc2.Variable v,
String CE)
throws IOException
IOExceptionpublic void getDetailInfo(Formatter f)
getDetailInfo in class ucar.nc2.NetcdfFilepublic String getFileTypeId()
getFileTypeId in class ucar.nc2.NetcdfFilepublic String getFileTypeDescription()
getFileTypeDescription in class ucar.nc2.NetcdfFile