Filter

From DocDataFlow
Jump to: navigation, search

A filter is an atomic adapter which can selectively strip granules from the data flow.

Inside the filter, there is some programming logic which checks every input granule, and returns a pass/fail answer.

Any granules that fail the test are dropped from the data flow.

An example: a filter could be set up to drop any word granules that contain a word that starts with a lower case letter.

Consider the following data flow which originated somewhere up-flow. This is the input to the example filter:

Word: This
Word: is
Word: a
Word: paragraph
Para: This is a paragraph
Word: This
Word: is
Word: another
Word: paragraph
Para: This is another paragraph
TextFrame: pos (10, 20), width 20, height 80

If a filter is set up to drop any words starting with a lower case letter, the output of the filter would become:

Word: This
Para: This is a paragraph
Word: This
Para: This is another paragraph
TextFrame: pos (10, 20), width 20, height 80