public Element makeExplicitNetcdfElement(NetcdfFile ncFile, String location) { Element netcdfElem = makeNetcdfElement(ncFile, location); netcdfElem.addContent(0, new Element("explicit", namespace)); return netcdfElem; }
/** * Write the NcML representation. * * @param os write to this Output Stream. * @param uri use this for the url attribute; if null use getLocation(). * @throws IOException */ @Override public void writeNcML(java.io.OutputStream os, String uri) throws IOException { NcMLWriter ncmlWriter = new NcMLWriter(); Element netcdfElem = ncmlWriter.makeNetcdfElement(this, uri); ncmlWriter.writeToStream(netcdfElem, os); }
/** * Write the NcML representation: dont show coodinate values * * @param os : write to this OutputStream. Will be closed at end of the method. * @param uri use this for the url attribute; if null use getLocation(). // ?? * @throws IOException if error * @see NcMLWriter#writeToStream */ public void writeNcML(java.io.OutputStream os, String uri) throws IOException { NcMLWriter ncmlWriter = new NcMLWriter(); Element netcdfElem = ncmlWriter.makeNetcdfElement(this, uri); ncmlWriter.writeToStream(netcdfElem, os); }
/** * Write the NcML representation: dont show coodinate values * * @param writer : write to this Writer, should have encoding of UTF-8 if applicable. Will be closed at end of the * method. * @param uri use this for the url attribute; if null use getLocation(). * @throws IOException if error * @see NcMLWriter#writeToWriter */ public void writeNcML(java.io.Writer writer, String uri) throws IOException { NcMLWriter ncmlWriter = new NcMLWriter(); Element netcdfElem = ncmlWriter.makeNetcdfElement(this, uri); ncmlWriter.writeToWriter(netcdfElem, writer); }
/** * CDL representation of Netcdf header info, non strict */ public String toNcML(String url) throws IOException { NcMLWriter ncmlWriter = new NcMLWriter(); ncmlWriter.setWriteVariablesPredicate(NcMLWriter.writeNoVariablesPredicate); Element netcdfElement = ncmlWriter.makeNetcdfElement(this, url); return ncmlWriter.writeToString(netcdfElement); }
ncmlWriter.setWriteVariablesPredicate(writeVarsPred); Element netcdfElement = ncmlWriter.makeNetcdfElement(ncfile, url); ncmlWriter.writeToWriter(netcdfElement, writer);
netcdfElement = ncmlWriter.makeExplicitNetcdfElement(org, null); } else { netcdfElement = ncmlWriter.makeNetcdfElement(org, null);
netcdfElement = ncmlWriter.makeExplicitNetcdfElement(org, null); } else { netcdfElement = ncmlWriter.makeNetcdfElement(org, null);
Element netcdfElem = ncmlWriter.makeNetcdfElement(ncfile, null); ncmlWriter.writeToStream(netcdfElem, out);