| java.lang.Object java.io.Reader com.ecyrd.jspwiki.TranslatorReader
TranslatorReader | public class TranslatorReader extends Reader (Code) | | Handles conversion from Wiki format into fully featured HTML.
This is where all the magic happens. It is CRITICAL that this
class is tested, or all Wikis might die horribly.
The output of the HTML has not yet been validated against
the HTML DTD. However, it is very simple.
author: Janne Jalkanen |
Inner Class :public class Heading | |
ATTACHMENT | final public static int ATTACHMENT(Code) | | |
BOLD | final protected static int BOLD(Code) | | |
DEFAULT_INLINEPATTERN | final public static String DEFAULT_INLINEPATTERN(Code) | | The default inlining pattern. Currently "*.png"
|
EDIT | final public static int EDIT(Code) | | |
ITALIC | final protected static int ITALIC(Code) | | |
PROP_ALLOWHTML | final public static String PROP_ALLOWHTML(Code) | | If set to "true", allows using raw HTML within Wiki text. Be warned,
this is a VERY dangerous option to set - never turn this on in a publicly
allowable Wiki, unless you are absolutely certain of what you're doing.
|
PROP_CAMELCASELINKS | final public static String PROP_CAMELCASELINKS(Code) | | If true, consider CamelCase hyperlinks as well.
|
PROP_INLINEIMAGEPTRN | final public static String PROP_INLINEIMAGEPTRN(Code) | | This property defines the inline image pattern. It's current value
is jspwiki.translatorReader.inlinePattern
|
PROP_PLAINURIS | final public static String PROP_PLAINURIS(Code) | | If true, all hyperlinks are translated as well, regardless whether they
are surrounded by brackets.
|
PROP_RUNPLUGINS | final public static String PROP_RUNPLUGINS(Code) | | If set to "true", enables plugins during parsing
|
PROP_USEOUTLINKIMAGE | final public static String PROP_USEOUTLINKIMAGE(Code) | | If true, all outward links (external links) have a small link image appended.
|
PROP_USERELNOFOLLOW | final public static String PROP_USERELNOFOLLOW(Code) | | If set to "true", all external links are tagged with 'rel="nofollow"'
|
READ | final public static int READ(Code) | | |
TYPED | final protected static int TYPED(Code) | | |
c_externalLinks | final static String[] c_externalLinks(Code) | | This list contains all IANA registered URI protocol
types as of September 2004 + a few well-known extra types.
JSPWiki recognises all of them as external links.
|
TranslatorReader | public TranslatorReader(WikiContext context, Reader in)(Code) | | Creates a TranslatorReader using the default HTML renderer.
|
addAttachmentLinkHook | public void addAttachmentLinkHook(StringTransmutator mutator)(Code) | | Adds a hook for processing attachment links.
Parameters: mutator - The hook to call. Null is safe. |
addExternalLinkHook | public void addExternalLinkHook(StringTransmutator mutator)(Code) | | Adds a hook for processing external links. This includes
all http:// ftp://, etc. links, including inlined images.
Parameters: mutator - The hook to call. Null is safe. |
addHeadingListener | public void addHeadingListener(HeadingListener listener)(Code) | | |
addLinkTransmutator | public void addLinkTransmutator(StringTransmutator mutator)(Code) | | Adds a hook for processing link texts. This hook is called
when the link text is written into the output stream, and
you may use it to modify the text. It does not affect the
actual link, only the user-visible text.
Parameters: mutator - The hook to call. Null is safe. |
addLocalLinkHook | public void addLocalLinkHook(StringTransmutator mutator)(Code) | | Adds a hook for processing local links. The engine
transforms both non-existing and existing page links.
Parameters: mutator - The hook to call. Null is safe. |
cleanLink | public static String cleanLink(String link)(Code) | | Cleans a Wiki name.
[ This is a link ] -> ThisIsALink
Parameters: link - Link to be cleared. Null is safe, and causes this to return null. A cleaned link. since: 2.0 |
close | public void close()(Code) | | |
disableAccessRules | public void disableAccessRules()(Code) | | |
enableImageInlining | public void enableImageInlining(boolean toggle)(Code) | | Use this to turn on or off image inlining.
Parameters: toggle - If true, images are inlined (as per set in jspwiki.properties)If false, then images won't be inlined; instead, they will betreated as standard hyperlinks. since: 2.2.9 |
enablePlugins | public void enablePlugins(boolean toggle)(Code) | | Can be used to turn on plugin execution on a translator-reader basis
|
getImagePatterns | protected static Collection getImagePatterns(WikiEngine engine)(Code) | | Figure out which image suffixes should be inlined.
Collection of Strings with patterns. |
makeLink | public String makeLink(int type, String link, String text)(Code) | | Write a HTMLized link depending on its type.
The link mutator chain is processed.
Parameters: type - Type of the link. Parameters: link - The actual link. Parameters: text - The user-visible text for the link. |
setInputReader | public Reader setInputReader(Reader in)(Code) | | Replaces the current input character stream with a new one.
Parameters: in - New source for input. If null, this method does nothing. the old stream |
setRenderer | protected void setRenderer(TextRenderer renderer)(Code) | | Sets the currently used renderer. This method is protected because
we only want to use it internally for now. The renderer interface
is not yet set to stone, so it's not expected that third parties
would use this.
|
|
|