eTextReader.OEB
Interface TitleHandler

All Known Implementing Classes:
HTMLTitleHandler

public interface TitleHandler


Method Summary
 java.util.List getHeadings()
          retrieve a list of headings for the most recently parsed object
 java.lang.String getTitle()
          get the title of the most recently parsed document
 void parse(java.lang.String url)
          load and parse the URL url.
 

Method Detail

parse

void parse(java.lang.String url)
           throws java.lang.Exception
load and parse the URL url. This method must be called before any of the accessor methods

Parameters:
url - the URL of the document to be parsed
Throws:
java.lang.Exception - if an error occurs parsing the document

getTitle

java.lang.String getTitle()
                          throws java.lang.IllegalStateException
get the title of the most recently parsed document

Returns:
a string representing the title; if one cannot be determined the URL of the document is returned
Throws:
java.lang.IllegalStateException - if no document has been parsed by this handler

getHeadings

java.util.List getHeadings()
                           throws java.lang.IllegalStateException
retrieve a list of headings for the most recently parsed object

Returns:
a List of Heading objects for each of the headings in the object
Throws:
java.lang.IllegalStateException - if no document has been parsed by this handler