edu.ucsb.nceas.metacat

## Class DBValidate

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

-     public class DBValidate
      extends java.lang.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 Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `boolean` | `alreadyHandle`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DBValidate()` Construct a new validation object
    `DBValidate(DBConnection conn)` Construct a new validation object using a database entity resolver
    `DBValidate(java.lang.String xmlcatalogfile)` Construct a new validation object using an OASIS catalog file

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `main(java.lang.String[] args)` main method for testing
    `java.lang.String` | `returnErrors()` provide a list of errors from the validation process
    `boolean` | `validate(java.lang.String doc)` validate an xml document against its DTD
    `boolean` | `validateString(java.lang.String xmldoc)` validate an xml document against its DTD

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### alreadyHandle

          public boolean alreadyHandle

  - ### Constructor Detail

    - #### DBValidate

          public DBValidate()

      Construct a new validation object

    - #### DBValidate

          public DBValidate(java.lang.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 Detail

    - #### validate

          public boolean validate(java.lang.String doc)

      validate an xml document against its DTD
      Parameters:
        `doc` - the filename of the document to validate

    - #### validateString

          public boolean validateString(java.lang.String xmldoc)

      validate an xml document against its DTD
      Parameters:
        `xmldoc` - the String containing the xml document to validate

    - #### returnErrors

          public java.lang.String returnErrors()

      provide a list of errors from the validation process

    - #### main

          public static void main(java.lang.String[] args)

      main method for testing

      Usage: java DBValidate

Copyright © 2020 Regents of the University of California. All Rights Reserved.