Codota Logo
NcMLReader.readNcML
Code IndexAdd Codota to your IDE (free)

How to use
readNcML
method
in
ucar.nc2.ncml.NcMLReader

Best Java code snippets using ucar.nc2.ncml.NcMLReader.readNcML (Showing top 20 results out of 315)

  • Common ways to obtain NcMLReader
private void myMethod () {
NcMLReader n =
  • Codota Iconnew NcMLReader()
  • Smart code suggestions by Codota
}
origin: edu.ucar/netcdf

/**
 * Read an NcML file from a URL location, and construct a NetcdfDataset.
 *
 * @param ncmlLocation the URL location string of the NcML document
 * @param cancelTask   allow user to cancel the task; may be null
 * @return the resulting NetcdfDataset
 * @throws IOException on read error, or bad referencedDatasetUri URI
 */
static public NetcdfDataset readNcML(String ncmlLocation, CancelTask cancelTask) throws IOException {
 return readNcML(ncmlLocation, (String) null, cancelTask);
}
origin: edu.ucar/netcdf

/**
 * Read NcML doc from a Reader, and construct a NetcdfDataset.
 *
 * @param r          the Reader containing the NcML document
 * @param cancelTask allow user to cancel the task; may be null
 * @return the resulting NetcdfDataset
 * @throws IOException on read error, or bad referencedDatasetUri URI
 */
static public NetcdfDataset readNcML(Reader r, CancelTask cancelTask) throws IOException {
 return readNcML(r, "NcMLReader", cancelTask);
}
origin: Unidata/thredds

/**
 * Read an NcML file from a URL location, and construct a NetcdfDataset.
 *
 * @param ncmlLocation the URL location string of the NcML document
 * @param cancelTask   allow user to cancel the task; may be null
 * @return the resulting NetcdfDataset
 * @throws IOException on read error, or bad referencedDatasetUri URI
 */
static public NetcdfDataset readNcML(String ncmlLocation, CancelTask cancelTask) throws IOException {
 return readNcML(ncmlLocation, (String) null, cancelTask);
}
origin: Unidata/thredds

/**
 * Read NcML doc from a Reader, and construct a NetcdfDataset.
 *
 * @param r          the Reader containing the NcML document
 * @param cancelTask allow user to cancel the task; may be null
 * @return the resulting NetcdfDataset
 * @throws IOException on read error, or bad referencedDatasetUri URI
 */
static public NetcdfDataset readNcML(Reader r, CancelTask cancelTask) throws IOException {
 return readNcML(r, "NcMLReader", cancelTask);
}
origin: Unidata/thredds

public void setUp() throws IOException {
 if (ncfile != null) return;
 String filename = "file:./" + TestNcML.topDir + "aggUnion.xml";
 ncfile = NcMLReader.readNcML(filename, null);
}
origin: Unidata/thredds

 @Override
 public FileCacheable open(DatasetUrl durl, int buffer_size, CancelTask cancelTask, Object iospMessage) throws IOException {
  return NcMLReader.readNcML(new StringReader(ncml), durl.trueurl, null);
 }
}
origin: edu.ucar/netcdf

static private NetcdfFile acquireNcml(FileCache cache, FileFactory factory, Object hashKey,
                   String location, int buffer_size, ucar.nc2.util.CancelTask cancelTask, Object spiObject) throws IOException {
 if (cache == null) return NcMLReader.readNcML(location, cancelTask);
 if (factory == null) factory = new NcMLFactory();
 return (NetcdfFile) cache.acquire(factory, hashKey, location, buffer_size, cancelTask, spiObject);
}
origin: edu.ucar/cdm

static private NetcdfFile acquireNcml(FileCache cache, FileFactory factory, Object hashKey,
                   String location, int buffer_size, ucar.nc2.util.CancelTask cancelTask, Object spiObject) throws IOException {
 if (cache == null) return NcMLReader.readNcML(location, cancelTask);
 if (factory == null) factory = new NcMLFactory();
 return (NetcdfFile) cache.acquire(factory, hashKey, location, buffer_size, cancelTask, spiObject);
}
origin: Unidata/thredds

