You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(19) |
Jul
(6) |
Aug
(65) |
Sep
(4) |
Oct
(5) |
Nov
(8) |
Dec
(2) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(1) |
Feb
(9) |
Mar
(1) |
Apr
|
May
(8) |
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <cw...@us...> - 2007-08-13 06:14:38
|
Revision: 500 http://rdfapi-php.svn.sourceforge.net/rdfapi-php/?rev=500&view=rev Author: cweiske Date: 2007-08-12 23:14:37 -0700 (Sun, 12 Aug 2007) Log Message: ----------- Add debug option Modified Paths: -------------- trunk/rdfapi-php/test/parseN3.php Modified: trunk/rdfapi-php/test/parseN3.php =================================================================== --- trunk/rdfapi-php/test/parseN3.php 2007-08-13 06:06:02 UTC (rev 499) +++ trunk/rdfapi-php/test/parseN3.php 2007-08-13 06:14:37 UTC (rev 500) @@ -8,17 +8,24 @@ if ($argc <= 1) { echo <<<EOT Parses an N3 ("turtle") file - Usage: php parseN3.php /path/to/file.n3 + Usage: php parseN3.php [--debug] /path/to/file.n3 EOT; exit(1); } +if ($argc == 3 && $argv[1] == '--debug') { + $bDebug = true; + array_shift($argv); +} else { + $bDebug = false; +} + $file = $argv[1]; if (!file_exists($file)) { echo <<<EOT File does not exist. - Usage: php parseN3.php /path/to/file.n3 + Usage: php parseN3.php [--debug] /path/to/file.n3 EOT; exit(2); @@ -29,6 +36,9 @@ require_once RDFAPI_INCLUDE_DIR . 'syntax/N3Parser.php'; $parser = new N3Parser(); +if ($bDebug) { + $parser->debug = true; +} $parser->parse( file_get_contents($file) ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cw...@us...> - 2007-08-13 06:06:05
|
Revision: 499 http://rdfapi-php.svn.sourceforge.net/rdfapi-php/?rev=499&view=rev Author: cweiske Date: 2007-08-12 23:06:02 -0700 (Sun, 12 Aug 2007) Log Message: ----------- N3 parsing test script Added Paths: ----------- trunk/rdfapi-php/test/parseN3.php Added: trunk/rdfapi-php/test/parseN3.php =================================================================== --- trunk/rdfapi-php/test/parseN3.php (rev 0) +++ trunk/rdfapi-php/test/parseN3.php 2007-08-13 06:06:02 UTC (rev 499) @@ -0,0 +1,36 @@ +<?php +/** +* Small script to try out our N3 parser. +* Simply call it with the file to parse as parameter. +* +* @author Christian Weiske <cw...@cw...> +*/ +if ($argc <= 1) { + echo <<<EOT +Parses an N3 ("turtle") file + Usage: php parseN3.php /path/to/file.n3 + +EOT; + exit(1); +} + +$file = $argv[1]; +if (!file_exists($file)) { + echo <<<EOT +File does not exist. + Usage: php parseN3.php /path/to/file.n3 + +EOT; + exit(2); +} + + +require_once 'config.php'; +require_once RDFAPI_INCLUDE_DIR . 'syntax/N3Parser.php'; + +$parser = new N3Parser(); +$parser->parse( + file_get_contents($file) +); + +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cw...@us...> - 2007-08-13 05:58:51
|
Revision: 498 http://rdfapi-php.svn.sourceforge.net/rdfapi-php/?rev=498&view=rev Author: cweiske Date: 2007-08-12 22:58:50 -0700 (Sun, 12 Aug 2007) Log Message: ----------- More verbose error message that helps to find the error better Modified Paths: -------------- trunk/rdfapi-php/api/syntax/N3Parser.php Modified: trunk/rdfapi-php/api/syntax/N3Parser.php =================================================================== --- trunk/rdfapi-php/api/syntax/N3Parser.php 2007-08-13 05:14:26 UTC (rev 497) +++ trunk/rdfapi-php/api/syntax/N3Parser.php 2007-08-13 05:58:50 UTC (rev 498) @@ -744,7 +744,11 @@ if (count($list) == 3) return array($list); if (count($list) < 3) { - throw new Exception('N3 statement too short.'); + throw new Exception( + 'N3 statement too short,' + . ' only ' . count($list) . ' elements instead of 3:' . "\n" + . implode("\n", $list) + ); } //Get all ; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cw...@us...> - 2007-08-13 05:14:28
|
Revision: 497 http://rdfapi-php.svn.sourceforge.net/rdfapi-php/?rev=497&view=rev Author: cweiske Date: 2007-08-12 22:14:26 -0700 (Sun, 12 Aug 2007) Log Message: ----------- Allow to pass datatype in constructor Modified Paths: -------------- trunk/rdfapi-php/api/model/Literal.php Modified: trunk/rdfapi-php/api/model/Literal.php =================================================================== --- trunk/rdfapi-php/api/model/Literal.php 2007-08-13 05:09:53 UTC (rev 496) +++ trunk/rdfapi-php/api/model/Literal.php 2007-08-13 05:14:26 UTC (rev 497) @@ -44,23 +44,28 @@ /** * Constructor * - * @param string $str label of the literal - * @param string $language optional language identifier + * @param string $str label of the literal + * @param string $language optional language identifier + * @param string $datatype optional datatype * */ - function Literal($str, $language = NULL) { - $this->dtype = NULL; - $this->label = $str; + function Literal($str, $language = NULL, $datatype = null) + { + $this->label = $str; - if ($language != NULL) { - $this->lang = $language; - } else { - $this->lang = NULL; - } + if ($language != NULL) { + $this->lang = $language; + } else { + $this->lang = NULL; + } + if ($datatype != null) { + $this->dtype = $datatype; + } else { + $this->dtype = NULL; + } + } - } - /** * Returns the string value of the literal. * This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cw...@us...> - 2007-08-13 05:09:54
|
Revision: 496 http://rdfapi-php.svn.sourceforge.net/rdfapi-php/?rev=496&view=rev Author: cweiske Date: 2007-08-12 22:09:53 -0700 (Sun, 12 Aug 2007) Log Message: ----------- Add "a" -> rdf:type test Modified Paths: -------------- trunk/rdfapi-php/test/unit/Syntax/n3Parser_test.php Modified: trunk/rdfapi-php/test/unit/Syntax/n3Parser_test.php =================================================================== --- trunk/rdfapi-php/test/unit/Syntax/n3Parser_test.php 2007-08-13 04:59:45 UTC (rev 495) +++ trunk/rdfapi-php/test/unit/Syntax/n3Parser_test.php 2007-08-13 05:09:53 UTC (rev 496) @@ -211,5 +211,30 @@ $this->assertEqual(2, $model->size()); $this->assertTrue($model->containsAll($model2)); }//function testBooleans() + + + + function testA() + { + $n3 = '@prefix : <http://example.org/#> . + :foo a :bar . + '; + $parser = &new N3Parser(); + //$parser->debug = true; + $model = &$parser->parse2model($n3, false); + + $model2 = new MemModel(); + $model2->add( + new Statement( + new Resource("http://example.org/#foo"), + new Resource("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"), + new Resource("http://example.org/#bar") + ) + ); + + //var_dump($model->triples); + $this->assertEqual(1, $model->size()); + $this->assertTrue($model->containsAll($model2)); + }//function testA() } ?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cw...@us...> - 2007-08-13 04:59:47
|
Revision: 495 http://rdfapi-php.svn.sourceforge.net/rdfapi-php/?rev=495&view=rev Author: cweiske Date: 2007-08-12 21:59:45 -0700 (Sun, 12 Aug 2007) Log Message: ----------- Add support for plain numbers and booleans in N3 files. This fixes bug #1545380: N3 parser doesn't understand numeric literals and allows me to go on integrating the new DAWG tests Modified Paths: -------------- trunk/rdfapi-php/api/syntax/N3Parser.php trunk/rdfapi-php/test/unit/Syntax/n3Parser_test.php Modified: trunk/rdfapi-php/api/syntax/N3Parser.php =================================================================== --- trunk/rdfapi-php/api/syntax/N3Parser.php 2007-08-12 18:10:08 UTC (rev 494) +++ trunk/rdfapi-php/api/syntax/N3Parser.php 2007-08-13 04:59:45 UTC (rev 495) @@ -77,7 +77,8 @@ $Univar = '\?'.$Name; $QName = '(?:[A-Za-z][A-Za-z0-9_@\.]*)?:'.$Name; $Literal = '"(\\\"|[^"])*"'; # '"(?:\\"|[^"])*"' - $Number = '[0-9]+(:?[\\.e][0-9]+)?'; + $Number = '[-+]?[0-9]+(\\.[0-9]+)?([eE][-+]?[0-9]+)?'; + $Boolean = '@(?:true|false)'; // $Literal = '"[^"\\\\]*(?:\\.\\[^"\\]*)*"'; # '"(?:\\"|[^"])*"' $LangTag = '@[A-Za-z\-]*[^ \^\.\;\,]'; $Datatype = '(\^\^)[^ ,\.;)]+'; @@ -85,17 +86,23 @@ // $LLiteral = '"""[^"\\\\]*(?:(?:.|"(?!""))[^"\\\\]*)*"""'; $LLiteral = '"""[^"\\\\]*(?:(?:\\\\.|"(?!""))[^"\\\\]*)*"""'; // '"""[^"\\]*(?:(?:\\.|"(?!""))[^"\\]*)*"""' - $Comment = '#.*$'; - $Prefix = '(?:[A-Za-z][A-Za-z0-9_]*)?:'; + $Comment = '#.*$'; + $Prefix = '(?:[A-Za-z][A-Za-z0-9_]*)?:'; $PrefixDecl = '@prefix'; - $WS = '[ \t]'; + $WS = '[ \t]'; $this->RDF_NS = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'; # for 'a' keyword $this->DAML_NS = 'http://www.daml.org/2001/03/daml+oil#'; # for '=' keyword $this->OWL_NS = 'http://www.w3.org/2002/07/owl#'; // $t = array( $LLiteral, $URI); //, $Literal, $PrefixDecl, $QName, $bNode, $Prefix, // $Univar, 'a', '{', '}', '\(', '\)', '\[', '\]', ',', ';', '\.', $WS, $Comment); - $t = array( $Datatype_URI,$Datatype,$LLiteral, $URI, $Literal, $PrefixDecl, $QName, $Number, $bNode, $Prefix, $Univar, 'a','=', '{', '}', '\(', '\)', '\[', '\]', ',', ';', '\.', $WS, $Comment,$LangTag); + $t = array( + $Datatype_URI, $Datatype, $LLiteral, $URI, $Literal, + $PrefixDecl, $QName, $Number, $Boolean, $bNode, + $Prefix, $Univar, 'a','=', + '{', '}', '\(', '\)', '\[', '\]', ',', ';', '\.', + $WS, $Comment,$LangTag + ); $this->Tokens = "/(".join($t,"|").")/m"; $this->bNode = 0; @@ -545,7 +552,8 @@ array_walk($list, array($this, 'replace_equal')); array_walk($list, array($this, 'replace_this')); - for ($i=0; $i<count($list); $i++) { + for ($i = 0; $i < count($list); $i++) { + if ($list[$i]=='<>') { if (!isset($path)) { if (!isset($_SERVER['SERVER_ADDR'])) { @@ -561,20 +569,28 @@ }; - if ((!strstr('<_"?.;,{}[]()@',$list[$i]{0})) - && (substr($list[$i],0,3)!='^^<') + if (preg_match('/^[-+]?[0-9]+$/', $list[$i])) { + //integer + $list[$i] = intval($list[$i]); + } else if (is_numeric($list[$i])) { + //float or decimal + // After conversion we cannot distinguish between both + $list[$i] = floatval($list[$i]); + } else if ((!strstr('<_"?.;,{}[]()@', $list[$i]{0})) + && (substr($list[$i],0,3) != '^^<') ) { - $_r = explode(":",$list[$i]); - $ns = $_r[0].':'; + //prefix or unknown + $_r = explode(':', $list[$i]); + $ns = $_r[0] . ':'; $name = $_r[1]; if (isset($prefixes[$ns])) { $list[$i] = '<'.$prefixes[$ns].$name.'>'; - } else if (isset($prefixes[substr($ns,2)])) { - $list[$i] = '^^'.$prefixes[substr($ns,2)].$name.''; + } else if (isset($prefixes[substr($ns, 2)])) { + $list[$i] = '^^' . $prefixes[substr($ns, 2)] . $name . ''; } else { - #die('Prefix not declared:'.$ns); - $this->parseError=true; + //die('Prefix not declared:'.$ns); + $this->parseError = true; trigger_error('Prefix not declared: '.$ns, E_USER_ERROR); break; } @@ -602,7 +618,9 @@ } if (substr($list[$i],0,2)=='^^') { - if ($list[$i][2]!='<'){$list[$i]='^^<'.substr($list[$i],2).'>';}; + if ($list[$i][2]!='<') { + $list[$i] = '^^<' . substr($list[$i], 2) . '>'; + } }; }//foreach list item @@ -999,67 +1017,94 @@ $t = $this->getStatements($t); # get all of the "statements" from the stream foreach ($t as $stat) { - $stats=$this->statementize($stat); + $stats = $this->statementize($stat); foreach ($stats as $y) { - $result[]=$y; + $result[]=$y; } } + // for x in [statementize(stat) for stat in t] { // for y in x: result.append(y) return $result; } - /** - * Constructs a RAP RDFNode from URI/Literal/Bnode - * @access private - * @param string $s - * @returns object RDFNode - **/ - function toRDFNode($s,$state) { - $ins=substr($s,1,-1); - if ($s{0}=="\"") { - $lang=NULL; + /** + * Constructs a RAP RDFNode from URI/Literal/Bnode + * @access private + * @param string $s + * @returns object RDFNode + **/ + function toRDFNode($s, $state) + { + $ins = substr($s, 1, -1); + if ($s{0} == '"') { + $lang = NULL; - if (count($state)>3) { + if (count($state)>3) { + for ($i = 3; $i < count($state); $i++) { + if ($state[$i][0]=='@') { + $lang = substr($state[3], 1); + } + if (substr($state[$i],0,2) == '^^') { + $dtype = substr($state[$i],2); + if ($dtype[0]=='<') { + $dtype = substr($dtype,1,-1); + } + } + } + } - for ($i = 3; $i < count($state); $i++){ - if ($state[$i][0]=='@')$lang=substr($state[3],1); - if (substr($state[$i],0,2)=='^^'){ + if (UNIC_RDF) { + $ins = $this->str2unicode_nfc($ins); + } + $new_Literal = new Literal($ins, $lang); + if (isset($dtype)) { + $new_Literal->setDatatype($dtype); + } + return $new_Literal; + } else if (is_int($s)) { + $value = new Literal($s); + $value->setDatatype(XML_SCHEMA . 'integer'); + return $value; + } else if (is_float($s)) { + $value = new Literal($s); + $value->setDatatype(XML_SCHEMA . 'double'); + return $value; + } else if ($s == '@true') { + $value = new Literal(true); + $value->setDatatype(XML_SCHEMA . 'boolean'); + return $value; + } else if ($s == '@false') { + $value = new Literal(false); + $value->setDatatype(XML_SCHEMA . 'boolean'); + return $value; + } - $dtype=substr($state[$i],2); - if ($dtype[0]=='<') $dtype= substr($dtype,1,-1); + if (strstr($s, '_' . BNODE_PREFIX)) { + if (($this->FixBnodes) || (!array_search($s,$this->bNodeMap))) { + return new BlankNode($ins); + } else { + return new BlankNode( + trim( + substr( + array_search($s, $this->bNodeMap), + 2 + ) + ) + ); + }; + } - }; + return new Resource($ins); + }//function toRDFNode($s, $state) - }; - }; - if(UNIC_RDF){ - $ins=$this->str2unicode_nfc($ins); - } - $new_Literal=new Literal($ins,$lang); - if (isset($dtype)) $new_Literal->setDatatype($dtype); - return $new_Literal; - }; - if (strstr($s,'_'.BNODE_PREFIX)) { - if (($this->FixBnodes) OR (!array_search($s,$this->bNodeMap))) { - return new BlankNode($ins); - } else {return new BlankNode(trim(substr(array_search($s,$this->bNodeMap),2))); - }; - } - - return new Resource($ins); - } - - - - } //end: N3Parser ?> Modified: trunk/rdfapi-php/test/unit/Syntax/n3Parser_test.php =================================================================== --- trunk/rdfapi-php/test/unit/Syntax/n3Parser_test.php 2007-08-12 18:10:08 UTC (rev 494) +++ trunk/rdfapi-php/test/unit/Syntax/n3Parser_test.php 2007-08-13 04:59:45 UTC (rev 495) @@ -1,4 +1,5 @@ <?php +require_once RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_N3; // ---------------------------------------------------------------------------------- // Class: testN3Parser @@ -8,103 +9,207 @@ * Tests the N3Parser * * @version $Id$ - * @author Tobias Gau� <tob...@we...> + * @author Tobias Gauss <tob...@we...> + * @author Christian Weiske <cw...@cw...? * * @package unittests * @access public */ - class testN3Parser extends UnitTestCase { - function testN3Parser() { - $this->UnitTestCase(); +class testN3Parser extends UnitTestCase +{ - $_SESSION['n3TestInput']=' - @prefix p: <http://www.example.org/personal_details#> . - @prefix m: <http://www.example.org/meeting_organization#> . + function testN3Parser() { + $this->UnitTestCase(); - <http://www.example.org/people#fred> - p:GivenName "Fred"; - p:hasEmail <mailto:fr...@ex...>; - m:attending <http://meetings.example.com/cal#m1> . + $_SESSION['n3TestInput']=' + @prefix p: <http://www.example.org/personal_details#> . + @prefix m: <http://www.example.org/meeting_organization#> . - <http://meetings.example.com/cal#m1> - m:homePage <http://meetings.example.com/m1/hp> . - '; + <http://www.example.org/people#fred> + p:GivenName "Fred"; + p:hasEmail <mailto:fr...@ex...>; + m:attending <http://meetings.example.com/cal#m1> . + <http://meetings.example.com/cal#m1> + m:homePage <http://meetings.example.com/m1/hp> . + '; - } - function testIsMemmodel() { - // Import Package - include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_N3); - $n3pars= new N3Parser(); - $model=$n3pars->parse2model($_SESSION['n3TestInput'],false); - $this->assertIsA($model, 'memmodel'); - } + } + function testIsMemmodel() { - function testParsing() { + // Import Package + $n3pars= new N3Parser(); + $model=$n3pars->parse2model($_SESSION['n3TestInput'],false); + $this->assertIsA($model, 'memmodel'); + } - $n3pars= new N3Parser(); - $model=$n3pars->parse2model($_SESSION['n3TestInput'],false); + function testParsing() { + $n3pars= new N3Parser(); + $model=$n3pars->parse2model($_SESSION['n3TestInput'],false); - $model2 = new MemModel(); - // Ceate new statements and add them to the model - $statement1 = new Statement(new Resource("http://www.example.org/people#fred"), - new Resource("http://www.example.org/personal_details#hasEmail"), - new Resource("mailto:fr...@ex...")); - $statement2 = new Statement(new Resource("http://www.example.org/people#fred"), - new Resource("http://www.example.org/meeting_organization#attending"), - new Resource("http://meetings.example.com/cal#m1")); - $statement3 = new Statement(new Resource("http://www.example.org/people#fred"), - new Resource("http://www.example.org/personal_details#GivenName"), - new Literal("Fred")); - $statement4 = new Statement(new Resource("http://meetings.example.com/cal#m1"), - new Resource("http://www.example.org/meeting_organization#homePage"), - new Resource("http://meetings.example.com/m1/hp")); + $model2 = new MemModel(); + // Ceate new statements and add them to the model + $statement1 = new Statement(new Resource("http://www.example.org/people#fred"), + new Resource("http://www.example.org/personal_details#hasEmail"), + new Resource("mailto:fr...@ex...")); + $statement2 = new Statement(new Resource("http://www.example.org/people#fred"), + new Resource("http://www.example.org/meeting_organization#attending"), + new Resource("http://meetings.example.com/cal#m1")); + $statement3 = new Statement(new Resource("http://www.example.org/people#fred"), + new Resource("http://www.example.org/personal_details#GivenName"), + new Literal("Fred")); + $statement4 = new Statement(new Resource("http://meetings.example.com/cal#m1"), + new Resource("http://www.example.org/meeting_organization#homePage"), + new Resource("http://meetings.example.com/m1/hp")); - $model2->add($statement1); - $model2->add($statement2); - $model2->add($statement3); - $model2->add($statement4); + $model2->add($statement1); + $model2->add($statement2); + $model2->add($statement3); + $model2->add($statement4); - $this->assertTrue($model->containsAll($model2)); - } - function testPrefixNotDeclared() { - $rdfInput=' - @prefix m: <http://www.example.org/meeting_organization#>. + $this->assertTrue($model->containsAll($model2)); + } - <http://www.example.org/people#fred> - p:GivenName "Fred"; - p:hasEmail <mailto:fr...@ex...>; - m:attending <http://meetings.example.com/cal#m1> . - '; + function testPrefixNotDeclared() { + $rdfInput=' + @prefix m: <http://www.example.org/meeting_organization#>. - $n3pars= new N3Parser(); - $model=$n3pars->parse2model($rdfInput,false); - //var_dump($model); - $this->assertErrorPattern('[Prefix not declared: p:]'); - } + <http://www.example.org/people#fred> + p:GivenName "Fred"; + p:hasEmail <mailto:fr...@ex...>; + m:attending <http://meetings.example.com/cal#m1> . + '; - function testLoneSemicolon() { - $n3 = '<a> <b> <c> ; .'; - $parser = &new N3Parser(); - $model = &$parser->parse2model($n3, false); - $this->assertEqual(1, $model->size()); - $this->assertNoErrors(); - } + $n3pars= new N3Parser(); + $model=$n3pars->parse2model($rdfInput,false); + //var_dump($model); + $this->assertErrorPattern('[Prefix not declared: p:]'); + } - function testTightClosingList() { - $n3 = '@prefix : <http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql4/manifest#> . - @prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> . - <> mf:entries ( mf:syn-09) .'; - $parser = &new N3Parser(); - $model = &$parser->parse2model($n3, false); - //if bug occured, the parser would be in an endless loop - } + function testLoneSemicolon() { + $n3 = '<a> <b> <c> ; .'; + $parser = &new N3Parser(); + $model = &$parser->parse2model($n3, false); + $this->assertEqual(1, $model->size()); + $this->assertNoErrors(); } + + function testTightClosingList() { + $n3 = '@prefix : <http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql4/manifest#> . + @prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> . + <> mf:entries ( mf:syn-09) .'; + $parser = &new N3Parser(); + $model = &$parser->parse2model($n3, false); + //if bug occured, the parser would be in an endless loop + } + + + + /** + * Check number parsing + * @see http://www.w3.org/2000/10/swap/grammar/n3-report.html#node + */ + function testNumbers() + { + $n3 = '@prefix : <http://example.org/#> . + :foo :bar 0.7 . + :foo :bar 42 . + :foo :bar 10e6 . + + :foo :bar -0.7 . + :foo :bar -42 . + :foo :bar -12E-6 . + '; + $parser = &new N3Parser(); + + $model = &$parser->parse2model($n3, false); + + $model2 = new MemModel(); + $model2->add( + new Statement( + new Resource("http://example.org/#foo"), + new Resource("http://example.org/#bar"), + new Literal(0.7, null, XML_SCHEMA . 'double') + ) + ); + $model2->add( + new Statement( + new Resource("http://example.org/#foo"), + new Resource("http://example.org/#bar"), + new Literal(42, null, XML_SCHEMA . 'integer') + ) + ); + $model2->add( + new Statement( + new Resource("http://example.org/#foo"), + new Resource("http://example.org/#bar"), + new Literal(10e6, null, XML_SCHEMA . 'double') + ) + ); + $model2->add( + new Statement( + new Resource("http://example.org/#foo"), + new Resource("http://example.org/#bar"), + new Literal(-0.7, null, XML_SCHEMA . 'double') + ) + ); + $model2->add( + new Statement( + new Resource("http://example.org/#foo"), + new Resource("http://example.org/#bar"), + new Literal(-42, null, XML_SCHEMA . 'integer') + ) + ); + $model2->add( + new Statement( + new Resource("http://example.org/#foo"), + new Resource("http://example.org/#bar"), + new Literal(-12E-6, null, XML_SCHEMA . 'double') + ) + ); + + $this->assertEqual(6, $model->size()); + $this->assertTrue($model->containsAll($model2)); + }//function testNumbers() + + + + function testBooleans() + { + $n3 = '@prefix : <http://example.org/#> . + :foo :bar @true . + :foo :bar @false . + '; + $parser = &new N3Parser(); + //$parser->debug = true; + $model = &$parser->parse2model($n3, false); + + $model2 = new MemModel(); + $model2->add( + new Statement( + new Resource("http://example.org/#foo"), + new Resource("http://example.org/#bar"), + new Literal(true, null, XML_SCHEMA . 'boolean') + ) + ); + $model2->add( + new Statement( + new Resource("http://example.org/#foo"), + new Resource("http://example.org/#bar"), + new Literal(false, null, XML_SCHEMA . 'boolean') + ) + ); + + //var_dump($model->triples); + $this->assertEqual(2, $model->size()); + $this->assertTrue($model->containsAll($model2)); + }//function testBooleans() +} ?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cw...@us...> - 2007-08-12 18:10:09
|
Revision: 494 http://rdfapi-php.svn.sourceforge.net/rdfapi-php/?rev=494&view=rev Author: cweiske Date: 2007-08-12 11:10:08 -0700 (Sun, 12 Aug 2007) Log Message: ----------- Indent nicely so that you can actually see what the code is meant to be If anyone of the original authors reads that: Thank you for giving me so many hours of fun that I needed to indent the code so that I could begin to understand what it was supposed to do. Modified Paths: -------------- trunk/rdfapi-php/api/syntax/N3Parser.php Modified: trunk/rdfapi-php/api/syntax/N3Parser.php =================================================================== --- trunk/rdfapi-php/api/syntax/N3Parser.php 2007-08-12 17:43:07 UTC (rev 493) +++ trunk/rdfapi-php/api/syntax/N3Parser.php 2007-08-12 18:10:08 UTC (rev 494) @@ -77,6 +77,7 @@ $Univar = '\?'.$Name; $QName = '(?:[A-Za-z][A-Za-z0-9_@\.]*)?:'.$Name; $Literal = '"(\\\"|[^"])*"'; # '"(?:\\"|[^"])*"' + $Number = '[0-9]+(:?[\\.e][0-9]+)?'; // $Literal = '"[^"\\\\]*(?:\\.\\[^"\\]*)*"'; # '"(?:\\"|[^"])*"' $LangTag = '@[A-Za-z\-]*[^ \^\.\;\,]'; $Datatype = '(\^\^)[^ ,\.;)]+'; @@ -94,7 +95,7 @@ // $t = array( $LLiteral, $URI); //, $Literal, $PrefixDecl, $QName, $bNode, $Prefix, // $Univar, 'a', '{', '}', '\(', '\)', '\[', '\]', ',', ';', '\.', $WS, $Comment); - $t = array( $Datatype_URI,$Datatype,$LLiteral, $URI, $Literal, $PrefixDecl, $QName, $bNode, $Prefix, $Univar, 'a','=', '{', '}', '\(', '\)', '\[', '\]', ',', ';', '\.', $WS, $Comment,$LangTag); + $t = array( $Datatype_URI,$Datatype,$LLiteral, $URI, $Literal, $PrefixDecl, $QName, $Number, $bNode, $Prefix, $Univar, 'a','=', '{', '}', '\(', '\)', '\[', '\]', ',', ';', '\.', $WS, $Comment,$LangTag); $this->Tokens = "/(".join($t,"|").")/m"; $this->bNode = 0; @@ -443,7 +444,7 @@ $res=array(); preg_match_all($this->Tokens, $s, $newres); $res=$this->array_concat($res, array_map('trim', $newres[0])); - +//var_dump($newres[0]); return $res; } @@ -530,88 +531,87 @@ if ($l=='this') $l='<urn:urn-n:this>'; } - /** - * Applies stuff :) - * Expands namespace prefixes etc. - * @param array $prefixes - * @param array $list - * @returns $list - * @access private - **/ - function applyStuff($prefixes, $list) { + /** + * Applies stuff :) + * Expands namespace prefixes etc. + * @param array $prefixes + * @param array $list + * @returns $list + * @access private + **/ + function applyStuff($prefixes, $list) + { + array_walk($list, array($this, 'replace_a_type')); + array_walk($list, array($this, 'replace_equal')); + array_walk($list, array($this, 'replace_this')); - array_walk($list, array($this, 'replace_a_type')); - array_walk($list, array($this, 'replace_equal')); - array_walk($list, array($this, 'replace_this')); + for ($i=0; $i<count($list); $i++) { + if ($list[$i]=='<>') { + if (!isset($path)) { + if (!isset($_SERVER['SERVER_ADDR'])) { + $_SERVER['SERVER_ADDR'] = 'localhost'; + } + if (!isset($_SERVER['REQUEST_URI'])) { + $_SERVER['REQUEST_URI'] = '/rdfapi-php'; + } + $list[$i] = '<http://'.$_SERVER['SERVER_ADDR'].$_SERVER['REQUEST_URI'].'#generate_timestamp_'.time().'>'; + } else { + $list[$i] = '<'.$path.'>'; + }; + }; - for ($i=0;$i<count($list);$i++) { - // for i in range(len(list)) { -// if (!strstr('<_"?.;,{}[]()',$list[$i]{0})) { + if ((!strstr('<_"?.;,{}[]()@',$list[$i]{0})) + && (substr($list[$i],0,3)!='^^<') + ) { + $_r = explode(":",$list[$i]); + $ns = $_r[0].':'; + $name = $_r[1]; -// if a <> resource occours, change it to the parsed filename or local URI + timestamp + if (isset($prefixes[$ns])) { + $list[$i] = '<'.$prefixes[$ns].$name.'>'; + } else if (isset($prefixes[substr($ns,2)])) { + $list[$i] = '^^'.$prefixes[substr($ns,2)].$name.''; + } else { + #die('Prefix not declared:'.$ns); + $this->parseError=true; + trigger_error('Prefix not declared: '.$ns, E_USER_ERROR); + break; + } - if ($list[$i]=='<>') { - if (!isset($path)) { - if (!isset($_SERVER['SERVER_ADDR'])) $_SERVER['SERVER_ADDR']='localhost'; - if (!isset($_SERVER['REQUEST_URI'])) $_SERVER['REQUEST_URI']='/rdfapi-php'; - $list[$i]='<http://'.$_SERVER['SERVER_ADDR'].$_SERVER['REQUEST_URI'].'#generate_timestamp_'.time().'>'; + } else { + if ($list[$i]{0} == '"') { // Congratulations - it's a literal! + if (substr($list[$i],0,3) == '"""') { + if (substr($list[$i],-3,3) == '"""') { // A big literal... + $lit = substr($list[$i],3,-3); + // print "++$lit++"; + $lit=str_replace('\n', '\\n',$lit); - }else {$list[$i]='<'.$path.'>';}; - }; + $lit=ereg_replace("[^\\]\"", "\\\"", $lit); + $list[$i] = '"'.$lit.'"'; + } else { + die ('Incorrect string formatting: '.substr($list[$i],-3,3)); + } + } else { + if (strstr($list[$i],"\n")) { + die('Newline in literal: '+$list[$i]); + } + } + } + } - if ((!strstr('<_"?.;,{}[]()@',$list[$i]{0}))AND (substr($list[$i],0,3)!='^^<')) { - $_r= explode(":",$list[$i]); + if (substr($list[$i],0,2)=='^^') { + if ($list[$i][2]!='<'){$list[$i]='^^<'.substr($list[$i],2).'>';}; + }; + }//foreach list item + return $list; + }//function applyStuff($prefixes, $list) - $ns=$_r[0].':'; - $name=$_r[1]; - - if (isset($prefixes[$ns])) $list[$i] = '<'.$prefixes[$ns].$name.'>'; - else if (isset($prefixes[substr($ns,2)])) $list[$i] = '^^'.$prefixes[substr($ns,2)].$name.''; - else { - #die('Prefix not declared:'.$ns); - $this->parseError=true; - trigger_error('Prefix not declared: '.$ns, E_USER_ERROR); - break; - - - } - - } else { - if ($list[$i]{0} == '"') { // Congratulations - it's a literal! - if (substr($list[$i],0,3) == '"""') { - if (substr($list[$i],-3,3) == '"""') { // A big literal... - $lit = substr($list[$i],3,-3); - // print "++$lit++"; - $lit=str_replace('\n', '\\n',$lit); - - $lit=ereg_replace("[^\\]\"", "\\\"", $lit); - - $list[$i] = '"'.$lit.'"'; - } - else { die ('Incorrect string formatting: '.substr($list[$i],-3,3)); } - } else { - if (strstr($list[$i],"\n")) die('Newline in literal: '+$list[$i]); - } - } - } - - if (substr($list[$i],0,2)=='^^') { - if ($list[$i][2]!='<'){$list[$i]='^^<'.substr($list[$i],2).'>';}; - }; - - - } - - - return $list; - } - /** * Returns an array of triples extracted from the list of n3 tokens * @param array $list This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cw...@us...> - 2007-08-12 17:43:12
|
Revision: 493 http://rdfapi-php.svn.sourceforge.net/rdfapi-php/?rev=493&view=rev Author: cweiske Date: 2007-08-12 10:43:07 -0700 (Sun, 12 Aug 2007) Log Message: ----------- remove debug output Modified Paths: -------------- trunk/rdfapi-php/api/syntax/RdfParser.php Modified: trunk/rdfapi-php/api/syntax/RdfParser.php =================================================================== --- trunk/rdfapi-php/api/syntax/RdfParser.php 2007-08-12 17:42:33 UTC (rev 492) +++ trunk/rdfapi-php/api/syntax/RdfParser.php 2007-08-12 17:43:07 UTC (rev 493) @@ -2207,7 +2207,7 @@ // $base is URL or filename $this->model = $model?$model:new MemModel($base); -echo $base; + $input = fopen($base,'r') or die("RDF Parser: Could not open File: $base. Stopped parsing."); $this->rdf_parser_create( NULL ); $this->rdf_set_base($base); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cw...@us...> - 2007-08-12 17:42:34
|
Revision: 492 http://rdfapi-php.svn.sourceforge.net/rdfapi-php/?rev=492&view=rev Author: cweiske Date: 2007-08-12 10:42:33 -0700 (Sun, 12 Aug 2007) Log Message: ----------- remove whitespace Modified Paths: -------------- trunk/rdfapi-php/api/syntax/RdfParser.php Modified: trunk/rdfapi-php/api/syntax/RdfParser.php =================================================================== --- trunk/rdfapi-php/api/syntax/RdfParser.php 2007-08-12 17:42:05 UTC (rev 491) +++ trunk/rdfapi-php/api/syntax/RdfParser.php 2007-08-12 17:42:33 UTC (rev 492) @@ -6,25 +6,25 @@ /** - * An RDF paser. + * An RDF paser. * This class reads RDF data from files or URIs and generates models out of it. All valid - * RDF XML syntaxes defined by the W3C in RDF/XML Syntax Specification (Revised) + * RDF XML syntaxes defined by the W3C in RDF/XML Syntax Specification (Revised) * - W3C Working Draft 10 October 2003 * (http://www.w3.org/TR/2003/WD-rdf-syntax-grammar-20031010/) are supported. - * The parser is based on the PHP version of repat - * (http://phpxmlclasses.sourceforge.net/show_doc.php?class=class_rdf_parser.html) - * by Luis Argerich (lra...@ya...). - * + * The parser is based on the PHP version of repat + * (http://phpxmlclasses.sourceforge.net/show_doc.php?class=class_rdf_parser.html) + * by Luis Argerich (lra...@ya...). + * * @version $Id$ - * @author Luis Argerich <lra...@ya...>, + * @author Luis Argerich <lra...@ya...>, * Chris Bizer <ch...@bi...>, * Radoslaw Oldakowski <ra...@gm...> * Daniel Westphal <ma...@d-...> * @package syntax * @access public * - */ - + */ + class RdfParser extends Object { var $rdf_parser; @@ -35,9 +35,9 @@ /** * converts a string to its unicode NFC form (e.g. \uHHHH or \UHHHHHHHH). -* +* * @param String $str -* @return String +* @return String * @access private * */ @@ -122,8 +122,8 @@ /** - * @access private - */ + * @access private + */ function _new_element() { $e['parent']=Array(); // Parent is a blank Array @@ -142,7 +142,7 @@ $e['statement_id']=''; $e['datatype']=''; $e['element_base_uri'] = ''; - + return $e; } @@ -151,8 +151,8 @@ * @param string $source * @param string &$destination * - * @access private - */ + * @access private + */ function _copy_element($source, &$destination ) { if( $source ) @@ -160,14 +160,14 @@ $destination['parent'] = $source; $destination['state'] = $source['state']; $destination['xml_lang'] = $source['xml_lang']; - $destination['element_base_uri'] = $source['element_base_uri']; + $destination['element_base_uri'] = $source['element_base_uri']; } } /** * @param string &$e - * @access private - */ + * @access private + */ function _clear_element(&$e) { $e['subject']=''; @@ -211,8 +211,8 @@ } /** - * @access private - */ + * @access private + */ function _push_element() { if(!isset($this->rdf_parser['free'])) { @@ -239,8 +239,8 @@ } /** - * @access private - */ + * @access private + */ function _pop_element() { $e = $this->rdf_parser['top']; @@ -251,32 +251,32 @@ /** * @param string $local_name - * @access private - */ + * @access private + */ function _is_rdf_property_attribute_resource($local_name ) { - return ( $local_name == RDF_TYPE ); + return ( $local_name == RDF_TYPE ); } /** * @param string $local_name - * @access private - */ + * @access private + */ function _is_rdf_property_attribute_literal($local_name ) { - return ( $local_name == RDF_VALUE ) + return ( $local_name == RDF_VALUE ) || ( $local_name == RDF_BAG ) || ( $local_name == RDF_SEQ ) || ( $local_name == RDF_ALT ) || ( $local_name == RDF_STATEMENT ) || ( $local_name == RDF_PROPERTY ) - || ( $local_name == RDF_LIST ); + || ( $local_name == RDF_LIST ); } /** * @param string $local_name - * @access private - */ + * @access private + */ function _is_rdf_ordinal( $local_name ) { $ordinal = -1; @@ -291,8 +291,8 @@ /** * @param string $local_name - * @access private - */ + * @access private + */ function _is_rdf_property_attribute( $local_name ) { return $this->_is_rdf_property_attribute_resource( $local_name ) @@ -303,11 +303,11 @@ { return ( $local_name == RDF_RDF ) || ( $local_name == RDF_DESCRIPTION) - || ( $local_name == RDF_ID) + || ( $local_name == RDF_ID) || ( $local_name == RDF_ABOUT ) || ( $local_name == RDF_BAG_ID ) || ( $local_name == RDF_PARSE_TYPE ) - || ( $local_name == RDF_RESOURCE ) + || ( $local_name == RDF_RESOURCE ) || ( $local_name == RDF_NODEID ) || ( $local_name == RDF_LI ) || ( $local_name == RDF_ABOUT_EACH ) @@ -317,8 +317,8 @@ /** * @param string $local_name - * @access private - */ + * @access private + */ function _is_rdf_property_element( $local_name ) { return ( $local_name == RDF_TYPE ) @@ -327,75 +327,75 @@ || ( $local_name == RDF_OBJECT ) || ( $local_name == RDF_VALUE ) || ( $local_name == RDF_LI ) - || ( $local_name == RDF_SEEALSO ) + || ( $local_name == RDF_SEEALSO ) || ( $local_name == RDF_BAG ) || ( $local_name == RDF_SEQ ) || ( $local_name == RDF_ALT ) || ( $local_name == RDF_STATEMENT ) || ( $local_name == RDF_PROPERTY ) || ( $local_name == RDF_LIST ) - || ( $local_name == RDF_FIRST ) + || ( $local_name == RDF_FIRST ) || ( $local_name == RDF_REST ) || ( $local_name{0} == '_' ); } /** * @param string $local_name - * @access private - */ + * @access private + */ function _is_forbidden_rdf_property_element ($local_name) { return ( $local_name == RDF_RDF ) || ( $local_name == RDF_DESCRIPTION) - || ( $local_name == RDF_ID) + || ( $local_name == RDF_ID) || ( $local_name == RDF_ABOUT ) || ( $local_name == RDF_BAG_ID ) || ( $local_name == RDF_PARSE_TYPE ) - || ( $local_name == RDF_RESOURCE ) + || ( $local_name == RDF_RESOURCE ) || ( $local_name == RDF_NODEID ) || ( $local_name == RDF_ABOUT_EACH ) || ( $local_name == RDF_ABOUT_EACH_PREFIX ) || ( $local_name == RDF_DATATYPE ); } - + /** * @param string $local_name - * @access private - */ + * @access private + */ function _is_rdf_node_element( $local_name ) { - return ( $local_name == RDF_DESCRIPTION ) + return ( $local_name == RDF_DESCRIPTION ) || ( $local_name == RDF_STATEMENT ) || ( $local_name == RDF_SUBJECT ) || ( $local_name == RDF_PREDICATE ) - || ( $local_name == RDF_OBJECT ) + || ( $local_name == RDF_OBJECT ) || ( $local_name == RDF_PROPERTY ) || ( $local_name == RDF_TYPE ) || ( $local_name == RDF_VALUE ) || ( $local_name == RDF_BAG ) || ( $local_name == RDF_SEQ ) - || ( $local_name == RDF_ALT ) - || ( $local_name == RDF_SEEALSO ) + || ( $local_name == RDF_ALT ) + || ( $local_name == RDF_SEEALSO ) || ( $local_name == RDF_LIST ) - || ( $local_name == RDF_FIRST ) - || ( $local_name == RDF_REST ) - || ( $local_name == RDF_NIL ) + || ( $local_name == RDF_FIRST ) + || ( $local_name == RDF_REST ) + || ( $local_name == RDF_NIL ) || ( $local_name{0} == '_' ); } /** * @param string $local_name - * @access private - */ + * @access private + */ function _is_forbidden_rdf_node_element ($local_name) { return ( $local_name == RDF_RDF ) - || ( $local_name == RDF_ID) + || ( $local_name == RDF_ID) || ( $local_name == RDF_ABOUT ) || ( $local_name == RDF_BAG_ID ) || ( $local_name == RDF_PARSE_TYPE ) - || ( $local_name == RDF_RESOURCE ) + || ( $local_name == RDF_RESOURCE ) || ( $local_name == RDF_NODEID ) || ( $local_name == RDF_LI ) || ( $local_name == RDF_ABOUT_EACH ) @@ -405,23 +405,23 @@ /** * @param string $val - * @access private - */ + * @access private + */ function _istalnum($val) { return ereg("[A-Za-z0-9]",$val); } /** * @param string $val - * @access private - */ + * @access private + */ function _istalpha($val) { return ereg("[A-Za-z]",$val); } /** * @param string $uri - * @access private - */ + * @access private + */ function _is_absolute_uri($uri ) { $result = false; @@ -464,10 +464,10 @@ * @param string &$path * @param string &$query * @param string &$fragment - * @access private -*/ + * @access private +*/ function _parse_uri($uri,$buffer,&$scheme,&$authority,&$path,&$query,&$fragment ) { - + $parsed=parse_url($uri); if(isset($parsed['scheme'])) { $scheme=$parsed['scheme']; @@ -506,13 +506,13 @@ * @param string $base_uri * @param string $reference_uri * @param string &$buffer - * @access private -*/ + * @access private +*/ function _resolve_uri_reference($base_uri,$reference_uri,&$buffer ) { if ($reference_uri == '') return ($buffer = preg_replace("/\#[^\/\\\]*$/", '', $base_uri)); - + $base_buffer=''; $reference_buffer=''; $path_buffer=''; @@ -526,15 +526,15 @@ $reference_path, $reference_query, $reference_fragment ); - + $this->_parse_uri($base_uri, $base_buffer, $base_scheme, $base_authority, $base_path, $base_query, - $base_fragment ); - + $base_fragment ); + if( $reference_scheme == '' && $reference_authority == '' && $reference_path == '' @@ -542,22 +542,22 @@ { $buffer=$base_uri; - if( $reference_fragment != '' ) + if( $reference_fragment != '' ) { if ($base_path == '' || $base_path == '/' || $base_path == "\\") { - $buffer = $this->rdf_parser['document_base_uri']; + $buffer = $this->rdf_parser['document_base_uri']; } - else + else { $buffer = preg_replace("/\#[^\/\\\]*$/", '', $base_uri); } - + // CB: Changed for base URI $c = substr($buffer, strlen($buffer)-1 ,1); if (!($c=='#' || $c==':' || $c=='/' || $c=="\\")) $buffer.= '#' ; - $buffer.=$reference_fragment; - + $buffer.=$reference_fragment; + } } else if( $reference_scheme != '' ) @@ -565,18 +565,18 @@ $buffer=$reference_uri; } else - { + { $result_scheme = $base_scheme; $result_path = ''; - + if( $reference_authority != '' ) { - $result_authority = $reference_authority; + $result_authority = $reference_authority; } else { $result_authority = $base_authority; - + if ($reference_path != '') { if ($reference_path{0} == '/' || $reference_path{0} == "\\") @@ -584,7 +584,7 @@ if ($reference_path{1} == '/' || $reference_path{1} == "\\") { $result_authority = ''; - $result_path = $reference_path; + $result_path = $reference_path; } else $result_path = $reference_path; @@ -592,30 +592,30 @@ elseif (substr($reference_path, 0, 3) == '../' || substr($reference_path, 0, 3) == '..\\') { - $slash = $reference_path{2}; - while($base_path != '' && ( substr($reference_path, 0, 3) == '../' + $slash = $reference_path{2}; + while($base_path != '' && ( substr($reference_path, 0, 3) == '../' || substr($reference_path, 0, 3) == '..\\')) - { - $base_path = preg_replace("/((\/)|(\\\))[^\/\\\]*$/", '', $base_path); + { + $base_path = preg_replace("/((\/)|(\\\))[^\/\\\]*$/", '', $base_path); if ($base_path != '') { - $base_path = preg_replace("/((\/)|(\\\))[^\/\\\]*$/", '', $base_path); + $base_path = preg_replace("/((\/)|(\\\))[^\/\\\]*$/", '', $base_path); $reference_path = substr($reference_path, 3); } } - + $result_path = $base_path .$slash .$reference_path; } - else - { + else + { if ($base_path) $result_path = preg_replace("/[^\/\\\]*$/", $reference_path, $base_path, 1); - else - $result_path = '/' .$reference_path; - } + else + $result_path = '/' .$reference_path; + } } - + } - + if( $result_scheme != '' ) { $buffer=$result_scheme; @@ -644,26 +644,26 @@ $buffer.='#'; $buffer.=$reference_fragment; } - } + } } /** - * IDs which contain CombiningChars or Extenders + * IDs which contain CombiningChars or Extenders * (see http://www.w3.org/TR/REC-xml-names/#NT-NCName) are assumed to be invalid. - * If you want to use IDs containing these characters you can turn off + * If you want to use IDs containing these characters you can turn off * the validating by setting the constant VALIDATE_IDS to FALSE (see constants.php). * * @param string $id - * @access private -*/ + * @access private +*/ function is_valid_id($id ) { if (!VALIDATE_IDS) return TRUE; - + $result = FALSE; - + if( $id ) { if( $this->_istalpha($id{0}) || $id{0} == '_') @@ -678,23 +678,23 @@ || $id{$i} == '-' || $id{$i} == '_')) { - $result = FALSE; + $result = FALSE; } } } } - + if (!$result) $this->_report_error('illegal ID, nodeID or bagID attribute value'); - else + else return TRUE; } /** * @param string $id * @param string &$buffer - * @access private -*/ + * @access private +*/ function _resolve_id($id,&$buffer ) { $id_buffer=''; @@ -705,7 +705,7 @@ } $this->_resolve_uri_reference( $this->rdf_get_base(), $id_buffer, $buffer ); - + } /** @@ -713,8 +713,8 @@ * @param string &$buffer * @param string &$namespace_uri * @param string &$local_name - * @access private -*/ + * @access private +*/ function _split_name($name, &$buffer, &$namespace_uri, &$local_name ) { static $nul = 0; @@ -745,8 +745,8 @@ } /** * @param string &$buf - * @access private -*/ + * @access private +*/ function _generate_anonymous_uri(&$buf ) { $id=''; @@ -759,7 +759,7 @@ } /** - * @param string $subject_type + * @param string $subject_type * @param string $subject * @param string $predicate * @param string $ordinal @@ -769,8 +769,8 @@ * @param string $bag_id * @param string $statements * @param string $statement_id - * @access private -*/ + * @access private +*/ function _report_statement( $subject_type, $subject, $predicate, $ordinal, $object_type, $object, $xml_lang, $bag_id, $statements, $statement_id, $datatype ) { $statement_id_type = RDF_SUBJECT_TYPE_URI; @@ -778,7 +778,7 @@ $predicate_buffer=''; if (!$xml_lang && $object_type == RDF_OBJECT_TYPE_LITERAL && isset($this->rdf_parser['document_xml_lang'])) $xml_lang = $this->rdf_parser['document_xml_lang']; - + // call add statement $this->add_statement_to_model($this->rdf_parser['user_data'],$subject_type,$subject,$predicate,$ordinal,$object_type,$object,$xml_lang, $datatype ); @@ -837,20 +837,20 @@ '', '', $datatype ); - + if ($subject_type == RDF_SUBJECT_TYPE_BNODE) $obj_type = RDF_OBJECT_TYPE_BNODE; - else - $obj_type = RDF_OBJECT_TYPE_RESOURCE; - - + else + $obj_type = RDF_OBJECT_TYPE_RESOURCE; + + // rdf:subject $this->_report_statement( $statement_id_type, $statement_id, RDF_NAMESPACE_URI.RDF_SUBJECT, - 0, - $obj_type, + 0, + $obj_type, $subject, '', '', @@ -894,8 +894,8 @@ * @param string $xml_lang * @param string $bag_id * @param string $statements - * @access private -*/ + * @access private +*/ function _handle_property_attributes($subject_type, $subject, $attributes, $xml_lang, $bag_id, $statements ) { $i=0; @@ -978,7 +978,7 @@ && ($attribute_local_name != RDF_BAG_ID) && ($attribute_local_name != RDF_RESOURCE) && ($attribute_local_name != RDF_PARSE_TYPE) - && ($attribute_local_name != RDF_PARSE_TYPE_LITERAL) + && ($attribute_local_name != RDF_PARSE_TYPE_LITERAL) && ($attribute_local_name != RDF_PARSE_TYPE_RESOURCE) && ($attribute_local_name != RDF_LI) && ($attribute_local_name != RDF_SUBJECT) @@ -990,7 +990,7 @@ && ($attribute_local_name != RDF_NIL) && ($attribute_local_name != RDF_REST) && ($attribute_local_name != RDF_FIRST) - ) + ) { $this->_report_statement( $subject_type, @@ -1004,14 +1004,14 @@ $statements, '', '' ); - } + } } else if( XML_NAMESPACE_URI == $attribute_namespace_uri ) { if ($attribute_local_name == 'base') { $this->rdf_parser['top']['element_base_uri'] = $attribute_value; - } + } } else if( $attribute_namespace_uri ) { @@ -1037,8 +1037,8 @@ /** * @param string $warning - * @access private -*/ + * @access private +*/ function _report_warning($warning) { $errmsg = RDFAPI_ERROR . '(class: parser): ' . $warning .'.'; @@ -1049,7 +1049,7 @@ function _report_error($error) { $errmsg = RDFAPI_ERROR . '(class: parser): ' . $error .'.'; - trigger_error($errmsg, E_USER_ERROR); + trigger_error($errmsg, E_USER_ERROR); } @@ -1058,8 +1058,8 @@ * @param string $local_name * @param string $attributes * @param string $parent - * @access private -*/ + * @access private +*/ function _handle_resource_element( $namespace_uri, $local_name, $attributes, $parent ) { $subjects_found = 0; @@ -1092,18 +1092,18 @@ $this->rdf_parser['top']['has_property_attributes'] = false; $this->rdf_parser['top']['has_member_attributes'] = false; - + if( $namespace_uri == RDF_NAMESPACE_URI ) { if( ! $this->_is_rdf_node_element( $local_name ) ) - { - $msg = 'unknown or out of context rdf node element: '.$local_name; - + { + $msg = 'unknown or out of context rdf node element: '.$local_name; + if ($this->_is_forbidden_rdf_node_element($local_name)) $this->_report_error($msg); - else - $this->_report_warning($msg); - } + else + $this->_report_warning($msg); + } } // examine each attribute for the standard RDF "keywords" @@ -1127,14 +1127,14 @@ $id = $attribute_value; ++$subjects_found; } else if( $attribute_local_name == RDF_ABOUT ) { - $about = '_'.$attribute_value; + $about = '_'.$attribute_value; ++$subjects_found; } else if( $attribute_local_name == RDF_NODEID) { $node_id = $attribute_value; ++$subjects_found; } else if( $attribute_local_name == RDF_ABOUT_EACH ) { $error = 'aboutEach has been removed from the RDF specifications'; - $this->_report_error($error); + $this->_report_error($error); } else if( $attribute_local_name == RDF_ABOUT_EACH_PREFIX ) { $error = 'aboutEachPrefix has been removed from the RDF specifications'; $this->_report_error($error); @@ -1149,12 +1149,12 @@ $this->rdf_parser['top']['has_member_attributes'] = true; } else { $this->rdf_parser['top']['has_property_attributes'] = true; - $msg = 'unknown or out of context rdf attribute: '.$attribute_local_name; - + $msg = 'unknown or out of context rdf attribute: '.$attribute_local_name; + if ($this->_is_forbidden_rdf_property_attribute($attribute_local_name)) $this->_report_error($msg); - else - $this->_report_warning($msg); + else + $this->_report_warning($msg); } } else if( $attribute_namespace_uri == XML_NAMESPACE_URI ) @@ -1166,7 +1166,7 @@ elseif ($attribute_local_name == 'base') { $this->rdf_parser['top']['element_base_uri'] = $attribute_value; - } + } } else if( $attribute_namespace_uri ) { @@ -1183,7 +1183,7 @@ } else if( $subjects_found > 1 ) { - $this->_report_error('ID, about and nodeID are mutually exclusive'); + $this->_report_error('ID, about and nodeID are mutually exclusive'); } else if( $id ) { @@ -1192,22 +1192,22 @@ $this->rdf_parser['top']['subject']=$id_buffer; } else if( $about ) - { - $this->_resolve_uri_reference( $this->rdf_get_base(), substr($about,1), $id_buffer ); + { + $this->_resolve_uri_reference( $this->rdf_get_base(), substr($about,1), $id_buffer ); $this->rdf_parser['top']['subject_type'] = RDF_SUBJECT_TYPE_URI; $this->rdf_parser['top']['subject']=$id_buffer; - } + } else if( $node_id ) { $this->is_valid_id($node_id); $this->rdf_parser['top']['subject_type'] = RDF_SUBJECT_TYPE_BNODE; $this->rdf_parser['top']['subject']=$node_id; } - + // if the subject is empty, assign it the document uri if( $this->rdf_parser['top']['subject'] == '' ) { - $this->rdf_parser['top']['subject']=$this->rdf_get_base(); + $this->rdf_parser['top']['subject']=$this->rdf_get_base(); } if( $bag_id ) @@ -1233,7 +1233,7 @@ '', $this->rdf_parser['top']['bag_id'], $this->rdf_parser['top']['statements'], - '', + '', $datatype); } @@ -1243,10 +1243,10 @@ if( $parent ) { if ($this->rdf_parser['top']['subject_type'] == RDF_SUBJECT_TYPE_BNODE) - $objtype = RDF_OBJECT_TYPE_BNODE; + $objtype = RDF_OBJECT_TYPE_BNODE; else - $objtype = RDF_OBJECT_TYPE_RESOURCE; - + $objtype = RDF_OBJECT_TYPE_RESOURCE; + $this->_report_statement( $parent['parent']['subject_type'], $parent['parent']['subject'], @@ -1257,7 +1257,7 @@ '', $parent['parent']['bag_id'], $parent['parent']['statements'], - $parent['statement_id'], + $parent['statement_id'], $parent['datatype']); } @@ -1278,8 +1278,8 @@ * @param string &$namespace_uri * @param string &$local_name * @param string &$attributes - * @access private -*/ + * @access private +*/ function _handle_property_element( &$namespace_uri, &$local_name, &$attributes ) { $buffer=''; @@ -1303,7 +1303,7 @@ $bag_id = ''; $parse_type = ''; $node_id = ''; - $datatype = ''; + $datatype = ''; $this->rdf_parser['top']['ordinal'] = 0; @@ -1311,14 +1311,14 @@ { if( ! $this->_is_rdf_property_element( $local_name ) ) { - $msg = 'unknown or out of context rdf property element: '.$local_name; - + $msg = 'unknown or out of context rdf property element: '.$local_name; + if ($this->_is_forbidden_rdf_property_element($local_name)) $this->_report_error($msg); - else + else $this->_report_warning($msg); } - + } $buffer=$namespace_uri; @@ -1332,7 +1332,7 @@ $this->rdf_parser['top']['ordinal']=$this->rdf_parser['top']['ordinal']; $buffer.='_'.$this->rdf_parser['top']['ordinal']; - + } else { @@ -1344,7 +1344,7 @@ $this->rdf_parser['top']['has_property_attributes'] = false; $this->rdf_parser['top']['has_member_attributes'] = false; - + for( $i = 0; isset($attributes[$i]); $i += 2 ) { $this->_split_name( @@ -1362,19 +1362,19 @@ { if( ( $attribute_local_name == RDF_ID ) ) { - $statement_id = $attribute_value; + $statement_id = $attribute_value; } else if( $attribute_local_name == RDF_PARSE_TYPE ) - { + { $parse_type = $attribute_value; } else if( $attribute_local_name == RDF_RESOURCE ) { - $resource = $attribute_value; + $resource = $attribute_value; } else if( $attribute_local_name == RDF_NODEID ) - { - $node_id = $attribute_value; + { + $node_id = $attribute_value; } else if( $attribute_local_name == RDF_BAG_ID ) { @@ -1393,7 +1393,7 @@ { $this->_report_warning('unknown rdf attribute: '.$attribute_local_name ); return; - } + } } else if( $attribute_namespace_uri == XML_NAMESPACE_URI ) { @@ -1404,29 +1404,29 @@ elseif ($attribute_local_name == 'base') { $this->rdf_parser['top']['element_base_uri'] = $attribute_value; - } + } } else if( $attribute_namespace_uri ) { $this->rdf_parser['top']['has_property_attributes'] = true; } - } + } if( $statement_id ) { $this->_resolve_id($statement_id, $buffer ); $this->rdf_parser['top']['statement_id']=$buffer; } - + if ($node_id) { $this->is_valid_id($node_id); - + if ($resource) { $this->_report_error('nodeID and resource are mutually exclusive'); - } - if ($statement_id) + } + if ($statement_id) { // reify statement $this->_report_statement( @@ -1434,17 +1434,17 @@ $this->rdf_parser['top']['parent']['subject'], $this->rdf_parser['top']['predicate'], $this->rdf_parser['top']['ordinal'], - RDF_OBJECT_TYPE_BNODE, - $node_id, + RDF_OBJECT_TYPE_BNODE, + $node_id, '', $this->rdf_parser['top']['parent']['bag_id'], $this->rdf_parser['top']['parent']['statements'], - $this->rdf_parser['top']['statement_id'], - ''); - $statement_id = ''; - } - else - { + $this->rdf_parser['top']['statement_id'], + ''); + $statement_id = ''; + } + else + { $this->_report_statement( $this->rdf_parser['top']['parent']['subject_type'], $this->rdf_parser['top']['parent']['subject'], @@ -1456,12 +1456,12 @@ $this->rdf_parser['top']['parent']['bag_id'], $this->rdf_parser['top']['parent']['statements'], '', - $datatype ); - } - - $this->rdf_parser['top']['state'] = IN_PROPERTY_EMPTY_RESOURCE; + $datatype ); + } + + $this->rdf_parser['top']['state'] = IN_PROPERTY_EMPTY_RESOURCE; } - + if( $parse_type ) { if( $resource ) { @@ -1478,7 +1478,7 @@ $this->_report_error('property elements with rdf:parseType do not allow property attributes'); return; } - + if( $attribute_value == RDF_PARSE_TYPE_RESOURCE ) { $this->_generate_anonymous_uri( $buffer ); @@ -1503,18 +1503,18 @@ $this->rdf_parser['top']['subject']=$buffer; $this->rdf_parser['top']['bag_id']=''; $this->rdf_parser['top']['datatype']= $datatype; - - } + + } elseif ( $attribute_value == RDF_PARSE_TYPE_LITERAL ) { $this->rdf_parser['top']['state'] = IN_PROPERTY_PARSE_TYPE_LITERAL; $this->rdf_parser['top']['datatype']= RDF_NAMESPACE_URI .RDF_XMLLITERAL; - $this->rdf_parser['xml_literal']['buffer'] = ''; - $this->rdf_parser['xml_literal']['depth'] = 0; + $this->rdf_parser['xml_literal']['buffer'] = ''; + $this->rdf_parser['xml_literal']['depth'] = 0; } - elseif ($attribute_value == RDF_PARSE_TYPE_COLLECTION) + elseif ($attribute_value == RDF_PARSE_TYPE_COLLECTION) { - $this->_generate_anonymous_uri( $buffer ); + $this->_generate_anonymous_uri( $buffer ); $this->_report_statement( $this->rdf_parser['top']['parent']['subject_type'], $this->rdf_parser['top']['parent']['subject'], @@ -1527,14 +1527,14 @@ $this->rdf_parser['top']['parent']['statements'], $this->rdf_parser['top']['statement_id'], $datatype ); - + $this->rdf_parser['top']['state'] = IN_PROPERTY_PARSE_TYPE_COLLECTION; $this->rdf_parser['top']['collection']['first_blank_node_id'] = $buffer; - } - + } + else { - + $this->_report_statement( $this->rdf_parser['top']['parent']['subject_type'], $this->rdf_parser['top']['parent']['subject'], @@ -1580,11 +1580,11 @@ $this->rdf_parser['top']['parent']['statements'], $this->rdf_parser['top']['statement_id'], $datatype ); // should we allow IDs? - + if( $bag_id ) { $this->_resolve_id( $bag_id, $buffer ); - $this->rdf_parser['top']['bag_id']=$buffer; + $this->rdf_parser['top']['bag_id']=$buffer; } if( $this->rdf_parser['top']['has_property_attributes'] ) @@ -1595,17 +1595,17 @@ $attributes, $this->rdf_parser['top']['xml_lang'], $this->rdf_parser['top']['bag_id'], - $this->rdf_parser['top']['statements'] ); + $this->rdf_parser['top']['statements'] ); } - } + } } - + /** * @param string &$namespace_uri * @param string &$local_name * @param string &$attributes - * @access private -*/ + * @access private +*/ function _handle_collection_element(&$namespace_uri, &$local_name, &$attributes) { $aux2=Array(); @@ -1615,7 +1615,7 @@ } $attributes=$aux2; /* collection construction site -// old: +// old: if ( ($namespace_uri == RDF_NAMESPACE_URI || $namespace_uri == '') && ($local_name == RDF_DESCRIPTION || $local_name == RDF_LI) ) { @@ -1628,13 +1628,13 @@ $attribute_local_name ); $attribute_value = $attributes[ $i + 1 ]; - + if( $attribute_namespace_uri == '' || $attribute_namespace_uri == RDF_NAMESPACE_URI ) { - if( $attribute_local_name == RDF_ABOUT || - $attribute_local_name == RDF_RESOURCE) + if( $attribute_local_name == RDF_ABOUT || + $attribute_local_name == RDF_RESOURCE) { - $this->rdf_parser['top']['parent']['collection']['object_type'][] = RDF_OBJECT_TYPE_RESOURCE; + $this->rdf_parser['top']['parent']['collection']['object_type'][] = RDF_OBJECT_TYPE_RESOURCE; } elseif ( $attribute_local_name == RDF_NODEID ) { $this->rdf_parser['top']['parent']['collection']['object_type'][] = RDF_OBJECT_TYPE_BNODE; @@ -1655,30 +1655,30 @@ $attribute_local_name ); $attribute_value = $attributes[ $i + 1 ]; - + if( $attribute_namespace_uri == '' || $attribute_namespace_uri == RDF_NAMESPACE_URI ) { $tmp_subject_type = RDF_SUBJECT_TYPE_URI; - if( $attribute_local_name == RDF_ABOUT || - $attribute_local_name == RDF_RESOURCE) + if( $attribute_local_name == RDF_ABOUT || + $attribute_local_name == RDF_RESOURCE) { - $this->rdf_parser['top']['parent']['collection']['object_type'][] = RDF_OBJECT_TYPE_RESOURCE; + $this->rdf_parser['top']['parent']['collection']['object_type'][] = RDF_OBJECT_TYPE_RESOURCE; } elseif ( $attribute_local_name == RDF_NODEID ) { $this->rdf_parser['top']['parent']['collection']['object_type'][] = RDF_OBJECT_TYPE_BNODE; $tmp_subject_type = RDF_SUBJECT_TYPE_BNODE; } $id_buffer = ''; - $this->_resolve_uri_reference( $this->rdf_get_base(), $attribute_value, $id_buffer ); + $this->_resolve_uri_reference( $this->rdf_get_base(), $attribute_value, $id_buffer ); $this->rdf_parser['top']['parent']['collection']['object_label'][] = $id_buffer; - + if (!( ($namespace_uri == RDF_NAMESPACE_URI || $namespace_uri == '') && ($local_name == RDF_DESCRIPTION || $local_name == RDF_LI) )) - { + { $this->_report_statement( $tmp_subject_type, - $id_buffer, - RDF_NAMESPACE_URI.RDF_TYPE, + $id_buffer, + RDF_NAMESPACE_URI.RDF_TYPE, '', RDF_OBJECT_TYPE_RESOURCE, $namespace_uri.$local_name, @@ -1692,15 +1692,15 @@ } -// collection construction site +// collection construction site } /** * @param string &$namespace_uri * @param string &$local_name * @param string &$attributes - * @access private -*/ + * @access private +*/ function _handle_xml_start_element(&$namespace_uri, &$local_name, &$attributes) { $aux2=Array(); @@ -1709,9 +1709,9 @@ $aux2[]=$atvalue; } $attributes=$aux2; - - $element = '<' .$this->_join_name_and_declare_prefix($namespace_uri, $local_name); - + + $element = '<' .$this->_join_name_and_declare_prefix($namespace_uri, $local_name); + for( $i = 0; isset($attributes[$i]); $i += 2 ) { $this->_split_name( @@ -1723,42 +1723,42 @@ $attribute_value = $attributes[ $i + 1 ]; $element .= ' ' .$this->_join_name_and_declare_prefix($attribute_namespace_uri, $attribute_local_name); - $element .= '=\"' .$attribute_value .'\"'; + $element .= '=\"' .$attribute_value .'\"'; } $element .= '>'; - + $this->rdf_parser['xml_literal']['buffer'] .= $element; } /** * @param string $name - * @access private -*/ + * @access private +*/ function _handle_xml_end_element($name) { $buffer=''; $namespace_uri=''; $local_name=''; - + $this->_split_name( $name, $buffer, $namespace_uri, $local_name ); - - $element = '</'; - - if ($namespace_uri && isset($this->rdf_parser['default_namespace']) + + $element = '</'; + + if ($namespace_uri && isset($this->rdf_parser['default_namespace']) &&$namespace_uri != $this->rdf_parser['default_namespace']) { - $element .= $this->rdf_parser['namespaces'][$namespace_uri] .':'; + $element .= $this->rdf_parser['namespaces'][$namespace_uri] .':'; } - + $element .= $local_name .'>'; - - $this->rdf_parser['xml_literal']['buffer'] .= $element; + + $this->rdf_parser['xml_literal']['buffer'] .= $element; $depth = $this->rdf_parser['xml_literal']['depth']--; - + if (isset($this->rdf_parser['xml_literal']['declared_ns'])) foreach ($this->rdf_parser['xml_literal']['declared_ns'] as $prefix => $_depth) { @@ -1770,66 +1770,66 @@ /** * @param string $namespace_uri * @param string $local_name - * @access private -*/ + * @access private +*/ function _join_name_and_declare_prefix($namespace_uri, $local_name) { - + $name = ''; - + if ($namespace_uri) - { + { if (isset($this->rdf_parser['default_namespace']) && $namespace_uri == $this->rdf_parser['default_namespace']) - { + { $name .= $local_name; - + if (!isset($this->rdf_parser['xml_literal']['declared_ns']['_DEFAULT_']) && $namespace_uri != XML_NAMESPACE_URI) { $name .= ' xmlns=' . '\"' .$namespace_uri .'\"'; - - $this->rdf_parser['xml_literal']['declared_ns']['_DEFAULT_'] + + $this->rdf_parser['xml_literal']['declared_ns']['_DEFAULT_'] = $this->rdf_parser['xml_literal']['depth']; } } else { - $ns_prefix = $this->rdf_parser['namespaces'][$namespace_uri]; - $name .= $ns_prefix .':' .$local_name; - + $ns_prefix = $this->rdf_parser['namespaces'][$namespace_uri]; + $name .= $ns_prefix .':' .$local_name; + if (!isset($this->rdf_parser['xml_literal']['declared_ns'][$ns_prefix]) && $namespace_uri != XML_NAMESPACE_URI) { $name .= " xmlns:$ns_prefix=" . '\"' .$namespace_uri .'\"'; - - $this->rdf_parser['xml_literal']['declared_ns'][$ns_prefix] + + $this->rdf_parser['xml_literal']['declared_ns'][$ns_prefix] = $this->rdf_parser['xml_literal']['depth']; } } - + } else $name .= $local_name; - + return $name; - + } /** - * @access private -*/ + * @access private +*/ function _end_collection() { - + if (isset($this->rdf_parser['top']['collection'])) - { - + { + $subject = $this->rdf_parser['top']['collection']['first_blank_node_id']; - - for ($i=0; isset($this->rdf_parser['top']['collection']['object_label'][$i]); $i++) - { - + + for ($i=0; isset($this->rdf_parser['top']['collection']['object_label'][$i]); $i++) + { + $this->_report_statement( - RDF_SUBJECT_TYPE_BNODE, + RDF_SUBJECT_TYPE_BNODE, $subject, RDF_NAMESPACE_URI.RDF_FIRST, '', @@ -1844,17 +1844,17 @@ if (!isset($this->rdf_parser['top']['collection']['object_label'][$i+1])) { $obj_type_2 = RDF_OBJECT_TYPE_RESOURCE; - $object_2 = RDF_NAMESPACE_URI.RDF_NIL; + $object_2 = RDF_NAMESPACE_URI.RDF_NIL; } - else + else { $obj_type_2= RDF_OBJECT_TYPE_BNODE; $this->_generate_anonymous_uri($object_2); - } - - + } + + $this->_report_statement( - RDF_SUBJECT_TYPE_BNODE, + RDF_SUBJECT_TYPE_BNODE, $subject, RDF_NAMESPACE_URI.RDF_REST, '', @@ -1864,10 +1864,10 @@ '', '', '', - ''); + ''); - $subject = $object_2; - } + $subject = $object_2; + } } } @@ -1875,8 +1875,8 @@ * @param string $parser * @param string $name * @param string $attributes - * @access private -*/ + * @access private +*/ function _start_element_handler($parser, $name, $attributes ) { $buffer=''; @@ -1896,31 +1896,31 @@ switch( $this->rdf_parser['top']['state'] ) { case IN_TOP_LEVEL: - // set base_uri, if possible + // set base_uri, if possible foreach ($attributes as $key => $value) { - if($key == XML_NAMESPACE_URI . NAMESPACE_SEPARATOR_CHAR . 'base') { + if($key == XML_NAMESPACE_URI . NAMESPACE_SEPARATOR_CHAR . 'base') { $this->rdf_parser['base_uri'] = $value; - $this->rdf_parser['document_base_uri'] = $value; - + $this->rdf_parser['document_base_uri'] = $value; + $c = substr($value, strlen($value)-1 ,1); if (!($c=='#' || $c==':' || $c=='/' || $c=="\\")) $this->rdf_parser['normalized_base_uri'] = $value . '#'; else - $this->rdf_parser['normalized_base_uri'] = $value; - + $this->rdf_parser['normalized_base_uri'] = $value; + } elseif ($key == XML_NAMESPACE_URI . NAMESPACE_SEPARATOR_CHAR .'lang') $this->rdf_parser['document_xml_lang'] = $value; echo ""; } - - + + if( RDF_NAMESPACE_URI.NAMESPACE_SEPARATOR_STRING.RDF_RDF == $name ) - { + { $this->rdf_parser['top']['state'] = IN_RDF; - break; - } + break; + } case IN_RDF: $this->rdf_parser['top']['state'] = IN_DESCRIPTION; $this->_handle_resource_element( $namespace_uri, $local_name, $attributes, '' ); @@ -1953,7 +1953,7 @@ /* fall through */ case IN_XML: $this->rdf_parser['xml_literal']['depth']++; - $this->_handle_xml_start_element($namespace_uri, $local_name, $attributes); + $this->_handle_xml_start_element($namespace_uri, $local_name, $attributes); break; case IN_PROPERTY_RESOURCE: $this->_report_warning( @@ -1973,8 +1973,8 @@ IN_PROPERTY_LITERAL. as character data is received from expat, it is saved in a buffer and reported when the end tag is received. - * @access private -*/ + * @access private +*/ function _end_literal_property() { if(!isset($this->rdf_parser['top']['statement_id'])) { @@ -2011,7 +2011,7 @@ $this->rdf_parser['top']['xml_lang'], $this->rdf_parser['top']['parent']['bag_id'], $this->rdf_parser['top']['parent']['statements'], - $this->rdf_parser['top']['statement_id'], + $this->rdf_parser['top']['statement_id'], $this->rdf_parser['top']['datatype']); } @@ -2019,18 +2019,18 @@ /** * @param string $parser * @param string $name - * @access private -*/ + * @access private +*/ function _end_element_handler( $parser, $name ) { switch( $this->rdf_parser['top']['state'] ) { case IN_TOP_LEVEL: - break; + break; case IN_XML: - $this->_handle_xml_end_element($name); + $this->_handle_xml_end_element($name); break; - case IN_PROPERTY_UNKNOWN_OBJECT: + case IN_PROPERTY_UNKNOWN_OBJECT: case IN_PROPERTY_LITERAL: $this->_end_literal_property( ); break; @@ -2040,17 +2040,17 @@ case IN_PROPERTY_PARSE_TYPE_LITERAL: // $search = array((0) => chr(10), (1) => chr(13), (2) => chr(9)); // $replace = array((0) => '\n' , (1) => '\r' , (2) => '\t'); -// $this->rdf_parser["xml_literal"]["buffer"] +// $this->rdf_parser["xml_literal"]["buffer"] // = str_replace($search, $replace, $this->rdf_parser["xml_literal"]["buffer"]); $this->rdf_parser['top']['data'] = $this->rdf_parser['xml_literal']['buffer']; - $this->_end_literal_property(); - $this->rdf_parser['xml_literal']['buffer'] = ''; - + $this->_end_literal_property(); + $this->rdf_parser['xml_literal']['buffer'] = ''; + break; case IN_PROPERTY_PARSE_TYPE_COLLECTION: $this->_end_collection(); - break; + break; case IN_RDF: case IN_DESCRIPTION: case IN_PROPERTY_RESOURCE: @@ -2065,14 +2065,14 @@ /** * @param string $parser * @param string $s - * @access private -*/ + * @access private +*/ function _character_data_handler( $parser,$s) { $len=strlen($s); switch( $this->rdf_parser['top']['state'] ) { - case IN_PROPERTY_LITERAL: + case IN_PROPERTY_LITERAL: case IN_PROPERTY_UNKNOWN_OBJECT: if( isset($this->rdf_parser['top']['data']) ) { @@ -2088,7 +2088,7 @@ if( $this->rdf_parser['top']['state'] == IN_PROPERTY_UNKNOWN_OBJECT ) { /* look for non-whitespace */ - for( $i = 0; (( $i < $len ) && ( ereg(" |\n|\t",$s{ $i }) )); $i++ ); + for( $i = 0; (( $i < $len ) && ( ereg(" |\n|\t",$s{ $i }) )); $i++ ); /* if we found non-whitespace, this is a literal */ if( $i < $len ) { @@ -2097,12 +2097,12 @@ } break; - case IN_TOP_LEVEL: + case IN_TOP_LEVEL: break; - case IN_PROPERTY_PARSE_TYPE_LITERAL: - case IN_XML: + case IN_PROPERTY_PARSE_TYPE_LITERAL: + case IN_XML: $this->rdf_parser['xml_literal']['buffer'] .= $s; - break; + break; case IN_RDF: case IN_DESCRIPTION: case IN_PROPERTY_RESOURCE: @@ -2118,7 +2118,7 @@ * Adds a new statement to the model * This method is called by generateModel(). * - * @access private + * @access private * @param string &$user_data * @param string $subject_type * @param string $subject @@ -2128,7 +2128,7 @@ * @param string $object * @param string $xml_lang ) * @return object MemModel - */ + */ function add_statement_to_model( &$user_data, $subject_type, @@ -2147,40 +2147,40 @@ $predicate=$this->str2unicode_nfc($predicate); $object=$this->str2unicode_nfc($object); } - + //create subject - if ($subject_type == RDF_SUBJECT_TYPE_BNODE) + if ($subject_type == RDF_SUBJECT_TYPE_BNODE) $objsub = new BlankNode($subject); else $objsub = new Resource($subject); - - // create predicate + + // create predicate $objpred = new Resource($predicate); - + // create object if (($object_type == RDF_OBJECT_TYPE_RESOURCE) || ($object_type == RDF_OBJECT_TYPE_BNODE)) { - if ($object_type == RDF_OBJECT_TYPE_BNODE) + if ($object_type == RDF_OBJECT_TYPE_BNODE) $objobj = new BlankNode($object); else - $objobj = new Resource($object); + $objobj = new Resource($object); } else { - + $objobj = new Literal($object); if ($datatype != '') { $objobj->setDatatype($datatype); - } + } elseif ($xml_lang !='') { $objobj->setLanguage($xml_lang); - } + } } // create statement $statement = new Statement($objsub, $objpred, $objobj); - + // add statement to model if(CREATE_MODEL_WITHOUT_DUPLICATES == TRUE){ $this->model->addWithoutDuplicates($statement); - }else + }else $this->model->add($statement); } @@ -2189,25 +2189,25 @@ /** * Generates a new MemModel from a URI, a file or from memory. - * If you want to parse an RDF document, pass the URI or location in the filesystem + * If you want to parse an RDF document, pass the URI or location in the filesystem * of the RDF document. You can also pass RDF code direct to the function. If you pass - * RDF code directly to the parser and there is no xml:base included, you should set - * the base URI manually using the optional second parameter $rdfBaseURI. + * RDF code directly to the parser and there is no xml:base included, you should set + * the base URI manually using the optional second parameter $rdfBaseURI. * Make sure that here are proper namespace declarations in your input document. * - * @access public + * @access public * @param string $base - * @param boolean $rdfBaseURI + * @param boolean $rdfBaseURI * @return object MemModel - */ + */ function & generateModel($base,$rdfBaseURI = false, $model = false) { // Check if $base is a URI or filename or a string containing RDF code. if (substr(ltrim($base),0 ,1) != '<') { - + // $base is URL or filename $this->model = $model?$model:new MemModel($base); - +echo $base; $input = fopen($base,'r') or die("RDF Parser: Could not open File: $base. Stopped parsing."); $this->rdf_parser_create( NULL ); $this->rdf_set_base($base); @@ -2216,7 +2216,7 @@ { $buf = fread( $input, 512 ); $done = feof($input); - + if ( ! $this->rdf_parse( $buf, feof($input) ) ) { $err_code = xml_get_error_code( $this->rdf_get_xml_parser()); @@ -2224,16 +2224,16 @@ $errmsg = RDFAPI_ERROR . '(class: parser; method: generateModel): XML-parser-error ' . $err_code .' in Line ' . $line .' of input document.'; trigger_error($errmsg, E_USER_ERROR); } - } + } /* close file. */ fclose( $input ); - + } else { // $base is RDF string $this->model = $model?$model:new MemModel($base); - + $this->rdf_parser_create( NULL ); - + if ($rdfBaseURI!==false) { $this->rdf_set_base($rdfBaseURI); @@ -2241,13 +2241,13 @@ { $this->rdf_set_base( NULL ); } - + if ( ! $this->rdf_parse( $base, TRUE ) ) { $err_code = xml_get_error_code( $this->rdf_get_xml_parser()); $line = xml_get_current_line_number($this->rdf_get_xml_parser() ); $errmsg = RDFAPI_ERROR . '(class: parser; method: generateModel): XML-parser-error ' . $err_code .' in Line ' . $line .' of input document.'; - trigger_error($errmsg, E_USER_ERROR); + trigger_error($errmsg, E_USER_ERROR); } } // base_uri could have changed while parsing @@ -2256,24 +2256,24 @@ if(isset($this->rdf_parser['namespaces'])){ $this->model->addParsedNamespaces($this->rdf_parser['namespaces']); } - + $this->rdf_parser_free(); - - return $this->model; + return $this->model; + } /** * @param string $encoding - * @access private -*/ + * @access private +*/ function rdf_parser_create( $encoding ) { $parser = xml_parser_create_ns( $encoding, NAMESPACE_SEPARATOR_CHAR ); - xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0); + xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0); $this->rdf_parser['xml_parser'] = $parser; xml_set_object($this->rdf_parser['xml_parser'], $this); @@ -2288,26 +2288,26 @@ * @param resource &$parser * @param string $ns_prefix * @param string $ns_uri - * @access private -*/ + * @access private +*/ function _start_ns_declaration_handler(&$parser, $ns_prefix, $ns_uri) { - if (!$ns_prefix) + if (!$ns_prefix) $this->rdf_parser['default_namespace'] = $ns_uri; - else + else $this->rdf_parser['namespaces'][$ns_uri] = $ns_prefix; } /** - * @access private -*/ + * @access private +*/ function rdf_parser_free( ) { $z=3; $this->rdf_parser['base_uri']=''; - $this->rdf_parser['document_base_uri'] = ''; + $this->rdf_parser['document_base_uri'] = ''; unset( $this->rdf_parser ); } @@ -2315,16 +2315,16 @@ /** * @param string $s * @param string $is_final - * @access private -*/ + * @access private +*/ function rdf_parse( $s, $is_final ) { return XML_Parse( $this->rdf_parser['xml_parser'], $s, $is_final ); } /** - * @access private -*/ + * @access private +*/ function rdf_get_xml_parser() { return ( $this->rdf_parser['xml_parser']); @@ -2332,31 +2332,31 @@ /** * @param string $base - * @access private -*/ + * @access private +*/ function rdf_set_base($base ) { - + $this->rdf_parser['base_uri']=$base; - + $c = substr($base, strlen($base)-1 ,1); if (!($c=='#' || $c==':' || $c=='/' || $c=="\\")) $this->rdf_parser['normalized_base_uri'] = $base . '#'; else - $this->rdf_parser['normalized_base_uri'] = $base; + $this->rdf_parser['normalized_base_uri'] = $base; return 0; } /** - * @access private -*/ + * @access private +*/ function rdf_get_base() { if ($this->rdf_parser['top']['element_base_uri']) return $this->rdf_parser['top']['element_base_uri']; - else - return $this->rdf_parser['base_uri']; + else + return $this->rdf_parser['base_uri']; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cw...@us...> - 2007-08-12 17:42:08
|
Revision: 491 http://rdfapi-php.svn.sourceforge.net/rdfapi-php/?rev=491&view=rev Author: cweiske Date: 2007-08-12 10:42:05 -0700 (Sun, 12 Aug 2007) Log Message: ----------- Make it throw an exception instead of die()ing hard Modified Paths: -------------- trunk/rdfapi-php/api/syntax/N3Parser.php Modified: trunk/rdfapi-php/api/syntax/N3Parser.php =================================================================== --- trunk/rdfapi-php/api/syntax/N3Parser.php 2007-08-12 15:26:47 UTC (rev 490) +++ trunk/rdfapi-php/api/syntax/N3Parser.php 2007-08-12 17:42:05 UTC (rev 491) @@ -42,8 +42,11 @@ * * * - * @author Sean B. Palmer <se...@my...>, Gunnar AA. Grimnes <ggr...@cs...>, Daniel Westphal <ma...@d-...> + * @author Sean B. Palmer <se...@my...> + * @author Gunnar AA. Grimnes <ggr...@cs...> + * @author Daniel Westphal <ma...@d-...> * @version $Id$ + * @license GPL http://www.gnu.org/licenses/gpl.txt * @package syntax * @access public **/ @@ -68,37 +71,37 @@ **/ function N3Parser() { //Regular expressions: - $Name = '[A-Za-z0-9_@\.]+[^\.,;\[\]\s\) ]*'; - $URI = '<[^> ]*>'; - $bNode = '_:'.$Name; - $Univar = '\?'.$Name; - $QName = '(?:[A-Za-z][A-Za-z0-9_@\.]*)?:'.$Name; - $Literal = '"(\\\"|[^"])*"'; # '"(?:\\"|[^"])*"' -// $Literal = '"[^"\\\\]*(?:\\.\\[^"\\]*)*"'; # '"(?:\\"|[^"])*"' - $LangTag = '@[A-Za-z\-]*[^ \^\.\;\,]'; + $Name = '[A-Za-z0-9_@\.]+[^\.,;\[\]\s\) ]*'; + $URI = '<[^> ]*>'; + $bNode = '_:'.$Name; + $Univar = '\?'.$Name; + $QName = '(?:[A-Za-z][A-Za-z0-9_@\.]*)?:'.$Name; + $Literal = '"(\\\"|[^"])*"'; # '"(?:\\"|[^"])*"' +// $Literal = '"[^"\\\\]*(?:\\.\\[^"\\]*)*"'; # '"(?:\\"|[^"])*"' + $LangTag = '@[A-Za-z\-]*[^ \^\.\;\,]'; $Datatype = '(\^\^)[^ ,\.;)]+'; $Datatype_URI = '(\^\^)'.$URI; // $LLiteral = '"""[^"\\\\]*(?:(?:.|"(?!""))[^"\\\\]*)*"""'; $LLiteral = '"""[^"\\\\]*(?:(?:\\\\.|"(?!""))[^"\\\\]*)*"""'; // '"""[^"\\]*(?:(?:\\.|"(?!""))[^"\\]*)*"""' - $Comment = '#.*$'; - $Prefix = '(?:[A-Za-z][A-Za-z0-9_]*)?:'; + $Comment = '#.*$'; + $Prefix = '(?:[A-Za-z][A-Za-z0-9_]*)?:'; $PrefixDecl = '@prefix'; - $WS = '[ \t]'; - $this->RDF_NS = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'; # for 'a' keyword + $WS = '[ \t]'; + $this->RDF_NS = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'; # for 'a' keyword $this->DAML_NS = 'http://www.daml.org/2001/03/daml+oil#'; # for '=' keyword - $this->OWL_NS = 'http://www.w3.org/2002/07/owl#'; + $this->OWL_NS = 'http://www.w3.org/2002/07/owl#'; // $t = array( $LLiteral, $URI); //, $Literal, $PrefixDecl, $QName, $bNode, $Prefix, // $Univar, 'a', '{', '}', '\(', '\)', '\[', '\]', ',', ';', '\.', $WS, $Comment); $t = array( $Datatype_URI,$Datatype,$LLiteral, $URI, $Literal, $PrefixDecl, $QName, $bNode, $Prefix, $Univar, 'a','=', '{', '}', '\(', '\)', '\[', '\]', ',', ';', '\.', $WS, $Comment,$LangTag); - $this->Tokens="/(".join($t,"|").")/m"; + $this->Tokens = "/(".join($t,"|").")/m"; - $this->bNode=0; - $this->debug=0; - $this->bNodeMap = array(); - $this->FixBnodes = FIX_BLANKNODES; - $this->parseError=false; + $this->bNode = 0; + $this->debug = 0; + $this->bNodeMap = array(); + $this->FixBnodes = FIX_BLANKNODES; + $this->parseError =false; } @@ -142,7 +145,7 @@ /** - * This parses a N3 string and calls func($subject, $predicate, $object) with each trioke + * This parses a N3 string and calls func($subject, $predicate, $object) with each triple * @param string $s * @param string $func * @access public @@ -722,7 +725,9 @@ if (count($list) == 3) return array($list); - if (count($list) < 3) die("Error: statement too short!"); + if (count($list) < 3) { + throw new Exception('N3 statement too short.'); + } //Get all ; $r=$this->getPovs($list); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cw...@us...> - 2007-08-12 15:26:50
|
Revision: 490 http://rdfapi-php.svn.sourceforge.net/rdfapi-php/?rev=490&view=rev Author: cweiske Date: 2007-08-12 08:26:47 -0700 (Sun, 12 Aug 2007) Log Message: ----------- Unit test support for DAWG syntax tests Modified Paths: -------------- trunk/rdfapi-php/test/unit/Sparql/Dawg2Helper.php trunk/rdfapi-php/test/unit/Sparql/SparqlDbTests_test.php trunk/rdfapi-php/test/unit/Sparql/SparqlTestHelper.php trunk/rdfapi-php/test/unit/Sparql/cases.php trunk/rdfapi-php/test/unit/Sparql/create-dawg2.php Modified: trunk/rdfapi-php/test/unit/Sparql/Dawg2Helper.php =================================================================== --- trunk/rdfapi-php/test/unit/Sparql/Dawg2Helper.php 2007-08-12 14:57:56 UTC (rev 489) +++ trunk/rdfapi-php/test/unit/Sparql/Dawg2Helper.php 2007-08-12 15:26:47 UTC (rev 490) @@ -17,8 +17,8 @@ { $suiteDir = dirname(__FILE__) . '/w3c-dawg2/data-r2/'; $suites = array( -// 'manifest-evaluation.ttl', -// 'extended-manifest-evaluation.ttl', + 'manifest-evaluation.ttl', + 'extended-manifest-evaluation.ttl', 'manifest-syntax.ttl' ); @@ -42,7 +42,6 @@ //activate it in cases.php $_SESSION['sparql_dawg2_tests'] = $arTests; - $_SESSION['sparqlTestGroups'] = array();//remove other cases $_SESSION['sparqlTestGroups']['dawg2'] = array(//'deact'=>1, 'title' => 'DAWG2 tests', 'tests' => 'sparql_dawg2_tests', @@ -103,8 +102,7 @@ throw new Exception('Collection file does not exist: ' . $strCollectionFile); } - //$arTests = self::loadEvaluationTests($strCollectionFile); - $arTests = array(); + $arTests = self::loadEvaluationTests($strCollectionFile); $arTests = array_merge($arTests, self::loadSyntaxTests($strCollectionFile)); return $arTests; }//public static function loadCollectionFromManifest($strCollectionFile) Modified: trunk/rdfapi-php/test/unit/Sparql/SparqlDbTests_test.php =================================================================== --- trunk/rdfapi-php/test/unit/Sparql/SparqlDbTests_test.php 2007-08-12 14:57:56 UTC (rev 489) +++ trunk/rdfapi-php/test/unit/Sparql/SparqlDbTests_test.php 2007-08-12 15:26:47 UTC (rev 490) @@ -13,6 +13,9 @@ require_once 'Console/Color.php'; } +//SparqlTestHelper::loadDawg2Tests(); + + class testSparqlDbTests extends UnitTestCase { protected static $strModelUri = 'unittest-model'; @@ -30,44 +33,84 @@ if (isset($arGroup['deact'])) continue; $checkfunc = $arGroup['checkfunc']; //echo count($_SESSION[$arGroup['tests']]) . " tests\n"; + foreach ($_SESSION[$arGroup['tests']] as $name) { + $fileData = null; + $fileResult = null; + $fileQuery = null; + if (is_array($name)) { - $fileData = $name['data']; - $fileQuery = $name['query'] . '.rq'; - $fileResult = $name['result'] . '.res'; - $title = $name['query']; + if (isset($name['data'])) { + if (!file_exists(SPARQL_TESTFILES . $name['data'])) { + $fileData = 'data/' . $name['data']; + } else { + $fileData = $name['data']; + } + } + + if (!file_exists(SPARQL_TESTFILES . $name['query'])) { + $fileQuery = 'query/' . $name['query'] . '.rq'; + } else { + $fileQuery = $name['query']; + } + + if (isset($name['result'])) { + if (!file_exists(SPARQL_TESTFILES . $name['result'])) { + $fileResult = 'result/' . $name['result'] . '.res'; + } else { + $fileResult = $name['result']; + } + } + + if (isset($name['title'])) { + $title = $name['title']; + } else { + $title = $name['query']; + } } else { - $fileData = $name . '.n3'; - $fileQuery = $name . '.rq'; - $fileResult = $name . '.res'; + $fileData = 'data/' . $name . '.n3'; + $fileQuery = 'query/' . $name . '.rq'; + $fileResult = 'result/' . $name . '.res'; $title = $name; } if (in_array($title, $_SESSION['testSparqlDbTestsIgnores'])) { -// echo Console_Color::convert('%y'); -// echo ' ignoring ' . $title . "\n"; -// echo Console_Color::convert('%n'); + if (isset($GLOBALS['debugTests'])) { + echo Console_Color::convert('%y'); + echo ' ignoring ' . $title . "\n"; + echo Console_Color::convert('%n'); + } continue; } //echo ' ' . $title . "\n"; $_SESSION['test'] = $title . ' test'; $e = null; - if ($fileData != $strLastDataFile) { + if ($fileData != null && $fileData != $strLastDataFile) { //re-use database if not changed list($database, $dbModel) = $this->prepareDatabase(); //import statements into database - $dbModel ->load(SPARQL_TESTFILES . 'data/' . $fileData); + $dbModel ->load(SPARQL_TESTFILES . $fileData); $strLastDataFile = $fileData; } - $qs = file_get_contents(SPARQL_TESTFILES . 'query/' . $fileQuery, 'r'); - $res = file_get_contents(SPARQL_TESTFILES . 'result/' . $fileResult, 'r'); - unset($result); - eval($res); - $q = $parser->parse($qs); + $qs = file_get_contents(SPARQL_TESTFILES . $fileQuery); + if ($fileResult !== null) { + $res = file_get_contents(SPARQL_TESTFILES . $fileResult); + unset($result); + eval($res); + } + + if (isset($name['type']) && + ($name['type'] == 'syntax-negative' || $name['type'] == 'syntax-positive') + ) { + $this->testQueryParse($qs, $parser, $name['type'], $title); + continue; + } + + $q = $parser->parse($qs); try { - $t = $dbModel->sparqlQuery($qs); + $t = $dbModel->sparqlQuery($qs); if ($t instanceof MemModel) { $bOk = $t->equals($result); @@ -110,11 +153,48 @@ } // echo $arGroup['title'] . " done\n"; } - } + }//public function testAllTestgroupsNoReload() /** + * Runs a parser test + */ + protected function testQueryParse($strQuery, $parser, $strType, $title) + { +//echo $title . "\n"; + $bException = false; + try { + $parser->parse($strQuery); + } catch (Exception $e) { + $bException = true; + } + + if ($strType == 'syntax-negative') { + $this->assertTrue($bException, 'Query should fail to be parsed.'); + $bOk = $bException == true; + } else if ($strType == 'syntax-positive') { + $this->assertFalse($bException, 'Query should get parsed.'); + $bOk = $bException == false; + } + + if (!$bOk) { + if (!isset($GLOBALS['debugTests'])) { + echo ' ' . $title . "\n"; + } else { + echo Console_Color::convert('%RTest failed: ' . $title . "%n\n"); + if (isset($e)) { + echo $e->getMessage() . "\n"; + //var_dump($e); + } + echo $strQuery . "\n"; + } + } + }//protected function testQueryParse($strQuery, $parser, $strType) + + + + /** * Instantiates the database object and clears * any existing statements to have a fresh place * for a unit test. Modified: trunk/rdfapi-php/test/unit/Sparql/SparqlTestHelper.php =================================================================== --- trunk/rdfapi-php/test/unit/Sparql/SparqlTestHelper.php 2007-08-12 14:57:56 UTC (rev 489) +++ trunk/rdfapi-php/test/unit/Sparql/SparqlTestHelper.php 2007-08-12 15:26:47 UTC (rev 490) @@ -1,4 +1,5 @@ <?php + /** * Class with Sparql-Unittest helper methods */ Modified: trunk/rdfapi-php/test/unit/Sparql/cases.php =================================================================== --- trunk/rdfapi-php/test/unit/Sparql/cases.php 2007-08-12 14:57:56 UTC (rev 489) +++ trunk/rdfapi-php/test/unit/Sparql/cases.php 2007-08-12 15:26:47 UTC (rev 490) @@ -42,6 +42,11 @@ 'tests' => 'sparql_ask_tests', 'checkfunc' => 'resultCheck' ), + 'dawg2' => array(//'deact'=>1, + 'title' => 'DAWG2 tests', + 'tests' => 'sparql_dawg2_tests', + 'checkfunc' => 'resultCheck' + ), ); $_SESSION['testSparqlDbTestsIgnores'] = array( @@ -53,6 +58,10 @@ 'ex11.2.3.2_0', //test is broken IMO (cweiske) 'query-survey-1', + + //fatal error + 'syntax-form-describe01.rq', + 'syntax-form-describe02.rq', ); @@ -677,5 +686,5 @@ ); - +require_once dirname(__FILE__) . '/cases_dawg2.php'; ?> \ No newline at end of file Modified: trunk/rdfapi-php/test/unit/Sparql/create-dawg2.php =================================================================== --- trunk/rdfapi-php/test/unit/Sparql/create-dawg2.php 2007-08-12 14:57:56 UTC (rev 489) +++ trunk/rdfapi-php/test/unit/Sparql/create-dawg2.php 2007-08-12 15:26:47 UTC (rev 490) @@ -15,7 +15,7 @@ echo "<?php /** -* automatically created by create-dawg2.php +* automatically created by create-dawg2.php on " . date('Y-m-d H:i') . " */ \$_SESSION['sparql_dawg2_tests'] = "; var_export($_SESSION['sparql_dawg2_tests']); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cw...@us...> - 2007-08-12 14:57:59
|
Revision: 489 http://rdfapi-php.svn.sourceforge.net/rdfapi-php/?rev=489&view=rev Author: cweiske Date: 2007-08-12 07:57:56 -0700 (Sun, 12 Aug 2007) Log Message: ----------- Adding w3c dawg test data and case listing Added Paths: ----------- trunk/rdfapi-php/test/unit/Sparql/cases_dawg2.php trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/ trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/ trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/ trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/data-1.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/data-2.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-nested-1.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-nested-1.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-nested-2.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-nested-2.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-placement-1.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-placement-1.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-placement-2.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-placement-2.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-placement-3.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-placement-3.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-scope-1.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/filter-scope-1.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/manifest.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-1.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-1.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-1.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-2.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-2.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-2.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-3.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-3.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/opt-filter-3.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/two-nested-opt-alt.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/two-nested-opt-alt.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/two-nested-opt.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/two-nested-opt.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/two-nested-opt.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/var-scope-join-1.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/var-scope-join-1.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra/var-scope-join-1.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/algebra-expressions.txt trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/ask/ trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/ask/ask-1.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/ask/ask-1.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/ask/ask-4.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/ask/ask-4.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/ask/ask-7.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/ask/ask-7.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/ask/ask-8.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/ask/ask-8.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/ask/data.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/ask/manifest.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/ trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-1.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-1.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-2.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-2.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-3.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-3.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-4.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-4.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-5.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/base-prefix-5.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/bgp-no-match.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/bgp-no-match.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/data-1.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/data-2.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/data-3.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/data-4.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/data-5.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/data-6.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/data-7.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/list-1.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/list-1.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/list-2.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/list-2.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/list-3.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/list-3.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/list-4.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/list-4.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/manifest.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/prefix-name-1.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/prefix-name-1.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/quotes-1.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/quotes-1.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/quotes-2.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/quotes-2.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/quotes-3.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/quotes-3.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/quotes-4.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/quotes-4.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/spoo-1.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/spoo-1.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-1.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-1.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-2.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-2.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-3.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-3.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-4.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-4.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-5.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-5.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-6.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-6.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-7.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-7.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-8.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-8.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-9.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/term-9.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/var-1.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/var-1.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/var-2.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/basic/var-2.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/ trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/data.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/manifest.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/query.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/bnode-coreference/result.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/ trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/data-1.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/data-2.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/manifest.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/query-bev-1.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/query-bev-2.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/query-bev-3.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/query-bev-4.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/query-bev-5.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/query-bev-6.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/result-bev-1.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/result-bev-2.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/result-bev-3.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/result-bev-4.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/result-bev-5.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/boolean-effective-value/result-bev-6.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/bound/ trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/bound/bound1-result.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/bound/bound1.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/bound/data.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/bound/manifest.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/construct/ trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/construct/data-ident.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/construct/data-opt.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/construct/data-reif.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/construct/manifest.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/construct/query-construct-optional.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/construct/query-ident.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/construct/query-reif-1.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/construct/query-reif-2.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/construct/query-subgraph.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/construct/result-construct-optional.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/construct/result-ident.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/construct/result-reif.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/construct/result-subgraph.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/ trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/data-g1.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/data-g2.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/data-g3.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/data-g4.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-01.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-01.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-02.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-02.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-03.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-03.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-04.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-04.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-05.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-05.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-06.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-06.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-07.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-07.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-08.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-08.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-09.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-09.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-10.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-10.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-11.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-11.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-12.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/dataset-12.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/dataset/manifest.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/ trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/data-all.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/data-node.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/data-num.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/data-opt.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/data-star.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/data-str.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-1-results.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-1.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-2.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-all.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-node.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-num.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-opt.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-star-1.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-star-1.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/distinct-str.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/manifest.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/no-distinct-1.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/no-distinct-2.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/no-distinct-all.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/no-distinct-node.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/no-distinct-num.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/no-distinct-opt.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/distinct/no-distinct-str.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/ trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/data-builtin-1.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/data-builtin-2.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/data-langMatches-de.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/data-langMatches.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/lang-case-insensitive-eq.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/lang-case-insensitive-ne.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/lang-case-sensitivity-eq.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/lang-case-sensitivity-ne.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/lang-case-sensitivity.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/manifest.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-blank-1.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-datatype-1.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-datatype-2.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-datatype-3.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-iri-1.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-isliteral-1.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-lang-1.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-lang-2.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-lang-3.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-langMatches-1.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-langMatches-2.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-langMatches-3.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-langMatches-4.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-langMatches-de-DE.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-langMatches-de-de.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-str-1.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-str-2.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-str-3.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-str-4.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/q-uri-1.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-blank-1.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-datatype-1.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-datatype-2.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-datatype-3.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-iri-1.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-isliteral-1.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-lang-1.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-lang-2.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-lang-3.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-langMatches-1.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-langMatches-2.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-langMatches-3.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-langMatches-4.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-langMatches-de.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-str-1.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-str-2.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-str-3.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-str-4.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-builtin/result-uri-1.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/ trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/data-eq.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/manifest.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-1.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-2.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-3.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-4.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-5.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-graph-1.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-graph-2.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-graph-3.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-graph-4.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq-graph-5.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq2-1.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq2-2.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/query-eq2-graph-1.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-1.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-2.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-3.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-4.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-5.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-graph-1.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-graph-2.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-graph-3.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-graph-4.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq-graph-5.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq2-1.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq2-2.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-equals/result-eq2-graph-1.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/ trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/data.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/manifest.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/query-ge-1.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/query-le-1.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/query-minus-1.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/query-mul-1.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/query-plus-1.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/query-unminus-1.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/query-unplus-1.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/result-ge-1.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/result-le-1.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/result-minus-1.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/result-mul-1.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/result-plus-1.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/result-unminus-1.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/expr-ops/result-unplus-1.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/extended-manifest-evaluation.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/ trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/data-g1.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/data-g2.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/data-g3.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/data-g4.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-01.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-01.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-02.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-02.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-03.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-03.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-04.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-04.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-05.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-05.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-06.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-06.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-07.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-07.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-08.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-08.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-09.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-09.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-10.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-10.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-11.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/graph-11.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/graph/manifest.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/i18n/ trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/i18n/kanji-01-results.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/i18n/kanji-01.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/i18n/kanji-02-results.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/i18n/kanji-02.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/i18n/kanji.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/i18n/manifest.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-01-results.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-01.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-01.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-02-results.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-02.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-02.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-03-results.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-03.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/i18n/normalization-03.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/manifest-evaluation.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/manifest-syntax.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/ trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/data-1.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/data-2.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/data-3.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/data-4.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/date-1-result.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/date-1.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/date-2-result.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/date-2.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/date-3-result.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/date-3.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/date-4-result.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/date-4.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/manifest.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-cmp-01-result.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-cmp-01.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-cmp-02-result.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-cmp-02.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-01-result.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-01.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-02-result.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-02.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-03-result.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-03.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-04-result.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-04.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-05-result.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-05.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-06-result.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-06.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-07-result.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-07.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-08-result.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-08.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-09-result.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-09.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-10-result.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-10.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-11-result.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-11.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-12-result.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/open-eq-12.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm-StringSimpleLiteralCmp.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm-eq-StringSimpleLiteralCmp.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm-eq.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm-eq.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm-manifest.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm-not-eq-StringSimpleLiteralCmp.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm-not-eq.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm-not-eq.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm.srx trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/open-world/sameTerm.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional/ trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional/data.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional/manifest.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional/q-opt-1.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional/q-opt-2.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional/q-opt-3.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional/result-opt-1.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional/result-opt-2.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional/result-opt-3.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/ trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/data-1.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/expr-1-result.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/expr-1.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/expr-2-result.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/expr-2.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/expr-3-result.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/expr-3.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/optional-filter/manifest.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/regex/ trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/regex/manifest.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-data-01.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-query-001.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-query-002.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-query-003.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-query-004.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-result-001.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-result-002.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-result-003.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/regex/regex-result-004.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/ trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/data.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/manifest.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-01.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-02.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-03.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-04.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-10.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-11.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-12.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-13.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-20.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-21.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-22.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-23.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-24.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-01.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-02.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-03.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-04.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-10.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-11.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-12.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-13.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-20.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-21.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-22.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-23.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/solution-seq/slice-results-24.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/ trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-1.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-11.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-3.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-4.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-6.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-7.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-8.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/data-sort-9.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/extended-manifest.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/manifest.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-1.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-10.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-2.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-3.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-4.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-5.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-6.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/query-sort-9.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-1.rdf trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-10.rdf trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-11.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-2.rdf trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-3.rdf trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-4.rdf trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-5.rdf trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-6.rdf trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-7.rdf trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-8.rdf trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/sort/result-sort-9.rdf trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax/ trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/ trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/manifest.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-basic-01.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-basic-02.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-basic-03.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-basic-04.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-basic-05.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-basic-06.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-bnodes-01.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-bnodes-02.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-bnodes-03.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-bnodes-04.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-bnodes-05.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-expr-01.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-expr-02.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-expr-03.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-expr-04.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-expr-05.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-forms-01.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-forms-02.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-limit-offset-01.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-limit-offset-02.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-limit-offset-03.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-limit-offset-04.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lists-01.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lists-02.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lists-03.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lists-04.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lists-05.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-01.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-02.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-03.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-04.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-05.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-06.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-07.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-08.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-09.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-10.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-11.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-12.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-13.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-14.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-15.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-16.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-17.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-18.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-19.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-lit-20.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-order-01.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-order-02.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-order-03.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-order-04.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-order-05.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-order-06.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-order-07.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-pat-01.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-pat-02.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-pat-03.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-pat-04.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-01.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-02.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-03.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-04.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-05.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-06.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-07.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-qname-08.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-01.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-02.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-03.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-05.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-06.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-07.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-08.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-09.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-10.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-11.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-12.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-13.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-struct-14.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-union-01.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql1/syntax-union-02.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/ trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/manifest.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-bnode-01.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-bnode-02.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-bnode-03.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-dataset-01.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-dataset-02.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-dataset-03.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-dataset-04.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-esc-01.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-esc-02.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-esc-03.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-esc-04.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-esc-05.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-ask-02.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-construct01.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-construct02.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-construct03.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-construct04.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-construct06.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-describe01.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-describe02.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-select-01.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-form-select-02.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-function-01.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-function-02.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-function-03.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-function-04.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-01.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-02.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-03.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-04.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-05.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-06.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-07.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-08.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-09.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-10.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-11.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-12.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-13.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-general-14.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-graph-01.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-graph-02.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-graph-03.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-graph-04.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-graph-05.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-keywords-01.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-keywords-02.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-keywords-03.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-lists-01.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-lists-02.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-lists-03.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-lists-04.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql2/syntax-lists-05.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/ trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/manifest.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-01.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-02.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-03.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-04.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-05.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-06.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-07.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-08.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-01.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-02.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-03.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-04.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-05.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-06.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-07.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-08.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-09.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-10.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-11.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-12.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-13.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-14.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-15.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-16.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-17.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-18.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-19.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-20.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-21.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-22.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-23.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-24.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-25.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-26.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-27.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-28.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-29.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-30.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-31.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-bnode-dot.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-bnodes-missing-pvalues-01.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-bnodes-missing-pvalues-02.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-empty-optional-01.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-empty-optional-02.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-filter-missing-parens.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-lone-list.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-bad-lone-node.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-blabel-cross-filter.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-blabel-cross-graph-bad.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-blabel-cross-optional-bad.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql3/syn-blabel-cross-union-bad.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/ trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/manifest.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-09.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-10.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-11.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-bad-34.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-bad-35.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-bad-36.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-bad-37.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-bad-38.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-bad-GRAPH-breaks-BGP.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-bad-OPT-breaks-BGP.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-bad-UNION-breaks-BGP.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/syntax-sparql4/syn-leading-digits-in-prefixed-names.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/ trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/data-01.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/data-02.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/data-03.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/dawg-data-01.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/dawg-tp-01.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/dawg-tp-02.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/dawg-tp-03.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/dawg-tp-04.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/dawg-tp-05.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/manifest.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/result-tp-01.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/result-tp-02.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/result-tp-03.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/triple-match/result-tp-04.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/ trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/false.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/manifest.ttl trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-byte-short-fail.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-byte-short.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-decimal-decimal.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-double-decimal-fail.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-double-decimal.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-double-double.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-double-float-fail.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-double-float.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-float-decimal-fail.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-float-decimal.rq trunk/rdfapi-php/test/unit/Sparql/w3c-dawg2/data-r2/type-promotion/tP-float-... [truncated message content] |
From: <cw...@us...> - 2007-08-12 14:38:55
|
Revision: 488 http://rdfapi-php.svn.sourceforge.net/rdfapi-php/?rev=488&view=rev Author: cweiske Date: 2007-08-12 07:38:53 -0700 (Sun, 12 Aug 2007) Log Message: ----------- Dawg2 helper class and script Added Paths: ----------- trunk/rdfapi-php/test/unit/Sparql/Dawg2Helper.php trunk/rdfapi-php/test/unit/Sparql/create-dawg2.php Added: trunk/rdfapi-php/test/unit/Sparql/Dawg2Helper.php =================================================================== --- trunk/rdfapi-php/test/unit/Sparql/Dawg2Helper.php (rev 0) +++ trunk/rdfapi-php/test/unit/Sparql/Dawg2Helper.php 2007-08-12 14:38:53 UTC (rev 488) @@ -0,0 +1,215 @@ +<?php + +require_once RDFAPI_INCLUDE_DIR . 'model/ModelFactory.php'; +require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlParser.php'; +require_once RDFAPI_INCLUDE_DIR . 'sparql/SparqlEngine.php'; + +class Dawg2Helper +{ + + + + /** + * Loads DAWG2 tests and adds them to the cases session array + * so that they can be executed with the normal tests + */ + public static function loadDawg2Tests() + { + $suiteDir = dirname(__FILE__) . '/w3c-dawg2/data-r2/'; + $suites = array( +// 'manifest-evaluation.ttl', +// 'extended-manifest-evaluation.ttl', + 'manifest-syntax.ttl' + ); + + $arTests = array(); + foreach ($suites as $suite) { + $arTests = array_merge( + $arTests, + self::loadSuiteFromManifest($suiteDir . $suite) + ); + } + + //make relative paths + $strip = dirname(__FILE__) . '/'; + foreach ($arTests as &$test) { + foreach ($test as $id => $value) { + if (substr($value, 0, strlen($strip)) == $strip) { + $test[$id] = substr($value, strlen($strip)); + } + } + } + + //activate it in cases.php + $_SESSION['sparql_dawg2_tests'] = $arTests; + $_SESSION['sparqlTestGroups'] = array();//remove other cases + $_SESSION['sparqlTestGroups']['dawg2'] = array(//'deact'=>1, + 'title' => 'DAWG2 tests', + 'tests' => 'sparql_dawg2_tests', + 'checkfunc' => 'resultCheck' + ); + + }//public static function loadDawg2Tests() + + + + /** + * Loads all test collections from a test suite manifest file. + * A test suite file is an N3 rdf data file linking to other + * collection manifest files. + * + * @param string $strSuiteFile Test suite file + * + */ + public static function loadSuiteFromManifest($strSuiteFile) + { + //if someone knows a proper way to select all rdf collection + //items with a single query, tell me + $res = self::queryN3($strSuiteFile, + 'PREFIX mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> + SELECT ?title, ?file WHERE { + ?x rdfs:label ?title. + ?y rdf:first ?file. + }' + ); + + $arTests = array(); + $dirname = dirname($strSuiteFile); + foreach ($res as $data) { + $file = $dirname . '/' . $data['?file']->uri; + $arTests = array_merge( + $arTests, + self::loadCollectionFromManifest($file) + ); + } + return $arTests; + }//public static function loadSuiteFromManifest($strSuiteFile) + + + + /** + * Loads tests from a test collection manifest file. + * A collection manifest contains only tests, no links to other + * manifest files. + * + * @param string $strCollectionFile Path of the collection file + * + * @return array Array of test definitions compatible to those in + * cases.php + */ + public static function loadCollectionFromManifest($strCollectionFile) + { + if (!file_exists($strCollectionFile)) { + throw new Exception('Collection file does not exist: ' . $strCollectionFile); + } + + //$arTests = self::loadEvaluationTests($strCollectionFile); + $arTests = array(); + $arTests = array_merge($arTests, self::loadSyntaxTests($strCollectionFile)); + return $arTests; + }//public static function loadCollectionFromManifest($strCollectionFile) + + + + public static function loadEvaluationTests($strCollectionFile) + { + $res = self::queryN3($strCollectionFile, + 'PREFIX mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> + PREFIX qt: <http://www.w3.org/2001/sw/DataAccess/tests/test-query#> + PREFIX dawgt: <http://www.w3.org/2001/sw/DataAccess/tests/test-dawg#> + SELECT ?name ?queryFile ?dataFile ?resultFile WHERE { + ?test rdf:type mf:QueryEvaluationTest. + ?test mf:name ?name. + ?test dawgt:approval dawgt:Approved. + ?test mf:action _:action. + _:action qt:query ?queryFile. + _:action qt:data ?dataFile. + ?test mf:result ?resultFile. + }' + ); + + $dirname = dirname($strCollectionFile) . '/'; + $arTests = array(); + + //this is a bug in SparqlEngine and should be fixed + if ($res === false) { + return array(); + } + + foreach ($res as $test) { + $arTests[] = array( + 'title' => $test['?name']->label, + 'data' => $dirname . $test['?dataFile']->uri, + 'query' => $dirname . $test['?queryFile']->uri, + 'result' => $dirname . $test['?resultFile']->uri, + ); + } + + return $arTests; + }//public static function loadEvaluationTests($strCollectionFile) + + + + public static function loadSyntaxTests($strCollectionFile) + { + $res = self::queryN3($strCollectionFile, + 'PREFIX mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> + PREFIX qt: <http://www.w3.org/2001/sw/DataAccess/tests/test-query#> + PREFIX dawgt: <http://www.w3.org/2001/sw/DataAccess/tests/test-dawg#> + SELECT ?name ?queryFile ?type WHERE { + ?test rdf:type ?type. + ?test mf:name ?name. + ?test dawgt:approval dawgt:Approved. + ?test mf:action ?queryFile. + FILTER(?type = mf:NegativeSyntaxTest || ?type = mf:PositiveSyntaxTest) + }' + ); + + $dirname = dirname($strCollectionFile) . '/'; + $arTests = array(); + + //this is a bug in SparqlEngine and should be fixed + if ($res === false) { + return array(); + } + foreach ($res as $test) { + if ($test['?type']->uri == 'http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#PositiveSyntaxTest') { + $type = 'syntax-positive'; + } else { + $type = 'syntax-negative'; + } + $arTests[] = array( + 'title' => $test['?name']->label, + 'query' => $dirname . $test['?queryFile']->uri, + 'type' => $type + ); + } + + return $arTests; + }//public static function loadEvaluationTests($strCollectionFile) + + + + /** + * Executes a SPARQL query on the data written in an + * file containing N3-formatted RDF data + * + * @param string $strN3File Path to file + * @param string $strSparqlQuery SPARQL query to execute + * + * @return mixed SPARQL engine query results + */ + public static function queryN3($strN3File, $strSparqlQuery) + { + $graphset = ModelFactory::getDatasetMem('Dataset1'); + $graph1 = $graphset->getDefaultGraph(); + $graph1 ->load($strN3File, 'n3'); + + $parser = new SparqlParser(); + $q = $parser->parse($strSparqlQuery); + $engine = SparqlEngine::factory(); + return $engine->queryModel($graphset, $q, false); + }//public static function queryN3($strN3File, $strSparqlQuery) +} + +?> \ No newline at end of file Added: trunk/rdfapi-php/test/unit/Sparql/create-dawg2.php =================================================================== --- trunk/rdfapi-php/test/unit/Sparql/create-dawg2.php (rev 0) +++ trunk/rdfapi-php/test/unit/Sparql/create-dawg2.php 2007-08-12 14:38:53 UTC (rev 488) @@ -0,0 +1,24 @@ +<?php +/** +* Utility script to generate an array of dawg2 tests similar to +* cases.php from the n3 tests notation. +* We could read the n3 test definition files everytime we run the tests, +* but this takes too long - so we cache it. +* +* Usage: +* php create-dawg2.php > cases_dawg2.php +*/ +require_once dirname(__FILE__) . '/../../config.php'; +require_once 'Dawg2Helper.php'; + +Dawg2Helper::loadDawg2Tests(); + +echo "<?php +/** +* automatically created by create-dawg2.php +*/ +\$_SESSION['sparql_dawg2_tests'] = "; +var_export($_SESSION['sparql_dawg2_tests']); +echo "; +?>"; +?> \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cw...@us...> - 2007-08-12 12:01:54
|
Revision: 487 http://rdfapi-php.svn.sourceforge.net/rdfapi-php/?rev=487&view=rev Author: cweiske Date: 2007-08-12 05:01:53 -0700 (Sun, 12 Aug 2007) Log Message: ----------- catch empty model Modified Paths: -------------- trunk/rdfapi-php/test/unit/Sparql/SparqlDbTests_test.php Modified: trunk/rdfapi-php/test/unit/Sparql/SparqlDbTests_test.php =================================================================== --- trunk/rdfapi-php/test/unit/Sparql/SparqlDbTests_test.php 2007-08-12 11:59:54 UTC (rev 486) +++ trunk/rdfapi-php/test/unit/Sparql/SparqlDbTests_test.php 2007-08-12 12:01:53 UTC (rev 487) @@ -135,6 +135,10 @@ $database->removeNamedGraphDb(self::$strModelUri); } $dbModel = $database->getNewModel(self::$strModelUri); + + if (!$dbModel instanceof DbModel) { + throw new Exception('Error creating new model for SparqlEngineDb tests: ' . $dbModel); + } return array($database, $dbModel); }//protected function prepareDatabase() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cw...@us...> - 2007-08-12 11:59:55
|
Revision: 486 http://rdfapi-php.svn.sourceforge.net/rdfapi-php/?rev=486&view=rev Author: cweiske Date: 2007-08-12 04:59:54 -0700 (Sun, 12 Aug 2007) Log Message: ----------- Try to fix bug #1745358: Apostrophes in URI Resources Modified Paths: -------------- trunk/rdfapi-php/api/dataset/DatasetDb.php trunk/rdfapi-php/api/model/DbModel.php trunk/rdfapi-php/api/model/DbStore.php Modified: trunk/rdfapi-php/api/dataset/DatasetDb.php =================================================================== --- trunk/rdfapi-php/api/dataset/DatasetDb.php 2007-08-12 11:33:30 UTC (rev 485) +++ trunk/rdfapi-php/api/dataset/DatasetDb.php 2007-08-12 11:59:54 UTC (rev 486) @@ -124,7 +124,10 @@ { $graphNameURI=$graph->getGraphName(); $this->removeNamedGraph($graphNameURI); - $this->dbConnection->execute('INSERT INTO dataset_model VALUES("'.$this->setName.'",'.$graph->modelID.',"'.$graphNameURI.'")'); + $this->dbConnection->execute('INSERT INTO dataset_model VALUES(' + . $this->dbConnection->qstr($this->setName) . ',' + . $this->dbConnection->qstr($graph->modelID) . ',' + . $this->dbConnection->qstr($graphNameURI) .')'); } @@ -135,7 +138,9 @@ */ function setDefaultGraph(&$graph) { - $this->dbConnection->execute('UPDATE datasets SET defaultModelUri ="'.$graph->modelURI.'" WHERE datasetName ="'.$this->setName.'"'); + $this->dbConnection->execute('UPDATE datasets SET defaultModelUri =' + . $this->dbConnection->qstr($graph->modelURI) . ' WHERE datasetName =' + . $this->dbConnection->qstr($this->setName)); } /** @@ -167,7 +172,9 @@ */ function removeNamedGraph($graphName) { - $this->dbConnection->execute('DELETE FROM dataset_model WHERE datasetName="'.$this->setName.'" AND graphURI ="'.$graphName.'"'); + $this->dbConnection->execute('DELETE FROM dataset_model WHERE datasetName="' + . $this->dbConnection->qstr($this->setName) . '" AND graphURI ="' + . $this->dbConnection->qstr($graphName) . '"'); } /** Modified: trunk/rdfapi-php/api/model/DbModel.php =================================================================== --- trunk/rdfapi-php/api/model/DbModel.php 2007-08-12 11:33:30 UTC (rev 485) +++ trunk/rdfapi-php/api/model/DbModel.php 2007-08-12 11:59:54 UTC (rev 486) @@ -144,8 +144,8 @@ (modelID, subject, predicate, object, l_language, l_datatype, subject_is, object_is) VALUES (" .$this->modelID ."," - ."'" .$statement->getLabelSubject() ."'," - ."'" .$statement->getLabelPredicate() ."',"; + . $this->dbConn->qstr($statement->getLabelSubject()) ."," + . $this->dbConn->qstr($statement->getLabelPredicate()) .","; if (is_a($statement->object(), 'Literal')) { $quotedLiteral = $this->dbConn->qstr($statement->obj->getLabel()); @@ -156,7 +156,7 @@ ."'l')"; }else{ $object_is = $this->_getNodeFlag($statement->object()); - $sql .= "'" .$statement->obj->getLabel() ."'," + $sql .= $this->dbConn->qstr($statement->obj->getLabel()) ."," ."''," ."''," ."'" .$subject_is ."'," @@ -1204,8 +1204,8 @@ (modelID, namespace, prefix) VALUES (" .$this->modelID ."," - ."'" .$nmsp ."'," - ."'" .$prefix."')"; + ."'" . $this->dbConn->qstr($nmsp) ."'," + ."'" . $this->dbConn->qstr($prefix) ."')"; } $rs =& $this->dbConn->execute($sql); Modified: trunk/rdfapi-php/api/model/DbStore.php =================================================================== --- trunk/rdfapi-php/api/model/DbStore.php 2007-08-12 11:33:30 UTC (rev 485) +++ trunk/rdfapi-php/api/model/DbStore.php 2007-08-12 11:59:54 UTC (rev 486) @@ -218,11 +218,12 @@ $rs =& $this->dbConn->execute("INSERT INTO models (modelID, modelURI, baseURI) - VALUES ('" .$modelID ."', - '" .$modelURI ."', - '" .$baseURI ."')"); + VALUES (" .$modelID .", + " .$this->dbConn->qstr($modelURI) .", + " .$this->dbConn->qstr($baseURI) .")"); + if (!$rs) - $this->dbConn->errorMsg(); + return $this->dbConn->errorMsg(); else return new DbModel($this->dbConn, $modelURI, $modelID, $baseURI); } @@ -588,8 +589,8 @@ $defaultModel=$this->getNewModel($defaultModelUri); $rs =& $this->dbConn->execute("INSERT INTO datasets - VALUES ('" .$datasetName ."', - '" .$defaultModelUri."')"); + VALUES ('" .$this->dbConn->qstr($datasetName) ."', + '" .$this->dbConn->qstr($defaultModelUri)."')"); if (!$rs) $this->dbConn->errorMsg(); @@ -689,9 +690,9 @@ $rs =& $this->dbConn->execute("INSERT INTO models (modelID, modelURI, baseURI) - VALUES ('" .$modelID ."', - '" .$modelURI ."', - '" .$baseURI ."')"); + VALUES (" .$modelID ."', + " .$this->dbConn->qstr($modelURI) ."', + " .$this->dbConn->qstr($baseURI) .")"); if (!$rs) $this->dbConn->errorMsg(); else @@ -723,8 +724,8 @@ return true; } - + /** * Performs a SPARQL query against a model. The model is converted to * an RDF Dataset. The result can be retrived in SPARQL Query Results XML Format or This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cw...@us...> - 2007-08-12 11:33:31
|
Revision: 485 http://rdfapi-php.svn.sourceforge.net/rdfapi-php/?rev=485&view=rev Author: cweiske Date: 2007-08-12 04:33:30 -0700 (Sun, 12 Aug 2007) Log Message: ----------- fix again Modified Paths: -------------- trunk/rdfapi-php/api/sparql/SparqlEngineDb/ResultConverter.php Modified: trunk/rdfapi-php/api/sparql/SparqlEngineDb/ResultConverter.php =================================================================== --- trunk/rdfapi-php/api/sparql/SparqlEngineDb/ResultConverter.php 2007-08-12 11:33:13 UTC (rev 484) +++ trunk/rdfapi-php/api/sparql/SparqlEngineDb/ResultConverter.php 2007-08-12 11:33:30 UTC (rev 485) @@ -91,7 +91,7 @@ //RAP style, shortcut notation $strFile = 'SparqlEngineDb/ResultRenderer/' . $strClass . '.php'; @include_once RDFAPI_INCLUDE_DIR . 'sparql/' . $strFile; - if (class_exists('SparqlEngineDb_ResultRenderer_' . $strClass)) { + if (class_exists('SparqlEngineDb_ResultRenderer_' . $strClass, false)) { return 'SparqlEngineDb_ResultRenderer_' . $strClass; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cw...@us...> - 2007-08-12 11:33:14
|
Revision: 484 http://rdfapi-php.svn.sourceforge.net/rdfapi-php/?rev=484&view=rev Author: cweiske Date: 2007-08-12 04:33:13 -0700 (Sun, 12 Aug 2007) Log Message: ----------- Fix bug 1750658: ResultConverter loadClass does not work with __autoload Modified Paths: -------------- trunk/rdfapi-php/api/sparql/SparqlEngine/ResultConverter.php trunk/rdfapi-php/api/sparql/SparqlEngineDb/ResultConverter.php Modified: trunk/rdfapi-php/api/sparql/SparqlEngine/ResultConverter.php =================================================================== --- trunk/rdfapi-php/api/sparql/SparqlEngine/ResultConverter.php 2007-08-12 11:24:06 UTC (rev 483) +++ trunk/rdfapi-php/api/sparql/SparqlEngine/ResultConverter.php 2007-08-12 11:33:13 UTC (rev 484) @@ -84,27 +84,27 @@ */ protected static function loadClass($strClass) { - if (class_exists($strClass)) { + if (class_exists($strClass, false)) { return $strClass; } //RAP style, shortcut notation $strFile = 'SparqlEngine/ResultRenderer/' . $strClass . '.php'; @include_once RDFAPI_INCLUDE_DIR . 'sparql/' . $strFile; - if (class_exists('SparqlEngine_ResultRenderer_' . $strClass)) { + if (class_exists('SparqlEngine_ResultRenderer_' . $strClass, false)) { return 'SparqlEngine_ResultRenderer_' . $strClass; } //RAP style $strFile = str_replace('_', '/', $strClass) . '.php'; @include_once RDFAPI_INCLUDE_DIR . 'sparql/' . $strFile; - if (class_exists($strClass)) { + if (class_exists($strClass, false)) { return $strClass; } //PEAR style @include_once $strFile; - if (class_exists($strClass)) { + if (class_exists($strClass, false)) { return $strClass; } Modified: trunk/rdfapi-php/api/sparql/SparqlEngineDb/ResultConverter.php =================================================================== --- trunk/rdfapi-php/api/sparql/SparqlEngineDb/ResultConverter.php 2007-08-12 11:24:06 UTC (rev 483) +++ trunk/rdfapi-php/api/sparql/SparqlEngineDb/ResultConverter.php 2007-08-12 11:33:13 UTC (rev 484) @@ -84,7 +84,7 @@ */ protected static function loadClass($strClass) { - if (class_exists($strClass)) { + if (class_exists($strClass, false)) { return $strClass; } @@ -98,13 +98,13 @@ //RAP style $strFile = str_replace('_', '/', $strClass) . '.php'; @include_once RDFAPI_INCLUDE_DIR . 'sparql/' . $strFile; - if (class_exists($strClass)) { + if (class_exists($strClass, false)) { return $strClass; } //PEAR style @include_once $strFile; - if (class_exists($strClass)) { + if (class_exists($strClass, false)) { return $strClass; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cw...@us...> - 2007-08-12 11:24:19
|
Revision: 483 http://rdfapi-php.svn.sourceforge.net/rdfapi-php/?rev=483&view=rev Author: cweiske Date: 2007-08-12 04:24:06 -0700 (Sun, 12 Aug 2007) Log Message: ----------- Fix bug #1772578: N3Parser infinite loop Modified Paths: -------------- trunk/rdfapi-php/api/syntax/N3Parser.php trunk/rdfapi-php/test/unit/Syntax/n3Parser_test.php Modified: trunk/rdfapi-php/api/syntax/N3Parser.php =================================================================== --- trunk/rdfapi-php/api/syntax/N3Parser.php 2007-08-12 11:03:13 UTC (rev 482) +++ trunk/rdfapi-php/api/syntax/N3Parser.php 2007-08-12 11:24:06 UTC (rev 483) @@ -68,7 +68,7 @@ **/ function N3Parser() { //Regular expressions: - $Name = '[A-Za-z0-9_@\.]+[^\.,;\[\]\s ]*'; + $Name = '[A-Za-z0-9_@\.]+[^\.,;\[\]\s\) ]*'; $URI = '<[^> ]*>'; $bNode = '_:'.$Name; $Univar = '\?'.$Name; @@ -439,7 +439,6 @@ $res=array(); preg_match_all($this->Tokens, $s, $newres); - $res=$this->array_concat($res, array_map('trim', $newres[0])); return $res; Modified: trunk/rdfapi-php/test/unit/Syntax/n3Parser_test.php =================================================================== --- trunk/rdfapi-php/test/unit/Syntax/n3Parser_test.php 2007-08-12 11:03:13 UTC (rev 482) +++ trunk/rdfapi-php/test/unit/Syntax/n3Parser_test.php 2007-08-12 11:24:06 UTC (rev 483) @@ -8,7 +8,7 @@ * Tests the N3Parser * * @version $Id$ - * @author Tobias Gau\xDF <tob...@we...> + * @author Tobias Gau� <tob...@we...> * * @package unittests * @access public @@ -17,7 +17,7 @@ class testN3Parser extends UnitTestCase { function testN3Parser() { $this->UnitTestCase(); - + $_SESSION['n3TestInput']=' @prefix p: <http://www.example.org/personal_details#> . @prefix m: <http://www.example.org/meeting_organization#> . @@ -26,7 +26,7 @@ p:GivenName "Fred"; p:hasEmail <mailto:fr...@ex...>; m:attending <http://meetings.example.com/cal#m1> . - + <http://meetings.example.com/cal#m1> m:homePage <http://meetings.example.com/m1/hp> . '; @@ -34,20 +34,20 @@ } function testIsMemmodel() { - + // Import Package include_once(RDFAPI_INCLUDE_DIR.PACKAGE_SYNTAX_N3); $n3pars= new N3Parser(); - $model=$n3pars->parse2model($_SESSION['n3TestInput'],false); + $model=$n3pars->parse2model($_SESSION['n3TestInput'],false); $this->assertIsA($model, 'memmodel'); } - + function testParsing() { - + $n3pars= new N3Parser(); - $model=$n3pars->parse2model($_SESSION['n3TestInput'],false); - - + $model=$n3pars->parse2model($_SESSION['n3TestInput'],false); + + $model2 = new MemModel(); // Ceate new statements and add them to the model @@ -63,17 +63,17 @@ $statement4 = new Statement(new Resource("http://meetings.example.com/cal#m1"), new Resource("http://www.example.org/meeting_organization#homePage"), new Resource("http://meetings.example.com/m1/hp")); - - + + $model2->add($statement1); $model2->add($statement2); $model2->add($statement3); $model2->add($statement4); - + $this->assertTrue($model->containsAll($model2)); } - + function testPrefixNotDeclared() { $rdfInput=' @prefix m: <http://www.example.org/meeting_organization#>. @@ -85,11 +85,11 @@ '; $n3pars= new N3Parser(); - $model=$n3pars->parse2model($rdfInput,false); - //var_dump($model); + $model=$n3pars->parse2model($rdfInput,false); + //var_dump($model); $this->assertErrorPattern('[Prefix not declared: p:]'); } - + function testLoneSemicolon() { $n3 = '<a> <b> <c> ; .'; $parser = &new N3Parser(); @@ -97,5 +97,14 @@ $this->assertEqual(1, $model->size()); $this->assertNoErrors(); } + + function testTightClosingList() { + $n3 = '@prefix : <http://www.w3.org/2001/sw/DataAccess/tests/data-r2/syntax-sparql4/manifest#> . + @prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> . + <> mf:entries ( mf:syn-09) .'; + $parser = &new N3Parser(); + $model = &$parser->parse2model($n3, false); + //if bug occured, the parser would be in an endless loop + } } ?> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cw...@us...> - 2007-08-12 11:03:14
|
Revision: 482 http://rdfapi-php.svn.sourceforge.net/rdfapi-php/?rev=482&view=rev Author: cweiske Date: 2007-08-12 04:03:13 -0700 (Sun, 12 Aug 2007) Log Message: ----------- nicify indentation Modified Paths: -------------- trunk/rdfapi-php/api/syntax/N3Parser.php Modified: trunk/rdfapi-php/api/syntax/N3Parser.php =================================================================== --- trunk/rdfapi-php/api/syntax/N3Parser.php 2007-08-12 10:14:41 UTC (rev 481) +++ trunk/rdfapi-php/api/syntax/N3Parser.php 2007-08-12 11:03:13 UTC (rev 482) @@ -793,33 +793,34 @@ while (in_array($schar, $list)) { // while schar in list { - $ndict=array(); - $nestingLevel=0; - $biggest=0; - for ($i=0;$i<count($list);$i++) { - if ($list[$i] == $schar) { - $nestingLevel += 1; - if (!in_array($nestingLevel, array_keys($ndict))) { - $ndict[$nestingLevel] = array(array($i)); - } else { - $ndict[$nestingLevel][]=array($i); - } - } - if ($list[$i] == $echar) { - if (!in_array($nestingLevel, array_keys($ndict))) { - $ndict[$nestingLevel]=array(array($i)); - } else { + $ndict = array(); + $nestingLevel = 0; + $biggest = 0; + for ($i = 0; $i < count($list); $i++) { + if ($list[$i] == $schar) { + $nestingLevel += 1; + if (!in_array($nestingLevel, array_keys($ndict))) { + $ndict[$nestingLevel] = array(array($i)); + } else { + $ndict[$nestingLevel][]=array($i); + } + } + if ($list[$i] == $echar) { + if (!in_array($nestingLevel, array_keys($ndict))) { + $ndict[$nestingLevel]=array(array($i)); + } else { $ndict[$nestingLevel][count($ndict[$nestingLevel])-1][]=$i; $nestingLevel-= 1; # elif type(list[i]) == type([]) { # list[i] = doLists(list[i], schar, echar) - } - } + } + } } - foreach (array_keys($ndict) as $key) - if ($key > $biggest) $biggest = $key; + foreach (array_keys($ndict) as $key) { + if ($key > $biggest) $biggest = $key; + } - $tol = $ndict[$biggest][0]; + $tol = $ndict[$biggest][0]; $list = $this->listify($list, $tol[0], ($tol[1]+1)); } return $list; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cw...@us...> - 2007-08-12 10:14:42
|
Revision: 481 http://rdfapi-php.svn.sourceforge.net/rdfapi-php/?rev=481&view=rev Author: cweiske Date: 2007-08-12 03:14:41 -0700 (Sun, 12 Aug 2007) Log Message: ----------- Fix N3Parser includes Modified Paths: -------------- trunk/rdfapi-php/api/syntax/N3Parser.php Modified: trunk/rdfapi-php/api/syntax/N3Parser.php =================================================================== --- trunk/rdfapi-php/api/syntax/N3Parser.php 2007-08-12 08:57:45 UTC (rev 480) +++ trunk/rdfapi-php/api/syntax/N3Parser.php 2007-08-12 10:14:41 UTC (rev 481) @@ -4,6 +4,8 @@ require_once RDFAPI_INCLUDE_DIR . 'model/Resource.php'; require_once RDFAPI_INCLUDE_DIR . 'model/Literal.php'; require_once RDFAPI_INCLUDE_DIR . 'model/Statement.php'; +require_once RDFAPI_INCLUDE_DIR . 'model/MemModel.php'; +require_once RDFAPI_INCLUDE_DIR . 'constants.php'; // ---------------------------------------------------------------------------------- // Class: N3Parser This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cw...@us...> - 2007-08-12 08:57:47
|
Revision: 480 http://rdfapi-php.svn.sourceforge.net/rdfapi-php/?rev=480&view=rev Author: cweiske Date: 2007-08-12 01:57:45 -0700 (Sun, 12 Aug 2007) Log Message: ----------- BlankNode wasn't loaded automatically Modified Paths: -------------- trunk/rdfapi-php/api/syntax/N3Parser.php Modified: trunk/rdfapi-php/api/syntax/N3Parser.php =================================================================== --- trunk/rdfapi-php/api/syntax/N3Parser.php 2007-08-08 16:27:35 UTC (rev 479) +++ trunk/rdfapi-php/api/syntax/N3Parser.php 2007-08-12 08:57:45 UTC (rev 480) @@ -1,5 +1,6 @@ <?php require_once RDFAPI_INCLUDE_DIR . 'util/Object.php'; +require_once RDFAPI_INCLUDE_DIR . 'model/Blanknode.php'; require_once RDFAPI_INCLUDE_DIR . 'model/Resource.php'; require_once RDFAPI_INCLUDE_DIR . 'model/Literal.php'; require_once RDFAPI_INCLUDE_DIR . 'model/Statement.php'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cw...@us...> - 2007-08-08 16:48:17
|
Revision: 479 http://rdfapi-php.svn.sourceforge.net/rdfapi-php/?rev=479&view=rev Author: cweiske Date: 2007-08-08 09:27:35 -0700 (Wed, 08 Aug 2007) Log Message: ----------- Double tests Modified Paths: -------------- trunk/rdfapi-php/test/unit/Sparql/cases.php Modified: trunk/rdfapi-php/test/unit/Sparql/cases.php =================================================================== --- trunk/rdfapi-php/test/unit/Sparql/cases.php 2007-08-08 16:21:15 UTC (rev 478) +++ trunk/rdfapi-php/test/unit/Sparql/cases.php 2007-08-08 16:27:35 UTC (rev 479) @@ -674,12 +674,6 @@ 2 => array('data' => 'dawg-query-001.n3', 'query' => "count-02", 'result' => "count-02"), - 3 => array('data' => 'dawg-query-001.n3', - 'query' => "ask-01", - 'result' => "ask-01"), - 4 => array('data' => 'dawg-query-001.n3', - 'query' => "count-02", - 'result' => "count-02"), ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cw...@us...> - 2007-08-08 16:31:43
|
Revision: 478 http://rdfapi-php.svn.sourceforge.net/rdfapi-php/?rev=478&view=rev Author: cweiske Date: 2007-08-08 09:21:15 -0700 (Wed, 08 Aug 2007) Log Message: ----------- This test seems really broken to me - SpEDb does return the correct result set IMO Modified Paths: -------------- trunk/rdfapi-php/test/unit/Sparql/cases.php trunk/rdfapi-php/test/unit/Sparql/result/query-survey-1.res Modified: trunk/rdfapi-php/test/unit/Sparql/cases.php =================================================================== --- trunk/rdfapi-php/test/unit/Sparql/cases.php 2007-08-08 13:52:35 UTC (rev 477) +++ trunk/rdfapi-php/test/unit/Sparql/cases.php 2007-08-08 16:21:15 UTC (rev 478) @@ -51,6 +51,7 @@ 'ex11.2.3.1_1', //bound() across union patterns is not possible 'ex11.2.3.2_0', + //test is broken IMO (cweiske) 'query-survey-1', ); Modified: trunk/rdfapi-php/test/unit/Sparql/result/query-survey-1.res =================================================================== --- trunk/rdfapi-php/test/unit/Sparql/result/query-survey-1.res 2007-08-08 13:52:35 UTC (rev 477) +++ trunk/rdfapi-php/test/unit/Sparql/result/query-survey-1.res 2007-08-08 16:21:15 UTC (rev 478) @@ -4,6 +4,7 @@ $res5 = new Literal("Bob"); $res5 = new Literal("John"); +$arr =array(); $arr["?n"]=$res5; $arr["?n"]=$res5; $arr["?n"]=$res5; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cw...@us...> - 2007-08-08 13:52:36
|
Revision: 477 http://rdfapi-php.svn.sourceforge.net/rdfapi-php/?rev=477&view=rev Author: cweiske Date: 2007-08-08 06:52:35 -0700 (Wed, 08 Aug 2007) Log Message: ----------- query-eq2-1 is totally broken Modified Paths: -------------- trunk/rdfapi-php/test/unit/Sparql/cases.php Modified: trunk/rdfapi-php/test/unit/Sparql/cases.php =================================================================== --- trunk/rdfapi-php/test/unit/Sparql/cases.php 2007-08-08 13:48:22 UTC (rev 476) +++ trunk/rdfapi-php/test/unit/Sparql/cases.php 2007-08-08 13:52:35 UTC (rev 477) @@ -52,7 +52,6 @@ //bound() across union patterns is not possible 'ex11.2.3.2_0', 'query-survey-1', - 'query-eq2-1', ); @@ -322,15 +321,11 @@ 42 => array('data' => "data-eq.n3", 'query' => "query-eq-5", 'result' => "query-eq-5") , +//test is broken - query results and query return variables don't even match +// 43 => array('data' => "data-eq.n3", +// 'query' => "query-eq2-1", +// 'result' => "query-eq2-1") , - 43 => array('data' => "data-eq.n3", - 'query' => "query-eq2-1", - 'result' => "query-eq2-1") , - - 44 => array('data' => "data-eq.n3", - 'query' => "query-eq2-1", - 'result' => "query-eq2-1") , - /**/ 45 => array('data' => "data-eq.n3", This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <cw...@us...> - 2007-08-08 13:48:26
|
Revision: 476 http://rdfapi-php.svn.sourceforge.net/rdfapi-php/?rev=476&view=rev Author: cweiske Date: 2007-08-08 06:48:22 -0700 (Wed, 08 Aug 2007) Log Message: ----------- Make test-B-18 pass Modified Paths: -------------- trunk/rdfapi-php/api/sparql/SparqlEngineDb/FilterGenerator.php trunk/rdfapi-php/api/sparql/SparqlParser.php Modified: trunk/rdfapi-php/api/sparql/SparqlEngineDb/FilterGenerator.php =================================================================== --- trunk/rdfapi-php/api/sparql/SparqlEngineDb/FilterGenerator.php 2007-08-08 13:47:51 UTC (rev 475) +++ trunk/rdfapi-php/api/sparql/SparqlEngineDb/FilterGenerator.php 2007-08-08 13:48:22 UTC (rev 476) @@ -156,8 +156,8 @@ //convert datetime to datetime if necessary return self::mkVal( '(CASE' - . ' WHEN ' . $this->getIsCol($tree) . ' = "' . self::$typeXsdDateTime . '"' - . ' THEN ' . $this->getDateConversionSql($this->getValueCol($tree)) + . ' WHEN ' . $this->getDatatypeCol($tree) . ' = "' . self::$typeXsdBoolean . '"' + . ' THEN IF(LOWER(' . $this->getValueCol($tree) . ') = "true", TRUE, FALSE)' . ' ELSE ' . $this->getValueCol($tree) . ' END)', self::$typeVariable @@ -172,14 +172,17 @@ if ($this->isNumber($tree)) { return $strValue; - } else if ($tree['quoted'] === false) { + } else if ($tree['quoted'] === false && + (!isset($tree['datatype']) || $tree['datatype'] != self::$typeXsdBoolean) + ) { $strValueNew = $this->sg->query->getFullUri($strValue); if ($strValueNew === false) { if ($strValue[0] == '<' && substr($strValue, -1) == '>') { $strValue = substr($strValue, 1, -1); } else { +var_dump($tree); throw new SparqlEngineDb_SqlGeneratorException( - 'Unexpected value "' . $strValueNew . '" (expected datatype)' + 'Unexpected value "' . $strValue . '" (expected datatype)' ); } } else { Modified: trunk/rdfapi-php/api/sparql/SparqlParser.php =================================================================== --- trunk/rdfapi-php/api/sparql/SparqlParser.php 2007-08-08 13:47:51 UTC (rev 475) +++ trunk/rdfapi-php/api/sparql/SparqlParser.php 2007-08-08 13:48:22 UTC (rev 476) @@ -1017,6 +1017,13 @@ $strQuoted = $tok; $litQuotes = true; } + } else if ($tok == 'true' || $tok == 'false') { + $part[] = array( + 'type' => 'value', + 'value' => $tok, + 'quoted' => false, + 'datatype' => 'http://www.w3.org/2001/XMLSchema#boolean' + ); } else { $part[] = array( 'type' => 'value', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |