thredds.crawlabledataset.filter
Class WildcardMatchOnNameFilter

java.lang.Object
  extended by thredds.crawlabledataset.filter.WildcardMatchOnNameFilter
All Implemented Interfaces:
CrawlableDatasetFilter
Direct Known Subclasses:
WildcardMatchOnPathFilter

public class WildcardMatchOnNameFilter
extends Object
implements CrawlableDatasetFilter

CrawlableDatasetFilter implementation that accepts datasets whose names are matched by the given wildcard string. The wildcard string can contain astrisks ("*") which match 0 or more characters and question marks ("?") which match 0 or 1 character.

Since:
Nov 5, 2005 12:51:56 PM
Author:
edavis

Field Summary
protected  Pattern pattern
           
protected  String wildcardString
           
 
Constructor Summary
WildcardMatchOnNameFilter(String wildcardString)
           
 
Method Summary
 boolean accept(CrawlableDataset dataset)
          Test whether the specified CrawlableDataset should be included in a list of CrawlableDatasets.
 Object getConfigObject()
          Return the configuration object.
 String getWildcardString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

wildcardString

protected String wildcardString

pattern

protected Pattern pattern
Constructor Detail

WildcardMatchOnNameFilter

public WildcardMatchOnNameFilter(String wildcardString)
Method Detail

getConfigObject

public Object getConfigObject()
Description copied from interface: CrawlableDatasetFilter
Return the configuration object.

Specified by:
getConfigObject in interface CrawlableDatasetFilter
Returns:
the configuration Object (may be null).

getWildcardString

public String getWildcardString()

accept

public boolean accept(CrawlableDataset dataset)
Description copied from interface: CrawlableDatasetFilter
Test whether the specified CrawlableDataset should be included in a list of CrawlableDatasets.

Specified by:
accept in interface CrawlableDatasetFilter
Parameters:
dataset - the CrawlableDataset to test for inclusion.
Returns:
true if the given CrawlableDataset should be included, false otherwise.


Copyright © 1999-2011 UCAR/Unidata. All Rights Reserved.