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); } */ }
private function _primaryStrategy() { /* * PREPARATION * * */ $languageProperties = $this->languageProperties; $this->_prepare($languageProperties); $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 ); //alternative: $this->_http_retrieve_odbc_sparul_delete_language($languageProperties, $graphURI); if ($generateOWLAxiomAnnotations) { //these 3 clearly depend on annotations $this->_odbc_sparul_delete_annotations($annotationGraphURI); //$this->_odbc_sparul_delete_subresources(); $this->_odbc_sparul_delete_annotations_of_subresources(); } Timer::stop('LiveUpdateDestination::_odbc_sparul_delete_total'); /* * STRATEGIES FOR INSERTION * will do nothing if Options::getOption('debug_turn_off_insert') is true * */ //$this->_odbc_sparul_insert_triples_and_annotations($graphURI,$annotationGraphURI,$generateOWLAxiomAnnotations); $this->_odbc_ttlp_insert_triples($this->tripleFromExtractor); $this->_odbc_ttlp_insert_annotations($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); } */ }