public class DBSAXHandler
extends org.xml.sax.helpers.DefaultHandler
implements org.xml.sax.ext.LexicalHandler, org.xml.sax.ext.DeclHandler
| Modifier and Type | Field and Description | 
|---|---|
protected java.lang.String | 
action  | 
protected boolean | 
atFirstElement  | 
protected java.lang.String | 
catalogid  | 
protected DBConnection | 
connection  | 
protected java.util.Date | 
createDate  | 
protected DocumentImpl | 
currentDocument  | 
protected java.lang.String | 
docid  | 
protected java.lang.String | 
docname  | 
protected java.lang.String | 
doctype  | 
static java.lang.String | 
ECOGRID  | 
protected java.lang.String | 
encoding  | 
protected long | 
endNodeId  | 
protected java.lang.String[] | 
groups  | 
protected boolean | 
hitTextNode  | 
protected boolean | 
ignoreDenyFirst  | 
static int | 
MAXDATACHARS  | 
protected java.util.Hashtable<java.lang.String,java.lang.String> | 
namespaces  | 
protected java.util.Vector<DBSAXNode> | 
nodeIndex  | 
protected java.util.Stack<DBSAXNode> | 
nodeStack  | 
protected boolean | 
processingDTD  | 
protected java.lang.String | 
pub  | 
protected java.lang.String | 
revision  | 
protected DBSAXNode | 
rootNode  | 
protected java.util.Vector<XMLSchema> | 
schemaList  | 
protected int | 
serverCode  | 
protected java.lang.String | 
systemid  | 
protected java.lang.StringBuffer | 
textBuffer  | 
protected java.util.Date | 
updateDate  | 
protected java.lang.String | 
user  | 
protected boolean | 
writeAccessRules  | 
| Constructor and Description | 
|---|
DBSAXHandler(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)
Construct an instance of the handler class In this constructor, user can
 specify the version need to upadate 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
attributeDecl(java.lang.String eName,
             java.lang.String aName,
             java.lang.String type,
             java.lang.String valueDefault,
             java.lang.String value)
SAX Handler that receives notification of attribute declarations 
 | 
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 | 
elementDecl(java.lang.String name,
           java.lang.String model)
SAX Handler that receives notification of element declarations 
 | 
void | 
endCDATA()
SAX Handler that receives notification of the end of CDATA sections 
 | 
void | 
endDocument()
SAX Handler that receives notification of end of the document 
 | 
void | 
endDTD()
SAX Handler that receives notification of end of DTD 
 | 
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 | 
endEntity(java.lang.String name)
SAX Handler that receives notification of the end of entities 
 | 
void | 
error(org.xml.sax.SAXParseException exception)
SAX Handler that receives notification of recoverable parsing errors 
 | 
void | 
externalEntityDecl(java.lang.String name,
                  java.lang.String publicId,
                  java.lang.String systemId)
SAX Handler that receives notification of external entity declarations 
 | 
void | 
fatalError(org.xml.sax.SAXParseException exception)
SAX Handler that receives notification of fatal parsing errors 
 | 
java.lang.String | 
getCatalogId()  | 
java.lang.String | 
getDocname()
get the document name 
 | 
java.lang.String | 
getDocumentName()  | 
java.lang.String | 
getDocumentType()  | 
java.lang.String | 
getEncoding()  | 
boolean | 
getIsRevisionDoc()
get the the is revision doc 
 | 
long | 
getRootNodeId()  | 
void | 
ignorableWhitespace(char[] cbuf,
                   int start,
                   int len)
SAX Handler that is called for each XML text node that is Ignorable
 white space 
 | 
void | 
internalEntityDecl(java.lang.String name,
                  java.lang.String value)
SAX Handler that receives notification of internal entity declarations 
 | 
boolean | 
processingDTD()
get the document processing state 
 | 
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 | 
setEncoding(java.lang.String encoding)  | 
void | 
setIsRevisionDoc(boolean isRevisionDoc)
Set the the handler is for revisionDoc 
 | 
