org.archive.crawler.filter
Class PathDepthFilter

java.lang.Object
  extended by javax.management.Attribute
      extended by org.archive.crawler.settings.Type
          extended by org.archive.crawler.settings.ComplexType
              extended by org.archive.crawler.settings.ModuleType
                  extended by org.archive.crawler.framework.Filter
                      extended by org.archive.crawler.filter.PathDepthFilter
All Implemented Interfaces:
java.io.Serializable, javax.management.DynamicMBean

Deprecated. As of release 1.10.0. Replaced by DecidingFilter and equivalent DecideRule.

public class PathDepthFilter
extends Filter

Accepts all urls passed in with a path depth less or equal than the max-path-depth value.

Author:
Igor Ranitovic
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.archive.crawler.settings.ComplexType
ComplexType.MBeanAttributeInfoIterator
 
Field Summary
static java.lang.String ATTR_MATCH_RETURN_VALUE
          Deprecated.  
static java.lang.String ATTR_MAX_PATH_DEPTH
          Deprecated.  
(package private)  java.lang.Integer maxPathDepth
          Deprecated.  
(package private) static char slash
          Deprecated.  
 
Fields inherited from class org.archive.crawler.framework.Filter
ATTR_ENABLED
 
Fields inherited from class org.archive.crawler.settings.ComplexType
definition, definitionMap
 
Constructor Summary
PathDepthFilter(java.lang.String name)
          Deprecated.  
 
Method Summary
protected  boolean getFilterOffPosition(CrawlURI curi)
          Deprecated. If the filter is disabled, the value returned by this method is what filters return as their disabled setting.
protected  boolean innerAccepts(java.lang.Object o)
          Deprecated. Classes subclassing this one should override this method to perfrom their custom determination of whether or not the object given to it.
protected  boolean returnTrueIfMatches(CrawlURI curi)
          Deprecated. Checks to see if filter functionality should be inverted for this curi.
 
Methods inherited from class org.archive.crawler.framework.Filter
accepts, kickUpdate, toString
 
Methods inherited from class org.archive.crawler.settings.ModuleType
addElement, listUsedFiles
 
Methods inherited from class org.archive.crawler.settings.ComplexType
addElementToDefinition, checkValue, earlyInitialize, getAbsoluteName, getAttribute, getAttribute, getAttribute, getAttributeInfo, getAttributeInfo, getAttributeInfoIterator, getAttributes, getDataContainerRecursive, getDataContainerRecursive, getDefaultValue, getDescription, getElementFromDefinition, getLegalValues, getLocalAttribute, getMBeanInfo, getMBeanInfo, getParent, getPreservedFields, getSettingsHandler, getUncheckedAttribute, getValue, globalSettings, invoke, isInitialized, isOverridden, iterator, removeElementFromDefinition, setAsOrder, setAttribute, setAttribute, setAttributes, setDescription, setPreservedFields, unsetAttribute
 
Methods inherited from class org.archive.crawler.settings.Type
addConstraint, equals, getConstraints, getLegalValueType, isExpertSetting, isOverrideable, isTransient, setExpertSetting, setLegalValueType, setOverrideable, setTransient
 
Methods inherited from class javax.management.Attribute
getName, hashCode
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ATTR_MATCH_RETURN_VALUE

public static final java.lang.String ATTR_MATCH_RETURN_VALUE
Deprecated. 
See Also:
Constant Field Values

ATTR_MAX_PATH_DEPTH

public static final java.lang.String ATTR_MAX_PATH_DEPTH
Deprecated. 
See Also:
Constant Field Values

maxPathDepth

java.lang.Integer maxPathDepth
Deprecated. 

slash

static final char slash
Deprecated. 
See Also:
Constant Field Values
Constructor Detail

PathDepthFilter

public PathDepthFilter(java.lang.String name)
Deprecated. 
Parameters:
name -
Method Detail

innerAccepts

protected boolean innerAccepts(java.lang.Object o)
Deprecated. 
Description copied from class: Filter
Classes subclassing this one should override this method to perfrom their custom determination of whether or not the object given to it.

Overrides:
innerAccepts in class Filter
Parameters:
o - The object
Returns:
True if it passes the filter.

returnTrueIfMatches

protected boolean returnTrueIfMatches(CrawlURI curi)
Deprecated. 
Description copied from class: Filter
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.

Overrides:
returnTrueIfMatches in class Filter
Parameters:
curi - Current CrawlURI
Returns:
true for default behaviour, false otherwise.

getFilterOffPosition

protected boolean getFilterOffPosition(CrawlURI curi)
Deprecated. 
Description copied from class: Filter
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.

Overrides:
getFilterOffPosition in class Filter
Parameters:
curi - CrawlURI to use as context. Passed curi can be null.
Returns:
This filters 'off' position.


Copyright © 2003-2011 Internet Archive. All Rights Reserved.