Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

[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?


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690