function getRDFaDescribeResultDoc($r)
 {
     $this->setHeader('content-type', 'Content-Type: text/html');
     $index = $r['result'];
     ARC2::inc('RDFaSerializer');
     $ser = new ARC2_RDFaSerializer($this->a, $this);
     $dur = $r['query_time'];
     return $ser->getSerializedIndex($index) . '<!-- query time: ' . $dur . "-->\n";
 }
 private function toRDFa($triples)
 {
     ARC2::inc('RDFaSerializer');
     $rdfa = new ARC2_RDFaSerializer($this->a, $this);
     return isset($triples[0]) && isset($triples[0]['s']) ? $rdfa->getSerializedTriples($triples) : $rdfa->getSerializedIndex($triples);
 }