|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
sabdakosh.Xdochandler
public class Xdochandler
The Class Xdochandler is the class that represent the logic of the application. The actual parsing of the xml file is performed in this class.
Field Summary | |
---|---|
private java.lang.String |
bool
The bool is the string variable that checks if the word entered by the user is present in the xml file. |
private java.io.CharArrayWriter |
contents
The contents is the object for CharArrayWriter class. |
java.lang.String |
eg1
eg1 variable represents the value of first example for a given word present in xml file. |
java.lang.String |
eg2
eg2 variable represents the value of second example for a given word present in xml file. |
java.lang.String |
eg3
eg3 variable represents the value of third example for a given word present in xml file. |
private java.lang.String |
input
The input variable represents the value provided by the user. |
java.lang.String |
mean1
mean1 variable represents the first english meaning of a given word present in xml file. |
java.lang.String |
mean2
mean2 variable represents the second english meaning of a given word present in xml file. |
java.lang.String |
mean3
mean3 variable represents the third english meaning of a given word present in xml file. |
java.lang.String |
nepali_meaning
The nepali_meaning is the variable that represents the value of nepali meaning in nepali language. |
java.lang.String |
total_meaning
The total_meaning is the variable that represents the value of english meaining and it's associated forms and examples. |
private java.lang.String |
xinput
The xinput is the variable that represents the element value returned by the parser. |
Constructor Summary | |
---|---|
Xdochandler(java.lang.String input)
Instantiates a new xdochandler. |
Method Summary | |
---|---|
void |
characters(char[] ch,
int start,
int length)
The characters is a callback method used by the SAX parser to return the characters found in the xml file. |
void |
endElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName)
endElement is also a callback method used by SAX parser that returns the ending element present in xml file. |
void |
startElement(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attr)
startElement is the callback method used by SAX parser that returns all the starting elements present in xml file. |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
---|
endDocument, 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 |
Field Detail |
---|
private java.lang.String input
private java.lang.String xinput
public java.lang.String mean1
public java.lang.String eg1
public java.lang.String mean2
public java.lang.String eg2
public java.lang.String mean3
public java.lang.String eg3
public java.lang.String nepali_meaning
public java.lang.String total_meaning
private java.lang.String bool
private java.io.CharArrayWriter contents
Constructor Detail |
---|
public Xdochandler(java.lang.String input)
input
- the input variable represents the value provided by the user. It is the value passed from Dictionary class.Method Detail |
---|
public void startElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attr) throws org.xml.sax.SAXException
startElement
in interface org.xml.sax.ContentHandler
startElement
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public void endElement(java.lang.String namespaceURI, java.lang.String localName, java.lang.String qName) throws org.xml.sax.SAXException
endElement
in interface org.xml.sax.ContentHandler
endElement
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public void characters(char[] ch, int start, int length) throws org.xml.sax.SAXException
characters
in interface org.xml.sax.ContentHandler
characters
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |