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

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

Best Java code snippets using ucar.nc2.ncml.NcMLReader.readAttributeValues (Showing top 9 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

private void readAtt(Object parent, Element attElem) {
 String name = attElem.getAttributeValue("name");
 if (name == null) {
  errlog.format("NcML Attribute name is required (%s)%n", attElem);
  return;
 }
 try {
  ucar.ma2.Array values = NcMLReader.readAttributeValues(attElem);
  Attribute att = new ucar.nc2.Attribute(name, values);
  if (parent instanceof Group)
   ((Group) parent).addAttribute(att);
  else if (parent instanceof Variable)
   ((Variable) parent).addAttribute(att);
 } catch (RuntimeException e) {
  errlog.format("NcML new Attribute Exception: %s att=%s in=%s%n", e.getMessage(), name, parent);
 }
}
origin: edu.ucar/cdm

private void readAtt(Object parent, Element attElem) {
 String name = attElem.getAttributeValue("name");
 if (name == null) {
  errlog.format("NcML Attribute name is required (%s)%n", attElem);
  return;
 }
 try {
  ucar.ma2.Array values = NcMLReader.readAttributeValues(attElem);
  Attribute att = new ucar.nc2.Attribute(name, values);
  if (parent instanceof Group)
   ((Group) parent).addAttribute(att);
  else if (parent instanceof Variable)
   ((Variable) parent).addAttribute(att);
 } catch (RuntimeException e) {
  errlog.format("NcML new Attribute Exception: %s att=%s in=%s%n", e.getMessage(), name, parent);
 }
}
origin: Unidata/thredds

private void readAtt(Object parent, Element attElem) {
 String name = attElem.getAttributeValue("name");
 if (name == null) {
  errlog.format("NcML Attribute name is required (%s)%n", attElem);
  return;
 }
 try {
  ucar.ma2.Array values = NcMLReader.readAttributeValues(attElem);
  Attribute att = new ucar.nc2.Attribute(name, values);
  if (parent instanceof Group)
   ((Group) parent).addAttribute(att);
  else if (parent instanceof Variable)
   ((Variable) parent).addAttribute(att);
 } catch (RuntimeException e) {
  errlog.format("NcML new Attribute Exception: %s att=%s in=%s%n", e.getMessage(), name, parent);
 }
}
origin: edu.ucar/netcdf

if (debugConstruct) System.out.println(" add new att = " + name);
try {
 ucar.ma2.Array values = readAttributeValues(attElem);
 addAttribute(parent, new ucar.nc2.Attribute(name, values));
} catch (RuntimeException e) {
if (hasValue) {
 try {
  ucar.ma2.Array values = readAttributeValues(attElem);
  addAttribute(parent, new ucar.nc2.Attribute(name, values));
 } catch (RuntimeException e) {
origin: edu.ucar/cdm

VariableSimple(Element velem) {
 name = velem.getAttributeValue("name");
 String type = velem.getAttributeValue("type");
 dt = DataType.getType(type);
 atts = new ArrayList<>();
 List<Element> attElems = velem.getChildren("attribute");
 for (Element attElem : attElems) {
  String attName = attElem.getAttributeValue("name");
  ucar.ma2.Array values = NcMLReader.readAttributeValues(attElem);
  atts.add(new Attribute(attName, values));
 }
 for (Attribute att : atts) {
  if (att.getShortName().equals(CDM.UNITS))
   units = att.getStringValue();
  if (att.getShortName().equals(CDM.LONG_NAME))
   desc = att.getStringValue();
  if ((desc == null) && att.getShortName().equals("description"))
   desc = att.getStringValue();
  if ((desc == null) && att.getShortName().equals("standard_name"))
   desc = att.getStringValue();
 }
}
origin: edu.ucar/netcdf

VariableSimple(Element velem) {
 name = velem.getAttributeValue("name");
 String type = velem.getAttributeValue("type");
 dt = DataType.getType(type);
 atts = new ArrayList<Attribute>();
 List<Element> attElems = velem.getChildren("attribute");
 for (Element attElem : attElems) {
  String attName = attElem.getAttributeValue("name");
  ucar.ma2.Array values = NcMLReader.readAttributeValues(attElem);
  atts.add(new Attribute(attName, values));
 }
 for (Attribute att : atts) {
  if (att.getShortName().equals(CDM.UNITS))
   units = att.getStringValue();
  if (att.getShortName().equals(CDM.LONG_NAME))
   desc = att.getStringValue();
  if ((desc == null) && att.getShortName().equals("description"))
   desc = att.getStringValue();
  if ((desc == null) && att.getShortName().equals("standard_name"))
   desc = att.getStringValue();
 }
}
origin: Unidata/thredds

VariableSimpleAdapter(Element velem) {
 name = velem.getAttributeValue("name");
 String type = velem.getAttributeValue("type");
 dt = DataType.getType(type);
 atts = new ArrayList<>();
 List<Element> attElems = velem.getChildren("attribute");
 for (Element attElem : attElems) {
  String attName = attElem.getAttributeValue("name");
  ucar.ma2.Array values = NcMLReader.readAttributeValues(attElem);
  atts.add(new Attribute(attName, values));
 }
 for (Attribute att : atts) {
  if (att.getShortName().equals(CDM.UNITS))
   units = att.getStringValue();
  if (att.getShortName().equals(CDM.LONG_NAME))
   desc = att.getStringValue();
  if ((desc == null) && att.getShortName().equals("description"))
   desc = att.getStringValue();
  if ((desc == null) && att.getShortName().equals("standard_name"))
   desc = att.getStringValue();
 }
}
origin: edu.ucar/cdm

if (debugConstruct) System.out.println(" add new att = " + name);
try {
 ucar.ma2.Array values = readAttributeValues(attElem);
 addAttribute(parent, new ucar.nc2.Attribute(name, values));
} catch (RuntimeException e) {
if (hasValue) {  // has a new value
 try {
  ucar.ma2.Array values = readAttributeValues(attElem);
  addAttribute(parent, new ucar.nc2.Attribute(name, values));
 } catch (RuntimeException e) {
origin: Unidata/thredds

if (debugConstruct) System.out.println(" add new att = " + name);
try {
 ucar.ma2.Array values = readAttributeValues(attElem);
 addAttribute(parent, new ucar.nc2.Attribute(name, values));
} catch (RuntimeException e) {
if (hasValue) {  // has a new value
 try {
  ucar.ma2.Array values = readAttributeValues(attElem);  // Handles "isUnsigned".
  addAttribute(parent, new ucar.nc2.Attribute(name, values));
 } catch (RuntimeException e) {
ucar.nc2.ncmlNcMLReaderreadAttributeValues

Javadoc

Parse the values element

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
  • 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.
  • readDim
    Read an NcML dimension element.
  • readAtt,
  • readDim,
  • readGroup,
  • readNetcdf,
  • readValues,
  • readVariable,
  • readVariableNested,
  • readVariableNew,
  • removeAttribute

Popular in Java

  • Creating JSON documents from java classes using gson
  • getContentResolver (Context)
  • onRequestPermissionsResult (Fragment)
  • onCreateOptionsMenu (Activity)
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • DecimalFormat (java.text)
    DecimalFormat is a concrete subclass ofNumberFormat that formats decimal numbers. It has a variety o
  • Hashtable (java.util)
    Hashtable is a synchronized implementation of Map. All optional operations are supported.Neither key
  • List (java.util)
    A List is a collection which maintains an ordering for its elements. Every element in the List has a
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • JPanel (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