Ignore:
Timestamp:
08/30/11 15:25:32 (14 years ago)
Author:
basvannuland
Message:

application reader changed to work

File:
1 edited

Legend:

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

    r78 r88  
    44{
    55    protected $model;
     6    protected $fileName;
    67
    78    public function __construct()
    89    {
    9     // Create empty MemModel
    10     $factory = new ModelFactory();
    11     $this->model = $factory->getDefaultModel();
    12 
    13     $fileName = 'data/applications/applications.rdf';
    14 
    15     if(file_exists($fileName))
    16         $this->model->load($fileName);
     10        $this->fileName = 'data/applications/applications.rdf';
     11   
     12        $this->reloadApplications();
     13    }
     14   
     15    public function reloadApplications()
     16    {
     17        // Create empty MemModel   
     18        $factory = new ModelFactory();
     19        $this->model = $factory->getDefaultModel();
     20       
     21        if(file_exists($this->fileName))
     22            $this->model->load($this->fileName);
    1723    }
    1824
    1925    public function readApplicationInfo($applicationID)
    20     {
     26    {       
     27        $this->reloadApplications();
     28       
    2129        $querystring = '
    2230            PREFIX  predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
Note: See TracChangeset for help on using the changeset viewer.