org.opencms.staticexport
Class CmsLinkVisitor

java.lang.Object
  extended by org.htmlparser.visitors.NodeVisitor
      extended by org.opencms.staticexport.CmsLinkVisitor

public class CmsLinkVisitor
extends NodeVisitor

Implements the HTML parser node visitor pattern to exchange all links on the page.

Since:
6.0.0
Version:
$Revision: 1.9 $
Author:
Alexander Kandzior

Constructor Summary
CmsLinkVisitor(CmsLinkProcessor linkProcessor)
          Public constructor.
 
Method Summary
 String getHtml()
          Returns the generated HTML.
 void visitEndTag(Tag tag)
          Visitor method to process a tag end.
 void visitImageTag(ImageTag imageTag)
          Visitor method to process an image tag.
 void visitLinkTag(LinkTag linkTag)
          Visitor method to process a single link.
 void visitRemarkNode(Remark node)
          Visitor method to process a remark.
 void visitStringNode(Text node)
          Visitor method to process a string node.
 void visitTag(Tag tag)
          Visitor method to process a tag (start).
 
Methods inherited from class org.htmlparser.visitors.NodeVisitor
beginParsing, finishedParsing, shouldRecurseChildren, shouldRecurseSelf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsLinkVisitor

public CmsLinkVisitor(CmsLinkProcessor linkProcessor)
Public constructor.

Parameters:
linkProcessor - the link processor to use
Method Detail

getHtml

public String getHtml()
Returns the generated HTML.

Returns:
the generated HTML

visitEndTag

public void visitEndTag(Tag tag)
Visitor method to process a tag end.

Overrides:
visitEndTag in class NodeVisitor
Parameters:
tag - the tag to process

visitImageTag

public void visitImageTag(ImageTag imageTag)
Visitor method to process an image tag.

Parameters:
imageTag - the tag to process

visitLinkTag

public void visitLinkTag(LinkTag linkTag)
Visitor method to process a single link.

Parameters:
linkTag - the tag to process

visitRemarkNode

public void visitRemarkNode(Remark node)
Visitor method to process a remark.

Overrides:
visitRemarkNode in class NodeVisitor
Parameters:
node - the node to process

visitStringNode

public void visitStringNode(Text node)
Visitor method to process a string node.

Overrides:
visitStringNode in class NodeVisitor
Parameters:
node - the string node to process

visitTag

public void visitTag(Tag tag)
Visitor method to process a tag (start).

Overrides:
visitTag in class NodeVisitor
Parameters:
tag - the tag to process