|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openpipeline.pipeline.docfilter.HTMLFilter
public class HTMLFilter
Implementation of the DocFilter interface for HTML files
| Constructor Summary | |
|---|---|
HTMLFilter()
|
|
| Method Summary | |
|---|---|
String |
getDescription()
Return a description of this filter suitable for display in the admin interface. |
String |
getErrorMessage()
Return any error message that occurs during the parse process. |
Throwable |
getException()
Return any exception that occurred during parsing. |
String[] |
getExtensions()
Return an array of file extensions that this filter can handle. |
ArrayList |
getLinks()
Returns links found in <a href="link"> tags. |
Map |
getMetaNameTags()
Returns a Map containing the name/value pairs found in meta tags in the form <meta name="name" content="value">. |
String[] |
getMimeTypes()
Return an array of mimetypes that this filter can handle. |
String |
getName()
Return the name of this filter. |
boolean |
getNextItem(Item item)
Reads data from the input, parses it, and adds it to the the specified item. |
boolean |
hasError()
Returns true if the last call to getNextItem() generated an error. |
void |
setBaseURL(String url)
Used to resolve relative links in the document. |
void |
setEncoding(String encoding)
Set the encoding of the data in the input stream. |
void |
setExtensions(String[] exts)
Set the extensions that this filter handles. |
void |
setInputStream(InputStream in)
Set the input stream which contains the document to be added. |
void |
setMimeTypes(String[] mimeTypes)
Set the mimetypes that this filter handles. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HTMLFilter()
| Method Detail |
|---|
public void setInputStream(InputStream in)
DocFilter
setInputStream in interface DocFilterpublic void setBaseURL(String url)
url - the URL of the page we're parsingpublic boolean getNextItem(Item item)
DocFilter
getNextItem in interface DocFilterpublic Map getMetaNameTags()
public String getErrorMessage()
DocFilter
getErrorMessage in interface DocFilterpublic Throwable getException()
DocFilter
getException in interface DocFilterpublic boolean hasError()
DocFilter
hasError in interface DocFilterpublic void setEncoding(String encoding)
DocFilter
setEncoding in interface DocFilterencoding - an encoding string, for example, "UTF-8" or "ISO-8859-1". Must
be one supported by the JVM.public ArrayList getLinks()
getLinks in interface DocFilterpublic String getDescription()
DocFilter
getDescription in interface DocFilterpublic String[] getExtensions()
DocFilter
{"htm", "html", "jsp", "asp"}
getExtensions in interface DocFilterpublic String[] getMimeTypes()
DocFilter
{"text/html", "text/plain"}
Other common mimetypes include application/pdf, application/msword, application/vnd.ms-excel, etc.
getMimeTypes in interface DocFilterpublic String getName()
DocFilter
getName in interface DocFilterpublic void setExtensions(String[] exts)
DocFilter
setExtensions in interface DocFilterexts - extensions this class should handlepublic void setMimeTypes(String[] mimeTypes)
DocFilter
setMimeTypes in interface DocFiltermimeTypes - mimetypes this class should handle
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||