Line | |
---|
1 | <?php
|
---|
2 | require 'classes/master.php';
|
---|
3 |
|
---|
4 | require 'rdfConstants.php';
|
---|
5 |
|
---|
6 | // Include RAP Library to write RDF files
|
---|
7 | define("RDFAPI_INCLUDE_DIR", "rdfapi/");
|
---|
8 | include(RDFAPI_INCLUDE_DIR . "RDFAPI.php");
|
---|
9 |
|
---|
10 | $surveyRDFWriter = new SurveyRDFWriter();
|
---|
11 |
|
---|
12 | $sTitle = $_POST['surveyTitle'];
|
---|
13 |
|
---|
14 | $surveyRDFWriter->createSurvey($sTitle,$_POST['surveyDescription']);
|
---|
15 |
|
---|
16 | $done = $surveyRDFWriter->saveSurvey($sTitle);
|
---|
17 |
|
---|
18 | echo 'Done<br/><br/>';
|
---|
19 |
|
---|
20 | $surveyRDFReader = new SurveyRDFReader();
|
---|
21 |
|
---|
22 | $surveyRDFReader->loadSurvey($sTitle);
|
---|
23 |
|
---|
24 | $result = $surveyRDFReader->readSurveyTitle();
|
---|
25 |
|
---|
26 | foreach($result as $line){
|
---|
27 | $value = $line['?surveyTitle'];
|
---|
28 | if($value != "")
|
---|
29 | echo $value->toString()."<br/>";
|
---|
30 | else
|
---|
31 | echo "undbound<br/>";
|
---|
32 | }
|
---|
33 |
|
---|
34 | $result2 = $surveyRDFReader->readSurveyDescription();
|
---|
35 |
|
---|
36 | foreach($result2 as $line){
|
---|
37 | $value = $line['?surveyDescription'];
|
---|
38 | if($value != "")
|
---|
39 | echo $value->toString()."<br/>";
|
---|
40 | else
|
---|
41 | echo "undbound<br/>";
|
---|
42 | }
|
---|
43 |
|
---|
44 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.