congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
NcMLReader.readNcML
Code IndexAdd Tabnine 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)

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

  • Parsing JSON documents to java classes using gson
  • findViewById (Activity)
  • runOnUiThread (Activity)
  • scheduleAtFixedRate (Timer)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • JOptionPane (javax.swing)
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now