コード例 #1
0
 private function _primaryStrategy()
 {
     /*
      * PREPARATION
      *
      * */
     if (!TheContainer::wasSet(LUD_SPARQLFILTER)) {
         $store = null;
         $tripleDiff = new TripleDiff($this->uri, $this->language, $this->producesFilterList, $store);
         TheContainer::set(LUD_SPARQLFILTER, $tripleDiff->createFilter($this->producesFilterList));
     }
     $this->odbc = ODBC::getDefaultConnection();
     $graphURI = $this->graphURI;
     $annotationGraphURI = $this->annotationGraphURI;
     $generateOWLAxiomAnnotations = $this->generateOWLAxiomAnnotations;
     /*
      * STRATEGIES FOR DELETION
      * */
     Timer::start('LiveUpdateDestination::_odbc_sparul_delete_total');
     $this->_odbc_clean_sparul_delete_subresources();
     $this->_odbc_sparul_delete_subject_not_static($graphURI, $this->subjectSPARULpattern, TheContainer::get(LUD_SPARQLFILTER));
     //$this->_odbc_sparul_delete_language($graphURI, $languageProperties );
     //$this->_odbc_sparul_delete_language_oneQuery($graphURI, $languageProperties );
     Timer::stop('LiveUpdateDestination::_odbc_sparul_delete_total');
     /*
      * STRATEGIES FOR INSERTION
      * will do nothing if Options::getOption('debug_turn_off_insert') is true
      * */
     $this->_odbc_ttlp_insert_triples($this->tripleFromExtractor);
     $this->log(INFO, 'no of queries, insert: ' . $this->counterInserts . ' delete: ' . $this->counterDelete . ' odbc_total: ' . $this->counterTotalODBCOperations);
     /*
             if(Options::getOption('writeSPARULtoFiles')){
                 $this->writeSPARULtoFiles($deleteSPARUL, $insertSPARUL);
             }
     */
 }
コード例 #2
0
 private function _prepare($languageProperties)
 {
     if (!TheContainer::wasSet(LUD_SPARQLFILTER)) {
         $store = null;
         $tripleDiff = new TripleDiff($this->uri, $this->language, $this->producesFilterList, $store);
         TheContainer::set(LUD_SPARQLFILTER, $tripleDiff->createFilter($this->producesFilterList));
     }
     if (!TheContainer::wasSet(LUD_SPARQLFILTERWITHLANGUAGES)) {
         $store = null;
         $producesFiltertmp = $this->producesFilterList;
         foreach ($languageProperties as $one) {
             $producesFiltertmp[] = array('type' => EXACT, 's' => '', 'p' => $one, 'o' => '');
         }
         $tripleDiff = new TripleDiff($this->uri, $this->language, $producesFiltertmp, $store);
         TheContainer::set(LUD_SPARQLFILTERWITHLANGUAGES, $tripleDiff->createFilter($producesFiltertmp));
     }
 }