public void setUp() {
 try {
  ncfile = NcMLReader.readNcML(location, null);
  //System.out.println("ncfile opened = "+location);
 } catch (java.net.MalformedURLException e) {
  System.out.println("bad URL error = "+e);
 } catch (IOException e) {
  System.out.println("IO error = "+e);
  e.printStackTrace();
 }
}
origin: Unidata/thredds

public void setUp() {
 try {
  ncfile = NcMLReader.readNcML(location, null);
  //System.out.println("ncfile opened = "+location);
 } catch (java.net.MalformedURLException e) {
  System.out.println("bad URL error = "+e);
 } catch (IOException e) {
  System.out.println("IO error = "+e);
  e.printStackTrace();
 }
}
origin: Unidata/thredds

public void setUp() {
 String filename = "file:"+TestNcML.topDir + "modifyVars.xml";
 try {
  ncfile = NcMLReader.readNcML(filename, null);
 } catch (java.net.MalformedURLException e) {
  System.out.println("bad URL error = "+e);
 } catch (IOException e) {
  System.out.println("IO error = "+e);
  e.printStackTrace();
 }
}
origin: Unidata/thredds

static private NetcdfFile acquireNcml(FileCache cache, FileFactory factory, Object hashKey,
                   String location, int buffer_size, ucar.nc2.util.CancelTask cancelTask, Object spiObject) throws IOException {
 if (cache == null) return NcMLReader.readNcML(location, cancelTask);
 if (factory == null) factory = new NcMLFactory();  // LOOK maybe always should use NcMLFactory ?
 return (NetcdfFile) cache.acquire(factory, hashKey, DatasetUrl.findDatasetUrl(location), buffer_size, cancelTask, spiObject);
}
origin: edu.ucar/netcdf

private synchronized void makeFmrc() throws IOException {
 if (madeFmrc) {
  checkIfChanged();
  return;
 }
 Element ncml = getNcmlElement();
 NetcdfDataset ncd = NcMLReader.readNcML(path, ncml, null);
 ncd.setFileCache( fileCache); // LOOK: this dataset never gets closed
 fmrc = new FmrcImpl( ncd);
 madeFmrc = true;
}
origin: Unidata/thredds

public void testWithDateFormatMark() throws Exception {
 System.out.printf("ncml=%s%n", ncml);
 String filename = "file:" + TestNcML.topDir + "testAggModify.ncml";
 NetcdfFile ncfile = NcMLReader.readNcML(new StringReader(ncml), filename, null);
 System.out.println(" TestNcmlAggExisting.open " + filename + "\n" + ncfile);
 Variable v = ncfile.findVariable("T");
 assert null != v;
 v = ncfile.findVariable("P");
 assert null == v;
 ncfile.close();
}
origin: Unidata/thredds

public void testStride() throws IOException, InvalidRangeException {
 String filename = "file:./" + TestNcML.topDir + "tiled/testAggTiled.ncml";
 NetcdfFile ncfile = NcMLReader.readNcML(filename, null);
 logger.debug(" TestNcmlAggExisting.open {}", ncfile);
 Variable v = ncfile.findVariable("temperature");
 v.setCaching(false);
 testReadDataSection(v, new Section("1:9:4,3:19:3"));
 ncfile.close();
}
origin: Unidata/thredds

@Test
public void testForecastModel() throws IOException, InvalidRangeException {
 String filename = "file:./"+TestDir.cdmUnitTestDir + "ncml/offsite/aggForecastModel.xml";
 logger.debug(" TestOffAggForecastModel.testForecastModel=\n{}", ncml);
 NetcdfFile ncfile = NcMLReader.readNcML(new StringReader(ncml), filename, null);
 testDimensions(ncfile, nruns);
 testCoordVar(ncfile);
 testAggCoordVar(ncfile, nruns);
 testReadData(ncfile, nruns, nfore);
 testReadSlice(ncfile);
 ncfile.close();
}
origin: Unidata/thredds

