/** * Get the display name plus the dimensions, eg 'name(dim1, dim2)' * * @param buf add info to this StringBuilder */ public void getNameAndDimensions(StringBuilder buf) { getNameAndDimensions(buf, true, false); }
/** * Get the display name plus the dimensions, eg 'name(dim1, dim2)' * * @param buf add info to this StringBuilder */ public void getNameAndDimensions(StringBuilder buf) { getNameAndDimensions(buf, true, false); }
/** * Get the display name plus the dimensions, eg 'name(dim1, dim2)' * @param buf add info to this StringBuilder */ public void getNameAndDimensions(StringBuilder buf) { getNameAndDimensions(buf, true, false); }
/** * Get the display name plus the dimensions, eg 'float name(dim1, dim2)' * @return display name plus the dimensions */ public String getNameAndDimensions() { Formatter buf = new Formatter(); getNameAndDimensions(buf, true, false); return buf.toString(); }
/** * Get the display name plus the dimensions, eg 'float name(dim1, dim2)' * * @param strict strictly comply with ncgen syntax, with name escaping. otherwise, get extra info, no escaping * @return display name plus the dimensions */ public String getNameAndDimensions(boolean strict) { Formatter buf = new Formatter(); getNameAndDimensions(buf, false, strict); return buf.toString(); }
/** * Get the display name plus the dimensions, eg 'float name(dim1, dim2)' * * @return display name plus the dimensions */ public String getNameAndDimensions() { Formatter buf = new Formatter(); getNameAndDimensions(buf, true, false); return buf.toString(); }
/** * Get the display name plus the dimensions, eg 'float name(dim1, dim2)' * * @param strict strictly comply with ncgen syntax, with name escaping. otherwise, get extra info, no escaping * @return display name plus the dimensions */ public String getNameAndDimensions(boolean strict) { Formatter buf = new Formatter(); getNameAndDimensions(buf, false, strict); return buf.toString(); }
/** * Get the display name plus the dimensions, eg 'float name(dim1, dim2)' * @param strict strictly comply with ncgen syntax, with name escaping. otherwise, get extra info, no escaping * @return display name plus the dimensions */ public String getNameAndDimensions(boolean strict) { Formatter buf = new Formatter(); getNameAndDimensions(buf, false, strict); return buf.toString(); }
/** * Get the display name plus the dimensions, eg 'name(dim1, dim2)' * * @param buf add info to this StringBuffer * @deprecated use getNameAndDimensions(StringBuilder buf) */ public void getNameAndDimensions(StringBuffer buf) { Formatter proxy = new Formatter(); getNameAndDimensions(proxy, true, false); buf.append(proxy.toString()); }
/** * Get the display name plus the dimensions, eg 'name(dim1, dim2)' * @param buf add info to this StringBuffer * @deprecated use getNameAndDimensions(StringBuilder buf) */ public void getNameAndDimensions(StringBuffer buf) { Formatter proxy = new Formatter(); getNameAndDimensions(proxy, true, false); buf.append(proxy.toString()); }
/** * Add display name plus the dimensions to the StringBuffer * @param buf add info to this * @param useFullName use full name else short name. strict = true implies short name * @param strict strictly comply with ncgen syntax, with name escaping. otherwise, get extra info, no escaping */ public void getNameAndDimensions(StringBuilder buf, boolean useFullName, boolean strict) { Formatter proxy = new Formatter(); getNameAndDimensions(proxy, useFullName, strict); buf.append(proxy.toString()); }
xhtml.element("p", String.valueOf(var.getDataType()) + var.getNameAndDimensions() + ";"); for(Attribute element : var.getAttributes()){ xhtml.element("li", " :" + element + ";");
private String debugMissingVar(NetcdfFile proto, NetcdfFile result) { Formatter f = new Formatter(); f.format("%nresult dataset %s%n", result.getLocation()); for (Variable v: result.getVariables()) f.format(" %s%n", v.getNameAndDimensions()); f.format("%n"); f.format("proto dataset %s%n", proto.getLocation()); for (Variable v: proto.getVariables()) f.format(" %s%n", v.getNameAndDimensions()); return f.toString(); }
private String debugMissingVar(NetcdfFile proto, NetcdfFile result) { Formatter f = new Formatter(); f.format("%nresult dataset %s%n", result.getLocation()); for (Variable v: result.getVariables()) f.format(" %s%n", v.getNameAndDimensions()); f.format("%n"); f.format("proto dataset %s%n", proto.getLocation()); for (Variable v: proto.getVariables()) f.format(" %s%n", v.getNameAndDimensions()); return f.toString(); }
for (Variable var : ncFile.getVariables()) { xhtml.startElement("li"); xhtml.characters(var.getDataType() + " " + var.getNameAndDimensions()); xhtml.newline(); List<Attribute> attributes = var.getAttributes();
private void compareVariableData(Variable var1, Variable var2, boolean showCompare, boolean justOne) throws IOException { Array data1 = var1.read(); Array data2 = var2.read(); if (showCompare) f.format(" compareArrays %s unlimited=%s size=%d%n", var1.getNameAndDimensions(), var1.isUnlimited(), data1.getSize()); compareData(var1.getFullName(), data1, data2, justOne); if (showCompare) f.format(" ok%n"); }
private void compareVariableData(Variable var1, Variable var2, boolean showCompare, boolean justOne) throws IOException { Array data1 = var1.read(); Array data2 = var2.read(); if (showCompare) f.format(" compareArrays %s unlimited=%s size=%d%n", var1.getNameAndDimensions(), var1.isUnlimited(), data1.getSize()); compareData(var1.getFullName(), data1, data2, justOne); if (showCompare) f.format(" ok%n"); }
private float testReadScalar(Variable v) throws IOException { if (show) System.out.printf(" read %s%n", v.getNameAndDimensions()); assert (null != v); Array a = v.read(); assert (null != a); IndexIterator ii = a.getIndexIterator(); return ii.getFloatNext(); }
private void testReadData(Variable v) throws IOException { if (show) System.out.printf(" read %s%n", v.getNameAndDimensions()); assert (null != v); assert (null != v.getDimension(0)); Array a = v.read(); assert (null != a); assert (v.getSize() == a.getSize()); }
private void check(NetcdfFile ncfile, int n) throws IOException, InvalidRangeException { Variable v = ncfile.findVariable("time"); assert v != null; System.out.printf(" time= %s%n", v.getNameAndDimensions()); assert v.getSize() == n : v.getSize(); v = ncfile.findVariable("eta"); assert v != null; assert v.getRank() == 3 : v.getRank(); }