public class CoordSystemFactory
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
CoordSystemFactory.ConventionNameOk
Allow plug-ins to determine if it owns a file based on the file's Convention attribute.
|
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
log |
static java.lang.String |
resourcesDir |
| Constructor and Description |
|---|
CoordSystemFactory() |
| Modifier and Type | Method and Description |
|---|---|
static java.util.List<java.lang.String> |
breakupConventionNames(java.lang.String convAttValue)
Breakup list of Convention names in the Convention attribute in CF compliant way.
|
static java.lang.String |
buildConventionAttribute(java.lang.String mainConv,
java.lang.String... convAtts)
Build a list of Conventions
|
static java.util.Optional<CoordSystemBuilder> |
factory(NetcdfDataset.Builder ds,
CancelTask cancelTask)
Get a CoordSystemBuilder whose job it is to add Coordinate information to a NetcdfDataset.Builder.
|
static boolean |
getUseMaximalCoordSys()
Get whether to make records into Structures.
|
static void |
registerConvention(java.lang.String conventionName,
CoordSystemBuilderFactory c)
Register a class that implements a Convention.
|
static void |
registerConvention(java.lang.String conventionName,
CoordSystemBuilderFactory factory,
CoordSystemFactory.ConventionNameOk match)
Register a class that implements a Convention.
|
static void |
registerNcml(java.lang.String conventionName,
java.lang.String ncmlLocation)
Register an NcML file that implements a Convention by wrapping the dataset in the NcML.
|
static void |
setUseMaximalCoordSys(boolean b)
If true, assign implicit CoordinateSystem objects to variables that dont have one yet.
|
protected static org.slf4j.Logger log
public static final java.lang.String resourcesDir
public static void registerNcml(java.lang.String conventionName,
java.lang.String ncmlLocation)
conventionName - name of Convention, must be in the "Conventions" global attribute.ncmlLocation - location of NcML file, may be local file or URL.public static void registerConvention(java.lang.String conventionName,
CoordSystemBuilderFactory c)
conventionName - name of Convention.
This name will be used to look in the "Conventions" global attribute.c - implementation of CoordSystemBuilderFactory that parses those kinds of netcdf files.public static void registerConvention(java.lang.String conventionName,
CoordSystemBuilderFactory factory,
CoordSystemFactory.ConventionNameOk match)
conventionName - name of Convention.
This name will be used to look in the "Conventions" global attribute.
Otherwise, you must implement the isMine() static method.match - pass in your own matcher. if null, equalsIgnoreCase() will be used.factory - implementation of CoordSystemBuilderFactory that parses those kinds of netcdf files.public static void setUseMaximalCoordSys(boolean b)
b - true if if you want to guess at Coordinate Systemspublic static boolean getUseMaximalCoordSys()
public static java.util.List<java.lang.String> breakupConventionNames(java.lang.String convAttValue)
convAttValue - original value of Convention attributepublic static java.lang.String buildConventionAttribute(java.lang.String mainConv,
java.lang.String... convAtts)
mainConv - this is the main conventionconvAtts - list of others, only use "extra" Conventions@Nonnull public static java.util.Optional<CoordSystemBuilder> factory(NetcdfDataset.Builder ds, CancelTask cancelTask) throws java.io.IOException
ds - the NetcdfDataset.Builder to modifycancelTask - allow user to bail out.java.io.IOException - on io error