congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
NcMLReader.addAttribute
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: edu.ucar/netcdf

try {
 ucar.ma2.Array values = readAttributeValues(attElem);
 addAttribute(parent, new ucar.nc2.Attribute(name, values));
} catch (RuntimeException e) {
 errlog.format("NcML new Attribute Exception: %s att=%s in=%s%n", e.getMessage(), name, parent);
 try {
  ucar.ma2.Array values = readAttributeValues(attElem);
  addAttribute(parent, new ucar.nc2.Attribute(name, values));
 } catch (RuntimeException e) {
  errlog.format("NcML existing Attribute Exception: %s att=%s in=%s%n", e.getMessage(), name, parent);
 addAttribute(parent, new ucar.nc2.Attribute(name, att.getValues()));
origin: edu.ucar/cdm

try {
 ucar.ma2.Array values = readAttributeValues(attElem);
 addAttribute(parent, new ucar.nc2.Attribute(name, values));
} catch (RuntimeException e) {
 errlog.format("NcML new Attribute Exception: %s att=%s in=%s%n", e.getMessage(), name, parent);
 try {
  ucar.ma2.Array values = readAttributeValues(attElem);
  addAttribute(parent, new ucar.nc2.Attribute(name, values));
 } catch (RuntimeException e) {
  errlog.format("NcML existing Attribute Exception: %s att=%s in=%s%n", e.getMessage(), name, parent);
 Array oldval = oldatt.getValues();
 if (oldval != null)
  addAttribute(parent, new ucar.nc2.Attribute(name, oldatt.getValues()));
 else {  // weird corner case of attribute with no value - must use the type
  String unS = attElem.getAttributeValue("isUnsigned");
  String typeS = attElem.getAttributeValue("type");
  DataType type = typeS == null ? DataType.STRING : DataType.getType(typeS);
  addAttribute(parent, new ucar.nc2.Attribute(name, type, isUnsigned));
origin: Unidata/thredds

try {
 ucar.ma2.Array values = readAttributeValues(attElem);
 addAttribute(parent, new ucar.nc2.Attribute(name, values));
} catch (RuntimeException e) {
 errlog.format("NcML new Attribute Exception: %s att=%s in=%s%n", e.getMessage(), name, parent);
 try {
  addAttribute(parent, new ucar.nc2.Attribute(name, values));
 } catch (RuntimeException e) {
  errlog.format("NcML existing Attribute Exception: %s att=%s in=%s%n", e.getMessage(), name, parent);
 Array oldval = oldatt.getValues();
 if (oldval != null)
  addAttribute(parent, new ucar.nc2.Attribute(name, oldatt.getValues()));
 else {  // weird corner case of attribute with no value - must use the type
  String unS = attElem.getAttributeValue("isUnsigned"); // deprecated but must deal with
  DataType dtype = typeS == null ? DataType.STRING : DataType.getType(typeS);
  if (isUnsignedSet) dtype = dtype.withSignedness(DataType.Signedness.UNSIGNED);
  addAttribute(parent, new ucar.nc2.Attribute(name, dtype));
ucar.nc2.ncmlNcMLReaderaddAttribute

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>
  • 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

  • Updating database using SQL prepared statement
  • getSystemService (Context)
  • requestLocationUpdates (LocationManager)
  • putExtra (Intent)
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • Top 12 Jupyter Notebook extensions
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