jimm.datavision.gui.sql
Class DbConnReader

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by jimm.datavision.ReportReader
          extended by jimm.datavision.gui.sql.DbConnReader
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class DbConnReader
extends ReportReader

A database connection reader opens an existing report XML file and reads the database connection information. It is opened when the user clicks "Copy Settings..." from within a database connection window.

Author:
Jim Menard, jimm@io.com
See Also:
DbConnWin

Field Summary
protected  java.lang.String connInfo
           
protected  java.lang.String dbName
           
protected  java.lang.String driverClassName
           
protected  java.lang.String username
           
 
Fields inherited from class jimm.datavision.ReportReader
border, DEFAULT_DTD_VERSION, DTD_VERSION_FORMULA_IDS, dtdVersion, field, formula, formulasToConvert, group, inSubreportJoins, line, missingColumnSeen, nextSectionLocation, parameter, report, section, subreport, tagNameStack, textData, usercol
 
Constructor Summary
DbConnReader()
           
 
Method Summary
 void characters(char[] ch, int start, int length)
          Reads text data.
 void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName)
          Handle elements expecting text data.
 java.lang.String getConnectionInfo()
           
 java.lang.String getDbName()
           
 java.lang.String getDriverClassName()
           
 java.lang.String getUserName()
           
 void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes)
          Reads the database tag and grabs the attributes we want.
 
Methods inherited from class jimm.datavision.ReportReader
addSectionToReport, border, bounds, charSepSource, column, convertFormulas, database, defaultLanguage, edge, ensureNotEmpty, field, findColumn, findSelectable, footer, format, formula, getReport, group, header, join, language, line, ncDatabaseSource, paper, parameter, parseColor, point, postParse, query, read, read, removeReportSections, report, rubyLanguageNameHack, section, sort, subreport, suppressionProc, usercol
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

driverClassName

protected java.lang.String driverClassName

connInfo

protected java.lang.String connInfo

dbName

protected java.lang.String dbName

username

protected java.lang.String username
Constructor Detail

DbConnReader

public DbConnReader()
Method Detail

getDriverClassName

public java.lang.String getDriverClassName()

getConnectionInfo

public java.lang.String getConnectionInfo()

getDbName

public java.lang.String getDbName()

getUserName

public java.lang.String getUserName()

startElement

public void startElement(java.lang.String namespaceURI,
                         java.lang.String localName,
                         java.lang.String qName,
                         org.xml.sax.Attributes attributes)
Reads the database tag and grabs the attributes we want.

Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class ReportReader

endElement

public void endElement(java.lang.String namespaceURI,
                       java.lang.String localName,
                       java.lang.String qName)
Description copied from class: ReportReader
Handle elements expecting text data.

Specified by:
endElement in interface org.xml.sax.ContentHandler
Overrides:
endElement in class ReportReader

characters

public void characters(char[] ch,
                       int start,
                       int length)
Description copied from class: ReportReader
Reads text data. Text data inside a single tag can be broken up into multiple calls to this method.

Specified by:
characters in interface org.xml.sax.ContentHandler
Overrides:
characters in class ReportReader