Class ConfigureableDataprocessor<T extends ConfigureableField>

    • Constructor Detail

      • ConfigureableDataprocessor

        public ConfigureableDataprocessor()
    • Method Detail

      • initialize

        public void initialize​(FieldConfigAccess fieldConfig,
                               Map<String,​String> confMap)
        Description copied from interface: DocumentPreProcessor
        DataPreProcessor MUST have a no-args constructor. To configure it afterwards, this method will be used.
        Specified by:
        initialize in interface DocumentPreProcessor
        confMap - custom string-to-string map that can be configured per DocumentPreProcessor.
      • getPatternConfiguration

        protected abstract T getPatternConfiguration​(String key,
                                                     String value,
                                                     Map<String,​String> confMap)
        Returns the ConfigureableField holding the parsed configuration for every configured key.
        Parameters:
        key - a key from the data processor configuration for this data processor.
        value - the value of that key.
        confMap - the complete data processor configuration map.
        Returns:
        the parsed configurable field for the key.
      • process

        public boolean process​(Document sourceDocument,
                               boolean visible)
        Description copied from interface: DocumentPreProcessor
        Called for each source document.
        Specified by:
        process in interface DocumentPreProcessor
        visible - weather or not the record is currently marked for indexing.
        Returns:
        true if the record should be indexed, false otherwise.
      • isRecordVisible

        protected boolean isRecordVisible​(Document sourceDocument,
                                          boolean visible)
        Called at the end of each process(Document, boolean) run after getProcessConsumer(Document, boolean) is has run for every ConfigureableField, to determine weather the record should be visible or not.
        Parameters:
        sourceDocument - the record data
        visible - the current visibility of the record
        Returns:
        true if the record should be indexed, false otherwise.