Esempio n. 1
0
 public function getOWLAxiomAnnotationsAsNTriple($oaiId)
 {
     if (count($this->annotations) == 0) {
         return $this->annotations;
     }
     Timer::start('RDFtriple::getOWLAxiomAnnotationsAsNTriple::total');
     $axiomUniqueId = $this->getOWLAxiomURI();
     $axiomNTtriple = '<' . $axiomUniqueId . '>';
     $axiomAnnotations = array();
     //$axiomAnnotations[] = $axiomNTtriple.' <'.RDF_TYPE.'>  <'.OWL_AXIOM.'>'." .\n";
     $axiomAnnotations[] = $axiomNTtriple . ' <' . OWL_SUBJECT . '> ' . $this->getSubject()->toNTriples() . " .\n";
     $axiomAnnotations[] = $axiomNTtriple . ' <' . OWL_PREDICATE . '> ' . $this->getPredicate()->toNTriples() . " .\n";
     $axiomAnnotations[] = $axiomNTtriple . ' <' . OWL_OBJECT . '> ' . $this->getObject()->toNTriples() . " .\n";
     $axiom = new URI($axiomUniqueId, false);
     foreach ($this->annotations as $one) {
         $tmptriple = new RDFtriple($axiom, $one['p'], $one['o']);
         $axiomAnnotations[] = $tmptriple->toNTriples();
     }
     //print_r($axiomAnnotations);die;
     //Timer::stop('RDFtriple::getOWLAxiomAnnotations::tripleCreation');
     Timer::stop('RDFtriple::getOWLAxiomAnnotationsAsNTriple::total');
     return $axiomAnnotations;
 }