[Bprocessor-commit] model/src/net/sourceforge/bprocessor/model Persistence.java, 1.22, 1.23
Status: Pre-Alpha
Brought to you by:
henryml
|
From: Nikolaj B. <nbr...@us...> - 2006-11-19 19:02:39
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv8674/src/net/sourceforge/bprocessor/model Modified Files: Persistence.java Log Message: Fixed a bug in the loading and saving of classifications Index: Persistence.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Persistence.java,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Persistence.java 16 Nov 2006 23:20:39 -0000 1.22 --- Persistence.java 19 Nov 2006 19:02:30 -0000 1.23 *************** *** 167,175 **** if (!xml.getClassification().equalsIgnoreCase("unassigned")) { if (type == 0) { ! space.setClassification(Project.getInstance(). ! getClassification(xml.getClassification(), 0)); } else { ! space.setClassification(Project.getInstance(). ! getClassification(xml.getClassification(), 1)); } } --- 167,190 ---- if (!xml.getClassification().equalsIgnoreCase("unassigned")) { if (type == 0) { ! if (xml.getClassification().startsWith("-")) { ! space.setClassification(Project.getInstance(). ! getClassification(xml.getClassification(), 0)); ! } else { ! Classification newclas = new Classification("-1", xml.getClassification(), ! Project.getInstance().getClassification("-99", 0), 0); ! Project.getInstance().getClassification("-99", 0).addChild(newclas); ! space.setClassification(newclas); ! } } else { ! if (xml.getClassification().startsWith("-")) { ! space.setClassification(Project.getInstance(). ! getClassification(xml.getClassification(), 1)); ! } else { ! Classification newclas = new Classification("-1", xml.getClassification(), ! Project.getInstance().getClassification("-99", 1), 1); ! Project.getInstance().getClassification("-99", 1).addChild(newclas); ! space.setClassification(newclas); ! } ! } } *************** *** 710,714 **** --- 725,733 ---- xml.setDescription(space.getDescription().toString()); if (space.getClassification() != null) { + if (space.getClassification().getId().equalsIgnoreCase("-1")) { + xml.setClassification(space.getClassification().getName()); + } else { xml.setClassification(space.getClassification().getFullId()); + } } else { xml.setClassification("unassigned"); |