| java.lang.Object com.ecyrd.jspwiki.parser.MarkupParser com.ecyrd.jspwiki.parser.JSPWikiMarkupParser
JSPWikiMarkupParser | public class JSPWikiMarkupParser extends MarkupParser (Code) | | Parses JSPWiki-style markup into a WikiDocument DOM tree. This class is the
heart and soul of JSPWiki : make sure you test properly anything that is added,
or else it breaks down horribly.
author: Janne Jalkanen since: 2.4 |
Method Summary | |
protected void | callHeadingListenerChain(Heading param) Calls the heading listeners. | protected String | callMutatorChain(Collection list, String text) Calls a transmutator chain.
Parameters: list - Chain to call Parameters: text - Text that should be passed to the mutate() methodof each of the mutators in the chain. | protected Element | createAnchor(int type, String link, String text, String section) Creates a JDOM anchor element. | public static Collection | getImagePatterns(WikiEngine engine) Figure out which image suffixes should be inlined. | public static boolean | isExternalLink(String link) Figures out if a link is an off-site link. | public static Element | makeError(String error) Writes HTML for error message. | public Element | makeHeading(int level, String title, Heading hd) Returns XHTML for the start of the heading. | public WikiDocument | parse() | protected int | parseToken(int ch) Return CHARACTER, if you think this was a plain character; ELEMENT, if
you think this was a wiki markup element, and IGNORE, if you think
we should ignore this altogether. |
ATTACHMENT | final protected static int ATTACHMENT(Code) | | |
CHARACTER | final public static int CHARACTER(Code) | | |
CLASS_EDITPAGE | final public static String CLASS_EDITPAGE(Code) | | The value for anchor element class attributes when used
for edit page links. The value is "createpage".
|
CLASS_INTERWIKI | final public static String CLASS_INTERWIKI(Code) | | The value for anchor element class attributes when used
for interwiki page links. The value is "interwiki".
|
CLASS_WIKIPAGE | final public static String CLASS_WIKIPAGE(Code) | | The value for anchor element class attributes when used
for wiki page (normal) links. The value is "wikipage".
|
DEFAULT_INLINEPATTERN | final public static String DEFAULT_INLINEPATTERN(Code) | | The default inlining pattern. Currently "*.png"
|
EDIT | final protected static int EDIT(Code) | | |
ELEMENT | final public static int ELEMENT(Code) | | |
EMPTY | final protected static int EMPTY(Code) | | |
EXTERNAL | final protected static int EXTERNAL(Code) | | |
IGNORE | final public static int IGNORE(Code) | | |
IMAGE | final protected static int IMAGE(Code) | | |
IMAGELINK | final protected static int IMAGELINK(Code) | | |
IMAGEWIKILINK | final protected static int IMAGEWIKILINK(Code) | | |
INTERWIKI | final protected static int INTERWIKI(Code) | | |
LOCAL | final protected static int LOCAL(Code) | | |
LOCALREF | final protected static int LOCALREF(Code) | | |
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_USEATTACHMENTIMAGE | final public static String PROP_USEATTACHMENTIMAGE(Code) | | If true, all outward attachment info links have a small link image appended.
|
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 protected static int READ(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.
This array is sorted during class load, so you can just dump
here whatever you want in whatever order you want.
|
callHeadingListenerChain | protected void callHeadingListenerChain(Heading param)(Code) | | Calls the heading listeners.
Parameters: param - A Heading object. |
callMutatorChain | protected String callMutatorChain(Collection list, String text)(Code) | | Calls a transmutator chain.
Parameters: list - Chain to call Parameters: text - Text that should be passed to the mutate() methodof each of the mutators in the chain. The result of the mutation. |
createAnchor | protected Element createAnchor(int type, String link, String text, String section)(Code) | | Creates a JDOM anchor element. Can be overridden to change the URL creation,
if you really know what you are doing.
Parameters: type - One of the types above Parameters: link - URL to which to link to Parameters: text - Link text Parameters: section - If a particular section identifier is required. An A element. since: 2.4.78 |
getImagePatterns | public static Collection getImagePatterns(WikiEngine engine)(Code) | | Figure out which image suffixes should be inlined.
Collection of Strings with patterns. |
isExternalLink | public static boolean isExternalLink(String link)(Code) | | Figures out if a link is an off-site link. This recognizes
the most common protocols by checking how it starts.
since: 2.4 |
makeError | public static Element makeError(String error)(Code) | | Writes HTML for error message.
|
makeHeading | public Element makeHeading(int level, String title, Heading hd)(Code) | | Returns XHTML for the start of the heading. Also sets the
line-end emitter.
Parameters: level - Parameters: title - the title for the heading Parameters: hd - a List to which heading should be added |
|
|