From 3410fe29b735da1514c37bd368b0dc05c9758583 Mon Sep 17 00:00:00 2001 From: Maarten van Gompel Date: Thu, 11 Jan 2024 11:18:37 +0100 Subject: [PATCH] added missing configuration methods to Config for new reverse indices (relates to #25) --- src/config.rs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/config.rs b/src/config.rs index a85e238..76a93a7 100644 --- a/src/config.rs +++ b/src/config.rs @@ -180,6 +180,30 @@ impl Config { self.dataset_annotation_metamap } + /// Is the reverse index for DataKey => Annotation enabled?. Holds only annotations that **directly** reference the DataKey (via [`crate::Selector::DataKeySelector`]), i.e. metadata + pub fn key_annotation_metamap(&self) -> bool { + self.key_annotation_metamap + } + + /// Enable/disable reverse index for DataKey => Annotation. Holds only annotations that **directly** reference the DataKey (via [`crate::Selector::DataKeySelector`]), i.e. metadata + /// Do not change this on a configuration that is already in use! + pub fn with_key_annotation_metamap(mut self, value: bool) -> Self { + self.key_annotation_metamap = value; + self + } + + /// Is the reverse index for AnnotationData => Annotation enabled?. Holds only annotations that **directly** reference the AnnotationData (via [`crate::Selector::AnnotationDataSelector`]), i.e. metadata + pub fn data_annotation_metamap(&self) -> bool { + self.data_annotation_metamap + } + + /// Enable/disable reverse index for AnnotationData => Annotation. Holds only annotations that **directly** reference the AnnotationData (via [`crate::Selector::AnnotationDataSelector`]), i.e. metadata + /// Do not change this on a configuration that is already in use! + pub fn with_data_annotation_metamap(mut self, value: bool) -> Self { + self.data_annotation_metamap = value; + self + } + /// Enable/disable index for annotations that reference other annotations /// Do not change this on a configuration that is already in use! pub fn with_annotation_annotation_map(mut self, value: bool) -> Self {