iiitToolkit 1.0

de.iiit.xmlconfig
Class ConfigReader

java.lang.Object
  |
  +--org.xml.sax.helpers.DefaultHandler
        |
        +--de.iiit.xmlconfig.ConfigReader
All Implemented Interfaces:
ContentHandler, DTDHandler, EntityResolver, ErrorHandler

Deprecated. This class is deprecated. Use Configuration.load(java.lang.String) instead.

public class ConfigReader
extends DefaultHandler

Reads a XML configuration file using Apache Xerces as a SAX parser. It extends the Xerces class DefaultHandler with its own implemetation of startElement() and endElement().

Version:
$Revision: 1.12 $ $Date: 2003/04/02 15:56:30 $
See Also:
Configuration

Constructor Summary
ConfigReader()
          Deprecated. Creates a new instance of ConfigReader
 
Method Summary
 void endElement(String uri, String localName, String qName)
          Deprecated. Implementation of the call-back method defined in Xerces' DefaultHandler
 Configuration readConfigFile(String filename)
          Deprecated. This is the main method of this class.
 void startElement(String uri, String localName, String qName, Attributes attrs)
          Deprecated. Implementation of the call-back method defined in Xerces' DefaultHandler
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, 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
 

Constructor Detail

ConfigReader

public ConfigReader()
Deprecated. 
Creates a new instance of ConfigReader

Method Detail

startElement

public void startElement(String uri,
                         String localName,
                         String qName,
                         Attributes attrs)
Deprecated. 
Implementation of the call-back method defined in Xerces' DefaultHandler

Specified by:
startElement in interface ContentHandler
Overrides:
startElement in class DefaultHandler
Parameters:
uri - The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed.
localName - The local name (without prefix), or the empty string if Namespace processing is not being performed.
qName - The qualified name (with prefix), or the empty string if qualified names are not available.
attrs - The attributes attached to the element. If there are no attributes, it shall be an empty Attributes object.

endElement

public void endElement(String uri,
                       String localName,
                       String qName)
Deprecated. 
Implementation of the call-back method defined in Xerces' DefaultHandler

Specified by:
endElement in interface ContentHandler
Overrides:
endElement in class DefaultHandler
Parameters:
uri - The Namespace URI, or the empty string if the element has no Namespace URI or if Namespace processing is not being performed.
localName - The local name (without prefix), or the empty string if Namespace processing is not being performed.
qName - The qualified XML 1.0 name (with prefix), or the empty string if qualified names are not available.

readConfigFile

public Configuration readConfigFile(String filename)
                             throws FileNotFoundException,
                                    IOException,
                                    SAXException
Deprecated. 
This is the main method of this class. It tries to read the XML file named filename and delivers it as an Object of class Configuration

Parameters:
filename - The name of the file to read.
Returns:
The read configuration or if the file was empty.
Throws:
FileNotFoundException - any exception occuring while reading and parsing the file is passed through.
IOException - any exception occuring while reading and parsing the file is passed through.
SAXException - any exception occuring while reading and parsing the file is passed through.
See Also:
Configuration

iiitToolkit 1.0

Copyright © 2002, 2003 ingeneurbuero fuer innovative informationstechnik, Dipl.-Ing. Joerg Beckmann, Dortmund, Germany. All Rights Reserved.
See Copyright statement