protected function performUpdate() { $this->applicationFactory = ApplicationFactory::getInstance(); $parserData = $this->applicationFactory->newParserData($this->parser->getTitle(), $this->parser->getOutput()); $this->updateAnnotionsForAfterParse($this->applicationFactory->newPropertyAnnotatorFactory(), $parserData->getSemanticData()); $parserData->pushSemanticDataToParserOutput(); $this->checkForRequestedUpdateByPagePurge($parserData); return true; }
private function performUpdate() { $this->applicationFactory = ApplicationFactory::getInstance(); $filePage = $this->makeFilePage(); $parserData = $this->applicationFactory->newParserData($this->file->getTitle(), $filePage->getParserOutput($this->makeCanonicalParserOptions())); $pageInfoProvider = $this->applicationFactory->newMwCollaboratorFactory()->newPageInfoProvider($filePage); $propertyAnnotator = $this->applicationFactory->newPropertyAnnotatorFactory()->newPredefinedPropertyAnnotator($parserData->getSemanticData(), $pageInfoProvider); $propertyAnnotator->addAnnotation(); $parserData->pushSemanticDataToParserOutput(); $parserData->updateStore(); return true; }
protected function performUpdate() { $this->applicationFactory = ApplicationFactory::getInstance(); $parserData = $this->applicationFactory->newParserData($this->parser->getTitle(), $this->parser->getOutput()); $propertyAnnotator = $this->applicationFactory->newPropertyAnnotatorFactory()->newSortkeyPropertyAnnotator($parserData->getSemanticData(), $this->parser->getDefaultSort()); $propertyAnnotator->addAnnotation(); $propertyAnnotator = $this->applicationFactory->newPropertyAnnotatorFactory()->newCategoryPropertyAnnotator($parserData->getSemanticData(), $this->parser->getOutput()->getCategoryLinks()); $propertyAnnotator->addAnnotation(); $parserData->pushSemanticDataToParserOutput(); $this->checkForRequestedUpdateByPagePurge($parserData); return true; }
protected function addRedirectTargetAnnotation($text) { if ($this->isEnabledNamespace) { $this->redirectTargetFinder->findRedirectTargetFromText($text); $redirectPropertyAnnotator = $this->applicationFactory->newPropertyAnnotatorFactory()->newRedirectPropertyAnnotator($this->parserData->getSemanticData(), $this->redirectTargetFinder); $redirectPropertyAnnotator->addAnnotation(); } }
private function updateSemanticData(Title $title, WikiPage $wikiPage, $revision) { $this->processSemantics = $revision !== null && $this->isSemanticEnabledNamespace($title); if (!$this->processSemantics) { return $this->semanticData = new SemanticData($this->getSubject()); } $pageInfoProvider = $this->applicationFactory->newMwCollaboratorFactory()->newPageInfoProvider($wikiPage, $revision, User::newFromId($revision->getUser())); $propertyAnnotator = $this->applicationFactory->newPropertyAnnotatorFactory()->newPredefinedPropertyAnnotator($this->semanticData, $pageInfoProvider); $propertyAnnotator->addAnnotation(); }