Class AnnotationSetTriageServiceImpl
java.lang.Object
ubic.gemma.persistence.service.common.auditAndSecurity.curation.AnnotationSetTriageServiceImpl
- All Implemented Interfaces:
AnnotationSetTriageService
@Service
public class AnnotationSetTriageServiceImpl
extends Object
implements AnnotationSetTriageService
Default
AnnotationSetTriageService.
Deliberately emits no audit event. Any audit event sets
curationDetails.lastUpdated, and that field is the
optimistic-concurrency token the curation commit checks — so triaging a
dataset would 409 every draft in flight on it. Same reasoning as
bebe778980 for snapshots. The triage row carries its own
judgedBy / judgedAt, so it is its own record.
-
Constructor Summary
ConstructorsConstructorDescriptionAnnotationSetTriageServiceImpl(AnnotationSetTriageDao annotationSetTriageDao) -
Method Summary
Modifier and TypeMethodDescriptionCorpus-wide tally by verdict.effectiveFor(AnnotationSet annotationSet) The ruling that counts — the most recent — or empty when nobody has ruled.effectiveForIds(Collection<Long> annotationSetIds) effectiveForInvestigationIds(Collection<Long> investigationIds) The effective ruling for each of several datasets, keyed by dataset id — newest ruling across every annotation set the dataset owns.findByInvestigation(Investigation investigation) Every ruling on any set of one investigation, most recent first.findBySet(AnnotationSet annotationSet) Every ruling on one set, most recent first.judge(AnnotationSet annotationSet, TriageVerdict verdict, String judgedBy, TriageJudgeKind judgeKind, String note) Record or replacejudgedBy's ruling onannotationSet.booleanreviewedByHuman(AnnotationSet annotationSet) Whether a person — not only a machine — has ruled on this set.booleanwithdraw(AnnotationSet annotationSet, String judgedBy) WithdrawjudgedBy's ruling, returning the set to un-triaged if it was the only one.
-
Constructor Details
-
AnnotationSetTriageServiceImpl
-
-
Method Details
-
judge
@Transactional public AnnotationSetTriage judge(AnnotationSet annotationSet, TriageVerdict verdict, String judgedBy, TriageJudgeKind judgeKind, @Nullable String note) Description copied from interface:AnnotationSetTriageServiceRecord or replacejudgedBy's ruling onannotationSet. Idempotent per judge: a second call from the same judge updates the standing row rather than adding one.- Specified by:
judgein interfaceAnnotationSetTriageService- Parameters:
judgedBy- the ruling identity — a username for a person, a run id for an agent. Never the transport's principal.judgeKind- stored rather than inferred fromjudgedBy, so "has a person ruled on this" does not depend on knowing every agent run id.note- why; the only place aTriageVerdict.WontFixsays what it is declining to fix. Optional.
-
withdraw
Description copied from interface:AnnotationSetTriageServiceWithdrawjudgedBy's ruling, returning the set to un-triaged if it was the only one.- Specified by:
withdrawin interfaceAnnotationSetTriageService- Returns:
- whether a row was removed
-
findBySet
@Transactional(readOnly=true) public List<AnnotationSetTriage> findBySet(AnnotationSet annotationSet) Description copied from interface:AnnotationSetTriageServiceEvery ruling on one set, most recent first.- Specified by:
findBySetin interfaceAnnotationSetTriageService
-
effectiveFor
@Transactional(readOnly=true) public Optional<AnnotationSetTriage> effectiveFor(AnnotationSet annotationSet) Description copied from interface:AnnotationSetTriageServiceThe ruling that counts — the most recent — or empty when nobody has ruled.- Specified by:
effectiveForin interfaceAnnotationSetTriageService
-
effectiveForIds
@Transactional(readOnly=true) public Map<Long, AnnotationSetTriage> effectiveForIds(Collection<Long> annotationSetIds) Description copied from interface:AnnotationSetTriageServiceBatchedAnnotationSetTriageService.effectiveFor(AnnotationSet). Sets with no ruling are absent from the map rather than mapped to null.- Specified by:
effectiveForIdsin interfaceAnnotationSetTriageService
-
effectiveForInvestigationIds
@Transactional(readOnly=true) public Map<Long, AnnotationSetTriage> effectiveForInvestigationIds(Collection<Long> investigationIds) Description copied from interface:AnnotationSetTriageServiceThe effective ruling for each of several datasets, keyed by dataset id — newest ruling across every annotation set the dataset owns. One round-trip for a whole page.- Specified by:
effectiveForInvestigationIdsin interfaceAnnotationSetTriageService
-
findByInvestigation
@Transactional(readOnly=true) public List<AnnotationSetTriage> findByInvestigation(Investigation investigation) Description copied from interface:AnnotationSetTriageServiceEvery ruling on any set of one investigation, most recent first.- Specified by:
findByInvestigationin interfaceAnnotationSetTriageService
-
reviewedByHuman
Description copied from interface:AnnotationSetTriageServiceWhether a person — not only a machine — has ruled on this set.- Specified by:
reviewedByHumanin interfaceAnnotationSetTriageService
-
countByVerdict
Description copied from interface:AnnotationSetTriageServiceCorpus-wide tally by verdict.- Specified by:
countByVerdictin interfaceAnnotationSetTriageService
-