public interface Parser
Modifier and Type | Interface and Description |
---|---|
static class |
Parser.Failure
a parser warning
thrown as an exception
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o)
check equivalence of parsers; this simply tests equality of parser names
|
java.lang.String |
getName()
get the name of the parser
|
int |
hashCode()
the hash code of a parser
|
Document[] |
parse(DigestURL url,
java.lang.String mimeType,
java.lang.String charset,
VocabularyScraper scraper,
int timezoneOffset,
java.io.InputStream source)
parse an input stream
|
java.util.Set<java.lang.String> |
supportedExtensions()
each parser must define a set of supported file extensions
|
java.util.Set<java.lang.String> |
supportedMimeTypes()
each parser must define a set of supported mime types
|
java.util.Set<java.lang.String> supportedMimeTypes()
java.util.Set<java.lang.String> supportedExtensions()
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
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
java.lang.String getName()
boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- int hashCode()
hashCode
in class java.lang.Object