Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.archive.crawler.settings
Class RegularExpressionConstraint

    java.lang.Object
      org.archive.crawler.settings.Constraint
          org.archive.crawler.settings.RegularExpressionConstraint

All Implemented Interfaces:
  java.io.Serializable, java.lang.Comparable<Constraint>

    public class RegularExpressionConstraint

extends Constraint
implements java.io.Serializable

A constraint that checks that a value matches a regular expression. This constraint can only be applied to textual attributes.

Author:
  John Erik Halse
See Also:
  Serialized Form

Nested Class Summary

Nested classes/interfaces inherited from class org.archive.crawler.settings.Constraint
`Constraint.FailedCheck`

Constructor Summary
`RegularExpressionConstraint(java.lang.String pattern)` Constructs a new RegularExpressionConstraint.
`RegularExpressionConstraint(java.lang.String pattern, java.util.logging.Level level)` Constructs a new RegularExpressionConstraint using the default error message.
`RegularExpressionConstraint(java.lang.String pattern, java.util.logging.Level level, java.lang.String msg)` Constructs a new RegularExpressionConstraint.
`RegularExpressionConstraint(java.lang.String pattern, java.lang.String msg)` Constructs a new RegularExpressionConstraint using default severity level (`Level.WARNING`).

Method Summary
`Constraint.FailedCheck` | `innerCheck(CrawlerSettings settings, ComplexType owner, Type definition, java.lang.Object value)` The method all subclasses should implement to do the actual checking.

Methods inherited from class org.archive.crawler.settings.Constraint
`check, compareTo, getDefaultMessage`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### RegularExpressionConstraint

    public RegularExpressionConstraint(java.lang.String pattern,
                                       java.util.logging.Level level,
                                       java.lang.String msg)

  Constructs a new RegularExpressionConstraint.

  Parameters:
    `pattern` - the regular expression pattern the value must match.
    `level` - the severity level.
    `msg` - the default error message.

### RegularExpressionConstraint

    public RegularExpressionConstraint(java.lang.String pattern,
                                       java.lang.String msg)

  Constructs a new RegularExpressionConstraint using default severity level (`Level.WARNING`).

  Parameters:
    `pattern` - the regular expression pattern the value must match.
    `msg` - the default error message.

### RegularExpressionConstraint

    public RegularExpressionConstraint(java.lang.String pattern,
                                       java.util.logging.Level level)

  Constructs a new RegularExpressionConstraint using the default error message.

  Parameters:
    `pattern` - the regular expression pattern the value must match.
    `level` - the severity level.

### RegularExpressionConstraint

    public RegularExpressionConstraint(java.lang.String pattern)

  Constructs a new RegularExpressionConstraint.

  Parameters:
    `pattern` - the regular expression pattern the value must match.

Method Detail

### innerCheck

    public Constraint.FailedCheck innerCheck(CrawlerSettings settings,
                                             ComplexType owner,
                                             Type definition,
                                             java.lang.Object value)

  Description copied from class: `Constraint`
  The method all subclasses should implement to do the actual checking.

  Specified by:
    `innerCheck` in class `Constraint`
    `owner` - the ComplexType owning the attribute to check.
    `definition` - the definition to check the attribute against.
    `value` - the value to check.
  Returns:
    null if ok, or an instance of `Constraint.FailedCheck`if the check failed.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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