org.exolab.castor.xml.validators
Class SimpleTypeValidator
java.lang.Object
org.exolab.castor.xml.validators.SimpleTypeValidator
- TypeValidator
public class SimpleTypeValidator
extends java.lang.Object
A class for defining simple rules used for validating a content model.
$Revision: 6936 $ $Date: 2004-10-01 07:25:46 -0600 (Fri, 01 Oct 2004) $
void | setMaxOccurs(int maxOccurs) - Sets the maximum number of times that the described field may occur.
|
void | setMinOccurs(int minOccurs) - Sets the minimum number of times that the described field may occur.
|
void | setValidator(TypeValidator validator) - Sets the TypeValidator to delegate validation to.
|
void | validate(Object object, ValidationContext context) - Validates the given Object.
|
SimpleTypeValidator
public SimpleTypeValidator()
Creates a default SimpleTypeValidator.
SimpleTypeValidator
public SimpleTypeValidator(TypeValidator validator)
Creates a SimpleTypeValidator using the given TypeValidator for
delegating validation.
validator
- The TypeValidator to use
setMaxOccurs
public void setMaxOccurs(int maxOccurs)
Sets the maximum number of times that the described field may occur.
maxOccurs
- the maximum number of times that the described field may
occur.
setMinOccurs
public void setMinOccurs(int minOccurs)
Sets the minimum number of times that the described field may occur.
minOccurs
- the minimum number of times that the described field may
occur.
setValidator
public void setValidator(TypeValidator validator)
Sets the TypeValidator to delegate validation to.
validator
- the TypeValidator to delegate validation to.
Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com