org.semanticdesktop.aperture.hypertext.linkextractor.html
Interface TokenHandler

All Known Implementing Classes:
HtmlLinkExtractor

public interface TokenHandler

The TokenHandler interface should be implemented by classes that want to receives tokens from a Tokenizer.


Method Summary
 void attribute(String name)
          Notification of an attribute for the most recently reported element.
 void attribute(String name, String value)
          Notification of an attribute for the most recently reported element.
 void comment(String comment)
          Notification of comment.
 void docType(String name, String sysId, String fpi, String url)
          Notification of a processing instruction.
 void endDocument()
          Notification of the end of a document.
 void endOfStartTag()
          Notification of the end of a start tag.
 void endTag(String name)
          Notification of an end tag.
 void error(String message)
          Notification of a detected error.
 void startDocument()
          Notification of the start of a new document.
 void startOfStartTag(String name)
          Notification of the start of a start tag.
 void text(String text)
          Notification of text.
 

Method Detail

startDocument

void startDocument()
Notification of the start of a new document.


endDocument

void endDocument()
Notification of the end of a document.


startOfStartTag

void startOfStartTag(String name)
Notification of the start of a start tag.

Parameters:
name - The tag name.

endOfStartTag

void endOfStartTag()
Notification of the end of a start tag.


endTag

void endTag(String name)
Notification of an end tag.

Parameters:
name - The tag name.

attribute

void attribute(String name)
Notification of an attribute for the most recently reported element. The reported attribute does not have a value.

Parameters:
name - The name of the attribute.

attribute

void attribute(String name,
               String value)
Notification of an attribute for the most recently reported element.

Parameters:
name - The name of the attribute.
value - The value of the attribute.

text

void text(String text)
Notification of text.

Parameters:
text - the text.

comment

void comment(String comment)
Notification of comment.

Parameters:
comment - The comment.

docType

void docType(String name,
             String sysId,
             String fpi,
             String url)
Notification of a processing instruction.

Parameters:
name - The type name, e.g. HTML.
sysId - The system id, e.g. PUBLIC or SYSTEM.
fpi - The Formal Public Identifier, e.g. "-//W3C//DTD HTML 4.0 Transitional//EN".
url - The URL of the DTD, e.g. "http://www.w3.org/TR/REC-html40/loose.dtd".

error

void error(String message)
Notification of a detected error.

Parameters:
message - An error message.


Copyright © 2010 Aperture Development Team. All Rights Reserved.