[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: netCDF question



John,

I was able to extract the source for them from the distributed jar.

private void writeOneEntry(InvDataset ds, OutputStream out, StringBuffer mess) throws IOException
  {
    Element rootElem = writeOneEntry(ds, mess);
    Document doc = new Document(rootElem);

    XMLOutputter fmt = new XMLOutputter(Format.getPrettyFormat());
    fmt.output(doc, out);
  }

public Element writeOneEntry(InvDataset ds, StringBuffer mess) throws IOException {
    return writeOneEntry(ds, mess, false);
  }

public Element writeOneRelaxedEntry(InvDataset ds, StringBuffer mess) throws IOException {
    return writeOneEntry(ds, mess, true);
  }

public Element writeOneEntry(InvDataset ds, StringBuffer mess, boolean relaxed) throws IOException {
    Element rootElem = new Element("DIF", defNS);
    writeDataset(ds, rootElem, mess);
    rootElem.addNamespaceDeclaration(defNS);
    rootElem.addNamespaceDeclaration(XMLEntityResolver.xsiNS);
rootElem.setAttribute("schemaLocation", defNS.getURI() + " " + schemaLocation, XMLEntityResolver.xsiNS);

    return rootElem;
  }


Thanks for checking.

Cheers,

Roger

On Oct 20, 2009, at 12:33 PM, John Caron wrote:

David Stuebe wrote:


Hi John
CC Roger
I am working with Roger Unwin on the OOI project and he has been trying to get a metadata extraction program working which builds against the NetCDF Java library. He has been stumped by two subroutines which he can not find:

Element difWriter.writeOneEntryX(InvDataset, StringBuffer);

Element difWriter.writeOneRelaxedEntry(InvDataset, StringBuffer);

Can you point us in the right direction for the correct subroutine to use?

i dont have any such routines - where did he get the code that calls those?