Changeset 100 for Dev/trunk/classes/DashboardRDFReader.php
- Timestamp:
- 09/01/11 15:59:15 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/trunk/classes/DashboardRDFReader.php
r91 r100 33 33 public function getDashboardInfo() 34 34 { 35 35 $querystring = ' 36 PREFIX predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '> 37 PREFIX resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '> 38 SELECT ?uid ?title ?description ?creator 39 WHERE 40 { 41 _dashboard predicates:resource_type resources:dashboard ; 42 predicates:uid ?uid ; 43 predicates:title ?title ; 44 predicates:description ?description ; 45 predicates:creator ?creator 46 }'; 47 48 $result = $this->model->sparqlQuery($querystring); 49 50 return $result; 51 } 52 53 public function readDashboardGraphs() 54 { 55 $result = array(); 56 $result[] = $this->readSDashboardGraphsTitle(); 57 $result[] = $this->readDashboardGraphsDescription(); 58 59 return $result; 60 } 61 62 public function readDashboardGraphsTitle() 63 { 64 $querystring = ' 65 PREFIX predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '> 66 PREFIX resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '> 67 SELECT ?graphTitle 68 WHERE 69 { 70 _graph predicates:resource_type resources:graph ; 71 predicates:title ?graphTitle 72 }'; 73 74 $result = $this->model->sparqlQuery($querystring); 75 76 return $result; 77 } 78 79 public function readDashboardGraphsDescription() 80 { 81 $querystring = ' 82 PREFIX predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '> 83 PREFIX resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '> 84 SELECT ?graphDescription 85 WHERE 86 { 87 _graph predicates:resource_type resources:graph ; 88 predicates:description ?graphDescription 89 }'; 90 91 $result = $this->model->sparqlQuery($querystring); 92 93 return $result; 94 } 95 96 public function readDashboardGraphsID() 97 { 98 $querystring = ' 99 PREFIX predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '> 100 PREFIX resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '> 101 SELECT ?graphID 102 WHERE 103 { 104 _graph predicates:resource_type resources:graph ; 105 predicates:uid ?graphID 106 }'; 107 108 $result = $this->model->sparqlQuery($querystring); 109 110 return $result; 111 } 112 113 public function readGraphTypes($graphID) 114 { 115 $querystring = ' 116 PREFIX predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '> 117 PREFIX resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '> 118 SELECT ?type 119 WHERE 120 { 121 _graph predicates:resource_type resources:graph ; 122 predicates:uid "' . $graphID . '" ; 123 predicates:graph_type ?type 124 }'; 125 126 $result = $this->model->sparqlQuery($querystring); 127 128 return $result; 129 } 130 131 public function readGraphData($graphID) 132 { 133 $querystring = ' 134 PREFIX predicates: <' . SURVEYTOOL_PREDICATES_NAMESPACE . '> 135 PREFIX resources: <' . SURVEYTOOL_RESOURCES_NAMESPACE . '> 136 SELECT ?datatype ?dataid 137 WHERE 138 { 139 _graph predicates:resource_type resources:graph ; 140 predicates:uid "' . $graphID . '" . 141 _data predicates:has_data resources:data ; 142 predicates:data_type ?datatype ; 143 predicates:uid ?dataid 144 }'; 145 146 $result = $this->model->sparqlQuery($querystring); 147 148 return $result; 36 149 } 37 150 }
Note: See TracChangeset
for help on using the changeset viewer.