nl.knowledgeplaza.util
Class XmlResourceBundle

java.lang.Object
  extended by java.util.ResourceBundle
      extended by nl.knowledgeplaza.util.XmlResourceBundle

public class XmlResourceBundle
extends java.util.ResourceBundle

A ResourceBundle implementation that uses a XML file to store the resources.

Version:
Author:
Sebastian Schaffert

Field Summary
protected  boolean debug
           
protected  org.w3c.dom.Element elem_common
           
protected  org.w3c.dom.Element elem_default
           
protected  org.w3c.dom.Element elem_locale
           
protected  java.lang.String language
           
protected  org.w3c.dom.Document root
           
 
Fields inherited from class java.util.ResourceBundle
parent
 
Constructor Summary
XmlResourceBundle(java.lang.String resourcefile, java.lang.String lang)
           
 
Method Summary
 java.util.Enumeration getKeys()
           
protected  void getKeys(org.w3c.dom.Element element, java.util.Hashtable hash)
           
protected  java.lang.String getResult(org.w3c.dom.Element element, java.lang.String key)
           
 java.lang.Object handleGetObject(java.lang.String key)
           
 
Methods inherited from class java.util.ResourceBundle
getBundle, getBundle, getBundle, getLocale, getObject, getString, getStringArray, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

protected boolean debug

root

protected org.w3c.dom.Document root

language

protected java.lang.String language

elem_locale

protected org.w3c.dom.Element elem_locale

elem_common

protected org.w3c.dom.Element elem_common

elem_default

protected org.w3c.dom.Element elem_default
Constructor Detail

XmlResourceBundle

public XmlResourceBundle(java.lang.String resourcefile,
                         java.lang.String lang)
                  throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

getResult

protected java.lang.String getResult(org.w3c.dom.Element element,
                                     java.lang.String key)

handleGetObject

public java.lang.Object handleGetObject(java.lang.String key)
Specified by:
handleGetObject in class java.util.ResourceBundle

getKeys

protected void getKeys(org.w3c.dom.Element element,
                       java.util.Hashtable hash)

getKeys

public java.util.Enumeration getKeys()
Specified by:
getKeys in class java.util.ResourceBundle


Copyright © 2010. All Rights Reserved.