Changeset 28 for Dev/trunk/classes/SurveyRDFWriter.php
- Timestamp:
- 07/21/11 13:06:09 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/classes/SurveyRDFWriter.php
r26 r28 3 3 class SurveyRDFWriter 4 4 { 5 var$model;5 protected $model; 6 6 7 var$resourceSurvey;8 var$surveyUID;7 protected $resourceSurvey; 8 protected $surveyUID; 9 9 10 10 public function __construct($surveyUID) … … 16 16 $this->surveyUID = $surveyUID; 17 17 18 } 18 } 19 20 public function saveSurvey() 21 { 22 $this->model->saveAs('surveys/survey_'.$this->surveyUID.'.rdf','rdf'); 23 } 19 24 20 25 public function createSurvey($sTitle, $sDescription) … … 36 41 $predicateDescription = new Resource(DESCRIPTION); 37 42 $surveyDescription = new Literal($sDescription); 38 $this->model->add(new Statement($this->resourceSurvey,$predicateDescription,$surveyDescription)); 39 43 $this->model->add(new Statement($this->resourceSurvey,$predicateDescription,$surveyDescription)); 40 44 } 41 45 … … 89 93 90 94 $predicateQuestion = new Resource(HAS_QUESTION); 91 $this->model->add(new Statement($this->resourceSurvey,$predicateQuestion,$resourceQuestion)); 92 95 $this->model->add(new Statement($this->resourceSurvey,$predicateQuestion,$resourceQuestion)); 93 96 } 94 95 public function saveSurvey()96 {97 $this->model->saveAs('surveys/'.$this->surveyUID.'.rdf','rdf');98 }99 100 97 } 101 98
Note: See TracChangeset
for help on using the changeset viewer.