nl.knowledgeplaza.util
Class XmlResourceBundle

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

public class XmlResourceBundle
extends ResourceBundle

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

Version:
Author:
Sebastian Schaffert

Field Summary
protected  boolean debug
           
protected  Element elem_common
           
protected  Element elem_default
           
protected  Element elem_locale
           
protected  String language
           
protected  Document root
           
 
Fields inherited from class java.util.ResourceBundle
parent
 
Constructor Summary
XmlResourceBundle(String resourcefile, String lang)
           
 
Method Summary
 Enumeration getKeys()
           
protected  void getKeys(Element element, Hashtable hash)
           
protected  String getResult(Element element, String key)
           
 Object handleGetObject(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 Document root

language

protected String language

elem_locale

protected Element elem_locale

elem_common

protected Element elem_common

elem_default

protected Element elem_default
Constructor Detail

XmlResourceBundle

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

getResult

protected String getResult(Element element,
                           String key)

handleGetObject

public Object handleGetObject(String key)
Specified by:
handleGetObject in class ResourceBundle

getKeys

protected void getKeys(Element element,
                       Hashtable hash)

getKeys

public Enumeration getKeys()
Specified by:
getKeys in class ResourceBundle


Copyright © 2012 KnowledgePlaza. All Rights Reserved.