Index: Dev/trunk/classes/ApplicationRDFReader.php
===================================================================
--- Dev/trunk/classes/ApplicationRDFReader.php	(revision 45)
+++ Dev/trunk/classes/ApplicationRDFReader.php	(revision 62)
@@ -3,116 +3,116 @@
 class ApplicationRDFReader
 {
-	protected $model;
-			
+    protected $model;
+
     public function __construct()
     {
-        // Create empty MemModel
-		$factory = new ModelFactory();
-		$this->model = $factory->getDefaultModel();
-		
-		$fileName = 'data/applications/applications.rdf';
-		
-		if(file_exists($fileName))
-			$this->model->load($fileName);
+    // Create empty MemModel
+    $factory = new ModelFactory();
+    $this->model = $factory->getDefaultModel();
+
+    $fileName = 'data/applications/applications.rdf';
+
+    if(file_exists($fileName))
+        $this->model->load($fileName);
     }
-	
-	public function readApplicationInfo($applicationID)
-	{
-		$querystring = '
-			PREFIX 	predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
-			PREFIX	resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
-			SELECT 	?title ?description ?style
-			WHERE 	
-			{
-				_application	predicates:resource_type	resources:application ;
-								predicates:uid				"' . $applicationID . '"	;
-								predicates:title 			?title 	;
-								prdeicates:description		?description	;
-								predicates:style			?style
-			}';
-			
-		$result = $this->model->sparqlQuery($querystring);
-				
-		return $result;
-	}
-	
-	public function readAllApplications()
-	{
-		$result = array();
-		$result[] = $this->readApplicationIDs();
-		$result[] = $this->readApplicationTitles();				
-		$result[] = $this->readApplicationDescriptions();
-		$result[] = $this->readApplicationStyles();
-		
-		return $restult;
-	}
-	
-	public function readApplicationIDs()
-	{
-		$querystring = '
-			PREFIX 	predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
-			PREFIX	resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
-			SELECT 	?uid
-			WHERE 	
-			{
-				_application	predicates:resource_type	resources:application ;
-								predicates:uid				?uid
-			}';
-			
-		$result = $this->model->sparqlQuery($querystring);
-				
-		return $result;
-	}
-	
-	public function readApplicationTitles()
-	{
-		$querystring = '
-			PREFIX 	predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
-			PREFIX	resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
-			SELECT 	?title
-			WHERE 	
-			{
-				_application	predicates:resource_type	resources:application ;
-								predicates:title 			?title 
-			}';
-			
-		$result = $this->model->sparqlQuery($querystring);
-				
-		return $result;
-	}
-	
-	public function readApplicationDescriptions()
-	{
-		$querystring = '
-			PREFIX 	predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
-			PREFIX	resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
-			SELECT 	?description
-			WHERE 	
-			{
-				_application	predicates:resource_type	resources:application ;
-								prdeicates:description		?description	
-			}';
-			
-		$result = $this->model->sparqlQuery($querystring);
-				
-		return $result;
-	}
-	
-	public function readApplicationStyles()
-	{
-		$querystring = '
-			PREFIX 	predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
-			PREFIX	resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
-			SELECT 	?style
-			WHERE 	
-			{
-				_application	predicates:resource_type	resources:application ;
-								predicates:style			?style
-			}';
-			
-		$result = $this->model->sparqlQuery($querystring);
-				
-		return $result;
-	}
+
+    public function readApplicationInfo($applicationID)
+    {
+        $querystring = '
+            PREFIX  predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+            PREFIX  resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+            SELECT  ?title ?description ?style
+            WHERE 	
+            {
+                    _application	predicates:resource_type	resources:application ;
+                                        predicates:uid			"' . $applicationID . '"	;
+                                        predicates:title 		?title 	;
+                                        prdeicates:description		?description	;
+                                        predicates:style		?style
+            }';
+
+        $result = $this->model->sparqlQuery($querystring);
+
+        return $result;
+    }
+
+    public function readAllApplications()
+    {
+        $result = array();
+        $result[] = $this->readApplicationIDs();
+        $result[] = $this->readApplicationTitles();				
+        $result[] = $this->readApplicationDescriptions();
+        $result[] = $this->readApplicationStyles();
+
+        return $restult;
+    }
+
+    public function readApplicationIDs()
+    {
+        $querystring = '
+            PREFIX  predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+            PREFIX  resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+            SELECT  ?uid
+            WHERE 	
+            {
+                    _application	predicates:resource_type	resources:application ;
+                                        predicates:uid			?uid
+            }';
+
+        $result = $this->model->sparqlQuery($querystring);
+
+        return $result;
+    }
+
+    public function readApplicationTitles()
+    {
+        $querystring = '
+            PREFIX  predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+            PREFIX  resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+            SELECT  ?title
+            WHERE 	
+            {
+                    _application	predicates:resource_type	resources:application ;
+                                        predicates:title 		?title 
+            }';
+
+        $result = $this->model->sparqlQuery($querystring);
+
+        return $result;
+    }
+
+    public function readApplicationDescriptions()
+    {
+        $querystring = '
+            PREFIX  predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+            PREFIX  resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+            SELECT  ?description
+            WHERE 	
+            {
+                    _application	predicates:resource_type	resources:application ;
+                                        prdeicates:description		?description	
+            }';
+
+        $result = $this->model->sparqlQuery($querystring);
+
+        return $result;
+    }
+
+    public function readApplicationStyles()
+    {
+        $querystring = '
+            PREFIX  predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '>
+            PREFIX  resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '>
+            SELECT  ?style
+            WHERE 	
+            {
+                    _application	predicates:resource_type	resources:application ;
+                                        predicates:style		?style
+            }';
+
+        $result = $this->model->sparqlQuery($querystring);
+
+        return $result;
+    }
 }
 
