public class ThreddsDataFactory extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ThreddsDataFactory.Result
The result of trying to open a THREDDS dataset.
|
Modifier and Type | Field and Description |
---|---|
static String |
PROTOCOL |
static String |
SCHEME |
Constructor and Description |
---|
ThreddsDataFactory() |
Modifier and Type | Method and Description |
---|---|
static void |
annotate(InvDataset ds,
NetcdfDataset ncDataset)
Add information from the InvDataset to the NetcdfDataset.
|
InvAccess |
chooseDatasetAccess(List<InvAccess> accessList)
Find the "best" access in case theres more than one, based on what the CDM knows
how to open and use.
|
NetcdfDataset |
openDataset(InvAccess access,
boolean acquire,
CancelTask task,
Formatter log)
Try to open invAccess as a NetcdfDataset.
|
NetcdfDataset |
openDataset(InvDataset invDataset,
boolean acquire,
CancelTask task,
Formatter log)
Try to open as a NetcdfDataset.
|
NetcdfDataset |
openDataset(String location,
boolean acquire,
CancelTask task,
Formatter log)
Open a NetcdfDataset from a URL location string.
|
ThreddsDataFactory.Result |
openFeatureDataset(FeatureType wantFeatureType,
InvDataset invDataset,
CancelTask task,
ThreddsDataFactory.Result result) |
ThreddsDataFactory.Result |
openFeatureDataset(FeatureType wantFeatureType,
String urlString,
CancelTask task)
Open a FeatureDataset from a URL location string, and a desired type (may by NONE or null).
|
ThreddsDataFactory.Result |
openFeatureDataset(InvAccess access,
CancelTask task)
Open a FeatureDataset from an InvAccess object.
|
ThreddsDataFactory.Result |
openFeatureDataset(InvDataset invDataset,
CancelTask task)
Open a FeatureDataset from an InvDataset object, deciding on which InvAccess to use.
|
ThreddsDataFactory.Result |
openFeatureDataset(String urlString,
CancelTask task)
Open a FeatureDataset from a URL location string.
|
static void |
setDebugFlags(DebugFlags debugFlag) |
static void |
setPreferAccess(ServiceType... prefer) |
static void |
setPreferCdm(boolean prefer) |
public static final String PROTOCOL
public static final String SCHEME
public static void setPreferCdm(boolean prefer)
public static void setPreferAccess(ServiceType... prefer)
public static void setDebugFlags(DebugFlags debugFlag)
public ThreddsDataFactory.Result openFeatureDataset(String urlString, CancelTask task) throws IOException
urlString
- [thredds:]catalog.xml#datasetIdtask
- may be nullIOException
- on read errorpublic ThreddsDataFactory.Result openFeatureDataset(FeatureType wantFeatureType, String urlString, CancelTask task) throws IOException
wantFeatureType
- desired feature type, may be NONE or nullurlString
- [thredds:]catalog.xml#datasetIdtask
- may be nullIOException
- on read errorpublic ThreddsDataFactory.Result openFeatureDataset(InvDataset invDataset, CancelTask task) throws IOException
invDataset
- use this to figure out what type, how to open, etctask
- allow user to cancel; may be nullIOException
- on read errorpublic ThreddsDataFactory.Result openFeatureDataset(FeatureType wantFeatureType, InvDataset invDataset, CancelTask task, ThreddsDataFactory.Result result) throws IOException
IOException
public ThreddsDataFactory.Result openFeatureDataset(InvAccess access, CancelTask task) throws IOException
access
- use this InvAccess.task
- may be nullIOException
- on read errorpublic NetcdfDataset openDataset(String location, boolean acquire, CancelTask task, Formatter log) throws IOException
location
- catalog.xml#datasetId, may optionally start with "thredds:"task
- may be nulllog
- error messages gp here, may be nullacquire
- if true, aquire the dataset, else open itIOException
- on read errorpublic NetcdfDataset openDataset(InvDataset invDataset, boolean acquire, CancelTask task, Formatter log) throws IOException
invDataset
- open thisacquire
- if true, aquire the dataset, else open ittask
- may be nulllog
- error message, may be nullIOException
- on read errorpublic NetcdfDataset openDataset(InvAccess access, boolean acquire, CancelTask task, Formatter log) throws IOException
access
- open this InvAccessacquire
- if true, aquire the dataset, else open ittask
- may be nulllog
- error message, may be nullIOException
- on read errorpublic InvAccess chooseDatasetAccess(List<InvAccess> accessList)
accessList
- choose from this list.public static void annotate(InvDataset ds, NetcdfDataset ncDataset)
ds
- get info from herencDataset
- add to hereCopyright © 1999–2019 UCAR/Unidata. All rights reserved.