Ignore:
Timestamp:
07/21/11 13:06:09 (14 years ago)
Author:
basvannuland
Message:

added uid to data return

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Dev/trunk/classes/SurveyRDFWriter.php

    r26 r28  
    33class SurveyRDFWriter
    44{
    5         var $model;
     5        protected $model;
    66               
    7         var $resourceSurvey;
    8         var $surveyUID;
     7        protected $resourceSurvey;
     8        protected $surveyUID;
    99       
    1010    public function __construct($surveyUID)
     
    1616                $this->surveyUID = $surveyUID;
    1717               
    18     }
     18    }   
     19       
     20        public function saveSurvey()
     21        {       
     22                $this->model->saveAs('surveys/survey_'.$this->surveyUID.'.rdf','rdf');
     23        }
    1924       
    2025        public function createSurvey($sTitle, $sDescription)
     
    3641                $predicateDescription = new Resource(DESCRIPTION);
    3742                $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));               
    4044        }
    4145       
     
    8993               
    9094                $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));           
    9396        }
    94        
    95         public function saveSurvey()
    96         {       
    97                 $this->model->saveAs('surveys/'.$this->surveyUID.'.rdf','rdf');
    98         }
    99 
    10097}
    10198
Note: See TracChangeset for help on using the changeset viewer.