/** * Set the name of this Attribute. * Attribute names are unique within a NetcdfFile's global set, and within a Variable's set. * * @param name name of attribute */ public synchronized void setName(String name) { setShortName(name); } /**
/** * Set the name of this Attribute. * Attribute names are unique within a NetcdfFile's global set, and within a Variable's set. * * @param name name of attribute */ public synchronized void setName(String name) { if (immutable) throw new IllegalStateException("Cant modify"); setShortName(name); }
/** * Set the name of this Attribute. * Attribute names are unique within a NetcdfFile's global set, and within a Variable's set. * * @param name name of attribute */ public synchronized void setName(String name) { if (immutable) throw new IllegalStateException("Cant modify"); setShortName(name); }
private void fixAttributes(Group g) { for (Variable v : g.getVariables()) { for (Attribute a : v.getAttributes()) { if (a.getShortName().equalsIgnoreCase("UNIT")) a.setShortName(CDM.UNITS); if (a.getShortName().equalsIgnoreCase("SCALE_FACTOR")) a.setShortName(CDM.SCALE_FACTOR); if (a.getShortName().equalsIgnoreCase("OFFSET")) a.setShortName(CDM.ADD_OFFSET); } } for (Group ng : g.getGroups()) { fixAttributes(ng); } }
private void fixAttributes(Group g) { for (Variable v : g.getVariables()) { for (Attribute a : v.getAttributes()) { if (a.getShortName().equalsIgnoreCase("UNIT") || a.getShortName().equalsIgnoreCase("UNITS")) a.setShortName(CDM.UNITS); if (a.getShortName().equalsIgnoreCase("SCALE_FACTOR")) a.setShortName(CDM.SCALE_FACTOR); if (a.getShortName().equalsIgnoreCase("OFFSET")) a.setShortName(CDM.ADD_OFFSET); } } for (Group ng : g.getGroups()) { fixAttributes(ng); } }
private void fixAttributes(Group g) { for (Variable v : g.getVariables()) { for (Attribute a : v.getAttributes()) { if (a.getShortName().equalsIgnoreCase("UNIT") || a.getShortName().equalsIgnoreCase("UNITS")) { a.setShortName(CDM.UNITS); } if (a.getShortName().equalsIgnoreCase("SCALE_FACTOR")) { a.setShortName(CDM.SCALE_FACTOR); } if (a.getShortName().equalsIgnoreCase("OFFSET")) { a.setShortName(CDM.ADD_OFFSET); } } } for (Group ng : g.getGroups()) { fixAttributes(ng); } }
ncatt.setShortName(pieces.name);