Package edu.ucsb.nceas.metacat
Class DBValidate
java.lang.Object
edu.ucsb.nceas.metacat.DBValidate
Name: DBValidate.java
Purpose: A Class that validates XML documents
This class is designed to be parser independent
i.e. it uses only org.xml.sax classes
It is tied to SAX 2.0 methods
Copyright: 2000 Regents of the University of California and the
National Center for Ecological Analysis and Synthesis
April 28, 2000
Authors: Dan Higgins, Matt Jones
-
Field Summary
-
Constructor Summary
ConstructorDescriptionConstruct a new validation objectDBValidate
(DBConnection conn) Construct a new validation object using a database entity resolverDBValidate
(String xmlcatalogfile) Construct a new validation object using an OASIS catalog file -
Method Summary
Modifier and TypeMethodDescriptionstatic void
main method for testingprovide a list of errors from the validation processboolean
validate an xml document against its DTDboolean
validateString
(String xmldoc) validate an xml document against its DTD
-
Field Details
-
alreadyHandle
public boolean alreadyHandle
-
-
Constructor Details
-
DBValidate
public DBValidate()Construct a new validation object -
DBValidate
Construct a new validation object using an OASIS catalog file -
DBValidate
Construct a new validation object using a database entity resolver
-
-
Method Details
-
validate
validate an xml document against its DTD- Parameters:
doc
- the filename of the document to validate
-
validateString
validate an xml document against its DTD- Parameters:
xmldoc
- the String containing the xml document to validate
-
returnErrors
provide a list of errors from the validation process -
main
main method for testingUsage: java DBValidate
-