org.opennms.bb.eui.admin.servmodel.utils
Class ServiceModelsParser

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

public class ServiceModelsParser
extends BBParser

ServiceModelsParser parses a 'ServiceModel' xml and stores the data 
 read in 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 Modifications: 04/18/00 - Changed the parser to extend BBParser - Sowmya

Inner classes inherited from class org.opennms.bb.common.utils.BBParser
BBParser.BBErrorHandler
 
Field Summary
(package private)  String BEGIN
           
(package private)  String END
           
(package private)  String INTERVAL
           
(package private)  String INTERVALS
           
(package private)  String MODEL
           
(package private)  String MODELDESCR
           
(package private)  String MODELNAME
           
(package private)  String MODELS
           
(package private)  Vector servicesData
           
(package private)  String VALUE
           
 
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
ServiceModelsParser()
          Creates the DOM parser
 
Method Summary
 Vector getServicesData()
          Returns the service models data
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 processIntervalNode(org.w3c.dom.Node intervalNode, Vector intervalsVector)
           
protected  boolean processIntervalsNode(org.w3c.dom.Node intervalNode, Hashtable modelHash)
           
protected  boolean processModelNode(org.w3c.dom.Node modNode)
           
protected  boolean processModelsNode(org.w3c.dom.Node modNode)
           
 
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

servicesData

Vector servicesData

MODELS

final String MODELS

MODEL

final String MODEL

MODELNAME

final String MODELNAME

MODELDESCR

final String MODELDESCR

INTERVALS

final String INTERVALS

INTERVAL

final String INTERVAL

BEGIN

final String BEGIN

END

final String END

VALUE

final String VALUE
Constructor Detail

ServiceModelsParser

public ServiceModelsParser()
Creates 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

processModelsNode

protected boolean processModelsNode(org.w3c.dom.Node modNode)

processModelNode

protected boolean processModelNode(org.w3c.dom.Node modNode)

processIntervalsNode

protected boolean processIntervalsNode(org.w3c.dom.Node intervalNode,
                                       Hashtable modelHash)

processIntervalNode

protected boolean processIntervalNode(org.w3c.dom.Node intervalNode,
                                      Vector intervalsVector)

getServicesData

public Vector getServicesData()
Returns the service models data