[Bprocessor-commit] model/src/net/sourceforge/bprocessor/model Classification.java, 1.7, 1.8
Status: Pre-Alpha
Brought to you by:
henryml
|
From: Nikolaj B. <nbr...@us...> - 2007-03-19 15:58:46
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv13094/src/net/sourceforge/bprocessor/model Modified Files: Classification.java Log Message: Made classification parametric and added an U-value attribute Index: Classification.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Classification.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Classification.java 31 Jan 2007 12:48:23 -0000 1.7 --- Classification.java 19 Mar 2007 12:38:14 -0000 1.8 *************** *** 7,10 **** --- 7,13 ---- package net.sourceforge.bprocessor.model; + import java.util.ArrayList; + import java.util.Iterator; + import java.util.List; import java.util.Vector; *************** *** 14,18 **** * This class persist the model from/to an XML document */ ! public class Classification { /** The logger */ private static Logger log = Logger.getLogger(Classification.class); --- 17,21 ---- * This class persist the model from/to an XML document */ ! public class Classification implements Parametric { /** The logger */ private static Logger log = Logger.getLogger(Classification.class); *************** *** 33,36 **** --- 36,42 ---- private String produkt; + /** The id of the classification */ + private Double uvalue = 0.0; + /** Construction Type */ *************** *** 236,239 **** --- 242,275 ---- } + public List getAttributes() { + ArrayList res = new ArrayList(); + res.add(new Attribute("Name", getName(), false)); + res.add(new Attribute("Id", getId(), false)); + res.add(new Attribute("U-value", getUvalue(), true)); + return res; + } + + public String getGeneralName() { + return "Classification"; + } + + public void setAttributes(List attributes) { + Iterator iter = attributes.iterator(); + while (iter.hasNext()) { + Attribute a = (Attribute)iter.next(); + if (a.getName().equals("U-value")) { + setUvalue((Double)a.getValue()); + } + } + } + + public Double getUvalue() { + return uvalue; + } + + public void setUvalue(Double uvalue) { + this.uvalue = uvalue; + } + |