Class GeoScrapeServiceImpl
java.lang.Object
ubic.gemma.core.geoscrape.GeoScrapeServiceImpl
- All Implemented Interfaces:
GeoScrapeService
Default
GeoScrapeService implementation.
Pages through GeoBrowser results, filters to
expression-profiling records on the allowed taxa, evaluates each registered
GeoRecordMatcher against each record, and creates a
PreboardedExperiment for any record at least one matcher flagged.
Tracks progress on a single GeoScrapeWatermark row per invocation.
The watermark is written via a short-lived programmatic transaction so
IN_PROGRESS / COMPLETED / FAILED / CANCELLED state changes are visible to
the GET /admin/geo-scrape/last endpoint even while a scrape is in
flight. Preboarded creation routes through PreboardedExperimentService
which handles dedupe + audit emission.
- Author:
- phase 3 geo-scrape pipeline
-
Nested Class Summary
Nested classes/interfaces inherited from interface GeoScrapeService
GeoScrapeService.DryRunResult, GeoScrapeService.ScrapeRequest -
Constructor Summary
ConstructorsConstructorDescriptionGeoScrapeServiceImpl(SessionFactory sessionFactory, PreboardedExperimentService preboardedExperimentService, List<GeoRecordMatcher> matchers, org.springframework.transaction.PlatformTransactionManager transactionManager, TicketService ticketService, UserManager userManager) -
Method Summary
Modifier and TypeMethodDescriptionRun a scrape.Evaluate matchers against the same windowGeoScrapeService.scrape(ScrapeRequest)would inspect, but persist nothing — no watermark row, noPreboardedExperimentrow, no ticket.
-
Constructor Details
-
GeoScrapeServiceImpl
@Autowired public GeoScrapeServiceImpl(SessionFactory sessionFactory, PreboardedExperimentService preboardedExperimentService, List<GeoRecordMatcher> matchers, org.springframework.transaction.PlatformTransactionManager transactionManager, TicketService ticketService, UserManager userManager)
-
-
Method Details
-
scrape
Description copied from interface:GeoScrapeServiceRun a scrape. Synchronous; intended to be invoked from aGeoScrapeTaskCommandrunning on the task-runner. HonorsThread.interrupted()between pages — the watermark row is markedGeoScrapeWatermark.Status.CANCELLEDif the worker is interrupted mid-scan.- Specified by:
scrapein interfaceGeoScrapeService- Returns:
- the persisted watermark row covering this run (so the caller can summarize counts/timings).
-
scrapeDryRun
Description copied from interface:GeoScrapeServiceEvaluate matchers against the same windowGeoScrapeService.scrape(ScrapeRequest)would inspect, but persist nothing — no watermark row, noPreboardedExperimentrow, no ticket. Intended for downstream callers (currently gemma-curation-agents) that mock-persist the results locally to evaluate curation methods without writing to prod gemd. Wire shape per candidate mirrors the existing preboarded GET response so the dry-run flag can flip off later without a shape change.- Specified by:
scrapeDryRunin interfaceGeoScrapeService- Returns:
- the candidate list in scan order;
dryRunon the request is ignored (treated astrueby contract).
-
getLastWatermark
- Specified by:
getLastWatermarkin interfaceGeoScrapeService- Returns:
- the most recent
GeoScrapeWatermarkrow, ornullif no scrape has ever been run.
-