|
||||||||||
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.common.filter.xml.FilterSchemaParser
This class is responsible for parsing the schema data for the filter module. Because this parser is going to be used on multiple rules it is designed as a singleton to insure that any classes in the same VM will use the same instance of this parser. Doing this ensures that the xml file is parse only once and the cost of that parse isn't inccured each time the parser is needed.
Inner classes inherited from class org.opennms.bb.common.utils.BBParser |
BBParser.BBErrorHandler |
Field Summary | |
private static String |
CNAME
|
private static String |
COLUMN
|
private Hashtable |
columnsHash
Data structure to hold the information from the dom tree as it is parsed out. |
private Hashtable |
columnViewRef
Data structure to hold the list of column names that reference a view. |
private static String |
EXPOSURE
|
private static String |
HIDDEN
|
private static int |
INITIAL_CAPACITY
initial capacity of the various hashtables used is set to 10 just so space is not wasted |
private static FilterSchemaParser |
instance
Singleton instance variable |
private static String |
JOINFROMCOL
|
private static String |
JOINREF
|
private static String |
JOINTBL
|
private static String |
JOINTOCOL
|
private static String |
KEY
|
private static String |
PRIMARY
|
private static String |
TABLE
XML TAGS that are relevant |
private Hashtable |
tables
Variable to hold all of the non-hidden tables in the PollerDatabaseSchema.xml keyed by table name. |
private static String |
TNAME
|
private static String |
VCOLUMN
|
private static String |
VIEW
|
private static String |
VIEWNAME
|
private static String |
VIEWREF
|
private Hashtable |
views
Variable to hold all of the views in the PollerDatabaseSchema.xml keyed by view name. |
private Hashtable |
virtualColumns
Data structure to hold the list of virtual columns |
private static String |
VLINK
|
private static String |
VNAME
|
private static String |
VTABLE
|
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 | |
private |
FilterSchemaParser()
Parses from the filename passed in |
Method Summary | |
Hashtable |
getColumns()
This method returns the list of all columns. |
Hashtable |
getColumnViewRef()
This method returns the list of all view columns |
static FilterSchemaParser |
getInstance()
This method is used to get the instance of the parser when another class needs to use it. |
Hashtable |
getTables()
This method returns the list of all tables. |
Hashtable |
getViews()
This method returns the list of all views |
Hashtable |
getVirtualColumns()
This method returns the list of all virtual columns. |
protected String |
processColumn(org.w3c.dom.Node columnNode)
This method is used to process a column node. |
protected boolean |
processElement(org.w3c.dom.Element el,
boolean isRoot)
This method gets called from BBParser parent class to start walking down the dom tree. |
protected JoinCondition |
processJoin(org.w3c.dom.Node joinNode,
FilterTable table)
This method is used to process a |
protected boolean |
processTableNode(org.w3c.dom.Node tableNode)
This method will process a node associated with a tag. |
protected boolean |
processViewNode(org.w3c.dom.Node viewNode)
This method will process a node associated with a |
protected VirtualColumn |
processVirtualColumn(org.w3c.dom.Node virtualNode)
This method is used to process a |
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 static final String TABLE
private static final String TNAME
private static final String COLUMN
private static final String VCOLUMN
private static final String CNAME
private static final String VNAME
private static final String VLINK
private static final String VTABLE
private static final String EXPOSURE
private static final String HIDDEN
private static final String KEY
private static final String PRIMARY
private static final String JOINREF
private static final String JOINTBL
private static final String JOINTOCOL
private static final String JOINFROMCOL
private static final String VIEW
private static final String VIEWNAME
private static final String VIEWREF
private static final int INITIAL_CAPACITY
private static FilterSchemaParser instance
private Hashtable tables
private Hashtable views
private Hashtable columnsHash
private Hashtable virtualColumns
private Hashtable columnViewRef
Constructor Detail |
private FilterSchemaParser() throws IOException
IOException,
- thrown from the parent BBParser if
the file fails to open or match DTDMethod Detail |
public static FilterSchemaParser getInstance()
protected boolean processElement(org.w3c.dom.Element el, boolean isRoot)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |