edu.ucsb.nceas.metacat

## Class Eml210SAXHandler

- java.lang.Object
- - org.xml.sax.helpers.DefaultHandler
  - - edu.ucsb.nceas.metacat.DBSAXHandler
    - - edu.ucsb.nceas.metacat.Eml210SAXHandler

- All Implemented Interfaces:
    edu.ucsb.nceas.utilities.access.AccessControlInterface, org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler, org.xml.sax.ext.DeclHandler, org.xml.sax.ext.LexicalHandler

      public class Eml210SAXHandler
      extends DBSAXHandler
      implements edu.ucsb.nceas.utilities.access.AccessControlInterface

  A database aware Class implementing callback methods for the SAX parser to call when processing the XML stream and generating events

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `INLINE`

    - ### Fields inherited from class edu.ucsb.nceas.metacat.DBSAXHandler

      `action, atFirstElement, catalogid, connection, createDate, currentDocument, docid, docname, doctype, ECOGRID, encoding, endNodeId, groups, hitTextNode, ignoreDenyFirst, MAXDATACHARS, namespaces, nodeIndex, nodeStack, processingDTD, pub, revision, rootNode, schemaList, serverCode, systemid, textBuffer, updateDate, user, writeAccessRules`

    - ### Fields inherited from interface edu.ucsb.nceas.utilities.access.AccessControlInterface

      `ACCESS, ACLID, ALL, ALLOW, ALLOWFIRST, ALLSTRING, CHMOD, CHMODSTRING, DENY, DENYFIRST, PERMISSION, PRINCIPAL, PUBLIC, READ, READSTRING, WRITE, WRITESTRING`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Eml210SAXHandler(DBConnection conn, java.lang.String action, java.lang.String docid, java.lang.String revision, java.lang.String user, java.lang.String[] groups, java.lang.String pub, int serverCode, java.util.Date createDate, java.util.Date updateDate, boolean writeAccessRules, java.util.Vector<java.lang.String> guidsToSync)` Construct an instance of the handler class In this constructor, user can specify the version need to update

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `characters(char[] cbuf, int start, int len)` SAX Handler that is called for each XML text node
    `void` | `comment(char[] ch, int start, int length)` SAX Handler that receives notification of comments in the DTD
    `void` | `deleteInlineFiles()`
    `void` | `endDocument()` SAX Handler that receives notification of end of the document
    `void` | `endElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)` SAX Handler that is called at the end of each XML element
    `void` | `ignorableWhitespace(char[] cbuf, int start, int len)` SAX Handler that is called for each XML text node that is Ignorable white space
    `void` | `processingInstruction(java.lang.String target, java.lang.String data)` SAX Handler called once for each processing instruction found: node that PI may occur before or after the root element.
    `void` | `startElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)` SAX Handler that is called at the start of each XML element
    `void` | `startPrefixMapping(java.lang.String prefix, java.lang.String uri)` SAX Handler that is called at the start of Namespace

    - ### Methods inherited from class edu.ucsb.nceas.metacat.DBSAXHandler

      `attributeDecl, elementDecl, endCDATA, endDTD, endEntity, error, externalEntityDecl, fatalError, getCatalogId, getDocname, getDocumentName, getDocumentType, getEncoding, getIsRevisionDoc, getRootNodeId, internalEntityDecl, processingDTD, setEncoding, setIsRevisionDoc, startCDATA, startDocument, startDTD, startEntity, warning, writeTextForDBSAXNode`

    - ### Methods inherited from class org.xml.sax.helpers.DefaultHandler

      `endPrefixMapping, notationDecl, resolveEntity, setDocumentLocator, skippedEntity, unparsedEntityDecl`

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

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

- - ### Field Detail

    - #### INLINE

          public static final java.lang.String INLINE

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### Eml210SAXHandler

          public Eml210SAXHandler(DBConnection conn,
                                  java.lang.String action,
                                  java.lang.String docid,
                                  java.lang.String revision,
                                  java.lang.String user,
                                  java.lang.String[] groups,
                                  java.lang.String pub,
                                  int serverCode,
                                  java.util.Date createDate,
                                  java.util.Date updateDate,
                                  boolean writeAccessRules,
                                  java.util.Vector<java.lang.String> guidsToSync)
                           throws org.xml.sax.SAXException

      Construct an instance of the handler class In this constructor, user can specify the version need to update
      Parameters:
        `conn` - the JDBC connection to which information is written
        `action` - - "INSERT" or "UPDATE"
        `docid` - to be inserted or updated into JDBC connection
        `revision,` - the user specified the revision need to be update
        `user` - the user connected to MetaCat servlet and owns the document
        `groups` - the groups to which user belongs
        `pub` - flag for public "read" access on document
        `serverCode` - the serverid from xml_replication on which this document resides.
      Throws:
        `org.xml.sax.SAXException`

  - ### Method Detail

    - #### startElement

          public void startElement(java.lang.String uri,
                                   java.lang.String localName,
                                   java.lang.String qName,
                                   org.xml.sax.Attributes atts)
                            throws org.xml.sax.SAXException

      SAX Handler that is called at the start of each XML element
      Specified by:
        `startElement` in interface `org.xml.sax.ContentHandler`
      Overrides:
        `startElement` in class `DBSAXHandler`
      Throws:
        `org.xml.sax.SAXException`

    - #### characters

          public void characters(char[] cbuf,
                                 int start,
                                 int len)
                          throws org.xml.sax.SAXException

      SAX Handler that is called for each XML text node
      Specified by:
        `characters` in interface `org.xml.sax.ContentHandler`
      Overrides:
        `characters` in class `DBSAXHandler`
      Throws:
        `org.xml.sax.SAXException`

    - #### endElement

          public void endElement(java.lang.String uri,
                                 java.lang.String localName,
                                 java.lang.String qName)
                          throws org.xml.sax.SAXException

      SAX Handler that is called at the end of each XML element
      Specified by:
        `endElement` in interface `org.xml.sax.ContentHandler`
      Overrides:
        `endElement` in class `DBSAXHandler`
      Throws:
        `org.xml.sax.SAXException`

    - #### comment

          public void comment(char[] ch,
                              int start,
                              int length)
                       throws org.xml.sax.SAXException

      SAX Handler that receives notification of comments in the DTD
      Specified by:
        `comment` in interface `org.xml.sax.ext.LexicalHandler`
      Overrides:
        `comment` in class `DBSAXHandler`
      Throws:
        `org.xml.sax.SAXException`

    - #### processingInstruction

          public void processingInstruction(java.lang.String target,
                                            java.lang.String data)
                                     throws org.xml.sax.SAXException

      SAX Handler called once for each processing instruction found: node that PI may occur before or after the root element.
      Specified by:
        `processingInstruction` in interface `org.xml.sax.ContentHandler`
      Overrides:
        `processingInstruction` in class `DBSAXHandler`
      Throws:
        `org.xml.sax.SAXException`

    - #### startPrefixMapping

          public void startPrefixMapping(java.lang.String prefix,
                                         java.lang.String uri)
                                  throws org.xml.sax.SAXException

      SAX Handler that is called at the start of Namespace
      Specified by:
        `startPrefixMapping` in interface `org.xml.sax.ContentHandler`
      Overrides:
        `startPrefixMapping` in class `DBSAXHandler`
      Throws:
        `org.xml.sax.SAXException`

    - #### ignorableWhitespace

          public void ignorableWhitespace(char[] cbuf,
                                          int start,
                                          int len)
                                   throws org.xml.sax.SAXException

      SAX Handler that is called for each XML text node that is Ignorable white space
      Specified by:
        `ignorableWhitespace` in interface `org.xml.sax.ContentHandler`
      Overrides:
        `ignorableWhitespace` in class `DBSAXHandler`
      Throws:
        `org.xml.sax.SAXException`

    - #### endDocument

          public void endDocument()
                           throws org.xml.sax.SAXException

      SAX Handler that receives notification of end of the document
      Specified by:
        `endDocument` in interface `org.xml.sax.ContentHandler`
      Overrides:
        `endDocument` in class `DBSAXHandler`
      Throws:
        `org.xml.sax.SAXException`

    - #### deleteInlineFiles

          public void deleteInlineFiles()
                                 throws org.xml.sax.SAXException

      Throws:
        `org.xml.sax.SAXException`

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