PageRenderTime 43ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/extensions/queries/old/testautocompletion.php

https://code.google.com/p/ontowiki/
PHP | 35 lines | 21 code | 6 blank | 8 comment | 0 complexity | 94c43153107f61bb05f41b86b51e9465 MD5 | raw file
Possible License(s): GPL-2.0, BSD-3-Clause
  1. <?
  2. require_once('Options.php');
  3. Options::$pathToIni="config.ini";
  4. //include ('ajax.php');
  5. echo "<xmp>";
  6. //$arr = array ( 'sembib:HumanAttribute' => 3 , 'sembib:WaterArea' => 6 , 'sembib:GeographicArea' => 1 ) ;
  7. //sort($arr);
  8. //var_dump($arr);
  9. //die;
  10. $json = '[{\"s\":\"?city\",\"p\":\"leader_name\",\"o\":\"?leader\"}]';
  11. $json = '[{\"s\":\"?city\",\"p\":\"owl:disjointWith\",\"o\":\"?leader\"}]';
  12. $json = '[{\"s\":\"?city\",\"p\":\"fdsfjowl:disjointWith\",\"o\":\"?leader\"}]';
  13. //$str = '{\"0\":{\"s\":\"aaaaaa\",\"p\":\"?dunno\",\"o\":\"?leader\",\"current\":\"s\"}}';
  14. $json= '{\"0\":{\"s\":\"Abra\",\"p\":\"sembib:spouseOf\",\"o\":\"?leader\",\"current\":\"s\"}}';
  15. $json= '{\"0\":{\"s\":\"tommy_T\",\"p\":\"db-ont:birthplace\",\"o\":\"db:England\",\"current\":\"s\"}}';
  16. $json= '{\"0\":{\"s\":\"?what\",\"p\":\"db-ont:releaseDate\",\"o\":\"200\",\"current\":\"o\"}}';
  17. $json = '{"0":{"s":"?what","p":"db-ont:releaseDate","o":"2007-09-25","otype":"typed-literal","lang":"","datatype":"http://www.w3.org/2001/XMLSchema#date"},"1":{"s":"?what","p":"releas","o":"?newObject","otype":"typed-literal","lang":"","datatype":"http://www.w3.org/2001/XMLSchema#date","current":"p"}}';
  18. $json = '{"0":{"s":"?what","p":"name","o":"?released","lang":""},"1":{"s":"?what2","p":"name","o":"Cal","lang":"","current":"o"}}';
  19. $json = '{"0":{"s":"?actors","p":"tes","o":"db-ont:Actor","lang":"","current":"p"}}';
  20. //test($str);
  21. $_REQUEST['q'] = 'foaf:nam';
  22. $_REQUEST['json'] = $json;
  23. $_REQUEST['limit'] = 10;
  24. echo $json."\n";
  25. global $debug ;
  26. $debug = true;
  27. include ('autocompletion.php');
  28. //print_r(suggest($str,100));
  29. ?>