org.exolab.castor.xml.validators
Class PatternValidator
java.lang.Object
org.exolab.castor.xml.validators.PatternValidator
public abstract class PatternValidator
extends java.lang.Object
A simple abstract class used for validating types
which allow the pattern facet
$Revision: 1.1.1.1 $ $Date: 2003/03/03 07:09:52 $
PatternValidator() - Creates a new PatternValidator with no default
regular expression
|
PatternValidator(String pattern) - Creates a new PatternValidator with the given
regular expresion
|
String | getPattern() - Returns the regular expression pattern for this PatternValidator,
or null if no pattern has been set.
|
boolean | hasPattern() - Returns true if a regular expression has been set
for this PatternValidator
|
void | setPattern(String pattern) - Sets the regular expression to validate against
|
void | validate(Object object, ValidationContext context) - Validates the given Object
|
void | validate(String str, ValidationContext context) - Validates the given String against the regular expression pattern
of this PatternValidator.
|
PatternValidator
public PatternValidator()
Creates a new PatternValidator with no default
regular expression
PatternValidator
public PatternValidator(String pattern)
Creates a new PatternValidator with the given
regular expresion
pattern
- the regular expression to validate against
getPattern
public String getPattern()
Returns the regular expression pattern for this PatternValidator,
or null if no pattern has been set.
- the regular expression pattern
hasPattern
public boolean hasPattern()
Returns true if a regular expression has been set
for this PatternValidator
- true if a regular expression has been set
for this PatternValidator
setPattern
public void setPattern(String pattern)
Sets the regular expression to validate against
pattern
- the regular expression to use when validating
validate
public void validate(Object object,
ValidationContext context)
throws ValidationException
Validates the given Object
object
- the Object to validatecontext
- the ValidationContext
validate
public void validate(String str,
ValidationContext context)
throws ValidationException
Validates the given String against the regular expression pattern
of this PatternValidator.
Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com