Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.port80.xml
Class xmlConf  view xmlConf download xmlConf.java

java.lang.Object
  extended byorg.xml.sax.helpers.DefaultHandler
      extended bycom.port80.xml.xmlConf
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

Deprecated. Use com.port80.util.Conf to read xml config. file instead.

public class xmlConf
extends org.xml.sax.helpers.DefaultHandler

XML format config. file read/write. This class parse an config. file in XML format to a Treemap. Usage: Map cf=xmlConf.getInstance().parse(fname); if(xmlConf.getInstance().write(fname,cf)==0) // success; ...

Version:
0.1 07/07/2000

Field Summary
protected  java.lang.String cell
          Deprecated.  
protected  java.util.Map conf
          Deprecated.  
private static boolean DEBUG
          Deprecated.  
protected static xmlConf instance
          Deprecated.  
protected  java.util.Stack keys
          Deprecated.  
protected  java.util.Stack objs
          Deprecated.  
protected  java.util.Stack ops
          Deprecated.  
protected static java.lang.String tCf
          Deprecated.  
protected static java.lang.String tKey
          Deprecated.  
protected static java.lang.String tMap
          Deprecated.  
protected static java.lang.String tValue
          Deprecated.  
protected static java.lang.String tVector
          Deprecated.  
protected static java.lang.String Usage
          Deprecated.  
private static boolean VERBOSE
          Deprecated.  
 
Constructor Summary
private xmlConf()
          Deprecated.  
 
Method Summary
 void characters(char[] c, int start, int len)
          Deprecated. Receive notification of character data inside an element.
 java.lang.Object clone(java.lang.Object object)
          Deprecated. Clone a tree of data structure consists of String, Vector and TreeMap.
 void endElement(java.lang.String uri, java.lang.String name, java.lang.String qname)
          Deprecated. Receive notification of the end of an element.
 void foreach(java.lang.Object obj, java.lang.Object userdata, com.port80.util.TreeWalkerCallback a)
          Deprecated.  
static xmlConf getInstance()
          Deprecated.  
static void main(java.lang.String[] args)
          Deprecated.  
 java.util.Map parse(java.lang.String filepath)
          Deprecated. Parse a xml file and return a new Map of conf.
 java.util.Map parse(java.lang.String filepath, java.util.Map ret)
          Deprecated. Parse a xml file and merge result into an existing conf Map.
 void real_foreach(java.lang.Object obj, java.lang.Object userdata, com.port80.util.TreeWalkerCallback a, java.lang.String k)
          Deprecated.  
(package private)  void setValue(java.lang.Object value)
          Deprecated.  
 void startElement(java.lang.String uri, java.lang.String name, java.lang.String qname, org.xml.sax.Attributes a)
          Deprecated. Receive notification of the start of an element.
static void test(java.lang.String[] args)
          Deprecated.  
static java.lang.String toCf(java.util.Map conf)
          Deprecated.  
static java.lang.String toCf(java.lang.Object object, java.lang.String indent, java.lang.String tab, java.lang.String tag)
          Deprecated.  
static java.lang.String toXml(java.util.Map conf)
          Deprecated.  
static java.lang.String toXml(java.lang.Object obj, java.lang.String indent, java.lang.String tab, java.lang.String tag)
          Deprecated.  
 
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

Usage

protected static final java.lang.String Usage
Deprecated. 
See Also:
Constant Field Values

tCf

protected static final java.lang.String tCf
Deprecated. 
See Also:
Constant Field Values

tMap

protected static final java.lang.String tMap
Deprecated. 
See Also:
Constant Field Values

tVector

protected static final java.lang.String tVector
Deprecated. 
See Also:
Constant Field Values

tKey

protected static final java.lang.String tKey
Deprecated. 
See Also:
Constant Field Values

tValue

protected static final java.lang.String tValue
Deprecated. 
See Also:
Constant Field Values

instance

protected static xmlConf instance
Deprecated. 

conf

protected java.util.Map conf
Deprecated. 

cell

protected java.lang.String cell
Deprecated. 

keys

protected java.util.Stack keys
Deprecated. 

objs

protected java.util.Stack objs
Deprecated. 

ops

protected java.util.Stack ops
Deprecated. 

DEBUG

private static boolean DEBUG
Deprecated. 

VERBOSE

private static boolean VERBOSE
Deprecated. 
Constructor Detail

xmlConf

private xmlConf()
Deprecated. 
Method Detail

getInstance

public static xmlConf getInstance()
Deprecated. 

main

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

test

public static void test(java.lang.String[] args)
                 throws java.lang.Exception
Deprecated. 

parse

public java.util.Map parse(java.lang.String filepath)
                    throws java.lang.Exception
Deprecated. 
Parse a xml file and return a new Map of conf.


parse

public java.util.Map parse(java.lang.String filepath,
                           java.util.Map ret)
                    throws java.lang.Exception
Deprecated. 
Parse a xml file and merge result into an existing conf Map.


startElement

public void startElement(java.lang.String uri,
                         java.lang.String name,
                         java.lang.String qname,
                         org.xml.sax.Attributes a)
Deprecated. 
Description copied from class: org.xml.sax.helpers.DefaultHandler
Receive notification of the start of an element.

By default, do nothing. Application writers may override this method in a subclass to take specific actions at the start of each element (such as allocating a new tree node or writing output to a file).


endElement

public void endElement(java.lang.String uri,
                       java.lang.String name,
                       java.lang.String qname)
Deprecated. 
Description copied from class: org.xml.sax.helpers.DefaultHandler
Receive notification of the end of an element.

By default, do nothing. Application writers may override this method in a subclass to take specific actions at the end of each element (such as finalising a tree node or writing output to a file).


characters

public void characters(char[] c,
                       int start,
                       int len)
Deprecated. 
Description copied from class: org.xml.sax.helpers.DefaultHandler
Receive notification of character data inside an element.

By default, do nothing. Application writers may override this method to take specific actions for each chunk of character data (such as adding the data to a node or buffer, or printing it to a file).


setValue

void setValue(java.lang.Object value)
Deprecated. 

toCf

public static java.lang.String toCf(java.util.Map conf)
Deprecated. 

toCf

public static java.lang.String toCf(java.lang.Object object,
                                    java.lang.String indent,
                                    java.lang.String tab,
                                    java.lang.String tag)
Deprecated. 

toXml

public static java.lang.String toXml(java.util.Map conf)
Deprecated. 

toXml

public static java.lang.String toXml(java.lang.Object obj,
                                     java.lang.String indent,
                                     java.lang.String tab,
                                     java.lang.String tag)
Deprecated. 

foreach

public void foreach(java.lang.Object obj,
                    java.lang.Object userdata,
                    com.port80.util.TreeWalkerCallback a)
Deprecated. 

real_foreach

public void real_foreach(java.lang.Object obj,
                         java.lang.Object userdata,
                         com.port80.util.TreeWalkerCallback a,
                         java.lang.String k)
Deprecated. 

clone

public java.lang.Object clone(java.lang.Object object)
Deprecated. 
Clone a tree of data structure consists of String, Vector and TreeMap.