|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ecyrd.jspwiki.parser.MarkupParser
com.ecyrd.jspwiki.parser.JSPWikiMarkupParser
public class JSPWikiMarkupParser
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.
Field Summary | |
---|---|
static String |
DEFAULT_INLINEPATTERN
The default inlining pattern. |
static String |
PROP_CAMELCASELINKS
If true, consider CamelCase hyperlinks as well. |
static String |
PROP_INLINEIMAGEPTRN
This property defines the inline image pattern. |
static String |
PROP_PLAINURIS
If true, all hyperlinks are translated as well, regardless whether they are surrounded by brackets. |
static String |
PROP_USEATTACHMENTIMAGE
If true, all outward attachment info links have a small link image appended. |
static String |
PROP_USEOUTLINKIMAGE
If true, all outward links (external links) have a small link image appended. |
static String |
PROP_USERELNOFOLLOW
If set to "true", all external links are tagged with 'rel="nofollow"' |
Fields inherited from class com.ecyrd.jspwiki.parser.MarkupParser |
---|
m_attachmentLinkMutatorChain, m_context, m_engine, m_externalLinkMutatorChain, m_headingListenerChain, m_in, m_inlineImages, m_linkMutators, m_localLinkMutatorChain, m_parseAccessRules, PROP_ALLOWHTML, PROP_RUNPLUGINS, PUNCTUATION_CHARS_ALLOWED, PUSHBACK_BUFFER_SIZE |
Constructor Summary | |
---|---|
JSPWikiMarkupParser(WikiContext context,
Reader in)
Creates a markup parser. |
Method Summary | |
---|---|
static Collection |
getImagePatterns(WikiEngine engine)
Figure out which image suffixes should be inlined. |
static boolean |
isExternalLink(String link)
Figures out if a link is an off-site link. |
static Element |
makeError(String error)
Writes HTML for error message. |
Element |
makeHeading(int level,
String title,
Heading hd)
Returns XHTML for the start of the heading. |
WikiDocument |
parse()
Parses the document. |
Methods inherited from class com.ecyrd.jspwiki.parser.MarkupParser |
---|
addAttachmentLinkHook, addExternalLinkHook, addHeadingListener, addLinkTransmutator, addLocalLinkHook, cleanLink, disableAccessRules, enableImageInlining, setInputReader |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PROP_INLINEIMAGEPTRN
public static final String PROP_CAMELCASELINKS
public static final String PROP_PLAINURIS
public static final String PROP_USEOUTLINKIMAGE
public static final String PROP_USEATTACHMENTIMAGE
public static final String PROP_USERELNOFOLLOW
public static final String DEFAULT_INLINEPATTERN
Constructor Detail |
---|
public JSPWikiMarkupParser(WikiContext context, Reader in)
Method Detail |
---|
public static Collection getImagePatterns(WikiEngine engine)
public static boolean isExternalLink(String link)
public static Element makeError(String error)
public Element makeHeading(int level, String title, Heading hd)
level
- title
- the title for the headinghd
- a List to which heading should be addedpublic WikiDocument parse() throws IOException
MarkupParser
parse
in class MarkupParser
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |