1 package com.jclark.xml.parse.awt; 2 3 import java.awt.AWTException; 4 import com.jclark.xml.parse.*; 5 6 /** 7 * An extension of <code>Application</code> that restricts methods 8 * to throwing <code>AWTException</code>. 9 * 10 * @version $Revision: 1.2 $ $Date: 1998/06/10 09:43:54 $ 11 */ 12 public interface Application extends com.jclark.xml.parse.base.Application { 13 /** 14 * Reports the start of the document. 15 * This is called once per well-formed document before any other methods. 16 */ startDocument()17 void startDocument() throws AWTException; 18 /** 19 * Reports the end of the prolog. 20 * Called before the start of the first element. 21 */ endProlog(EndPrologEvent event)22 void endProlog(EndPrologEvent event) throws AWTException; 23 24 /** 25 * Reports the start of an element. 26 * This includes both start-tags and empty elements. 27 */ startElement(StartElementEvent event)28 void startElement(StartElementEvent event) throws AWTException; 29 /** 30 * Reports character data. 31 */ characterData(CharacterDataEvent event)32 void characterData(CharacterDataEvent event) throws AWTException; 33 /** 34 * Reports the end of a element. 35 * This includes both end-tags and empty elements. 36 */ endElement(EndElementEvent event)37 void endElement(EndElementEvent event) throws AWTException; 38 39 /** 40 * Reports a processing instruction. 41 * Note that processing instructions can occur before or after the 42 * document element. 43 */ processingInstruction(ProcessingInstructionEvent event)44 void processingInstruction(ProcessingInstructionEvent event) throws AWTException; 45 46 /** 47 * Reports the end of the document. 48 * Called once per well-formed document, after all other methods. 49 * Not called if the document is not well-formed. 50 */ endDocument()51 void endDocument() throws AWTException; 52 /** 53 * Reports a comment. 54 * Note that comments can occur before or after the 55 * document element. 56 */ comment(CommentEvent event)57 void comment(CommentEvent event) throws AWTException; 58 59 /** 60 * Reports the start of a CDATA section. 61 */ startCdataSection(StartCdataSectionEvent event)62 void startCdataSection(StartCdataSectionEvent event) throws AWTException; 63 64 /** 65 * Reports the end of a CDATA section. 66 */ endCdataSection(EndCdataSectionEvent event)67 void endCdataSection(EndCdataSectionEvent event) throws AWTException; 68 69 /** 70 * Reports the start of an entity reference. 71 * This event will be followed by the result of parsing 72 * the entity's replacement text. 73 * This is not called for entity references in attribute values. 74 */ startEntityReference(StartEntityReferenceEvent event)75 void startEntityReference(StartEntityReferenceEvent event) throws AWTException; 76 77 /** 78 * Reports the start of an entity reference. 79 * This event follow's the result of parsing 80 * the entity's replacement text. 81 * This is not called for entity references in attribute values. 82 */ endEntityReference(EndEntityReferenceEvent event)83 void endEntityReference(EndEntityReferenceEvent event) throws AWTException; 84 85 /** 86 * Reports the start of the document type declaration. 87 */ startDocumentTypeDeclaration(StartDocumentTypeDeclarationEvent event)88 void startDocumentTypeDeclaration(StartDocumentTypeDeclarationEvent event) throws AWTException; 89 90 /** 91 * Reports the end of the document type declaration. 92 */ endDocumentTypeDeclaration(EndDocumentTypeDeclarationEvent event)93 void endDocumentTypeDeclaration(EndDocumentTypeDeclarationEvent event) throws AWTException; 94 /** 95 * Reports a markup declaration. 96 */ markupDeclaration(MarkupDeclarationEvent event)97 void markupDeclaration(MarkupDeclarationEvent event) throws AWTException; 98 } 99