/** * Find the dimension pointed to by key * * @param ds in this dataset * @param key may be dimension name or ":gatt" where gatt is local attribute whose value is the dimension name * @param errlog error messages here * @return dimension or null if not exist */ static public Dimension getDimension(NetcdfDataset ds, String key, Formatter errlog) { Dimension d = null; String s = getLiteral(ds, key, errlog); if (s != null) { d = ds.findDimension(s); // LOOK use group if ((d == null) && (errlog != null)) errlog.format(" Cant find Variable %s from %s%n", s, key); } return d; }
/** * Find the dimension pointed to by key * * @param ds in this dataset * @param key may be dimension name or ":gatt" where gatt is local attribute whose value is the dimension name * @param errlog error messages here * @return dimension or null if not exist */ static public Dimension getDimension(NetcdfDataset ds, String key, Formatter errlog) { Dimension d = null; String s = getLiteral(ds, key, errlog); if (s != null) { d = ds.findDimension(s); // LOOK use group if ((d == null) && (errlog != null)) errlog.format(" Cant find Variable %s from %s%n", s, key); } return d; }
/** * Turn the key into a String and return the corresponding featureType, if any. * * @param ds look in this datset * @param key if starts with ":", replace with value of global attribute * @param errlog error messages here * @return featureType, or null */ static public FeatureType getFeatureType(NetcdfDataset ds, String key, Formatter errlog) { FeatureType ft = null; String fts = getLiteral(ds, key, errlog); if (fts != null) { ft = FeatureType.valueOf(fts.toUpperCase()); if ((ft == null) && (errlog != null)) errlog.format(" Cant find Feature type %s from %s\n", fts, key); } return ft; }
/** * Turn the key into a String and return the corresponding featureType, if any. * * @param ds look in this datset * @param key if starts with ":", replace with value of global attribute * @param errlog error messages here * @return featureType, or null */ static public FeatureType getFeatureType(NetcdfDataset ds, String key, Formatter errlog) { FeatureType ft = null; String fts = getLiteral(ds, key, errlog); if (fts != null) { ft = FeatureType.valueOf(fts.toUpperCase()); if ((ft == null) && (errlog != null)) errlog.format(" Cant find Feature type %s from %s%n", fts, key); } return ft; }
/** * Turn the key into a String and return the corresponding featureType, if any. * * @param ds look in this datset * @param key if starts with ":", replace with value of global attribute * @param errlog error messages here * @return featureType, or null */ static public FeatureType getFeatureType(NetcdfDataset ds, String key, Formatter errlog) { FeatureType ft = null; String fts = getLiteral(ds, key, errlog); if (fts != null) { ft = FeatureType.valueOf(fts.toUpperCase()); if ((ft == null) && (errlog != null)) errlog.format(" Cant find Feature type %s from %s%n", fts, key); } return ft; }
/** * Find the dimension pointed to by key * * @param ds in this dataset * @param key may be dimension name or ":gatt" where gatt is local attribute whose value is the dimension name * @param errlog error messages here * @return dimension or null if not exist */ static public Dimension getDimension(NetcdfDataset ds, String key, Formatter errlog) { Dimension d = null; String s = getLiteral(ds, key, errlog); if (s != null) { d = ds.findDimension(s); // LOOK use group if ((d == null) && (errlog != null)) errlog.format(" Cant find Variable %s from %s\n", s, key); } return d; }
/** * Find the variable pointed to by key * * @param ds in this dataset * @param key may be variable name or ":gatt" where gatt is local attribute whose value is the variable name * @param errlog error messages here * @return name of variable or null if not exist */ static public String getVariableName(NetcdfDataset ds, String key, Formatter errlog) { Variable v = null; String vs = getLiteral(ds, key, errlog); if (vs != null) { v = ds.findVariable(vs); if ((v == null) && (errlog != null)) errlog.format(" Cant find Variable %s from %s%n", vs, key); } return v == null ? null : v.getShortName(); }
/** * Find the variable pointed to by key * * @param ds in this dataset * @param key may be variable name or ":gatt" where gatt is local attribute whose value is the variable name * @param errlog error messages here * @return name of variable or null if not exist */ static public String getVariableName(NetcdfDataset ds, String key, Formatter errlog) { Variable v = null; String vs = getLiteral(ds, key, errlog); if (vs != null) { v = ds.findVariable(vs); if ((v == null) && (errlog != null)) errlog.format(" Cant find Variable %s from %s\n", vs, key); } return v == null ? null : v.getShortName(); }
/** * Find the variable pointed to by key * * @param ds in this dataset * @param key may be variable name or ":gatt" where gatt is local attribute whose value is the variable name * @param errlog error messages here * @return name of variable or null if not exist */ static public String getVariableName(NetcdfDataset ds, String key, Formatter errlog) { Variable v = null; String vs = getLiteral(ds, key, errlog); if (vs != null) { v = ds.findVariable(vs); if ((v == null) && (errlog != null)) errlog.format(" Cant find Variable %s from %s%n", vs, key); } return v == null ? null : v.getShortName(); }