org.exolab.castor.xml
Class SimpleTypeValidator

java.lang.Object
  |
  +--org.exolab.castor.xml.SimpleTypeValidator

public class SimpleTypeValidator
extends java.lang.Object
implements TypeValidator

A class for defining simple rules used for validating a content model

Version:
$Revision: 1.3 $ $Date: 2000/11/04 01:31:14 $
Author:
Keith Visco

Constructor Summary
SimpleTypeValidator()
          Creates a default SimpleTypeValidator
SimpleTypeValidator(TypeValidator validator)
          Creates a SimpleTypeValidator using the given TypeValidator for delegating validation
 
Method Summary
 void setMaxOccurs(int maxOccurs)
          Sets the maximum occurance that the described field may occur
 void setMinOccurs(int minOccurs)
          Sets the minimum occurance that the described field may occur
 void setValidator(TypeValidator validator)
          Sets the TypeValidator to delegate validation to
 void validate(java.lang.Object object)
          Validates the given Object
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleTypeValidator

public SimpleTypeValidator()
Creates a default SimpleTypeValidator

SimpleTypeValidator

public SimpleTypeValidator(TypeValidator validator)
Creates a SimpleTypeValidator using the given TypeValidator for delegating validation
Method Detail

setMaxOccurs

public void setMaxOccurs(int maxOccurs)
Sets the maximum occurance that the described field may occur
Parameters:
maxOccurs - the maximum occurance that the descibed field may occur.

setMinOccurs

public void setMinOccurs(int minOccurs)
Sets the minimum occurance that the described field may occur
Parameters:
minOccurs - the minimum occurance that the descibed field may occur.

setValidator

public void setValidator(TypeValidator validator)
Sets the TypeValidator to delegate validation to
Parameters:
validator - the TypeValidator to delegate validation to

validate

public void validate(java.lang.Object object)
              throws ValidationException
Validates the given Object
Specified by:
validate in interface TypeValidator
Parameters:
object - the Object to validate


Intalio Inc. (C) 1999-2001. All rights reserved http://www.intalio.com