public class NameValidator extends StringValidator
PatternValidator.DefaultRegExpEvaluator| Modifier and Type | Field and Description |
|---|---|
static short |
CDATA |
static short |
NCNAME |
static short |
NMTOKEN |
| Constructor and Description |
|---|
NameValidator()
Creates a new NameValidator with the default validation
set to NCName
|
NameValidator(short type)
Creates a new NameValidator with the given validation type
|
| Modifier and Type | Method and Description |
|---|---|
void |
setRequired(boolean required)
Sets whether or not a String is required (non null)
|
void |
validate(java.lang.Object object)
Validates the given Object
|
void |
validate(java.lang.Object object,
ValidationContext context)
Validates the given Object
|
void |
validate(java.lang.String value,
ValidationContext context)
Validates the given String against the regular expression pattern
of this PatternValidator.
|
normalize, setFixed, setFixedValue, setLength, setMaxLength, setMinLength, setWhiteSpacegetPattern, hasPattern, isNillable, setNillable, setPatternpublic static final short NCNAME
public static final short NMTOKEN
public static final short CDATA
public NameValidator()
public NameValidator(short type)
type - the validation type for this NameValidatorpublic void setRequired(boolean required)
setRequired in class StringValidatorrequired - the flag indicating whether Strings are requiredpublic void validate(java.lang.String value,
ValidationContext context)
throws ValidationException
PatternValidatorvalidate in class StringValidatorValidationException - if the given String is not
matched by the regular expression patternPatternValidator.setPattern(java.lang.String)public void validate(java.lang.Object object)
throws ValidationException
validate in class StringValidatorobject - the Object to validateValidationExceptionpublic void validate(java.lang.Object object,
ValidationContext context)
throws ValidationException
validate in interface TypeValidatorvalidate in class StringValidatorobject - the Object to validatecontext - the ValidationContextValidationExceptionIntalio Inc. (C) 1999-2006. All rights reserved http://www.intalio.com