[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [6921] moved function to uibim
From: |
Petur Thorsteinsson |
Subject: |
[Fmsystem-commits] [6921] moved function to uibim |
Date: |
Thu, 03 Feb 2011 19:26:36 +0000 |
Revision: 6921
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=6921
Author: peturbjorn
Date: 2011-02-03 19:26:36 +0000 (Thu, 03 Feb 2011)
Log Message:
-----------
moved function to uibim
Modified Paths:
--------------
branches/dev-bim2/property/inc/class.uiitem.inc.php
Modified: branches/dev-bim2/property/inc/class.uiitem.inc.php
===================================================================
--- branches/dev-bim2/property/inc/class.uiitem.inc.php 2011-02-03 19:24:31 UTC
(rev 6920)
+++ branches/dev-bim2/property/inc/class.uiitem.inc.php 2011-02-03 19:26:36 UTC
(rev 6921)
@@ -486,83 +486,8 @@
$this->setupCss();
}
- public function getModelsJson() {
- $GLOBALS['phpgw_info']['flags']['xslt_app'] = false;
- header("Content-type: application/json");
- $bobimmodel = new bobimmodel_impl();
- $sobimmodel = new sobimmodel_impl($this->db);
- $bobimmodel->setSobimmodel($sobimmodel);
- $output = $bobimmodel->createBimModelList();
- echo json_encode($output);
- }
- /*
- *
- */
- public function removeModelJson($modelId = null) {
- $GLOBALS['phpgw_info']['flags']['xslt_app'] = false;
- header("Content-type: application/json");
- $output = array();
- $output["result"] = 1;
- if($modelId == null) {
- $modelId = (int) phpgw::get_var("modelId");
- }
-
- $bobimmodel = new bobimmodel_impl();
- $sovfs = new sovfs_impl();
- $sovfs->setSubModule(self::$virtualFileSystemPath);
- $bobimmodel->setVfsObject($sovfs);
- $sobimmodel = new sobimmodel_impl($this->db);
- $sobimmodel->setModelId($modelId);
- $bobimmodel->setSobimmodel($sobimmodel);
- try {
- $bobimmodel->removeIfcModelByModelId();
- echo json_encode($output);
- } catch (InvalidArgumentException $e) {
- $output["result"] = 0;
- $output["error"] = "Invalid arguments";
- $output["exception"] = $e;
- echo json_encode($output);
- } catch (ModelDoesNotExistException $e) {
- $output["result"] = 0;
- $output["error"] = "Model does not exist!";
- $output["exception"] = $e;
- echo json_encode($output);
- } catch (Exception $e) {
- $output["result"] = 0;
- $output["error"] = "General error";
- $output["exception"] = $e;
- echo json_encode($output);
- }
- }
+
- public function getFacilityManagementXmlByModelId($modelId = null) {
- $GLOBALS['phpgw_info']['flags']['xslt_app'] = false;
- header("Content-type: application/xml");
- $restUrl =
"http://localhost:8080/BIM_Facility_Management/rest/uploadIfc";
- if($modelId == null) {
- $modelId = (int) phpgw::get_var("modelId");
- }
- echo "ModelId is:".$modelId;
- $bobimmodel = new bobimmodel_impl();
- $sovfs = new sovfs_impl();
- $sovfs->setSubModule(self::$virtualFileSystemPath);
- $bobimmodel->setVfsObject($sovfs);
- $sobimmodel = new sobimmodel_impl($this->db);
- $sobimmodel->setModelId($modelId);
- $bobimmodel->setSobimmodel($sobimmodel);
- $ifcFileWithRealPath = $bobimmodel->getIfcFileNameWithRealPath();
- $xmlResult =
$this->getFacilityManagementXmlFromIfc($ifcFileWithRealPath);
-
- $bobimitem = new bobimitem_impl();
- $bobimitem->setModelId($modelId);
- $bobimitem->setIfcXml($xmlResult);
- $bobimitem->setSobimitem(new sobimitem_impl($this->db));
- $bobimitem->setSobimtype(new sobimtype_impl($this->db));
-
- $bobimitem->loadIfcItemsIntoDatabase();
-
- }
-
private function getFacilityManagementXmlFromIfc($fileWithPath) {
$sobim_converter = new sobim_converter_impl();
$sobim_converter->setFileToSend($fileWithPath);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [6921] moved function to uibim,
Petur Thorsteinsson <=