|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.opennms.bb.common.utils.BBParser | +--org.opennms.bb.dp.poller.parsers.ModelsParser
This class is used to parse the packages.xml and load the information into classes to be used programatically.
Inner classes inherited from class org.opennms.bb.common.utils.BBParser |
BBParser.BBErrorHandler |
Field Summary | |
private static String |
BEGIN
|
private static String |
CREATED
|
private static String |
END
|
private static String |
HEADER
|
private static String |
INTERVAL
|
private static String |
INTERVALS
|
private List |
m_modelList
The list of models to parse from the xml file. |
private List |
m_models
The list of Model objects that are created by parsing from the list of models. |
private PollerModel |
m_pollerModel
As each model is parsed this object will be built and then placed into the m_models list when complete |
private boolean |
m_readModel
Indicates if a certain model should be read or ignored |
private static String |
MODEL
|
private static String |
MODEL_DESCR
|
private static String |
MODEL_NAME
|
private static String |
MODELS
|
private static String |
MSTATION
|
private static String |
SERVICE_MODELS
|
private static String |
VALUE
|
private static String |
VER
|
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 | |
ModelsParser(List aModelList)
Creates the new parser that can be used to disassemble an XML file corresponding to the models.dtd as defined by the OpenNMS specifications. |
Method Summary | |
List |
getModels()
This method returns the list of models that was created by parsing. |
Map |
getModelsAsMap()
This method returns the list of models as a Map object, indexed by the model name. |
protected boolean |
processElement(org.w3c.dom.Element el,
boolean isRoot)
This method override the method in the base class that is the default target for processing elements in the DOM tree. |
private boolean |
processIntervalElement(org.w3c.dom.Element intervalElement,
PollerModel aPollerModel)
This method is used to process the |
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 |
|
Field Detail |
private List m_modelList
private List m_models
private boolean m_readModel
private PollerModel m_pollerModel
private static final String SERVICE_MODELS
private static final String HEADER
private static final String VER
private static final String MSTATION
private static final String CREATED
private static final String MODELS
private static final String MODEL
private static final String MODEL_NAME
private static final String MODEL_DESCR
private static final String INTERVALS
private static final String INTERVAL
private static final String BEGIN
private static final String END
private static final String VALUE
Constructor Detail |
public ModelsParser(List aModelList)
Creates the new parser that can be used to disassemble an XML file corresponding to the models.dtd as defined by the OpenNMS specifications. A new instance of a DOM parser is created to parse the passed file. The list of models that should be read by the parser are passed to the object on construction.
List
- aPackageList, The list of m_packages to be read.Method Detail |
protected boolean processElement(org.w3c.dom.Element el, boolean isRoot)
This method override the method in the base class that is the default target for processing elements in the DOM tree. The method is invoked by the DOM parser to handle each element.
processElement
in class BBParser
el
- The DOM element to be processed.isRoot
- True if the element is a root element.private boolean processIntervalElement(org.w3c.dom.Element intervalElement, PollerModel aPollerModel)
This method is used to process the
Element
- serviceElement, the DOM element to handle.PollerPackage
- m_pollerPackage, the package object we are buildingpublic List getModels()
This method returns the list of models that was created by parsing.
public Map getModelsAsMap()
This method returns the list of models as a Map object, indexed by the model name.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |