congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
NcMLReader.mergeNcML
Code IndexAdd Tabnine to your IDE (free)

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

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew ArrayList()
  • Codota Iconnew LinkedList()
  • Smart code suggestions by Tabnine
}
origin: edu.ucar/cdm

public NetcdfFile acquireFile(CancelTask cancelTask) throws IOException {
 if (debugOpenFile) System.out.println(" try to acquire " + cacheLocation);
 long start = System.currentTimeMillis();
 NetcdfFile ncfile = NetcdfDataset.acquireFile(reader, null, cacheLocation, -1, cancelTask, spiObject);
 // must merge NcML before enhancing
 if (mergeNcml != null)
  ncfile = NcMLReader.mergeNcML(ncfile, mergeNcml); // create new dataset
 if (enhance == null || enhance.isEmpty()) {
  if (debugOpenFile) System.out.println(" acquire (no enhance) " + cacheLocation + " took " + (System.currentTimeMillis() - start));
  return ncfile;
 }
 // must enhance
 NetcdfDataset ds;
 if (ncfile instanceof NetcdfDataset) {
  ds = (NetcdfDataset) ncfile;
  ds.enhance(enhance); // enhance "in place", ie modify the NetcdfDataset
 } else {
  ds = new NetcdfDataset(ncfile, enhance); // enhance when wrapping
 }
 if (debugOpenFile) System.out.println(" acquire (enhance) " + cacheLocation + " took " + (System.currentTimeMillis() - start));
 return ds;
}
origin: edu.ucar/netcdf

public NetcdfFile acquireFile(CancelTask cancelTask) throws IOException {
 if (debugOpenFile) System.out.println(" try to acquire " + cacheLocation);
 long start = System.currentTimeMillis();
 NetcdfFile ncfile = NetcdfDataset.acquireFile(reader, null, cacheLocation, -1, cancelTask, spiObject);
 // must merge NcML before enhancing
 if (mergeNcml != null)
  ncfile = NcMLReader.mergeNcML(ncfile, mergeNcml); // create new dataset
 if (enhance == null || enhance.isEmpty()) {
  if (debugOpenFile) System.out.println(" acquire (no enhance) " + cacheLocation + " took " + (System.currentTimeMillis() - start));
  return ncfile;
 }
 // must enhance
 NetcdfDataset ds;
 if (ncfile instanceof NetcdfDataset) {
  ds = (NetcdfDataset) ncfile;
  ds.enhance(enhance); // enhance "in place", ie modify the NetcdfDataset
 } else {
  ds = new NetcdfDataset(ncfile, enhance); // enhance when wrapping
 }
 if (debugOpenFile) System.out.println(" acquire (enhance) " + cacheLocation + " took " + (System.currentTimeMillis() - start));
 return ds;
}
origin: Unidata/thredds

public NetcdfFile acquireFile(CancelTask cancelTask) throws IOException {
 if (debugOpenFile) System.out.println(" try to acquire " + cacheLocation);
 long start = System.currentTimeMillis();
 if (durl == null)
  durl = DatasetUrl.findDatasetUrl(cacheLocation); // cache the ServiceType so we dont have to keep figuring it out
 NetcdfFile ncfile = NetcdfDataset.acquireFile(reader, null, durl, -1, cancelTask, spiObject);
 // must merge NcML before enhancing
 if (mergeNcml != null)
  ncfile = NcMLReader.mergeNcML(ncfile, mergeNcml); // create new dataset
 if (enhance == null || enhance.isEmpty()) {
  if (debugOpenFile) System.out.println(" acquire (no enhance) " + cacheLocation + " took " + (System.currentTimeMillis() - start));
  return ncfile;
 }
 // must enhance
 NetcdfDataset ds;
 if (ncfile instanceof NetcdfDataset) {
  ds = (NetcdfDataset) ncfile;
  ds.enhance(enhance); // enhance "in place", ie modify the NetcdfDataset
 } else {
  ds = new NetcdfDataset(ncfile, enhance); // enhance when wrapping
 }
 if (debugOpenFile) System.out.println(" acquire (enhance) " + cacheLocation + " took " + (System.currentTimeMillis() - start));
 return ds;
}
origin: edu.ucar/netcdf

