org.archive.crawler.settings
Class LegalValueListConstraint

java.lang.Object
  extended by org.archive.crawler.settings.Constraint
      extended by org.archive.crawler.settings.LegalValueListConstraint
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Constraint>

public class LegalValueListConstraint
extends Constraint

A constraint that checks that an attribute value matches one of the items in the list of legal values.

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
LegalValueListConstraint()
          Constructs a new LegalValueListConstraint using default severity level (Level.WARNING) and default error message.
LegalValueListConstraint(java.util.logging.Level level)
          Constructs a new LegalValueListConstraint using default error message.
LegalValueListConstraint(java.util.logging.Level level, java.lang.String msg)
          Constructs a new LegalValueListConstraint.
LegalValueListConstraint(java.lang.String msg)
          Constructs a new LegalValueListConstraint 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

LegalValueListConstraint

public LegalValueListConstraint(java.util.logging.Level level,
                                java.lang.String msg)
Constructs a new LegalValueListConstraint.

Parameters:
level - the severity level.
msg - the default error message.

LegalValueListConstraint

public LegalValueListConstraint(java.lang.String msg)
Constructs a new LegalValueListConstraint using default severity level (Level.WARNING).

Parameters:
msg - the default error message.

LegalValueListConstraint

public LegalValueListConstraint(java.util.logging.Level level)
Constructs a new LegalValueListConstraint using default error message.

Parameters:
level -

LegalValueListConstraint

public LegalValueListConstraint()
Constructs a new LegalValueListConstraint using default severity level (Level.WARNING) and default error message.

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.FailedCheckif the check failed.


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