xmlBlaster 2.2.0 API

org.xmlBlaster.contrib.dbwriter
Class SqlInfoParser

java.lang.Object
  extended by org.xmlBlaster.util.SaxHandlerBase
      extended by org.xmlBlaster.contrib.dbwriter.XmlParserBase
          extended by org.xmlBlaster.contrib.dbwriter.SqlInfoParser
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.ErrorHandler, org.xml.sax.ext.LexicalHandler, I_Parser, I_ContribPlugin

public class SqlInfoParser
extends XmlParserBase
implements I_Parser

Author:
michele@laghi.eu

Field Summary
static java.lang.String ATTR_TAG
           
(package private)  boolean caseSensitive
           
private  SqlColumn colDescription
           
private  boolean inDescription
           
private  I_Info info
           
private  boolean inRow
           
private static java.util.logging.Logger log
           
private  SqlDescription recordDescription
           
private  SqlRow recordRow
           
private  VersionTransformerCache transformerCache
           
private  SqlInfo updateRecord
           
private  boolean useReaderCharset
           
private  java.lang.String xslTransformerName
          Is only use if a "dbWriter.xslTransformerName" is configured
 
Fields inherited from class org.xmlBlaster.contrib.dbwriter.XmlParserBase
allowedTagNames, clientProperty, inClientProperty, inRootTag, qosTag
 
Fields inherited from class org.xmlBlaster.util.SaxHandlerBase
character, glob, locator, xmlLiteral, xmlSource
 
Constructor Summary
SqlInfoParser()
          Please call init()
 
Method Summary
private  void clearCharacter()
           
 void endElement(java.lang.String uri, java.lang.String localName, java.lang.String name)
          End element, event from SAX parser.
private  boolean getBoolAttr(org.xml.sax.Attributes attrs, java.lang.String key, boolean def)
           
private  int getIntAttr(org.xml.sax.Attributes attrs, java.lang.String key, int def)
           
 java.util.Set getUsedPropertyKeys()
          Gets all property keys which may be used by this object.
 void init(I_Info info)
           
static void main(java.lang.String[] args)
           
 SqlInfo parse(java.io.InputStream is, java.lang.String encoding)
           
 SqlInfo parse(java.lang.String data)
           
 SqlInfo readObject(java.io.InputStream is, java.lang.String encoding)
          Parses the given xml Qos and returns a StatusQosData holding the data.
 void shutdown()
           
 void startElement(java.lang.String uri, java.lang.String localName, java.lang.String name, org.xml.sax.Attributes attrs)
          Start element, event from SAX parser.
 
Methods inherited from class org.xmlBlaster.contrib.dbwriter.XmlParserBase
addAllowedTag, addTagToString, endCDATA, endElementBase, isEmpty, protectionNeeded, startCDATA, startElementBase
 
Methods inherited from class org.xmlBlaster.util.SaxHandlerBase
characters, comment, endDocument, endDTD, endEntity, endPrefixMapping, error, fatalError, getUseLexicalHandler, ignorableWhitespace, init, init, init, notationDecl, processingInstruction, setDocumentLocator, setUseLexicalHandler, skippedEntity, startDocument, startDTD, startEntity, startPrefixMapping, toString, toXml, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ATTR_TAG

public static final java.lang.String ATTR_TAG
See Also:
Constant Field Values

xslTransformerName

private java.lang.String xslTransformerName
Is only use if a "dbWriter.xslTransformerName" is configured


transformerCache

private VersionTransformerCache transformerCache

updateRecord

private SqlInfo updateRecord

inDescription

private boolean inDescription

inRow

private boolean inRow

recordRow

private SqlRow recordRow

recordDescription

private SqlDescription recordDescription

log

private static java.util.logging.Logger log

colDescription

private SqlColumn colDescription

info

private I_Info info

caseSensitive

boolean caseSensitive

useReaderCharset

private boolean useReaderCharset
Constructor Detail

SqlInfoParser

public SqlInfoParser()
              throws java.lang.Exception
Please call init()

Throws:
java.lang.Exception
Method Detail

main

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

init

public void init(I_Info info)
          throws java.lang.Exception
Specified by:
init in interface I_ContribPlugin
Throws:
java.lang.Exception

getUsedPropertyKeys

public java.util.Set getUsedPropertyKeys()
Description copied from interface: I_ContribPlugin
Gets all property keys which may be used by this object.

Specified by:
getUsedPropertyKeys in interface I_ContribPlugin
Returns:
See Also:
I_ContribPlugin.getUsedPropertyKeys()

shutdown

public void shutdown()
              throws java.lang.Exception
Specified by:
shutdown in interface I_ContribPlugin
Throws:
java.lang.Exception
See Also:
I_Plugin

parse

public SqlInfo parse(java.lang.String data)
              throws java.lang.Exception
Throws:
java.lang.Exception
See Also:
SaxHandlerBase.parse(String)

parse

public SqlInfo parse(java.io.InputStream is,
                     java.lang.String encoding)
              throws java.lang.Exception
Specified by:
parse in interface I_Parser
encoding - The encoding if you want to speciy one, if null, the default is taken.
Returns:
Throws:
java.lang.Exception

readObject

public SqlInfo readObject(java.io.InputStream is,
                          java.lang.String encoding)
                   throws java.lang.Exception
Parses the given xml Qos and returns a StatusQosData holding the data. Parsing of update() and publish() QoS is supported here.

Parameters:
the - XML based ASCII string
Throws:
java.lang.Exception

getBoolAttr

private final boolean getBoolAttr(org.xml.sax.Attributes attrs,
                                  java.lang.String key,
                                  boolean def)

getIntAttr

private final int getIntAttr(org.xml.sax.Attributes attrs,
                             java.lang.String key,
                             int def)

startElement

public final void startElement(java.lang.String uri,
                               java.lang.String localName,
                               java.lang.String name,
                               org.xml.sax.Attributes attrs)
Start element, event from SAX parser.

Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class XmlParserBase
Parameters:
name - Tag name
attrs - the attributes of the tag

clearCharacter

private final void clearCharacter()

endElement

public void endElement(java.lang.String uri,
                       java.lang.String localName,
                       java.lang.String name)
End element, event from SAX parser.

Specified by:
endElement in interface org.xml.sax.ContentHandler
Overrides:
endElement in class XmlParserBase
Parameters:
name - Tag name

xmlBlaster 2.2.0 API

Copyright © 1999-2014 The xmlBlaster.org contributers.