| org.archive.crawler.settings.ComplexType org.archive.crawler.settings.ModuleType org.archive.crawler.framework.Filter
All known Subclasses: org.archive.crawler.filter.SurtPrefixFilter, org.archive.crawler.framework.CrawlScope, org.archive.crawler.filter.HTTPMidFetchUnchangedFilter, org.archive.crawler.filter.TransclusionFilter, org.archive.crawler.filter.PathDepthFilter, org.archive.crawler.deciderules.DecidingFilter, org.archive.crawler.filter.URIListRegExpFilter, org.archive.crawler.filter.OrFilter, org.archive.crawler.filter.URIRegExpFilter, org.archive.crawler.filter.HopsFilter,
Filter | public class Filter extends ModuleType (Code) | | Base class for filter classes.
Several classes allow 'filters' to be applied to them. Filters are classes
that, based on an arbitrary object passed to them, return a boolean stating
if if passes the filter. Thus applying filters can affect the behavior of
those classes. This class provides the basic framework for filters. All
detailed implementation of filters inherit from it and it is considered to
be a 'null' filter (always returns true).
author: Gordon Mohr See Also: org.archive.crawler.framework.Processor |
Constructor Summary | |
public | Filter(String name, String description) Creates a new 'null' filter. | public | Filter(String name) Creates a new 'null' filter. |
Method Summary | |
public boolean | accepts(Object o) | protected boolean | getFilterOffPosition(CrawlURI curi) If the filter is disabled, the value returned by this method is
what filters return as their disabled setting.
Default is that we return 'true', continue processing, but some
filters -- the exclude filters for example -- will want to return
false if disabled so processing can continue.
Parameters: curi - CrawlURI to use as context. | protected boolean | innerAccepts(Object o) Classes subclassing this one should override this method to perfrom
their custom determination of whether or not the object given to it. | public void | kickUpdate() | protected boolean | returnTrueIfMatches(CrawlURI curi) Checks to see if filter functionality should be inverted for this
curi.
All filters will by default return true if curi is accepted by the
filter. | public String | toString() |
Filter | public Filter(String name, String description)(Code) | | Creates a new 'null' filter.
Parameters: name - the name of the filter. Parameters: description - an description of the filter suitable for showing inthe user interface. |
Filter | public Filter(String name)(Code) | | Creates a new 'null' filter.
Parameters: name - the name of the filter. |
getFilterOffPosition | protected boolean getFilterOffPosition(CrawlURI curi)(Code) | | If the filter is disabled, the value returned by this method is
what filters return as their disabled setting.
Default is that we return 'true', continue processing, but some
filters -- the exclude filters for example -- will want to return
false if disabled so processing can continue.
Parameters: curi - CrawlURI to use as context. Passed curi can be null. This filters 'off' position. |
innerAccepts | protected boolean innerAccepts(Object o)(Code) | | Classes subclassing this one should override this method to perfrom
their custom determination of whether or not the object given to it.
Parameters: o - The object True if it passes the filter. |
kickUpdate | public void kickUpdate()(Code) | | |
returnTrueIfMatches | protected boolean returnTrueIfMatches(CrawlURI curi)(Code) | | Checks to see if filter functionality should be inverted for this
curi.
All filters will by default return true if curi is accepted by the
filter. If this method returns false, then the filter will return true
if doesn't match.
Classes extending this class should override this method with
appropriate code.
Parameters: curi - Current CrawlURI true for default behaviour, false otherwise. |
Methods inherited from org.archive.crawler.settings.ComplexType | public Type addElement(CrawlerSettings settings, Type type) throws InvalidAttributeValueException(Code)(Java Doc) public Type addElementToDefinition(Type type)(Code)(Java Doc) public FailedCheck checkValue(CrawlerSettings settings, String attributeName, Object value)(Code)(Java Doc) public void earlyInitialize(CrawlerSettings settings)(Code)(Java Doc) public String getAbsoluteName()(Code)(Java Doc) public Object getAttribute(String name) throws AttributeNotFoundException, MBeanException, ReflectionException(Code)(Java Doc) public Object getAttribute(String name, CrawlURI uri) throws AttributeNotFoundException(Code)(Java Doc) public Object getAttribute(Object context, String name) throws AttributeNotFoundException(Code)(Java Doc) public MBeanAttributeInfo getAttributeInfo(CrawlerSettings settings, String name)(Code)(Java Doc) public MBeanAttributeInfo getAttributeInfo(String name)(Code)(Java Doc) public MBeanAttributeInfoIterator getAttributeInfoIterator(Object context)(Code)(Java Doc) public AttributeList getAttributes(String[] name)(Code)(Java Doc) protected DataContainer getDataContainerRecursive(Context context)(Code)(Java Doc) protected DataContainer getDataContainerRecursive(Context context, String key) throws AttributeNotFoundException(Code)(Java Doc) public Object getDefaultValue()(Code)(Java Doc) public String getDescription()(Code)(Java Doc) public Type getElementFromDefinition(String name)(Code)(Java Doc) public Object[] getLegalValues()(Code)(Java Doc) public Object getLocalAttribute(CrawlerSettings settings, String name) throws AttributeNotFoundException(Code)(Java Doc) public MBeanInfo getMBeanInfo()(Code)(Java Doc) public MBeanInfo getMBeanInfo(Object context)(Code)(Java Doc) public ComplexType getParent()(Code)(Java Doc) protected String[] getPreservedFields()(Code)(Java Doc) public SettingsHandler getSettingsHandler()(Code)(Java Doc) public Object getUncheckedAttribute(Object context, String name)(Code)(Java Doc) public Object getValue()(Code)(Java Doc) public CrawlerSettings globalSettings()(Code)(Java Doc) public Object invoke(String arg0, Object[] arg1, String[] arg2) throws MBeanException, ReflectionException(Code)(Java Doc) public boolean isInitialized()(Code)(Java Doc) public boolean isOverridden(CrawlerSettings settings, String name) throws AttributeNotFoundException(Code)(Java Doc) public Iterator iterator(Object context)(Code)(Java Doc) protected Type removeElementFromDefinition(String name)(Code)(Java Doc) protected void setAsOrder(SettingsHandler settingsHandler) throws InvalidAttributeValueException(Code)(Java Doc) final public synchronized void setAttribute(Attribute attribute) throws AttributeNotFoundException, InvalidAttributeValueException, MBeanException, ReflectionException(Code)(Java Doc) final public synchronized void setAttribute(CrawlerSettings settings, Attribute attribute) throws InvalidAttributeValueException, AttributeNotFoundException(Code)(Java Doc) public AttributeList setAttributes(AttributeList attributes)(Code)(Java Doc) public void setDescription(String string)(Code)(Java Doc) protected void setPreservedFields(String[] preservedFields)(Code)(Java Doc) public String toString()(Code)(Java Doc) public Object unsetAttribute(CrawlerSettings settings, String name) throws AttributeNotFoundException(Code)(Java Doc)
|
|
|