org.opensaml.xml.signature.validator
Class PGPDataSchemaValidator

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

public class PGPDataSchemaValidator
extends Object
implements Validator<PGPData>

Checks PGPData for Schema compliance.


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

Field Detail

VALID_DS_CHILD_NAMES

private static final Set<QName> VALID_DS_CHILD_NAMES
QNames corresponding to the valid children.

Constructor Detail

PGPDataSchemaValidator

public PGPDataSchemaValidator()
Method Detail

validate

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

Specified by:
validate in interface Validator<PGPData>
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 children defined in the XML Signature namespace.

Returns:
list of valid child QNames

validateChildrenPresence

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

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

validateChildrenNamespaces

protected void validateChildrenNamespaces(PGPData 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 © 1999-2013. All Rights Reserved.