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()));
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));
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));