public void loadAttribute(String name, String value) throws ParseException { if (name.equals("phasesSystem")) phasesSystem = PhasesSystem.valueOf(value.toUpperCase()); else if (name.equals("voltageLevel")) voltageLevel = VoltageLevel.valueOf(value.toUpperCase()); else if (name.equals("mode")) mode = Mode.valueOf(value.toUpperCase()); else if (name.equals("powerFactor")) powerFactor = Double.parseDouble(value); else super.loadAttribute(name, value); }
public String toString() { String result = ""; result += "<feature name=\"phasesSystem\" value=\"" + phasesSystem.toString() + "\"/>\n"; result += "<feature name=\"voltageLevel\" value=\"" + voltageLevel.toString() + "\"/>\n"; result += "<feature name=\"mode\" value=\"" + mode.toString() + "\"/>\n"; result += "<feature name=\"powerFactor\" value=\"" + powerFactor + "\"/>\n"; return result; }