org.archive.crawler.deciderules
Class MatchesFilePatternDecideRule

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.deciderules.DecideRule
                      extended by org.archive.crawler.deciderules.ConfiguredDecideRule
                          extended by org.archive.crawler.deciderules.PredicatedDecideRule
                              extended by org.archive.crawler.deciderules.MatchesRegExpDecideRule
                                  extended by org.archive.crawler.deciderules.MatchesFilePatternDecideRule
All Implemented Interfaces:
java.io.Serializable, javax.management.DynamicMBean
Direct Known Subclasses:
NotMatchesFilePatternDecideRule

public class MatchesFilePatternDecideRule
extends MatchesRegExpDecideRule

Compares suffix of a passed CrawlURI, UURI, or String against a regular expression pattern, applying its configured decision to all matches. Several predefined patterns are available for convenience. Choosing 'custom' makes this the same as a regular MatchesRegExpDecideRule.

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 ALL
           
static java.lang.String ALL_DEFAULT_PATTERNS
           
static java.lang.String ATTR_USE_PRESET
           
static java.lang.String AUDIO
           
static java.lang.String AUDIO_PATTERNS
           
static java.lang.String CUSTOM
           
static java.lang.String IMAGES
           
static java.lang.String IMAGES_PATTERNS
           
static java.lang.String MISC
           
static java.lang.String MISC_PATTERNS
           
static java.lang.String VIDEO
           
static java.lang.String VIDEO_PATTERNS
           
 
Fields inherited from class org.archive.crawler.deciderules.MatchesRegExpDecideRule
ATTR_REGEXP
 
Fields inherited from class org.archive.crawler.deciderules.ConfiguredDecideRule
ALLOWED_TYPES, ATTR_DECISION
 
Fields inherited from class org.archive.crawler.deciderules.DecideRule
ACCEPT, PASS, REJECT
 
Fields inherited from class org.archive.crawler.settings.ComplexType
definition, definitionMap
 
Constructor Summary
MatchesFilePatternDecideRule(java.lang.String name)
          Usual constructor.
 
Method Summary
protected  java.lang.String getRegexp(java.lang.Object o)
          Use a preset if configured to do so.
 
Methods inherited from class org.archive.crawler.deciderules.MatchesRegExpDecideRule
evaluate
 
Methods inherited from class org.archive.crawler.deciderules.PredicatedDecideRule
decisionFor
 
Methods inherited from class org.archive.crawler.deciderules.ConfiguredDecideRule
singlePossibleNonPassDecision
 
Methods inherited from class org.archive.crawler.deciderules.DecideRule
getController, kickUpdate
 
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, toString, 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_USE_PRESET

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

IMAGES_PATTERNS

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

AUDIO_PATTERNS

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

VIDEO_PATTERNS

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

MISC_PATTERNS

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

ALL_DEFAULT_PATTERNS

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

ALL

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

IMAGES

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

AUDIO

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

VIDEO

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

MISC

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

CUSTOM

public static final java.lang.String CUSTOM
See Also:
Constant Field Values
Constructor Detail

MatchesFilePatternDecideRule

public MatchesFilePatternDecideRule(java.lang.String name)
Usual constructor.

Parameters:
name -
Method Detail

getRegexp

protected java.lang.String getRegexp(java.lang.Object o)
Use a preset if configured to do so.

Overrides:
getRegexp in class MatchesRegExpDecideRule
Parameters:
o - Context
Returns:
Regex to use.
See Also:
URIRegExpFilter.getRegexp(Object)


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