Source for file RdqlEngine.php
Documentation is available at RdqlEngine.php
// ----------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------
* Some general methods common for RdqlMemEngine and RdqlDbEngine
* @version $Id: fsource_rdql__rdqlRdqlEngine.php.html,v 1.10 2006/06/26 12:34:13 tgauss Exp $
* @author Radoslaw Oldakowski <radol@gmx.de>
* Prints a query result as HTML table.
* You can change the colors in the configuration file.
* @param array $queryResult [][?VARNAME] = object Node
// Import Package Utility
include_once(RDFAPI_INCLUDE_DIR.
PACKAGE_UTILITY);
if (current($queryResult[0]) ==
NULL) {
echo
'<table border="1" cellpadding="3" cellspacing="0"><tr><td><b>No.</b></td>';
foreach ($queryResult[0] as $varName =>
$value)
echo
"<td align='center'><b>$varName</b></td>";
foreach ($queryResult as $n =>
$var) {
echo
'<tr><td width="20" align="right">' .
($n +
1) .
'.</td>';
foreach ($var as $varName =>
$value) {
echo
INDENTATION .
INDENTATION .
'<td bgcolor="';
if (is_a($value, 'Literal')) {
if ($value->getLanguage() !=
NULL)
$lang =
' <b>(xml:lang="' .
$value->getLanguage() .
'") </b> ';
if ($value->getDatatype() !=
NULL)
$dtype =
' <b>(rdf:datatype="' .
$value->getDatatype() .
'") </b> ';
} // end: Class RdqlEngine
Documentation generated on Mon, 26 Jun 2006 14:25:59 +0200 by phpDocumentor 1.3.0RC6