public final class RobotsMetaTagParser
extends javax.swing.text.html.HTMLEditorKit.ParserCallback
| Constructor and Description |
|---|
RobotsMetaTagParser() |
RobotsMetaTagParser(java.net.URL url) |
RobotsMetaTagParser(java.net.URL url,
java.lang.String page) |
| Modifier and Type | Method and Description |
|---|---|
void |
handleSimpleTag(javax.swing.text.html.HTML.Tag tag,
javax.swing.text.MutableAttributeSet attributes,
int position)
Checks for robots META tags.
|
boolean |
index()
Indicates whether the page can be indexed.
|
java.util.List<Link> |
parseMetaTags()
Parses the document and returns a list of links that can not be
followed.
|
void |
setPage(java.lang.String page) |
void |
setUrl(java.net.URL url) |
public RobotsMetaTagParser()
public RobotsMetaTagParser(java.net.URL url)
public RobotsMetaTagParser(java.net.URL url,
java.lang.String page)
public void setPage(java.lang.String page)
public void setUrl(java.net.URL url)
public void handleSimpleTag(javax.swing.text.html.HTML.Tag tag,
javax.swing.text.MutableAttributeSet attributes,
int position)
handleSimpleTag in class javax.swing.text.html.HTMLEditorKit.ParserCallbacktag - Indicates the type of tag that caused this method to
be called. Only META tags are handled, any other kind of tag
causes this method to do nothing.attributes - The attributes of this tag. If the tag
defines the "name" attribute with value "robots" (not case
sensitive) then the "content" attribute will be checked, and
stored if it exists.position - The position of the tag in the document. Not
used.public java.util.List<Link> parseMetaTags()
index to check the value of this flag.List of Links that should
not be followed from this page.public boolean index()
parseMetaTags has been called.true iff. the page can be indexed.