org.archive.crawler.settings
Class LegalValueTypeConstraint

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

public class LegalValueTypeConstraint
extends Constraint
implements java.io.Serializable

A constraint that checks that an attribute value is of the right type

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

LegalValueTypeConstraint

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

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

LegalValueTypeConstraint

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

Parameters:
msg - the default error message.

LegalValueTypeConstraint

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

Parameters:
level -

LegalValueTypeConstraint

public LegalValueTypeConstraint()
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.