uk.org.ogsadai.activity
Class ConfigurableActivitiesDocumentValidator
java.lang.Object
|
+--uk.org.ogsadai.common.DocumentValidator
|
+--uk.org.ogsadai.activity.ConfigurableActivitiesDocumentValidator
- public class ConfigurableActivitiesDocumentValidator
- extends DocumentValidator
This DocumentValidator
checks through the activity elements contained in an activity configuration document and validates those that make use of individual activity configuration files. The following checks are made:
- the file can be found
- the file contains well-formed XML
Note that this document validator does not perform schema-validation of the document, it merely ensures the document can be found and contains well-formed XML.
- Author:
- The OGSA-DAI Project Team
Field Summary |
private static java.lang.String |
COPYRIGHT_NOTICE
Copyright statement |
private static DAILogger |
LOG
Logger object for logging in this class |
Method Summary |
protected void |
performValidation(org.w3c.dom.Document document)
Validates the specified document and throws a DocumentValidationException with a desctiptive error message if the document is invalid. |
private void |
validateFile(java.lang.String name, java.lang.String path)
Validates the specified file, checking that it exists and contains well-formed XML. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COPYRIGHT_NOTICE
private static final java.lang.String COPYRIGHT_NOTICE
-
Copyright statement
- See Also:
- Constant Field Values
LOG
private static final DAILogger LOG
-
Logger object for logging in this class
ConfigurableActivitiesDocumentValidator
public ConfigurableActivitiesDocumentValidator()
performValidation
protected void performValidation(org.w3c.dom.Document document)
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:
document
- Document to validate.
- Throws:
DocumentValidationException
- if the document is invalid.
validateFile
private void validateFile(java.lang.String name,
java.lang.String path)
throws DocumentValidationException
-
Validates the specified file, checking that it exists and contains well-formed XML.
-
- Parameters:
name
- name of the activity
path
- path to the individual activity configuration file
- Throws:
DocumentValidationException
- if the file does not exist or it contains invalid XML