public void addResource(File object) {
   ResourceModel rm = new ResourceModel();
   rm.setName(object.getName());
   rm.setFilePath(object.getAbsolutePath());
   String filePath = rm.getFilePath();
   if (filePath.endsWith(".jpeg") || filePath.endsWith(".gif")) rm.setDataType("Image");
   else if (filePath.endsWith(".au")) rm.setDataType("AudioStream");
   if (rm.getDataType().equals("Image")) rm.setImage(loadImage(object.getAbsolutePath()));
   else if (rm.getDataType().equals("AudioStream"))
     rm.setAudioStream(loadAudio(object.getAbsolutePath()));
   resources.put(rm.getName(), rm);
 }
 public void addResource(ResourceModel rm) {
   resources.put(rm.getName(), rm);
 }
 public void addPage(BPageModel model) {
   if (model.getName() == null) model.setName(pageCounter.getPageName());
   pageModels.put(model.getName(), model);
   model.setData(this);
 }
 public void addShape(BShapeModel model) {
   if (model.getName() == null) model.setName(shapeCounter.getShapeName());
   shapeModels.put(model.getName(), model);
   model.setData(this);
 }