public function testGetModelInfo()
 {
     $this->modelId = 3;
     $sobimInfo = new sobimmodelinformation_impl($this->db, $this->modelId);
     $modelInfo = $sobimInfo->getModelInformation();
     $this->assertEquals("reference file created for the Basic FM Handover View", $modelInfo->getAuthorization());
     $this->assertEquals("Thomas Liebich", $modelInfo->getAuthor());
     $this->assertEquals(1296118479, $modelInfo->getChangeDate());
     $this->assertEquals("ViewDefinition [CoordinationView, FMHandOverView]", $modelInfo->getDescription());
     $this->assertEquals("AEC3", $modelInfo->getOrganization());
     $this->assertEquals("IFC text editor", $modelInfo->getOriginatingSystem());
     $this->assertEquals("IFC text editor", $modelInfo->getPreProcessor());
     $this->assertEquals(null, $modelInfo->getValDate());
     $this->assertEquals("IFC2X3", $modelInfo->getNativeSchema());
 }
Ejemplo n.º 2
0
 public function displayModelInformation()
 {
     /*$GLOBALS['phpgw_info']['flags']['noheader'] = false;
     		$GLOBALS['phpgw_info']['flags']['nofooter'] = false;
     		$GLOBALS['phpgw_info']['flags']['xslt_app'] = false;
     		$GLOBALS['phpgw']->common->phpgw_header(true);*/
     $GLOBALS['phpgw']->xslttpl->add_file(array('bim_modelinformation'));
     $modelId = phpgw::get_var("modelId");
     //$modelId = 3;
     if (empty($modelId)) {
         // go apeshit
         echo "No modelId!";
     } else {
         $sobimInfo = new sobimmodelinformation_impl($this->db, $modelId);
         /* @var $modelInfo BimModelInformation */
         $modelInfo = $sobimInfo->getModelInformation();
         $sobimmodel = new sobimmodel_impl($this->db);
         $sobimmodel->setModelId($modelId);
         /* @var $model BimModel */
         $model = $sobimmodel->retrieveBimModelInformationById();
         $data = array('model' => $model->transformObjectToArray(), 'information' => $modelInfo->transformObjectToArray());
         $GLOBALS['phpgw']->xslttpl->set_var('phpgw', array('modelInformation' => $data));
     }
     $this->setupBimCss();
 }