org.opensaml.xml.schema.validator
Class XSStringSchemaValidator<T extends XSString>

java.lang.Object
  extended by org.opensaml.xml.schema.validator.XSStringSchemaValidator<T>
Type Parameters:
T - the type to be validated
All Implemented Interfaces:
Validator<T>

public class XSStringSchemaValidator<T extends XSString>
extends Object
implements Validator<T>

Checks XSString for Schema compliance.


Constructor Summary
XSStringSchemaValidator()
          Constructor.
XSStringSchemaValidator(boolean allowEmptyElementContent)
          Constructor.
 
Method Summary
protected  boolean isAllowEmptyContent()
          Get the flag which determines whether empty content should be allowed.
 void validate(T xmlObject)
          Checks to see if a XMLObject is valid.
protected  void validateStringContent(T xmlObject)
          Validates the content of the XSBase64Binary object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XSStringSchemaValidator

public XSStringSchemaValidator(boolean allowEmptyElementContent)
Constructor.

Parameters:
allowEmptyElementContent - flag indicated whether empty content should be allowed

XSStringSchemaValidator

public XSStringSchemaValidator()
Constructor. Empty content is not allowed.

Method Detail

validate

public void validate(T xmlObject)
              throws ValidationException
Checks to see if a XMLObject is valid.

Specified by:
validate in interface Validator<T extends XSString>
Parameters:
xmlObject - the XMLObject to validate
Throws:
ValidationException - thrown if the element is not valid

isAllowEmptyContent

protected boolean isAllowEmptyContent()
Get the flag which determines whether empty content should be allowed.

Returns:
true if empty content should be allowed, false otherwise

validateStringContent

protected void validateStringContent(T xmlObject)
                              throws ValidationException
Validates the content of the XSBase64Binary object.

Parameters:
xmlObject - the object to evaluate
Throws:
ValidationException - thrown if the content of the Base64Binary object is invalid


Copyright © 2006-2011 Internet2. All Rights Reserved.