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
SGMLParserListener
s.
- Version:
- 05 Aug 1997
- Author:
- Kazuki YASUMATSU
- See Also:
- Element, SGMLParser, SGMLParserListener
-
CDATA_PARSED
- The cdata (#PCDATA, #CDATA, #RCDATA) parsed event type.
-
ENDTAG_PARSED
- The end tag parsed event type.
-
PARSING_FINISHED
- The parsing finished event type.
-
SGML_FIRST
- Marks the first integer id for the range of sgml event ids.
-
SGML_LAST
- Marks the last integer id for the range of sgml event ids.
-
STARTTAG_PARSED
- The start tag parsed event type.
-
SGMLEvent(SGMLParser, int)
- Constructs a sgml event with the specified sgml parser (event source)
and id.
-
SGMLEvent(SGMLParser, int, Element)
- Constructs a sgml event with the specified sgml parser (event source),
id, and element.
-
SGMLEvent(SGMLParser, int, Element, Hashtable)
- Constructs a sgml event with the specified sgml parser (event source),
id, element, and attributes.
-
SGMLEvent(SGMLParser, int, String)
- Constructs a sgml event with the specified sgml parser (event source),
id, and cdata.
-
getAttributes()
- Returns the attributes of this sgml event.
-
getCDATA()
- Returns the cdata (#PCDATA, #CDATA, #RCDATA) of this sgml event.
-
getElement()
- Returns the element of this sgml event.
-
getID()
- Returns the id of this sgml event.
-
getParser()
- Returns the sgml parser (event source) of this sgml event.
SGML_FIRST
public static final int SGML_FIRST
- Marks the first integer id for the range of sgml event ids.
SGML_LAST
public static final int SGML_LAST
- Marks the last integer id for the range of sgml event ids.
STARTTAG_PARSED
public static final int STARTTAG_PARSED
- The start tag parsed event type.
ENDTAG_PARSED
public static final int ENDTAG_PARSED
- The end tag parsed event type.
CDATA_PARSED
public static final int CDATA_PARSED
- The cdata (#PCDATA, #CDATA, #RCDATA) parsed event type.
PARSING_FINISHED
public static final int PARSING_FINISHED
- The parsing finished event type.
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.
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.
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.
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.
getID
public int getID()
- Returns the id of this sgml event.
getParser
public SGMLParser getParser()
- Returns the sgml parser (event source) of this sgml event.
getElement
public Element getElement()
- Returns the element of this sgml event. This operation is valid
when id is STARTTAG_PARSED or ENDTAG_PARSED.
getAttributes
public Hashtable getAttributes()
- Returns the attributes of this sgml event. This operation is valid
when id is STARTTAG_PARSED.
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