com.ibm.ccd.ui.portlets.search.core
Class SearchResultParser

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by com.ibm.ccd.ui.portlets.search.core.SearchResultParser
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class SearchResultParser
extends org.xml.sax.helpers.DefaultHandler

A helper class for search result xml parsing using the SAX Parser


Constructor Summary
SearchResultParser()
           
 
Method Summary
 void characters(char[] ch, int start, int length)
          This method processes the event based on conditions.
 java.lang.String getData()
          This method returns the data string which forms the table values.
 java.lang.String getEventName()
          Returns the event name
 java.lang.String getMetaData()
          This method returns the meta data string which forms the table headings.
 java.lang.StringBuffer getTotalResultSize()
           
 void parse(java.lang.String xmlString)
          This method parses the XML
 void setEventName(java.lang.String string)
          Set the event name
 void setTotalResultSize(java.lang.StringBuffer data)
           
 void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes atts)
          Receives the startElement event
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchResultParser

public SearchResultParser()
Method Detail

startElement

public void startElement(java.lang.String namespaceURI,
                         java.lang.String localName,
                         java.lang.String qName,
                         org.xml.sax.Attributes atts)
                  throws org.xml.sax.SAXException
Receives the startElement event

Specified by:
startElement in interface org.xml.sax.ContentHandler
Overrides:
startElement in class org.xml.sax.helpers.DefaultHandler
Parameters:
namespaceURI - string
localName - string
qName - string
atts - Attributes object
Throws:
org.xml.sax.SAXException

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws org.xml.sax.SAXException
This method processes the event based on conditions.

Specified by:
characters in interface org.xml.sax.ContentHandler
Overrides:
characters in class org.xml.sax.helpers.DefaultHandler
Parameters:
ch - character array
start - starting index of the char[]
length - lengthof the char[]
Throws:
org.xml.sax.SAXException

parse

public void parse(java.lang.String xmlString)
           throws UIException
This method parses the XML

Parameters:
xmlString - string
Throws:
UIException

getMetaData

public java.lang.String getMetaData()
This method returns the meta data string which forms the table headings.

Returns:
getMetaDataString the metaData string

getData

public java.lang.String getData()
This method returns the data string which forms the table values.

Returns:
data the data string

getEventName

public java.lang.String getEventName()
Returns the event name

Returns:
eventName

setEventName

public void setEventName(java.lang.String string)
Set the event name

Parameters:
string -

getTotalResultSize

public java.lang.StringBuffer getTotalResultSize()
Returns:
stringBuffer

setTotalResultSize

public void setTotalResultSize(java.lang.StringBuffer data)
Parameters:
data -