Changeset 100 for Dev/trunk/classes/DashboardRDFWriter.php
- Timestamp:
- 09/01/11 15:59:15 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/classes/DashboardRDFWriter.php
r91 r100 1 1 <?php 2 2 3 class SurveyRDFWriter3 class DashboardRDFWriter 4 4 { 5 5 protected $model; … … 27 27 } 28 28 29 public function createDashboard($dTitle, $dDescription, $dRespondentGroup)29 public function createDashboard($dTitle, $dDescription, $dCreatorID) 30 30 { 31 31 $this->resourceDashboard = new Resource(DASHBOARD.'/'.$this->dashboardID); … … 46 46 $dashboardDescription = new Literal($dDescription); 47 47 $this->model->add(new Statement($this->resourceDashboard,$predicateDescription,$dashboardDescription)); 48 49 $predicateCreator = new Resource(CREATOR); 50 $userID = new Literal($dCreatorID); 51 $this->model->add(new Statement($this->resourceDashboard,$predicateCreator,$userID)); 48 52 } 49 53 50 public function addGraph($g Title,$gDescription,$gTypes,$gData)54 public function addGraph($gID,$gTitle,$gDescription,$gTypes,$gData) 51 55 { 52 56 $resourceGraph = new Resource(GRAPH); … … 60 64 $this->model->add(new Statement($resourceGraph,$predicateDescription,$graphDescription)); 61 65 66 $predicateUniqueID = new Resource(UID); 67 $graphID = new Literal($gID); 68 $this->model->add(new Statement($resourceQuestion,$predicateUniqueID,$graphID)); 69 62 70 $predicateGraphType = new Resource(GRAPH_TYPE); 63 71 foreach($gTypes as $gType) … … 67 75 } 68 76 69 $predicateData = new Resource( DATA);77 $predicateData = new Resource(HAS_DATA); 70 78 foreach($gData as $gThis) 71 79 { 72 $graphData = new Literal($gThis); 73 $this->model->add(new Statement($resourceGraph,$predicateData,$graphData)); 80 $resourceData = new Resource(DATA); 81 $this->model->add(new Statement($resourceGraph,$predicateData,$resourceData)); 82 83 $dataType = new Literal($gThis['type']); 84 $predicateDataType = new Resource(DATA_TYPE); 85 $this->model->add(new Statement($resourceData,$predicateDataType,$dataType)); 86 87 $dataID = new Literal($gThis['id']); 88 $this->model->add(new Statement($resourceData,$predicateUniqueID,$dataID)); 74 89 } 75 90
Note: See TracChangeset
for help on using the changeset viewer.