Ignore:
Timestamp:
08/30/11 17:49:19 (14 years ago)
Author:
basvannuland
Message:

start with dashboard database

File:
1 edited

Legend:

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

    r85 r91  
    6969        return $result;
    7070    }
     71   
     72    public function readQuestionCodes()
     73    {
     74        $result = null;
     75       
     76        if(file_exists($this->filePath.'questions.rdf'))
     77        {
     78            // Create empty MemModel
     79            $factory = new ModelFactory();
     80            $tempmodel= $factory->getDefaultModel();
     81            $tempmodel->load($this->filePath.'questions.rdf');
     82
     83            $querystring = '
     84            PREFIX      predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
     85            PREFIX      resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
     86            SELECT      ?questionCode
     87            WHERE
     88            {   
     89                    _question   predicates:resource_type        resources:question ;
     90                                predicates:question_code        ?questionCode                           
     91            }';
     92           
     93            $result = $tempmodel->sparqlQuery($querystring);
     94        }
     95        return $result;
     96    }
    7197
    7298    public function readQuestionTitle($questionID)
Note: See TracChangeset for help on using the changeset viewer.