Class DBValidate

java.lang.Object
edu.ucsb.nceas.metacat.DBValidate

public class DBValidate extends Object
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 Details

    • alreadyHandle

      public boolean alreadyHandle
  • Constructor Details

    • DBValidate

      public DBValidate()
      Construct a new validation object
    • DBValidate

      public DBValidate(String xmlcatalogfile)
      Construct a new validation object using an OASIS catalog file
    • DBValidate

      public DBValidate(DBConnection conn)
      Construct a new validation object using a database entity resolver
  • Method Details

    • validate

      public boolean validate(String doc)
      validate an xml document against its DTD
      Parameters:
      doc - the filename of the document to validate
    • validateString

      public boolean validateString(String xmldoc)
      validate an xml document against its DTD
      Parameters:
      xmldoc - the String containing the xml document to validate
    • returnErrors

      public String returnErrors()
      provide a list of errors from the validation process
    • main

      public static void main(String[] args)
      main method for testing

      Usage: java DBValidate