void | 
startCDATA()
SAX Handler that receives notification of the start of CDATA sections 
 | 
void | 
startDocument()
SAX Handler that receives notification of beginning of the document 
 | 
void | 
startDTD(java.lang.String name,
        java.lang.String publicId,
        java.lang.String systemId)
SAX Handler that receives notification of DOCTYPE. 
 | 
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 | 
startEntity(java.lang.String name)
SAX Handler that receives notification of the start of entities 
 | 
void | 
startPrefixMapping(java.lang.String prefix,
                  java.lang.String uri)
SAX Handler that is called at the start of Namespace 
 | 
void | 
warning(org.xml.sax.SAXParseException exception)
SAX Handler that receives notification of warnings 
 | 
protected long | 
writeTextForDBSAXNode(long previousEndNodeId,
                     java.lang.StringBuffer strBuffer,
                     DBSAXNode node)  | 
protected boolean atFirstElement
protected boolean processingDTD
protected java.lang.String docname
protected java.lang.String doctype
protected java.lang.String catalogid
protected java.lang.String systemid
protected java.util.Stack<DBSAXNode> nodeStack
protected java.util.Vector<DBSAXNode> nodeIndex
protected DBConnection connection
protected DocumentImpl currentDocument
protected java.util.Date createDate
protected java.util.Date updateDate
protected DBSAXNode rootNode
protected java.lang.String action
protected java.lang.String docid
protected java.lang.String revision
protected java.lang.String user
protected java.lang.String[] groups
protected java.lang.String pub
protected java.lang.String encoding
protected int serverCode
protected java.util.Hashtable<java.lang.String,java.lang.String> namespaces
protected boolean hitTextNode
protected java.lang.StringBuffer textBuffer
public static final int MAXDATACHARS
protected long endNodeId
protected java.util.Vector<XMLSchema> schemaList
protected boolean writeAccessRules
protected boolean ignoreDenyFirst
public static final java.lang.String ECOGRID
public DBSAXHandler(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)
conn - the JDBC connection to which information is writtenaction - - "INSERT" or "UPDATE"docid - to be inserted or updated into JDBC connectionrevision, - the user specified the revision need to be updateuser - the user connected to MetaCat servlet and owns the documentgroups - the groups to which user belongspub - flag for public "read" access on documentserverCode - the serverid from xml_replication on which this
            document resides.public void startDocument()
                   throws org.xml.sax.SAXException
startDocument in interface org.xml.sax.ContentHandlerstartDocument in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXExceptionpublic void endDocument()
                 throws org.xml.sax.SAXException
endDocument in interface org.xml.sax.ContentHandlerendDocument in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXExceptionpublic void startPrefixMapping(java.lang.String prefix,
                               java.lang.String uri)
                        throws org.xml.sax.SAXException
startPrefixMapping in interface org.xml.sax.ContentHandlerstartPrefixMapping in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXExceptionpublic void startElement(java.lang.String uri,
                         java.lang.String localName,
                         java.lang.String qName,
                         org.xml.sax.Attributes atts)
                  throws org.xml.sax.SAXException
startElement in interface org.xml.sax.ContentHandlerstartElement in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXExceptionpublic void characters(char[] cbuf,
                       int start,
                       int len)
                throws org.xml.sax.SAXException
characters in interface org.xml.sax.ContentHandlercharacters in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXExceptionpublic void ignorableWhitespace(char[] cbuf,
                                int start,
                                int len)
                         throws org.xml.sax.SAXException
ignorableWhitespace in interface org.xml.sax.ContentHandlerignorableWhitespace in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXExceptionpublic void processingInstruction(java.lang.String target,
                                  java.lang.String data)
                           throws org.xml.sax.SAXException
processingInstruction in interface org.xml.sax.ContentHandlerprocessingInstruction in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXExceptionpublic void endElement(java.lang.String uri,
                       java.lang.String localName,
                       java.lang.String qName)
                throws org.xml.sax.SAXException
