Tabnine Logo
NcMLReader.readAttributeValues
Code IndexAdd Tabnine 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)

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

  • Making http requests using okhttp
  • scheduleAtFixedRate (ScheduledExecutorService)
  • notifyDataSetChanged (ArrayAdapter)
  • getExternalFilesDir (Context)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • ImageIO (javax.imageio)
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Top Vim plugins
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