private void testEquals(String ncmlLocation) throws  IOException {
 System.out.println("testEquals");
 NetcdfDataset ncd = NcMLReader.readNcML(ncmlLocation, null);
 String locref  = ncd.getReferencedFile().getLocation();
 NetcdfDataset ncdref = NetcdfDataset.openDataset(locref, false, null);
 ucar.unidata.util.test.CompareNetcdf.compareFiles(ncd, ncdref, false, false, false);
 ncd.close();
 ncdref.close();
}
origin: Unidata/thredds

@Test
public void testNcmlDirect() throws IOException, InvalidRangeException {
 String filename = "file:./"+TestNcML.topDir + "aggExisting.xml";
 NetcdfFile ncfile = NcMLReader.readNcML(filename, null);
 logger.debug(" TestNcmlAggExisting.open {}", filename);
 testDimensions(ncfile);
 testCoordVar(ncfile);
 testAggCoordVar(ncfile);
 testReadData(ncfile);
 testReadSlice(ncfile);
 ncfile.close();
}
origin: Unidata/thredds

public void test3() throws IOException, InvalidRangeException {
 String filename = "file:./" + TestNcML.topDir + "aggSynthetic3.xml";
 NetcdfFile ncfile = NcMLReader.readNcML(filename, null);
 testDimensions(ncfile);
 testCoordVar(ncfile);
 testAggCoordVar3(ncfile);
 testReadData(ncfile, "T");
 testReadSlice(ncfile, "T");
 ncfile.close();
}
origin: Unidata/thredds

public void testNoCoordDir() throws IOException, InvalidRangeException {
 String filename = "file:./" + TestNcML.topDir + "aggSynNoCoordsDir.xml";
 NetcdfFile ncfile = NcMLReader.readNcML(filename, null);
 testDimensions(ncfile);
 testCoordVar(ncfile);
 testAggCoordVarNoCoordsDir(ncfile);
 testReadData(ncfile, "T");
 testReadSlice(ncfile, "T");
 ncfile.close();
}
ucar.nc2.ncmlNcMLReaderreadNcML

Javadoc

Read NcML doc from an InputStream, and construct a NetcdfDataset.

Popular methods of NcMLReader

  • wrapNcML
    Use NCML to modify the dataset, getting NcML from a URL
  • wrapNcMLresource
    Use NCML to modify a dataset, getting the NcML document as a resource stream. Uses ClassLoader.getRe
  • <init>
  • addAttribute
  • cmdRemove
  • findAttribute
  • mergeNcML
    Use NCML to modify the referenced dataset, create a new dataset with the merged info Used to wrap ea
  • mergeNcMLdirect
    Use NCML to directly modify the dataset
  • readAgg
  • readAtt
    Read an NcML attribute element.
  • readAttributeValues
    Parse the values element
  • readDim
    Read an NcML dimension element.
  • readAttributeValues,
  • readDim,
  • readGroup,
  • readNetcdf,
  • readValues,
  • readVariable,
  • readVariableNested,
  • readVariableNew,
  • removeAttribute

Popular in Java

  • Making http requests using okhttp
  • setScale (BigDecimal)
  • scheduleAtFixedRate (Timer)
  • startActivity (Activity)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • FileInputStream (java.io)
    A FileInputStream obtains input bytes from a file in a file system. What files are available depends
  • FileOutputStream (java.io)
    A file output stream is an output stream for writing data to aFile or to a FileDescriptor. Whether
  • Vector (java.util)
    The Vector class implements a growable array of objects. Like an array, it contains components that
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • JComboBox (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now