public class DatasetFilter
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.regex.Pattern |
regExpPattern |
Constructor and Description |
---|
DatasetFilter(DatasetSource parentDsSource,
java.lang.String name,
thredds.cataloggen.config.DatasetFilter.Type type,
java.lang.String matchPattern)
Constructor
|
DatasetFilter(DatasetSource parentDsSource,
java.lang.String name,
thredds.cataloggen.config.DatasetFilter.Type type,
java.lang.String matchPattern,
boolean applyToCollectionDatasets,
boolean applyToAtomicDatasets,
boolean rejectMatchingDatasets) |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(InvDataset dataset)
Test whether the given dataset should be included in a dataset collection.
|
static boolean |
acceptDatasetByFilterGroup(java.util.List filters,
InvDataset dataset,
boolean isCollectionDataset)
Given a dataset and a group of filters, return true if the group of
filters indicates that the dataset should be accepted, false if it
should be rejected.
|
protected boolean |
appliesToDataset(InvDataset dataset) |
java.lang.String |
getMatchPattern()
Return the matchPattern of this DatasetFilter
|
java.lang.String |
getMatchPatternTarget() |
java.lang.String |
getName()
Return the name of this DatasetFilter
|
DatasetSource |
getParentDatasetSource()
Return the parent DatasetSource of this DatasetFilter
|
thredds.cataloggen.config.DatasetFilter.Type |
getType()
Return the type of this DatasetFilter
|
boolean |
isAcceptMatchingDatasets() |
boolean |
isApplyToAtomicDatasets() |
boolean |
isApplyToCollectionDatasets() |
boolean |
isRejectMatchingDatasets() |
boolean |
reject(InvDataset dataset)
Test whether the given dataset should be excluded from the dataset collection.
|
void |
setApplyToAtomicDatasets(boolean applyToAtomicDatasets) |
void |
setApplyToCollectionDatasets(boolean applyToCollectionDatasets) |
void |
setMatchPatternTarget(java.lang.String matchPatternTarget) |
void |
setRejectMatchingDatasets(boolean rejectMatchingDatasets) |
java.lang.String |
toString()
string representation
|
public DatasetFilter(DatasetSource parentDsSource, java.lang.String name, thredds.cataloggen.config.DatasetFilter.Type type, java.lang.String matchPattern)
parentDsSource
- name
- type
- matchPattern
- public DatasetFilter(DatasetSource parentDsSource, java.lang.String name, thredds.cataloggen.config.DatasetFilter.Type type, java.lang.String matchPattern, boolean applyToCollectionDatasets, boolean applyToAtomicDatasets, boolean rejectMatchingDatasets)
public DatasetSource getParentDatasetSource()
public java.lang.String getName()
public thredds.cataloggen.config.DatasetFilter.Type getType()
public java.lang.String getMatchPattern()
public java.lang.String getMatchPatternTarget()
public void setMatchPatternTarget(java.lang.String matchPatternTarget)
public boolean isApplyToCollectionDatasets()
public void setApplyToCollectionDatasets(boolean applyToCollectionDatasets)
public boolean isApplyToAtomicDatasets()
public void setApplyToAtomicDatasets(boolean applyToAtomicDatasets)
public boolean isRejectMatchingDatasets()
public boolean isAcceptMatchingDatasets()
public void setRejectMatchingDatasets(boolean rejectMatchingDatasets)
public java.lang.String toString()
toString
in class java.lang.Object
public boolean reject(InvDataset dataset)
dataset
- - the dataset to be testedjava.lang.IllegalStateException
- if the filter accepts rather than rejects datasets.public boolean accept(InvDataset dataset)
dataset
- - the dataset to be testedjava.lang.IllegalStateException
- if the filter rejects rather than accepts datasets.protected boolean appliesToDataset(InvDataset dataset)
public static boolean acceptDatasetByFilterGroup(java.util.List filters, InvDataset dataset, boolean isCollectionDataset)
filters
- - the group of filters to apply to the dataset.dataset
- - the dataset on which to apply the filter group.isCollectionDataset
- java.lang.NullPointerException
- if the filter list or the dataset is null.