[Bprocessor-commit] model/src/net/sourceforge/bprocessor/model Space.java, 1.202, 1.203 Persistence
Status: Pre-Alpha
Brought to you by:
henryml
From: rimestad <rim...@us...> - 2007-11-06 19:00:46
|
Update of /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv21069/src/net/sourceforge/bprocessor/model Modified Files: Space.java Persistence.java Project.java Log Message: started on making the library lay on disk Index: Persistence.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Persistence.java,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** Persistence.java 6 Nov 2007 18:26:55 -0000 1.53 --- Persistence.java 6 Nov 2007 19:00:43 -0000 1.54 *************** *** 337,340 **** --- 337,345 ---- }*/ { + if (xml.getAnchor() != null) { + space.setInstanceAnchor(internalizeCoordinateSystem(xml.getAnchor(), mapper, xmls)); + } + } + { Iterator iter = xml.getConstructor().iterator(); while (iter.hasNext()) { *************** *** 978,981 **** --- 983,988 ---- } } + } else { + xml.setAnchor(externalizeCoordinateSystem(space.getInstanceAnchor(), map)); } { *************** *** 1580,1582 **** --- 1587,1597 ---- return res; } + + /** + * Load all lbr files in the library folder + * @return A collection of library objects + */ + public static Collection<Space> loadLibrary() { + return new LinkedList<Space>(); + } } Index: Space.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Space.java,v retrieving revision 1.202 retrieving revision 1.203 diff -C2 -d -r1.202 -r1.203 *** Space.java 6 Nov 2007 18:26:54 -0000 1.202 --- Space.java 6 Nov 2007 19:00:43 -0000 1.203 *************** *** 3020,3022 **** --- 3020,3032 ---- } } + + /** + * set the anchor for a instance + * @param cs the coordinatesystem to use as anchor + */ + public void setInstanceAnchor(CoordinateSystem cs) { + if (isInstance()) { + anchor = cs; + } + } } Index: Project.java =================================================================== RCS file: /cvsroot/bprocessor/model/src/net/sourceforge/bprocessor/model/Project.java,v retrieving revision 1.138 retrieving revision 1.139 diff -C2 -d -r1.138 -r1.139 *** Project.java 5 Nov 2007 18:09:18 -0000 1.138 --- Project.java 6 Nov 2007 19:00:43 -0000 1.139 *************** *** 64,67 **** --- 64,69 ---- private static Collection<ClassificationType> classificationTypes; + private static Collection<Space> library; + /** The cameras */ private HashMap cameras = new HashMap(); *************** *** 119,123 **** private long nextMaterialId; ! private List<Space> catalogObjects; /** --- 121,125 ---- private long nextMaterialId; ! private List<Space> catalog; /** *************** *** 130,133 **** --- 132,136 ---- try { Object[] loaded = Persistence.loadDBK(new File("Classification.xml")); + library = Persistence.loadLibrary(); constructionClas = (Classification)loaded[0]; functionalClas = (Classification)loaded[1]; *************** *** 154,158 **** redoStack = new Stack(); copyBuffer = new LinkedList(); ! catalogObjects = new LinkedList<Space>(); resetCam(); observers = new LinkedList(); --- 157,161 ---- redoStack = new Stack(); copyBuffer = new LinkedList(); ! catalog = new LinkedList<Space>(); resetCam(); observers = new LinkedList(); *************** *** 1042,1046 **** */ public List<Space> getCatalogObjects() { ! return catalogObjects; } --- 1045,1049 ---- */ public List<Space> getCatalogObjects() { ! return catalog; } *************** *** 1050,1054 **** */ public void addCalalogObject(Space s) { ! catalogObjects.add(s); } } --- 1053,1057 ---- */ public void addCalalogObject(Space s) { ! catalog.add(s); } } |