org.apache.turbine.torque.engine.database.transform
Class XmlToData

java.lang.Object
  |
  +--org.xml.sax.helpers.DefaultHandler
        |
        +--org.apache.turbine.torque.engine.database.transform.XmlToData
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

Deprecated. use turbine-torque

public class XmlToData
extends org.xml.sax.helpers.DefaultHandler
implements org.xml.sax.EntityResolver

A Class that is used to parse an input xml schema file and creates and AppData java structure. It uses apache Xerces to do the xml parsing.

Version:
$Id: XmlToData.java,v 1.3 2002/02/16 19:40:37 mpoeschl Exp $
Author:
Leon Messerschmidt, Jason van Zyl, Martin Poeschl, Fedor Karpelevitch

Inner Class Summary
 class XmlToData.ColumnValue
          Deprecated.  
 class XmlToData.DataRow
          Deprecated.  
 
Field Summary
private  java.util.Vector data
          Deprecated.  
private  Database database
          Deprecated.  
private  org.xml.sax.InputSource dataDTD
          Deprecated.  
private  java.io.File dtdFile
          Deprecated.  
private  java.lang.String dtdFileName
          Deprecated.  
private  java.lang.String errorMessage
          Deprecated.  
 
Constructor Summary
XmlToData(Database database, java.lang.String dtdFilePath)
          Deprecated. Default custructor
 
Method Summary
 void error(org.xml.sax.SAXParseException spe)
          Deprecated. Error callback.
 void fatalError(org.xml.sax.SAXParseException spe)
          Deprecated. Fatal error callback.
 org.xml.sax.InputSource getInputSource(java.lang.String urlString)
          Deprecated. get an InputSource for an URL String
 java.util.List parseFile(java.lang.String xmlFile)
          Deprecated.  
 org.xml.sax.InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId)
          Deprecated. called by the XML parser
 void startElement(java.lang.String uri, java.lang.String localName, java.lang.String rawName, org.xml.sax.Attributes attributes)
          Deprecated. Handles opening elements of the xml file.
 void warning(org.xml.sax.SAXParseException spe)
          Deprecated. Warning callback.
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

database

private Database database
Deprecated. 

errorMessage

private java.lang.String errorMessage
Deprecated. 

data

private java.util.Vector data
Deprecated. 

dtdFileName

private java.lang.String dtdFileName
Deprecated. 

dtdFile

private java.io.File dtdFile
Deprecated. 

dataDTD

private org.xml.sax.InputSource dataDTD
Deprecated. 
Constructor Detail

XmlToData

public XmlToData(Database database,
                 java.lang.String dtdFilePath)
          throws java.net.MalformedURLException,
                 java.io.IOException
Deprecated. 
Default custructor
Method Detail

parseFile

public java.util.List parseFile(java.lang.String xmlFile)
Deprecated. 

startElement

public void startElement(java.lang.String uri,
                         java.lang.String localName,
                         java.lang.String rawName,
                         org.xml.sax.Attributes attributes)
Deprecated. 
Handles opening elements of the xml file.
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler

warning

public void warning(org.xml.sax.SAXParseException spe)
Deprecated. 
Warning callback.
Overrides:
warning in class org.xml.sax.helpers.DefaultHandler
Throws:
spe - The parse exception that caused the callback to be invoked.

error

public void error(org.xml.sax.SAXParseException spe)
Deprecated. 
Error callback.
Overrides:
error in class org.xml.sax.helpers.DefaultHandler
Throws:
spe - The parse exception that caused the callback to be invoked.

fatalError

public void fatalError(org.xml.sax.SAXParseException spe)
Deprecated. 
Fatal error callback.
Overrides:
fatalError in class org.xml.sax.helpers.DefaultHandler
Throws:
spe - The parse exception that caused the callback to be invoked.

resolveEntity

public org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
                                             java.lang.String systemId)
Deprecated. 
called by the XML parser
Specified by:
resolveEntity in interface org.xml.sax.EntityResolver
Overrides:
resolveEntity in class org.xml.sax.helpers.DefaultHandler
Returns:
an InputSource for the database.dtd file

getInputSource

public org.xml.sax.InputSource getInputSource(java.lang.String urlString)
Deprecated. 
get an InputSource for an URL String
Parameters:
urlString -  
Returns:
an InputSource for the URL String


Copyright © 2000-2002 Apache Software Foundation. All Rights Reserved.