|
GATE Version 3.1-2270 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
gate.xml.GateFormatXmlDocumentHandler
public class GateFormatXmlDocumentHandler
Implements the behaviour of the XML reader. This is the reader for Gate Xml documents saved with DocumentImplementation.toXml() method.
Field Summary | |
---|---|
protected List |
myStatusListeners
Listeners for status report |
Constructor Summary | |
---|---|
GateFormatXmlDocumentHandler(Document aDocument)
|
Method Summary | |
---|---|
void |
addStatusListener(StatusListener listener)
This methos is called when a listener is registered with this class |
void |
characters(char[] text,
int start,
int length)
This method is called when the SAX parser encounts text in the XML doc. |
void |
charactersAction(char[] text,
int start,
int length)
This method is called when all characters between specific tags have been read completely |
void |
comment(String text)
This method is called when the SAX parser encounts a comment It works only if the XmlDocumentHandler implements a com.sun.parser.LexicalEventListener |
void |
endCDATA()
This method is called when the SAX parser encounts the end of a CDATA section. |
void |
endDocument()
This method is called when the SAX parser encounts the end of the XML document. |
void |
endElement(String uri,
String qName,
String elemName)
This method is called when the SAX parser encounts the end of an XML element. |
void |
endParsedEntity(String name,
boolean included)
This method is called when the SAX parser encounts a parsed entity and informs the application if that entity was parsed or not It's working only if the CustomDocumentHandler implements a com.sun.parser.LexicalEventListener |
void |
error(SAXParseException ex)
Error method.We deal with this exception inside SimpleErrorHandler class |
void |
fatalError(SAXParseException ex)
FatalError method. |
protected void |
fireStatusChangedEvent(String text)
This methos is called whenever we need to inform the listener about an event. |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
This method is called when the SAX parser encounts white spaces |
void |
removeStatusListener(StatusListener listener)
This methos is called when a listener is removed |
void |
startCDATA()
This method is called when the SAX parser encounts a start of a CDATA section It works only if the XmlDocumentHandler implements a com.sun.parser.LexicalEventListener |
void |
startDocument()
This method is called when the SAX parser encounts the beginning of the XML document. |
void |
startElement(String uri,
String qName,
String elemName,
Attributes atts)
This method is called when the SAX parser encounts the beginning of an XML element. |
void |
startParsedEntity(String name)
This method is called when the SAX parser encounts a parsed Entity It works only if the XmlDocumentHandler implements a com.sun.parser.LexicalEventListener |
void |
warning(SAXParseException ex)
Warning method comment. |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
---|
endPrefixMapping, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected List myStatusListeners
Constructor Detail |
---|
public GateFormatXmlDocumentHandler(Document aDocument)
Method Detail |
---|
public void startDocument() throws SAXException
startDocument
in interface ContentHandler
startDocument
in class DefaultHandler
SAXException
public void endDocument() throws SAXException
endDocument
in interface ContentHandler
endDocument
in class DefaultHandler
SAXException
public void startElement(String uri, String qName, String elemName, Attributes atts) throws SAXException
startElement
in interface ContentHandler
startElement
in class DefaultHandler
SAXException
public void endElement(String uri, String qName, String elemName) throws SAXException
endElement
in interface ContentHandler
endElement
in class DefaultHandler
SAXException
public void characters(char[] text, int start, int length) throws SAXException
characters
in interface ContentHandler
characters
in class DefaultHandler
SAXException
public void charactersAction(char[] text, int start, int length) throws SAXException
SAXException
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException
ignorableWhitespace
in interface ContentHandler
ignorableWhitespace
in class DefaultHandler
SAXException
public void error(SAXParseException ex) throws SAXException
error
in interface ErrorHandler
error
in class DefaultHandler
SAXException
public void fatalError(SAXParseException ex) throws SAXException
fatalError
in interface ErrorHandler
fatalError
in class DefaultHandler
SAXException
public void warning(SAXParseException ex) throws SAXException
warning
in interface ErrorHandler
warning
in class DefaultHandler
SAXException
public void comment(String text) throws SAXException
SAXException
public void startCDATA() throws SAXException
SAXException
public void endCDATA() throws SAXException
SAXException
public void startParsedEntity(String name) throws SAXException
SAXException
public void endParsedEntity(String name, boolean included) throws SAXException
SAXException
public void addStatusListener(StatusListener listener)
public void removeStatusListener(StatusListener listener)
protected void fireStatusChangedEvent(String text)
|
GATE Version 3.1-2270 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |