uk.org.ogsadai.activity
Class UnknownActivityDocumentValidator

java.lang.Object
  |
  +--uk.org.ogsadai.common.DocumentValidator
        |
        +--uk.org.ogsadai.activity.UnknownActivityDocumentValidator

public class UnknownActivityDocumentValidator
extends DocumentValidator

A DocumentValidator that scans through the activites contained in the given perform document ensuring that they are known by the engine. If this is not the case then an DocumentValidationException is thrown. Note that documentation elements are ignored.

Author:
The OGSA-DAI Project Team

Field Summary
private static java.lang.String COPYRIGHT_NOTICE
           
private static DAILogger LOG
           
private  java.util.Set mKnownActivities
          A set of the known activity names.
 
Fields inherited from class uk.org.ogsadai.common.DocumentValidator
 
Constructor Summary
UnknownActivityDocumentValidator(java.util.Set knownActivities)
          Constructs an UnknownActivityDocumentValidator that knows about all the activities in the specified set.
 
Method Summary
protected  void performValidation(org.w3c.dom.Document request)
          Validates the specified document and throws a DocumentValidationException with a desctiptive error message if the document is invalid.
private  void validateChildren(org.w3c.dom.Node parent)
          Recursively validates the child elements of the specified parent, ensuring that any activity elements are known about.
 
Methods inherited from class uk.org.ogsadai.common.DocumentValidator
setSuccessor, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPYRIGHT_NOTICE

private static final java.lang.String COPYRIGHT_NOTICE
See Also:
Constant Field Values

LOG

private static final DAILogger LOG

mKnownActivities

private final java.util.Set mKnownActivities
A set of the known activity names.

Constructor Detail

UnknownActivityDocumentValidator

public UnknownActivityDocumentValidator(java.util.Set knownActivities)
Constructs an UnknownActivityDocumentValidator that knows about all the activities in the specified set.

Parameters:
knownActivities - a Set of activity names.
Method Detail

performValidation

protected void performValidation(org.w3c.dom.Document request)
                          throws DocumentValidationException
Description copied from class: DocumentValidator
Validates the specified document and throws a DocumentValidationException with a desctiptive error message if the document is invalid.

Specified by:
performValidation in class DocumentValidator
Parameters:
request - Document to validate.
Throws:
DocumentValidationException - if the document is invalid.

validateChildren

private void validateChildren(org.w3c.dom.Node parent)
                       throws DocumentValidationException
Recursively validates the child elements of the specified parent, ensuring that any activity elements are known about.

DocumentValidationException