edu.ucsb.nceas.metacat

## Class DocumentImplWrapper

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

-     public class DocumentImplWrapper
      extends java.lang.Object

  This class a wrapper class for documentimpl for insert or update. It will provide deferent parser base on xml document validation by dtd or schema

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DocumentImplWrapper(java.lang.String myRuleBase, boolean validation, boolean writeAccessRules)` Constructor of DocumentImpleWrapper

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `write(DBConnection conn, java.lang.String xml, java.lang.String pub, java.io.Reader dtd, java.lang.String action, java.lang.String docid, java.lang.String user, java.lang.String[] groups, byte[] xmlBytes, java.lang.String schemaLocalLocation, org.dataone.service.types.v1.Checksum checksum)`
    `java.lang.String` | `writeReplication(DBConnection conn, java.lang.String xml, byte[] xmlBytes, java.lang.String pub, java.io.Reader dtd, java.lang.String action, java.lang.String accnum, java.lang.String user, java.lang.String[] groups, java.lang.String homeServer, java.lang.String notifyServer, java.util.Date createDate, java.util.Date updateDate)`
    `java.lang.String` | `writeReplication(DBConnection conn, java.lang.String xml, byte[] xmlBytes, java.lang.String pub, java.io.Reader dtd, java.lang.String action, java.lang.String accnum, java.lang.String user, java.lang.String[] groups, java.lang.String homeServer, java.lang.String notifyServer, java.lang.String tableName, boolean timedReplication, java.util.Date createDate, java.util.Date updateDate)` Constructor with tableName - this doc is in xml_documents or xml_revsions If in xml_revisions, it need a special handler.

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

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

- - ### Constructor Detail

    - #### DocumentImplWrapper

          public DocumentImplWrapper(java.lang.String myRuleBase,
                                     boolean validation,
                                     boolean writeAccessRules)

      Constructor of DocumentImpleWrapper
      Parameters:
        `myRuleBase` - the xml is base on DTD or Schema
        `validation` - if the xml document need to be validated

  - ### Method Detail

    - #### write

          public java.lang.String write(DBConnection conn,
                                        java.lang.String xml,
                                        java.lang.String pub,
                                        java.io.Reader dtd,
                                        java.lang.String action,
                                        java.lang.String docid,
                                        java.lang.String user,
                                        java.lang.String[] groups,
                                        byte[] xmlBytes,
                                        java.lang.String schemaLocalLocation,
                                        org.dataone.service.types.v1.Checksum checksum)
                                 throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### writeReplication

          public java.lang.String writeReplication(DBConnection conn,
                                                   java.lang.String xml,
                                                   byte[] xmlBytes,
                                                   java.lang.String pub,
                                                   java.io.Reader dtd,
                                                   java.lang.String action,
                                                   java.lang.String accnum,
                                                   java.lang.String user,
                                                   java.lang.String[] groups,
                                                   java.lang.String homeServer,
                                                   java.lang.String notifyServer,
                                                   java.util.Date createDate,
                                                   java.util.Date updateDate)
                                            throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### writeReplication

          public java.lang.String writeReplication(DBConnection conn,
                                                   java.lang.String xml,
                                                   byte[] xmlBytes,
                                                   java.lang.String pub,
                                                   java.io.Reader dtd,
                                                   java.lang.String action,
                                                   java.lang.String accnum,
                                                   java.lang.String user,
                                                   java.lang.String[] groups,
                                                   java.lang.String homeServer,
                                                   java.lang.String notifyServer,
                                                   java.lang.String tableName,
                                                   boolean timedReplication,
                                                   java.util.Date createDate,
                                                   java.util.Date updateDate)
                                            throws java.lang.Exception

      Constructor with tableName - this doc is in xml_documents or xml_revsions If in xml_revisions, it need a special handler.
      Parameters:
        `conn` -
        `xml` -
        `pub` -
        `dtd` -
        `action` -
        `accnum` -
        `user` -
        `groups` -
        `homeServer` -
        `notifyServer` -
        `tableName` -
      Returns:
      Throws:
        `java.lang.Exception`

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