Ejemplo n.º 1
0
 /**
  *
  */
 function &getResDescr($resURI, $attach_metadata = false)
 {
     global $_PUBBY_DATASET;
     $r = new Resource(RAPpubbyURIrewriter::pubbyURItoDatasetURI($resURI));
     $rd_m = new MemModel();
     $rd_m = $this->m->find($r, NULL, NULL);
     $backlinks = $this->m->find(NULL, NULL, $r);
     $rd_m->addModel($backlinks);
     $rew_rd_m =& RAPpubbyURIrewriter::rewriteURIsInResDescrModel($rd_m);
     if (!$rew_rd_m->isEmpty() && $_PUBBY_DATASET['addSameAsStatements']) {
         $rew_rd_m->add(new Statement(new Resource($resURI), new Resource(OWL_NS . "sameAs"), $r));
     }
     $rew_rd_m->addParsedNamespaces($this->ns);
     $rd = new RAPpubbyResDescr($resURI, $rew_rd_m);
     if ($attach_metadata && !$rd->isEmpty()) {
         $rd->attachMetadata($this->getMetadata($resURI));
     }
     return $rd;
 }