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 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.
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.
sourcepub fn generate_ids(&self) -> bool
pub fn generate_ids(&self) -> bool
Is generation of public IDs when missing enabled or not?
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