/**
 * Open a file, keep track of open files
 * @param location open this location
 * @param openFiles keep track of open files
 * @return file or null if not found
 */
private NetcdfDataset open(String location, HashMap<String, NetcdfDataset> openFiles)  { // } throws IOException {
 NetcdfDataset ncd = null;
 if (openFiles != null) {
  ncd = openFiles.get(location);
  if (ncd != null) return ncd;
 }
 try {
  if (config.innerNcml == null) {
   ncd = NetcdfDataset.acquireDataset(location, null);  // default enhance
  } else {
   NetcdfFile nc = NetcdfDataset.acquireFile(location, null);
   ncd = NcMLReader.mergeNcML(nc, config.innerNcml); // create new dataset
   ncd.enhance(); // now that the ncml is added, enhance "in place", ie modify the NetcdfDataset
  }
 } catch (IOException ioe) {
  logger.error("Cant open file ", ioe);  // file was deleted ??
  return null;
 }
 if (openFiles != null && ncd != null) {
  openFiles.put(location, ncd);
 }
 return ncd;
}
origin: edu.ucar/cdm

/**
 * Open a file, keep track of open files
 * @param location open this location
 * @param openFiles keep track of open files
 * @return file or null if not found
 */
private NetcdfDataset open(String location, Map<String, NetcdfDataset> openFiles)  throws IOException {
 NetcdfDataset ncd;
 if (openFiles != null) {
  ncd = openFiles.get(location);
  if (ncd != null) return ncd;
 }
 if (config.innerNcml == null) {
  ncd = NetcdfDataset.acquireDataset(location, null);  // default enhance
 } else {
  NetcdfFile nc = NetcdfDataset.acquireFile(location, null);
  ncd = NcMLReader.mergeNcML(nc, config.innerNcml); // create new dataset
  ncd.enhance(); // now that the ncml is added, enhance "in place", ie modify the NetcdfDataset
 }
 if (openFiles != null && ncd != null) {
  openFiles.put(location, ncd);
 }
 return ncd;
}
origin: Unidata/thredds

/**
 * Open a file, keep track of open files
 * @param location open this location
 * @param openFiles keep track of open files
 * @return file or null if not found
 */
private NetcdfDataset open(String location, Map<String, NetcdfDataset> openFiles)  throws IOException {
 NetcdfDataset ncd;
 if (openFiles != null) {
  ncd = openFiles.get(location);
  if (ncd != null) return ncd;
 }
 if (config.innerNcml == null) {
  ncd = NetcdfDataset.acquireDataset(new DatasetUrl(null, location), true, null);  // default enhance
 } else {
  NetcdfFile nc = NetcdfDataset.acquireFile(new DatasetUrl(null, location), null);
  ncd = NcMLReader.mergeNcML(nc, config.innerNcml); // create new dataset
  ncd.enhance(); // now that the ncml is added, enhance "in place", ie modify the NetcdfDataset
 }
 if (openFiles != null && ncd != null) {
  openFiles.put(location, ncd);
 }
 return ncd;
}
origin: edu.ucar/netcdf

NetcdfDataset ncd = NcMLReader.mergeNcML(nc, ncml); // create new dataset
origin: edu.ucar/cdm

NetcdfDataset ncd = NcMLReader.mergeNcML(nc, ncml); // create new dataset
origin: Unidata/thredds

NetcdfDataset ncd = NcMLReader.mergeNcML(nc, ncml); // create new dataset
ucar.nc2.ncmlNcMLReadermergeNcML

Javadoc

Use NCML to modify the referenced dataset, create a new dataset with the merged info Used to wrap each dataset of an aggregation before its aggregated

Popular methods of NcMLReader

  • readNcML
    Read an NcML file from a URL location, and construct a NetcdfDataset.
  • 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
  • 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

  • Start an intent from android
  • getSharedPreferences (Context)
  • addToBackStack (FragmentTransaction)
  • setScale (BigDecimal)
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • Top 12 Jupyter Notebook Extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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