org.opensaml.xml.signature.validator
Class KeyInfoTypeSchemaValidator

java.lang.Object
  extended by org.opensaml.xml.signature.validator.KeyInfoTypeSchemaValidator
All Implemented Interfaces:
Validator<KeyInfoType>

public class KeyInfoTypeSchemaValidator
extends Object
implements Validator<KeyInfoType>

Checks KeyInfoType for Schema compliance.


Constructor Summary
KeyInfoTypeSchemaValidator()
           
 
Method Summary
protected static Set<QName> getValidDSChildNames()
          Get the QNames corresponding to the valid KeyInfo children defined in the XML Signature namespace.
 void validate(KeyInfoType xmlObject)
          Checks to see if a XMLObject is valid.
protected  void validateChildrenNamespaces(KeyInfoType xmlObject)
          Validate that all children are either ones defined within the XML Signature schema, or are from another namespace.
protected  void validateChildrenPresence(KeyInfoType xmlObject)
          Validate that at least child is present.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

KeyInfoTypeSchemaValidator

public KeyInfoTypeSchemaValidator()
Method Detail

validate

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

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

getValidDSChildNames

protected static Set<QName> getValidDSChildNames()
Get the QNames corresponding to the valid KeyInfo children defined in the XML Signature namespace.

Returns:
list of valid child QNames

validateChildrenPresence

protected void validateChildrenPresence(KeyInfoType xmlObject)
                                 throws ValidationException
Validate that at least child is present.

Parameters:
xmlObject - the object to validate
Throws:
ValidationException - thrown if the object is invalid

validateChildrenNamespaces

protected void validateChildrenNamespaces(KeyInfoType xmlObject)
                                   throws ValidationException
Validate that all children are either ones defined within the XML Signature schema, or are from another namespace.

Parameters:
xmlObject - the object to validate
Throws:
ValidationException - thrown if the object is invalid


Copyright © 2006-2011 Internet2. All Rights Reserved.