info.bliki.html.wikipedia
Class OpenCloseTag

java.lang.Object
  extended by info.bliki.html.wikipedia.AbstractHTMLTag
      extended by info.bliki.html.wikipedia.OpenCloseTag
All Implemented Interfaces:
HTMLTag
Direct Known Subclasses:
OpenCloseHTMLTag, PreTag

public class OpenCloseTag
extends AbstractHTMLTag


Field Summary
protected  java.lang.String closeStr
           
protected  boolean formatContent
           
protected  java.lang.String openStr
           
 
Fields inherited from class info.bliki.html.wikipedia.AbstractHTMLTag
fconvertPlainText
 
Constructor Summary
OpenCloseTag(java.lang.String opener, java.lang.String closer)
           
OpenCloseTag(java.lang.String opener, java.lang.String closer, boolean convertPlainText)
           
OpenCloseTag(java.lang.String opener, java.lang.String closer, boolean convertPlainText, boolean formatContent)
           
 
Method Summary
 void close(TagNode node, java.lang.StringBuilder resultBuffer)
          Write the closing wiki syntax for this tag to the result buffer
 void content(AbstractHTMLToWiki w, TagNode node, java.lang.StringBuilder resultBuffer, boolean showWithoutTag)
          Convert the current HTML node into wiki text.
 void formatContent(java.lang.String str, java.lang.StringBuilder resultBuffer)
           
 java.lang.String getCloseStr()
           
 java.lang.String getOpenStr()
           
 void open(TagNode node, java.lang.StringBuilder resultBuffer)
          Write the opening wiki syntax for this tag to the result buffer
 void setCloseStr(java.lang.String closeStr)
           
 void setOpenStr(java.lang.String openStr)
           
 
Methods inherited from class info.bliki.html.wikipedia.AbstractHTMLTag
emptyContent, getFirstContent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

openStr

protected java.lang.String openStr

closeStr

protected java.lang.String closeStr

formatContent

protected final boolean formatContent
Constructor Detail

OpenCloseTag

public OpenCloseTag(java.lang.String opener,
                    java.lang.String closer,
                    boolean convertPlainText,
                    boolean formatContent)
Parameters:
opener - opening string for this tag
closer - closing string for this tag
convertPlainText - create plain text output without wiki tags
formatContent - format the intermediate resulting wiki content by reducing multiple spaces to only one space ' ' character

OpenCloseTag

public OpenCloseTag(java.lang.String opener,
                    java.lang.String closer,
                    boolean convertPlainText)

OpenCloseTag

public OpenCloseTag(java.lang.String opener,
                    java.lang.String closer)
Method Detail

open

public void open(TagNode node,
                 java.lang.StringBuilder resultBuffer)
Description copied from interface: HTMLTag
Write the opening wiki syntax for this tag to the result buffer

Specified by:
open in interface HTMLTag
Overrides:
open in class AbstractHTMLTag
See Also:
HTMLTag.close(TagNode, StringBuilder)

content

public void content(AbstractHTMLToWiki w,
                    TagNode node,
                    java.lang.StringBuilder resultBuffer,
                    boolean showWithoutTag)
Description copied from interface: HTMLTag
Convert the current HTML node into wiki text.

Specified by:
content in interface HTMLTag
Overrides:
content in class AbstractHTMLTag
Parameters:
w - the converter which contains the special wiki tag conversion rules.
node - the current HTML node which should be converted to HTML
resultBuffer - the resulting HTML buffer
showWithoutTag - if true don't call the open() and close() method for this tag

formatContent

public void formatContent(java.lang.String str,
                          java.lang.StringBuilder resultBuffer)

close

public void close(TagNode node,
                  java.lang.StringBuilder resultBuffer)
Description copied from interface: HTMLTag
Write the closing wiki syntax for this tag to the result buffer

Specified by:
close in interface HTMLTag
Overrides:
close in class AbstractHTMLTag
See Also:
HTMLTag.open(TagNode, StringBuilder)

getOpenStr

public java.lang.String getOpenStr()

setOpenStr

public void setOpenStr(java.lang.String openStr)

getCloseStr

public java.lang.String getCloseStr()

setCloseStr

public void setCloseStr(java.lang.String closeStr)


Copyright © 2012 Java Wikipedia API (Bliki engine). All Rights Reserved.