public class FiltersManager extends Object
data filters
.
This manager holds a set of filters and applies all the relevant
ones by building a stack that transforms a raw DataSource
into a processed DataSource
.
DataSource
,
DataFilter
Constructor and Description |
---|
FiltersManager()
Build an empty manager.
|
Modifier and Type | Method and Description |
---|---|
void |
addFilter(DataFilter filter)
Add a data filter.
|
DataSource |
applyRelevantFilters(DataSource original)
Apply all the relevant data filters, taking care of layers.
|
void |
clearFilters()
Remove all data filters.
|
public void addFilter(DataFilter filter)
filter
- filter to addapplyRelevantFilters(DataSource)
,
clearFilters()
public void clearFilters()
addFilter(DataFilter)
public DataSource applyRelevantFilters(DataSource original) throws IOException
If several filters can be applied, they will all be applied as a stack, even recursively if required. This means that if filter A applies to files with names of the form base.ext.a and filter B applies to files with names of the form base.ext.b, then providing base.ext.a.b.a will result in filter A being applied on top of filter B which itself is applied on top of another instance of filter A.
original
- original data sourceIOException
- if some data stream cannot be filteredaddFilter(DataFilter)
,
clearFilters()
Copyright © 2002-2021 CS GROUP. All rights reserved.