endElement in interface org.xml.sax.ContentHandlerendElement in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXExceptionpublic void startDTD(java.lang.String name,
                     java.lang.String publicId,
                     java.lang.String systemId)
              throws org.xml.sax.SAXException
startDTD in interface org.xml.sax.ext.LexicalHandlerorg.xml.sax.SAXExceptionpublic void endDTD()
            throws org.xml.sax.SAXException
endDTD in interface org.xml.sax.ext.LexicalHandlerorg.xml.sax.SAXExceptionpublic void comment(char[] ch,
                    int start,
                    int length)
             throws org.xml.sax.SAXException
comment in interface org.xml.sax.ext.LexicalHandlerorg.xml.sax.SAXExceptionpublic void startCDATA()
                throws org.xml.sax.SAXException
startCDATA in interface org.xml.sax.ext.LexicalHandlerorg.xml.sax.SAXExceptionpublic void endCDATA()
              throws org.xml.sax.SAXException
endCDATA in interface org.xml.sax.ext.LexicalHandlerorg.xml.sax.SAXExceptionpublic void startEntity(java.lang.String name)
                 throws org.xml.sax.SAXException
startEntity in interface org.xml.sax.ext.LexicalHandlerorg.xml.sax.SAXExceptionpublic void endEntity(java.lang.String name)
               throws org.xml.sax.SAXException
endEntity in interface org.xml.sax.ext.LexicalHandlerorg.xml.sax.SAXExceptionpublic void elementDecl(java.lang.String name,
                        java.lang.String model)
                 throws org.xml.sax.SAXException
elementDecl in interface org.xml.sax.ext.DeclHandlerorg.xml.sax.SAXExceptionpublic void attributeDecl(java.lang.String eName,
                          java.lang.String aName,
                          java.lang.String type,
                          java.lang.String valueDefault,
                          java.lang.String value)
                   throws org.xml.sax.SAXException
attributeDecl in interface org.xml.sax.ext.DeclHandlerorg.xml.sax.SAXExceptionpublic void internalEntityDecl(java.lang.String name,
                               java.lang.String value)
                        throws org.xml.sax.SAXException
internalEntityDecl in interface org.xml.sax.ext.DeclHandlerorg.xml.sax.SAXExceptionpublic void externalEntityDecl(java.lang.String name,
                               java.lang.String publicId,
                               java.lang.String systemId)
                        throws org.xml.sax.SAXException
externalEntityDecl in interface org.xml.sax.ext.DeclHandlerorg.xml.sax.SAXExceptionpublic void fatalError(org.xml.sax.SAXParseException exception)
                throws org.xml.sax.SAXException
fatalError in interface org.xml.sax.ErrorHandlerfatalError in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXExceptionpublic void error(org.xml.sax.SAXParseException exception)
           throws org.xml.sax.SAXException
error in interface org.xml.sax.ErrorHandlererror in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXExceptionpublic void warning(org.xml.sax.SAXParseException exception)
             throws org.xml.sax.SAXException
warning in interface org.xml.sax.ErrorHandlerwarning in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXExceptionpublic java.lang.String getDocname()
public boolean processingDTD()
public boolean getIsRevisionDoc()
public void setIsRevisionDoc(boolean isRevisionDoc)
isRevisionDoc - public java.lang.String getEncoding()
public void setEncoding(java.lang.String encoding)
protected long writeTextForDBSAXNode(long previousEndNodeId,
                                     java.lang.StringBuffer strBuffer,
                                     DBSAXNode node)
                              throws org.xml.sax.SAXException
org.xml.sax.SAXExceptionpublic long getRootNodeId()
public java.lang.String getDocumentType()
public java.lang.String getDocumentName()
public java.lang.String getCatalogId()
Copyright © 2020 Regents of the University of California. All Rights Reserved.