[Bprocessor-commit] model/src/net/sourceforge/bprocessor/model Persistence.java, 1.94, 1.95 Surface
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2013-06-02 05:24:38
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv21645/src/net/sourceforge/bprocessor/model Modified Files: Persistence.java Surface.java Grid.java Item.java Log Message: Index: Item.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Item.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Item.java 30 Dec 2011 12:53:24 -0000 1.12 --- Item.java 2 Jun 2013 05:24:34 -0000 1.13 *************** *** 544,582 **** res.add(new Attribute("Name", getName())); - if (getOwner() == Project.getInstance().world()) { - if (isConstructionSpace()) { - res.add(new Attribute("Classification", - Project.getConstructionClas(), getClassification(), true)); - } else { - res.add(new Attribute("Classification", - Project.getFunctionalClas(), getClassification(), true)); - } - } else { - if (isConstructionSpace()) { - if (getOwner() != null && getOwner().getClassification() != null) { - res.add(new Attribute("Classification", - getOwner().getClassification(), getClassification(), true)); - } else { - res.add(new Attribute("Classification", - Project.getConstructionClas(), getClassification(), true)); - } - } else { - if (getOwner() != null && getOwner().getClassification() != null) { - res.add(new Attribute("Classification", - getOwner().getClassification(), getClassification(), true)); - } else { - res.add(new Attribute("Classification", - Project.getFunctionalClas(), getClassification(), true)); - } - } - } - if (getClassification() != null && getClassificationType() != null) { - res.add(new Attribute("Type", getClassification().getPossibleTypes(), - getClassificationType(), true)); - HashMap<String, Object> param = getOwnParameters(); - for (String s : param.keySet()) { - res.add(new Attribute(s, param.get(s))); - } - } res.add(new Attribute("ID", getId() != null ? getId().toString() : "", false)); res.add(new Attribute("Owner", getOwner(), false)); --- 544,547 ---- Index: Surface.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Surface.java,v retrieving revision 1.230 retrieving revision 1.231 diff -C2 -d -r1.230 -r1.231 *** Surface.java 30 Dec 2011 12:53:24 -0000 1.230 --- Surface.java 2 Jun 2013 05:24:34 -0000 1.231 *************** *** 1921,1926 **** public List<Attribute> getAttributes() { ArrayList<Attribute> res = new ArrayList<Attribute>(); - List<Material> materials = new LinkedList(Project.getInstance().getMaterials()); - Entity.sort(materials); res.add(new Attribute("Name", getName(), false)); --- 1921,1924 ---- *************** *** 1931,1940 **** res.add(new Attribute("Owner", getOwner(), false)); } ! ! res.add(new Attribute("Space1", getFrontDomain(), true)); ! res.add(new Attribute("Front Material", new Reference(frontMaterial(), materials))); ! res.add(new Attribute("Space2", getBackDomain(), true)); ! res.add(new Attribute("Back Material", new Reference(backMaterial(), materials))); ! if (exterior != null) { res.add(new Attribute("Exterior", getExterior(), false)); --- 1929,1933 ---- res.add(new Attribute("Owner", getOwner(), false)); } ! if (exterior != null) { res.add(new Attribute("Exterior", getExterior(), false)); Index: Grid.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Grid.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Grid.java 23 Sep 2009 07:50:21 -0000 1.12 --- Grid.java 2 Jun 2013 05:24:34 -0000 1.13 *************** *** 81,84 **** --- 81,100 ---- } + /** + * + * @return subdivisions + */ + public int getSubdivisions() { + return subdivisions; + } + + /** + * + * @param value new value of subdivisions + */ + public void setSubdivisions(int value) { + subdivisions = value; + } + /** {@inheritDoc} */ @Override Index: Persistence.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Persistence.java,v retrieving revision 1.94 retrieving revision 1.95 diff -C2 -d -r1.94 -r1.95 *** Persistence.java 24 May 2011 13:57:24 -0000 1.94 --- Persistence.java 2 Jun 2013 05:24:34 -0000 1.95 *************** *** 602,605 **** --- 602,610 ---- res.setHeight(height); } + int subdivisions = xml.getSubdivisions(); + if (subdivisions > 0) { + res.setSubdivisions(subdivisions); + } + res.setId(xml.getProgid()); mapper.put(xml.getId(), res); *************** *** 1324,1327 **** --- 1329,1333 ---- xml.setWidth((float) grid.getWidth()); xml.setHeight((float) grid.getHeight()); + xml.setSubdivisions(grid.getSubdivisions()); xml.setVertex(externalizeVertex(grid.getOrigin(), new HashMap())); |