pub struct Config { /* private fields */ }Expand description
This holds the configuration. It is not limited to configuring a single part of the model, but unifies all in a single configuration.
Implementations§
source§impl Config
impl Config
pub fn new() -> Self
sourcepub fn with_textrelationmap(self, value: bool) -> Self
pub fn with_textrelationmap(self, value: bool) -> Self
Enable/disable the reverse index for text, it maps TextResource => TextSelection => Annotation Do not change this on a configuration that is already in use!
sourcepub fn textrelationmap(&self) -> bool
pub fn textrelationmap(&self) -> bool
Is the reverse index for text enabled? It maps TextResource => TextSelection => Annotation
sourcepub fn with_resource_annotation_map(self, value: bool) -> Self
pub fn with_resource_annotation_map(self, value: bool) -> Self
Enable/disable reverse index for TextResource => Annotation. Holds only annotations that directly reference the TextResource (via crate::Selector::ResourceSelector), i.e. metadata
Do not change this on a configuration that is already in use!
sourcepub fn resource_annotation_map(&self) -> bool
pub fn resource_annotation_map(&self) -> bool
Is the reverse index for TextResource => Annotation enabled? Holds only annotations that directly reference the TextResource (via crate::Selector::ResourceSelector), i.e. metadata
sourcepub fn with_dataset_annotation_map(self, value: bool) -> Self
pub fn with_dataset_annotation_map(self, value: bool) -> Self
Enable/disable reverse index for AnnotationDataSet => Annotation. Holds only annotations that directly reference the AnnotationDataSet (via crate::Selector::DataSetSelector), i.e. metadata
Do not change this on a configuration that is already in use!
sourcepub fn dataset_annotation_map(&self) -> bool
pub fn dataset_annotation_map(&self) -> bool
Is the reverse index for AnnotationDataSet => Annotation enabled?. Holds only annotations that directly reference the AnnotationDataSet (via crate::Selector::DataSetSelector), i.e. metadata
sourcepub fn key_annotation_metamap(&self) -> bool
pub fn key_annotation_metamap(&self) -> bool
Is the reverse index for DataKey => Annotation enabled?. Holds only annotations that directly reference the DataKey (via crate::Selector::DataKeySelector), i.e. metadata
sourcepub fn with_key_annotation_metamap(self, value: bool) -> Self
pub fn with_key_annotation_metamap(self, value: bool) -> Self
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!
sourcepub fn data_annotation_metamap(&self) -> bool
pub fn data_annotation_metamap(&self) -> bool
Is the reverse index for AnnotationData => Annotation enabled?. Holds only annotations that directly reference the AnnotationData (via crate::Selector::AnnotationDataSelector), i.e. metadata
sourcepub fn with_data_annotation_metamap(self, value: bool) -> Self
pub fn with_data_annotation_metamap(self, value: bool) -> Self
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!
sourcepub fn with_annotation_annotation_map(self, value: bool) -> Self
pub fn with_annotation_annotation_map(self, value: bool) -> Self
Enable/disable index for annotations that reference other annotations Do not change this on a configuration that is already in use!
sourcepub fn annotation_annotation_map(&self) -> bool
pub fn annotation_annotation_map(&self) -> bool
Is the index for annotations that reference other annotations enabled?
sourcepub fn with_dataformat(self, value: DataFormat) -> Self
pub fn with_dataformat(self, value: DataFormat) -> Self
Sets chosen dataformat for serialisation, defaults to STAM JSON.
Do not change this on a configuration that is already in use! Use [AnnotationStore.set_filename()] instead.
pub fn with_shrink_to_fit(self, value: bool) -> Self
sourcepub fn with_strip_temp_ids(self, value: bool) -> Self
pub fn with_strip_temp_ids(self, value: bool) -> Self
Strip temporary public identifiers when deserialising?
sourcepub fn dataformat(&self) -> DataFormat
pub fn dataformat(&self) -> DataFormat
Returns the configured dataformat for serialisation.
sourcepub fn with_generate_ids(self, value: bool) -> Self
pub fn with_generate_ids(self, value: bool) -> Self
Generate public IDs when missing. Each will consist of 21 URL-friendly ASCII symbols after a prefix of A for Annotations, S for DataSets, D for AnnotationData, R for resources
sourcepub fn generate_ids(&self) -> bool
pub fn generate_ids(&self) -> bool
Is generation of public IDs when missing enabled or not?
sourcepub fn strip_temp_ids(&self) -> bool
pub fn strip_temp_ids(&self) -> bool
Strip temporary public identifiers when deserialising?
sourcepub fn shrink_to_fit(&self) -> bool
pub fn shrink_to_fit(&self) -> bool
Shrink data structures for minimal memory footprint?
sourcepub fn with_use_include(self, value: bool) -> Self
pub fn with_use_include(self, value: bool) -> Self
Use @include mechanism for STAM JSON, or output all to a single file?
sourcepub fn use_include(&self) -> bool
pub fn use_include(&self) -> bool
Use @include mechanism for STAM JSON, or output all to a single file?
sourcepub fn with_milestone_interval(self, value: usize) -> Self
pub fn with_milestone_interval(self, value: usize) -> Self
Set the configured milestone interval The Milestone placement interval (in unicode codepoints) is used in indexing text resources. A low number above zero increases search performance at the cost of memory and increased initialisation time.
sourcepub fn milestone_interval(&self) -> usize
pub fn milestone_interval(&self) -> usize
Return the configured milestone interval The Milestone placement interval (in unicode codepoints) is used in indexing text resources. A low number above zero increases search performance at the cost of memory and increased initialisation time.
sourcepub fn with_debug(self, value: bool) -> Self
pub fn with_debug(self, value: bool) -> Self
Enable or disable debug mode. In debug mode, verbose output will be printed to standard error output