phrase nets
|
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 () |
A datasource backed by a (local or remote) HTML document.
pn::parse::DataSourceHTML::DataSourceHTML | ( | File | source, |
String | containerElement | ||
) | throws IOException [inline] |
Ctor.
source | The local HTML file to read. Must have UTF-8 charset. Must not be null |
containerElement | The container element to parse (e.g. "p"). Must not be null |
IOException | If the source cannot be read. |
pn::parse::DataSourceHTML::DataSourceHTML | ( | File | source, |
String | containerElement, | ||
String | charset | ||
) | throws IOException [inline] |
Ctor.
source | The local HTML file to read. Must not be null |
containerElement | The container element to parse (e.g. "p"). Must not be null |
charset | The charset of the file (e.g. "UTF-8") |
IOException | If source cannot be read |
pn::parse::DataSourceHTML::DataSourceHTML | ( | URL | source, |
String | containerElement | ||
) | throws URISyntaxException, IOException [inline] |
Ctor.
source | The URL pointing to the HTML document to read. |
containerElement | The container element to parse (e.g. "p"). Must not be null |
URISyntaxException | If the URL can't be converted to an URI |
IOException | If the source cannot be read |
Document pn::parse::DataSourceHTML::document | ( | ) | [inline] |
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.
PNException | On 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] |
Implements pn::parse::DataSource.
URI pn::parse::DataSourceHTML::uri | ( | ) | [inline] |
Implements pn::parse::DataSource.