Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.knowgate.dataobjs
Class DBSaxHandler

    java.lang.Object
      org.xml.sax.helpers.DefaultHandler
          com.knowgate.dataobjs.DBSaxHandler

All Implemented Interfaces:
  org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

    public class DBSaxHandler

extends org.xml.sax.helpers.DefaultHandler

SAX Parser Event Handler for loading XML formated data into a DBPersist object.

Field Summary
`protected static boolean` | `DEFAULT_DYNAMIC_VALIDATION`
`protected static boolean` | `DEFAULT_MEMORY_USAGE`
`protected static boolean` | `DEFAULT_NAMESPACE_PREFIXES`
`protected static boolean` | `DEFAULT_NAMESPACES`
`protected static java.lang.String` | `DEFAULT_PARSER_NAME`
`protected static int` | `DEFAULT_REPETITION`
`protected static boolean` | `DEFAULT_SCHEMA_FULL_CHECKING`
`protected static boolean` | `DEFAULT_SCHEMA_VALIDATION`
`protected static boolean` | `DEFAULT_TAGGINESS`
`protected static boolean` | `DEFAULT_VALIDATION`
`protected static java.lang.String` | `DYNAMIC_VALIDATION_FEATURE_ID`
`protected long` | `fCharacters` Number of characters.
`protected long` | `fElements` Number of elements.
`protected static java.lang.String` | `NAMESPACE_PREFIXES_FEATURE_ID`
`protected static java.lang.String` | `NAMESPACES_FEATURE_ID`
`protected java.util.ListIterator` | `oColIter`
`protected java.util.LinkedList` | `oColList`
`protected DBColumn` | `oColumn`
`protected DBTable` | `oTable`
`protected DBPersist` | `oTarget`
`protected static java.lang.String` | `SCHEMA_FULL_CHECKING_FEATURE_ID`
`protected static java.lang.String` | `SCHEMA_VALIDATION_FEATURE_ID`
`protected static java.lang.String` | `VALIDATION_FEATURE_ID`

Constructor Summary
`DBSaxHandler(DBPersist oPersist)` Deprecated. Use DBSaxHandler(DBPersist oPersist, JDCConnection) instead
`DBSaxHandler(DBPersist oPersist, JDCConnection oConn)`

Method Summary
`void` | `characters(char[] ch, int start, int length)` Characters.
`protected java.lang.String` | `composeError(java.lang.String type, org.xml.sax.SAXParseException ex)` Compose the error message.
`void` | `error(org.xml.sax.SAXParseException ex)` Error.
`void` | `fatalError(org.xml.sax.SAXParseException ex)` Fatal error.
`void` | `parse(java.lang.String sXMLSource)` Parses an XML document into a DBPersist instance
`void` | `startDocument()` Start document.
`void` | `startElement(java.lang.String uri, java.lang.String local, java.lang.String raw, org.xml.sax.Attributes attrs)` Start element.
`void` | `warning(org.xml.sax.SAXParseException ex)` Warning.

