phrase nets
Public Member Functions
pn::parse::DataSourceHTML Class Reference
Inheritance diagram for pn::parse::DataSourceHTML:
pn::parse::DataSource

List of all members.

Public Member Functions

 DataSourceHTML (File source, String containerElement) throws IOException
 DataSourceHTML (File source, String containerElement, String charset) throws IOException
 DataSourceHTML (URL source, String containerElement) throws URISyntaxException, IOException
URI uri ()
String nextBlock () throws PNException
void reset ()
String title ()
Document document ()

Detailed Description

A datasource backed by a (local or remote) HTML document.


Constructor & Destructor Documentation

pn::parse::DataSourceHTML::DataSourceHTML ( File  source,
String  containerElement 
) throws IOException [inline]

Ctor.

Parameters:
sourceThe local HTML file to read. Must have UTF-8 charset. Must not be null
containerElementThe container element to parse (e.g. "p"). Must not be null
Exceptions:
IOExceptionIf the source cannot be read.
pn::parse::DataSourceHTML::DataSourceHTML ( File  source,
String  containerElement,
String  charset 
) throws IOException [inline]

Ctor.

Parameters:
sourceThe local HTML file to read. Must not be null
containerElementThe container element to parse (e.g. "p"). Must not be null
charsetThe charset of the file (e.g. "UTF-8")
Exceptions:
IOExceptionIf source cannot be read
pn::parse::DataSourceHTML::DataSourceHTML ( URL  source,
String  containerElement 
) throws URISyntaxException, IOException [inline]

Ctor.

Parameters:
sourceThe URL pointing to the HTML document to read.
containerElementThe container element to parse (e.g. "p"). Must not be null
Exceptions:
URISyntaxExceptionIf the URL can't be converted to an URI
IOExceptionIf the source cannot be read

Member Function Documentation

Document pn::parse::DataSourceHTML::document ( ) [inline]
Returns:
The source document
String pn::parse::DataSourceHTML::nextBlock ( ) throws PNException [inline]

Returns the next block of data or null if there is no more data. Linker can assume that there is no connection between two blocks, i.e., blocks can be parsed independently.

Returns:
The next data block
Exceptions:
PNExceptionOn errors

Implements pn::parse::DataSource.

void pn::parse::DataSourceHTML::reset ( ) [inline]

Resets this data source to its initial state, so that nextBlock() behaves as as if called on a newly created object.

Implements pn::parse::DataSource.

String pn::parse::DataSourceHTML::title ( ) [inline]
Returns:
A short title (name) of this data source

Implements pn::parse::DataSource.

URI pn::parse::DataSourceHTML::uri ( ) [inline]
Returns:
The URI of the data source

Implements pn::parse::DataSource.


The documentation for this class was generated from the following file:
 All Classes Functions Variables