All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jp.kyasu.sgml.SGMLEvent

java.lang.Object
   |
   +----java.util.EventObject
           |
           +----jp.kyasu.sgml.SGMLEvent

public class SGMLEvent
extends EventObject
The SGML event that is delivered from a SGMLParser to SGMLParserListeners.

Version:
05 Aug 1997
Author:
Kazuki YASUMATSU
See Also:
Element, SGMLParser, SGMLParserListener

Variable Index

 o CDATA_PARSED
The cdata (#PCDATA, #CDATA, #RCDATA) parsed event type.
 o ENDTAG_PARSED
The end tag parsed event type.
 o PARSING_FINISHED
The parsing finished event type.
 o SGML_FIRST
Marks the first integer id for the range of sgml event ids.
 o SGML_LAST
Marks the last integer id for the range of sgml event ids.
 o STARTTAG_PARSED
The start tag parsed event type.

Constructor Index

 o SGMLEvent(SGMLParser, int)
Constructs a sgml event with the specified sgml parser (event source) and id.
 o SGMLEvent(SGMLParser, int, Element)
Constructs a sgml event with the specified sgml parser (event source), id, and element.
 o SGMLEvent(SGMLParser, int, Element, Hashtable)
Constructs a sgml event with the specified sgml parser (event source), id, element, and attributes.
 o SGMLEvent(SGMLParser, int, String)
Constructs a sgml event with the specified sgml parser (event source), id, and cdata.

Method Index

 o getAttributes()
Returns the attributes of this sgml event.
 o getCDATA()
Returns the cdata (#PCDATA, #CDATA, #RCDATA) of this sgml event.
 o getElement()
Returns the element of this sgml event.
 o getID()
Returns the id of this sgml event.
 o getParser()
Returns the sgml parser (event source) of this sgml event.

Variables

 o SGML_FIRST
 public static final int SGML_FIRST
Marks the first integer id for the range of sgml event ids.

 o SGML_LAST
 public static final int SGML_LAST
Marks the last integer id for the range of sgml event ids.

 o STARTTAG_PARSED
 public static final int STARTTAG_PARSED
The start tag parsed event type.

 o ENDTAG_PARSED
 public static final int ENDTAG_PARSED
The end tag parsed event type.

 o CDATA_PARSED
 public static final int CDATA_PARSED
The cdata (#PCDATA, #CDATA, #RCDATA) parsed event type.

 o PARSING_FINISHED
 public static final int PARSING_FINISHED
The parsing finished event type.

Constructors

 o SGMLEvent
 public SGMLEvent(SGMLParser parser,
                  int id,
                  Element element,
                  Hashtable attributes)
Constructs a sgml event with the specified sgml parser (event source), id, element, and attributes. The id must be STARTTAG_PARSED.

Parameters:
parser - the sgml parser (event source).
id - the id.
element - the element.
attributes - the attributes.
Throws: IllegalArgumentException
if the id is not STARTTAG_PARSED.
 o SGMLEvent
 public SGMLEvent(SGMLParser parser,
                  int id,
                  Element element)
Constructs a sgml event with the specified sgml parser (event source), id, and element. The id must be ENDTAG_PARSED.

Parameters:
parser - the sgml parser (event source).
id - the id.
element - the element.
Throws: IllegalArgumentException
if the id is not ENDTAG_PARSED.
 o SGMLEvent
 public SGMLEvent(SGMLParser parser,
                  int id,
                  String cdata)
Constructs a sgml event with the specified sgml parser (event source), id, and cdata. The id must be CDATA_PARSED.

Parameters:
parser - the sgml parser (event source).
id - the id.
cdata - the cdata.
Throws: IllegalArgumentException
if the id is not CDATA_PARSED.
 o SGMLEvent
 public SGMLEvent(SGMLParser parser,
                  int id)
Constructs a sgml event with the specified sgml parser (event source) and id. The id must be PARSING_FINISHED.

Parameters:
parser - the sgml parser (event source).
id - the id.
Throws: IllegalArgumentException
if the id is not PARSING_FINISHED.

Methods

 o getID
 public int getID()
Returns the id of this sgml event.

 o getParser
 public SGMLParser getParser()
Returns the sgml parser (event source) of this sgml event.

 o getElement
 public Element getElement()
Returns the element of this sgml event. This operation is valid when id is STARTTAG_PARSED or ENDTAG_PARSED.

 o getAttributes
 public Hashtable getAttributes()
Returns the attributes of this sgml event. This operation is valid when id is STARTTAG_PARSED.

 o getCDATA
 public String getCDATA()
Returns the cdata (#PCDATA, #CDATA, #RCDATA) of this sgml event. This operation is valid when id is CDATA_PARSED.


All Packages  Class Hierarchy  This Package  Previous  Next  Index