Methods inherited from class org.xml.sax.helpers.DefaultHandler
`endDocument, endElement, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### fElements

    protected long fElements

  Number of elements.

### fCharacters

    protected long fCharacters

  Number of characters.

### oColList

    protected java.util.LinkedList oColList

### oColIter

    protected java.util.ListIterator oColIter

### oColumn

    protected DBColumn oColumn

### oTable

    protected DBTable oTable

### oTarget

    protected DBPersist oTarget

### NAMESPACES_FEATURE_ID

    protected static final java.lang.String NAMESPACES_FEATURE_ID

See Also:
  Constant Field Values

### NAMESPACE_PREFIXES_FEATURE_ID

    protected static final java.lang.String NAMESPACE_PREFIXES_FEATURE_ID

See Also:
  Constant Field Values

### VALIDATION_FEATURE_ID

    protected static final java.lang.String VALIDATION_FEATURE_ID

See Also:
  Constant Field Values

### SCHEMA_VALIDATION_FEATURE_ID

    protected static final java.lang.String SCHEMA_VALIDATION_FEATURE_ID

See Also:
  Constant Field Values

### SCHEMA_FULL_CHECKING_FEATURE_ID

    protected static final java.lang.String SCHEMA_FULL_CHECKING_FEATURE_ID

See Also:
  Constant Field Values

### DYNAMIC_VALIDATION_FEATURE_ID

    protected static final java.lang.String DYNAMIC_VALIDATION_FEATURE_ID

See Also:
  Constant Field Values

### DEFAULT_PARSER_NAME

    protected static final java.lang.String DEFAULT_PARSER_NAME

See Also:
  Constant Field Values

### DEFAULT_REPETITION

    protected static final int DEFAULT_REPETITION

See Also:
  Constant Field Values

### DEFAULT_NAMESPACES

    protected static final boolean DEFAULT_NAMESPACES

See Also:
  Constant Field Values

### DEFAULT_NAMESPACE_PREFIXES

    protected static final boolean DEFAULT_NAMESPACE_PREFIXES

See Also:
  Constant Field Values

### DEFAULT_VALIDATION

    protected static final boolean DEFAULT_VALIDATION

See Also:
  Constant Field Values

### DEFAULT_SCHEMA_VALIDATION

    protected static final boolean DEFAULT_SCHEMA_VALIDATION

See Also:
  Constant Field Values

### DEFAULT_SCHEMA_FULL_CHECKING

    protected static final boolean DEFAULT_SCHEMA_FULL_CHECKING

See Also:
  Constant Field Values

### DEFAULT_DYNAMIC_VALIDATION

    protected static final boolean DEFAULT_DYNAMIC_VALIDATION

See Also:
  Constant Field Values

### DEFAULT_MEMORY_USAGE

    protected static final boolean DEFAULT_MEMORY_USAGE

See Also:
  Constant Field Values

### DEFAULT_TAGGINESS

    protected static final boolean DEFAULT_TAGGINESS

See Also:
  Constant Field Values

Constructor Detail

### DBSaxHandler

    public DBSaxHandler(DBPersist oPersist)

  Deprecated. Use DBSaxHandler(DBPersist oPersist, JDCConnection) instead

  Construct and set reference to DBPersist object that will hold the loaded data.

### DBSaxHandler

    public DBSaxHandler(DBPersist oPersist,
                        JDCConnection oConn)
                 throws java.sql.SQLException

Throws:
  `java.sql.SQLException`

Method Detail

### startDocument

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

  Start document.

  Specified by:
    `startDocument` in interface `org.xml.sax.ContentHandler`
  Overrides:
    `startDocument` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXException`

### startElement

    public void startElement(java.lang.String uri,
                             java.lang.String local,
                             java.lang.String raw,
                             org.xml.sax.Attributes attrs)
                      throws org.xml.sax.SAXException

  Start element.

  Specified by:
    `startElement` in interface `org.xml.sax.ContentHandler`
  Overrides:
    `startElement` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXException`

### characters

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

  Characters.

  Specified by:
    `characters` in interface `org.xml.sax.ContentHandler`
  Overrides:
    `characters` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXException`

### warning

    public void warning(org.xml.sax.SAXParseException ex)
                 throws org.xml.sax.SAXException

  Warning.

  Specified by:
    `warning` in interface `org.xml.sax.ErrorHandler`
  Overrides:
    `warning` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXException`

### error

    public void error(org.xml.sax.SAXParseException ex)
               throws org.xml.sax.SAXException

  Error.

  Specified by:
    `error` in interface `org.xml.sax.ErrorHandler`
  Overrides:
    `error` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXException`

### fatalError

    public void fatalError(org.xml.sax.SAXParseException ex)
                    throws org.xml.sax.SAXException

  Fatal error.

  Specified by:
    `fatalError` in interface `org.xml.sax.ErrorHandler`
  Overrides:
    `fatalError` in class `org.xml.sax.helpers.DefaultHandler`
  Throws:
    `org.xml.sax.SAXException`

### composeError

    protected java.lang.String composeError(java.lang.String type,
                                            org.xml.sax.SAXParseException ex)

  Compose the error message.

### parse

    public void parse(java.lang.String sXMLSource)
               throws java.lang.InstantiationException,
                      java.lang.IllegalAccessException,
                      java.lang.ClassNotFoundException,
                      java.io.IOException,
                      org.xml.sax.SAXException

  Parses an XML document into a DBPersist instance

  Throws:
    `java.lang.InstantiationException`
    `java.lang.IllegalAccessException`
    `java.lang.ClassNotFoundException`
    `java.io.IOException`
    `org.xml.sax.SAXException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD