protected void unravelStringMet(NetcdfFile ncFile, Group group, Metadata met) { if (group == null) { group = ncFile.getRootGroup(); } // get file type met.set("File-Type-Description", ncFile.getFileTypeDescription()); // unravel its string attrs for (Attribute attribute : group.getAttributes()) { if (attribute.isString()) { met.add(attribute.getFullName(), attribute.getStringValue()); } else { // try and cast its value to a string met.add(attribute.getFullName(), String.valueOf(attribute .getNumericValue())); } } for (Group g : group.getGroups()) { unravelStringMet(ncFile, g, met); } }
@Override public String getFileTypeDescription() { if (orgFile != null) return orgFile.getFileTypeDescription(); if (agg != null) return agg.getFileTypeDescription(); return "N/A"; }
@Override public String getFileTypeDescription() { if (orgFile != null) return orgFile.getFileTypeDescription(); if (agg != null) return agg.getFileTypeDescription(); return "N/A"; }
@Override public String getFileTypeDescription() { if (orgFile != null) return orgFile.getFileTypeDescription(); if (agg != null) return agg.getFileTypeDescription(); return "N/A"; }
try { ncFile = NetcdfFile.open(tis.getFile().getAbsolutePath()); metadata.set("File-Type-Description", ncFile.getFileTypeDescription());
public void getDetailInfo(Formatter f) { f.format("NetcdfFile location= %s%n", getLocation()); f.format(" title= %s%n", getTitle()); f.format(" id= %s%n", getId()); f.format(" fileType= %s%n", getFileTypeId()); f.format(" fileDesc= %s%n", getFileTypeDescription()); f.format(" class= %s%n", getClass().getName()); if (spi == null) { f.format(" has no IOSP%n"); } else { f.format(" iosp= %s%n%n", spi.getClass()); f.format("%s", spi.getDetailInfo()); } showCached(f); showProxies(f); }
public void getDetailInfo(Formatter f) { f.format("NetcdfFile location= %s%n", getLocation()); f.format(" title= %s%n", getTitle()); f.format(" id= %s%n", getId()); f.format(" fileType= %s%n", getFileTypeId()); f.format(" fileDesc= %s%n", getFileTypeDescription()); f.format(" class= %s%n", getClass().getName()); if (spi == null) { f.format(" has no IOSP%n"); } else { f.format(" iosp= %s%n%n", spi.getClass()); f.format("%s", spi.getDetailInfo()); } showCached(f); showProxies(f); }
public String getFileTypeDescription() { // LOOK - should cache ?? Dataset ds = null; NetcdfFile ncfile = null; try { ds = getTypicalDataset(); ncfile = ds.acquireFile(null); return ncfile.getFileTypeDescription(); } catch (Exception e) { logger.error("failed to open "+ds); } finally { if (ds != null) try { ds.close(ncfile); } catch (IOException e) { logger.error("failed to close "+ds); } } return "N/A"; }
public void getDetailInfo(Formatter f) { f.format("NetcdfFile location= %s%n", getLocation()); f.format(" title= %s%n", getTitle()); f.format(" id= %s%n", getId()); f.format(" fileType= %s%n", getFileTypeId()); f.format(" fileDesc= %s%n", getFileTypeDescription()); f.format(" fileVersion= %s%n", getFileTypeVersion()); f.format(" class= %s%n", getClass().getName()); if (spi == null) { f.format(" has no IOSP%n"); } else { f.format(" iosp= %s%n%n", spi.getClass()); f.format("%s", spi.getDetailInfo()); } showCached(f); showProxies(f); }
public String getFileTypeDescription() { // LOOK - should cache ?? Dataset ds = null; NetcdfFile ncfile = null; try { ds = getTypicalDataset(); ncfile = ds.acquireFile(null); return ncfile.getFileTypeDescription(); } catch (Exception e) { logger.error("failed to open "+ds); } finally { if (ds != null) try { ds.close(ncfile); } catch (IOException e) { logger.error("failed to close "+ds); } } return "N/A"; }
public String getFileTypeDescription() { // LOOK - should cache ?? Dataset ds = null; NetcdfFile ncfile = null; try { ds = getTypicalDataset(); ncfile = ds.acquireFile(null); return ncfile.getFileTypeDescription(); } catch (Exception e) { logger.error("failed to open "+ds); } finally { if (ds != null) try { ds.close(ncfile); } catch (IOException e) { logger.error("failed to close "+ds); } } return "N/A"; }
protected void unravelStringMet(NetcdfFile ncFile, Group group, Metadata met) { if (group == null) { group = ncFile.getRootGroup(); } // get file type met.set("File-Type-Description", ncFile.getFileTypeDescription()); // unravel its string attrs for (Attribute attribute : group.getAttributes()) { if (attribute.isString()) { met.add(attribute.getFullName(), attribute.getStringValue()); } else { // try and cast its value to a string met.add(attribute.getFullName(), String.valueOf(attribute .getNumericValue())); } } for (Group g : group.getGroups()) { unravelStringMet(ncFile, g, met); } }
protected void unravelStringMet(NetcdfFile ncFile, Group group, Metadata met) { if (group == null) { group = ncFile.getRootGroup(); } // get file type met.set("File-Type-Description", ncFile.getFileTypeDescription()); // unravel its string attrs for (Attribute attribute : group.getAttributes()) { if (attribute.isString()) { met.add(attribute.getFullName(), attribute.getStringValue()); } else { // try and cast its value to a string met.add(attribute.getFullName(), String.valueOf(attribute .getNumericValue())); } } for (Group g : group.getGroups()) { unravelStringMet(ncFile, g, met); } }
try { ncFile = NetcdfFile.open(tis.getFile().getAbsolutePath()); metadata.set("File-Type-Description", ncFile.getFileTypeDescription());
try { ncFile = NetcdfFile.open(tis.getFile().getAbsolutePath()); metadata.set("File-Type-Description", ncFile.getFileTypeDescription());