[Bprocessor-commit] model/src/net/sourceforge/bprocessor/model Space.java,1.21,1.22 Project.java,1.4
Status: Pre-Alpha
Brought to you by:
henryml
From: Michael L. <he...@us...> - 2006-03-23 10:43:54
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11413/src/net/sourceforge/bprocessor/model Modified Files: Space.java Project.java Removed Files: ConstructionSpace.java FunctionalSpace.java Log Message: Removed ConstructionSpace and FunctionalSpace Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** Space.java 17 Mar 2006 09:30:34 -0000 1.21 --- Space.java 23 Mar 2006 10:43:49 -0000 1.22 *************** *** 28,33 **** /** Default */ private static final long serialVersionUID = 1L; /** The logger */ ! private static Logger log = Logger.getLogger(FunctionalSpace.class); /** The name */ private String name; --- 28,40 ---- /** Default */ private static final long serialVersionUID = 1L; + + /** Construction Type */ + public static final int CONSTRUCTION = 0; + + /** Functional Type */ + public static final int FUNCTIONAL = 1; + /** The logger */ ! private static Logger log = Logger.getLogger(Space.class); /** The name */ private String name; *************** *** 44,47 **** --- 51,56 ---- /** The modellor */ private Modellor modellor; + /** type */ + private int type; *************** *** 55,62 **** * Constructor for space * @param name The name */ ! public Space(String name) { super(); setName(name); description = new Description(""); } --- 64,73 ---- * Constructor for space * @param name The name + * @param type The type */ ! public Space(String name, int type) { super(); setName(name); + setType(type); description = new Description(""); } *************** *** 68,72 **** */ public static Space createConstructionSpace(String name) { ! return new ConstructionSpace(name); } --- 79,83 ---- */ public static Space createConstructionSpace(String name) { ! return new Space(name, Space.CONSTRUCTION); } *************** *** 77,81 **** */ public static Space createFunctionalSpace(String name) { ! return new FunctionalSpace(name); } --- 88,108 ---- */ public static Space createFunctionalSpace(String name) { ! return new Space(name, Space.FUNCTIONAL); ! } ! ! /** ! * Get type ! * @return type ! */ ! public int getType() { ! return type; ! } ! ! /** ! * Set type ! * @param value New type ! */ ! public void setType(int value) { ! type = value; } *************** *** 114,143 **** return description; } - /** - * Get the attributes - * @return The attributes - * @hibernate.set - * cascade="delete" - * lazy="false" - * @hibernate.key - * column="DOMAIN_ID" - * @hibernate.one-to-many - * class="net.sourceforge.bprocessor.model.Attribute" - - public Set getAttributes() { - return attributes; - } */ - - /** - * Set the attributes - * @param attributes The attributes - - public void setAttributes(Set attributes) { - this.attributes = attributes; - } */ - - /** * Get the interior mesh * @return The interior mesh --- 141,146 ---- *************** *** 255,259 **** */ public boolean isConstructionSpace() { ! return false; } --- 258,262 ---- */ public boolean isConstructionSpace() { ! return (type == Space.CONSTRUCTION); } *************** *** 263,267 **** */ public boolean isFunctionalSpace() { ! return false; } --- 266,270 ---- */ public boolean isFunctionalSpace() { ! return (type == Space.FUNCTIONAL); } *************** *** 326,331 **** */ public String getGeneralName() { ! // TODO Auto-generated method stub ! return null; } } --- 329,339 ---- */ public String getGeneralName() { ! if (isConstructionSpace()) { ! return "Construction Space"; ! } ! if (isFunctionalSpace()) { ! return "Functional Space"; ! } ! return "Space"; } } --- FunctionalSpace.java DELETED --- --- ConstructionSpace.java DELETED --- Index: Project.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** Project.java 21 Mar 2006 21:59:59 -0000 1.49 --- Project.java 23 Mar 2006 10:43:49 -0000 1.50 *************** *** 311,315 **** */ public Collection getConstructionSpaces() { ! return filter(spaces.values(), ConstructionSpace.class); } --- 311,323 ---- */ public Collection getConstructionSpaces() { ! Collection result = new HashSet(); ! Iterator iter = spaces.values().iterator(); ! while (iter.hasNext()) { ! Space current = (Space) iter.next(); ! if (current.getType() == Space.CONSTRUCTION) { ! result.add(current); ! } ! } ! return result; } *************** *** 397,401 **** */ public Collection getFunctionalSpaces() { ! return filter(spaces.values(), FunctionalSpace.class); } --- 405,417 ---- */ public Collection getFunctionalSpaces() { ! Collection result = new HashSet(); ! Iterator iter = spaces.values().iterator(); ! while (iter.hasNext()) { ! Space current = (Space) iter.next(); ! if (current.getType() == Space.FUNCTIONAL) { ! result.add(current); ! } ! } ! return result; } |