public class RDFaParser extends AbstractParser implements Parser
Parser.Failure
Modifier and Type | Field and Description |
---|---|
private htmlParser |
hp |
log, SUPPORTED_EXTENSIONS, SUPPORTED_MIME_TYPES
Constructor and Description |
---|
RDFaParser() |
Modifier and Type | Method and Description |
---|---|
private static void |
addNotEmptyValuesToSet(java.util.Set<java.lang.String> set,
java.lang.String value) |
private static Document |
convertAllTriplesToDocument(DigestURL url,
java.lang.String mimeType,
java.lang.String charset,
IRDFaTriple[] allTriples) |
static void |
main(java.lang.String[] args) |
Document[] |
parse(DigestURL url,
java.lang.String mimeType,
java.lang.String charset,
VocabularyScraper scraper,
int timezoneOffset,
java.io.InputStream source)
parse an input stream
|
private Document[] |
parseHtml(DigestURL url,
java.lang.String mimeType,
java.lang.String charset,
VocabularyScraper scraper,
int timezoneOffset,
java.io.InputStream source) |
private static Document |
parseRDFa(DigestURL url,
java.lang.String mimeType,
java.lang.String charset,
java.io.InputStream source) |
equals, getName, hashCode, singleList, supportedExtensions, supportedMimeTypes
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
equals, getName, hashCode, supportedExtensions, supportedMimeTypes
private final htmlParser hp
public Document[] parse(DigestURL url, java.lang.String mimeType, java.lang.String charset, VocabularyScraper scraper, int timezoneOffset, java.io.InputStream source) throws Parser.Failure, java.lang.InterruptedException
Parser
parse
in interface Parser
url
- the url of the sourcemimeType
- the mime type of the source, if knowncharset
- the charset of the source, if knownscraper
- an entity scraper to detect facets from text annotation contextsource
- a input streamParser.Failure
java.lang.InterruptedException
private static Document parseRDFa(DigestURL url, java.lang.String mimeType, java.lang.String charset, java.io.InputStream source)
private Document[] parseHtml(DigestURL url, java.lang.String mimeType, java.lang.String charset, VocabularyScraper scraper, int timezoneOffset, java.io.InputStream source) throws Parser.Failure, java.lang.InterruptedException
Parser.Failure
java.lang.InterruptedException
private static Document convertAllTriplesToDocument(DigestURL url, java.lang.String mimeType, java.lang.String charset, IRDFaTriple[] allTriples)
private static void addNotEmptyValuesToSet(java.util.Set<java.lang.String> set, java.lang.String value)
public static void main(java.lang.String[] args)