org.opennms.bb.eui.admin.utils
Class PitXmlParser

java.lang.Object
  |
  +--org.opennms.bb.common.utils.BBParser
        |
        +--org.opennms.bb.eui.admin.utils.PitXmlParser

public class PitXmlParser
extends BBParser

 PitXmlParser parses the PitXML and stores the data read in a vectors
 This can then be queried for the data using the 'get..' functions

 It throws an IOException if the xml file is not found or if it does not
 conform to its DTD 

Author:
Sowmya

Inner classes inherited from class org.opennms.bb.common.utils.BBParser
BBParser.BBErrorHandler
 
Field Summary
(package private)  String ADMIN_MAIN
           
(package private)  String BGCOLOR
           
(package private)  String CLASSNAME
           
(package private)  String FONT_SIZE
           
(package private)  String FONT_STYLE
           
(package private)  String FONT_TYPE
           
(package private)  String HINT
           
(package private)  String HOTKEY
           
(package private)  String ICON
           
(package private)  String ICONLAYOUT
           
(package private)  Hashtable iconLayoutData
           
(package private)  int INITIAL_CAPACITY
           
(package private)  String LABEL
           
(package private)  String LABELPOS
           
(package private)  String LABELTEXT
           
(package private)  String LAYOUT
           
(package private)  String PANEL
           
(package private)  Hashtable panelData
           
(package private)  String POSITION
           
(package private)  String ROWCOL
           
(package private)  String TITLE
           
(package private)  Hashtable titleData
           
(package private)  String TOOL
           
(package private)  String TOOLS
           
(package private)  Vector toolsData
           
 
Fields inherited from class org.opennms.bb.common.utils.BBParser
ATTRIB_VALUE_PAIR_ERR, ATTRIB_VALUE_PAIR_ERR_STR, EXCEPTION, m_curElement, m_errNum, m_exceptionMsg, m_inpSource, m_parser, NULL_VALUE_ERR, NULL_VALUE_ERR_STR
 
Constructor Summary
PitXmlParser()
          Constructs the DOM parser
 
Method Summary
 Hashtable getIconLayoutData()
          Returns the panel information as a hashtable
 Hashtable getPanelData()
          Returns the panel information as a hashtable
 Hashtable getTitleData()
          Returns the title information as a hashtable
 Vector getToolsData()
          Returns the tools information - the data returned is a vector of hashtables
protected  boolean processElement(org.w3c.dom.Element el, boolean isRoot)
          This is the method to be overridden by sub-classes to branch off and go through the DOM tree to handle elements specific to the XML they are parsing - does nothing here
protected  boolean processIconLayoutElement(org.w3c.dom.Node iconLayoutNode)
           
protected  boolean processLabelElement(org.w3c.dom.Node labelNode, Hashtable toolHash)
           
protected  boolean processPanelElement(org.w3c.dom.Node panelNode)
           
protected  boolean processTitleElement(org.w3c.dom.Node titleNode)
           
protected  boolean processToolsElement(org.w3c.dom.Node toolsNode)
           
protected  boolean processToolsTool(org.w3c.dom.Node toolNode)
           
 
Methods inherited from class org.opennms.bb.common.utils.BBParser
getErrorMessage, getErrorNumber, parse, parse, parse, parse, processDocument, processNode, processParmValue
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

titleData

Hashtable titleData

panelData

Hashtable panelData

iconLayoutData

Hashtable iconLayoutData

toolsData

Vector toolsData

ADMIN_MAIN

final String ADMIN_MAIN

TITLE

final String TITLE

POSITION

final String POSITION

FONT_TYPE

final String FONT_TYPE

FONT_STYLE

final String FONT_STYLE

FONT_SIZE

final String FONT_SIZE

PANEL

final String PANEL

BGCOLOR

final String BGCOLOR

LAYOUT

final String LAYOUT

ROWCOL

final String ROWCOL

ICONLAYOUT

final String ICONLAYOUT

LABELPOS

final String LABELPOS

TOOLS

final String TOOLS

TOOL

final String TOOL

ICON

final String ICON

HINT

final String HINT

CLASSNAME

final String CLASSNAME

LABEL

final String LABEL

LABELTEXT

final String LABELTEXT

HOTKEY

final String HOTKEY

INITIAL_CAPACITY

final int INITIAL_CAPACITY
Constructor Detail

PitXmlParser

public PitXmlParser()
Constructs the DOM parser
Method Detail

processElement

protected boolean processElement(org.w3c.dom.Element el,
                                 boolean isRoot)
Description copied from class: BBParser
This is the method to be overridden by sub-classes to branch off and go through the DOM tree to handle elements specific to the XML they are parsing - does nothing here
Overrides:
processElement in class BBParser
Following copied from class: org.opennms.bb.common.utils.BBParser
Returns:
true if processed sucessfully, false otherwise

processTitleElement

protected boolean processTitleElement(org.w3c.dom.Node titleNode)

processPanelElement

protected boolean processPanelElement(org.w3c.dom.Node panelNode)

processIconLayoutElement

protected boolean processIconLayoutElement(org.w3c.dom.Node iconLayoutNode)

processToolsElement

protected boolean processToolsElement(org.w3c.dom.Node toolsNode)

processToolsTool

protected boolean processToolsTool(org.w3c.dom.Node toolNode)

processLabelElement

protected boolean processLabelElement(org.w3c.dom.Node labelNode,
                                      Hashtable toolHash)

getTitleData

public Hashtable getTitleData()
Returns the title information as a hashtable

getPanelData

public Hashtable getPanelData()
Returns the panel information as a hashtable

getIconLayoutData

public Hashtable getIconLayoutData()
Returns the panel information as a hashtable

getToolsData

public Vector getToolsData()
Returns the tools information - the data returned is a vector of hashtables