Esempio n. 1
0
 public function compare(ExtractionResult $extractionResult)
 {
     if ($this->active == false) {
         return;
     }
     Timer::start('Hash::compare');
     $extractorID = $extractionResult->getExtractorID();
     $triples = $extractionResult->getTriples();
     $nicename = str_replace(DB_META_NS, '', $extractorID);
     //first of all some exceptions, e.g. MetaInformationextractor
     if (!$this->hasHash) {
         //no saved hash, add to Hash
         //add
         $this->_addToJSON($extractorID, $triples);
     } else {
         if ($this->_isExtractorInHash($extractorID)) {
             //do the normal thing
             $this->_compareHelper($extractorID, $triples);
         } else {
             //add
             $this->_addToJSON($extractorID, $triples);
         }
     }
     Timer::stop('Hash::compare');
 }