if ($rd->isEmpty()) { header('HTTP/1.1 404 Not Found'); } $c = $rd->serialize("html"); header('Content-length: ' . strlen($c)); echo $c; break; default: if (strpos($_SERVER['HTTP_ACCEPT'], "application/rdf+xml") !== false) { $dataURI = RAPpubbyURIrewriter::resURItoDataURI($http_reqest_URI); header('HTTP/1.1 303 See Other'); header('Location: ' . $dataURI); header('Content-type: text/plain'); $c = "303 See Other: For a description of this item, see <{$dataURI}>"; } elseif (strpos($_SERVER['HTTP_ACCEPT'], "application/n3") !== false) { $dataURI = RAPpubbyURIrewriter::resURItoDataURI($http_reqest_URI, 'n3'); header('HTTP/1.1 303 See Other'); header('Location: ' . $dataURI); header('Content-type: text/plain'); $c = "303 See Other: For a description of this item in n3, see <{$dataURI}>"; } else { $pageURI = RAPpubbyURIrewriter::resURItoPageURI($http_reqest_URI); header('HTTP/1.1 303 See Other'); header('Location: ' . $pageURI); header('Content-type: text/plain'); header('Content-length: 33'); $c = "303 See Other: For a description of this item see <{$pageURI}>"; } header('Content-length: ' . strlen($c)); echo $c; }
/** * */ function getPageURI() { return RAPpubbyURIrewriter::resURItoPageURI($this->res->getURI()); }