Example #1
0
 /**
  * @param array $triples
  * @return array
  */
 public function extractMissingObjectNs(array $triples)
 {
     $missingNs = array();
     $graph = new MongoGraph();
     foreach ($triples as $triple) {
         $triple = rtrim($triple);
         $parts = preg_split("/\\s/", $triple);
         $object = $this->extract_object($parts);
         if ($this->isUri($object)) {
             try {
                 $graph->uri_to_qname($object);
             } catch (\Tripod\Exceptions\LabellerException $te) {
                 $missingNs[] = $te->getTarget();
             }
         }
     }
     return array_unique($missingNs);
 }