public class DataFactory
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
DataFactory.Result
The result of trying to open a THREDDS dataset.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROTOCOL |
static java.lang.String |
SCHEME |
Constructor and Description |
---|
DataFactory() |
Modifier and Type | Method and Description |
---|---|
static void |
annotate(Dataset ds,
NetcdfDataset ncDataset)
Add information from the Dataset to the NetcdfDataset.
|
Access |
chooseDatasetAccess(java.util.List<Access> accessList)
Find the "best" access in case theres more than one, based on what the CDM knows
how to open and use.
|
NetcdfDataset |
openDataset(Access access,
boolean acquire,
CancelTask task,
java.util.Formatter log)
Try to open Access as a NetcdfDataset.
|
NetcdfDataset |
openDataset(Dataset Dataset,
boolean acquire,
CancelTask task,
java.util.Formatter log)
Try to open as a NetcdfDataset.
|
NetcdfDataset |
openDataset(java.lang.String location,
boolean acquire,
CancelTask task,
java.util.Formatter log)
Open a NetcdfDataset from a URL location string.
|
DataFactory.Result |
openFeatureDataset(Access access,
CancelTask task)
Open a FeatureDataset from an Access object.
|
DataFactory.Result |
openFeatureDataset(Dataset Dataset,
CancelTask task)
Open a FeatureDataset from an Dataset object, deciding on which Access to use.
|
DataFactory.Result |
openFeatureDataset(FeatureType wantFeatureType,
Dataset ds,
CancelTask task,
DataFactory.Result result) |
DataFactory.Result |
openFeatureDataset(FeatureType wantFeatureType,
java.lang.String urlString,
CancelTask task)
Open a FeatureDataset from a URL location string, and a desired type (may by NONE or null).
|
DataFactory.Result |
openFeatureDataset(java.lang.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 java.lang.String PROTOCOL
public static final java.lang.String SCHEME
public static void setPreferCdm(boolean prefer)
public static void setPreferAccess(ServiceType... prefer)
public static void setDebugFlags(DebugFlags debugFlag)
public DataFactory.Result openFeatureDataset(java.lang.String urlString, CancelTask task) throws java.io.IOException
urlString
- [thredds:]catalog.xml#datasetIdtask
- may be nulljava.io.IOException
- on read errorpublic DataFactory.Result openFeatureDataset(FeatureType wantFeatureType, java.lang.String urlString, CancelTask task) throws java.io.IOException
wantFeatureType
- desired feature type, may be NONE or nullurlString
- [thredds:]catalog.xml#datasetIdtask
- may be nulljava.io.IOException
- on read errorpublic DataFactory.Result openFeatureDataset(Dataset Dataset, CancelTask task) throws java.io.IOException
Dataset
- use this to figure out what type, how to open, etctask
- allow user to cancel; may be nulljava.io.IOException
- on read errorpublic DataFactory.Result openFeatureDataset(FeatureType wantFeatureType, Dataset ds, CancelTask task, DataFactory.Result result) throws java.io.IOException
java.io.IOException
public DataFactory.Result openFeatureDataset(Access access, CancelTask task) throws java.io.IOException
access
- use this Access.task
- may be nulljava.io.IOException
- on read errorpublic NetcdfDataset openDataset(java.lang.String location, boolean acquire, CancelTask task, java.util.Formatter log) throws java.io.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 itjava.io.IOException
- on read errorpublic NetcdfDataset openDataset(Dataset Dataset, boolean acquire, CancelTask task, java.util.Formatter log) throws java.io.IOException
Dataset
- open thisacquire
- if true, aquire the dataset, else open ittask
- may be nulllog
- error message, may be nulljava.io.IOException
- on read errorpublic NetcdfDataset openDataset(Access access, boolean acquire, CancelTask task, java.util.Formatter log) throws java.io.IOException
access
- open this Accessacquire
- if true, aquire the dataset, else open ittask
- may be nulllog
- error message, may be nulljava.io.IOException
- on read errorpublic Access chooseDatasetAccess(java.util.List<Access> accessList)
accessList
- choose from this list.public static void annotate(Dataset ds, NetcdfDataset ncDataset)
ds
- get info from herencDataset
- add to here