Java Doc for JSPWikiMarkupParser.java in  » Wiki-Engine » JSPWiki » com » ecyrd » jspwiki » parser » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Wiki Engine » JSPWiki » com.ecyrd.jspwiki.parser 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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


Field Summary
final protected static  intATTACHMENT
    
final public static  intCHARACTER
    
final public static  StringCLASS_EDITPAGE
     The value for anchor element class attributes when used for edit page links.
final public static  StringCLASS_INTERWIKI
     The value for anchor element class attributes when used for interwiki page links.
final public static  StringCLASS_WIKIPAGE
     The value for anchor element class attributes when used for wiki page (normal) links.
final public static  StringDEFAULT_INLINEPATTERN
     The default inlining pattern.
final protected static  intEDIT
    
final public static  intELEMENT
    
final protected static  intEMPTY
    
final protected static  intEXTERNAL
    
final public static  intIGNORE
    
final protected static  intIMAGE
    
final protected static  intIMAGELINK
    
final protected static  intIMAGEWIKILINK
    
final protected static  intINTERWIKI
    
final protected static  intLOCAL
    
final protected static  intLOCALREF
    
final public static  StringPROP_CAMELCASELINKS
     If true, consider CamelCase hyperlinks as well.
final public static  StringPROP_INLINEIMAGEPTRN
     This property defines the inline image pattern.
final public static  StringPROP_PLAINURIS
     If true, all hyperlinks are translated as well, regardless whether they are surrounded by brackets.
final public static  StringPROP_USEATTACHMENTIMAGE
     If true, all outward attachment info links have a small link image appended.
final public static  StringPROP_USEOUTLINKIMAGE
     If true, all outward links (external links) have a small link image appended.
final public static  StringPROP_USERELNOFOLLOW
    
final protected static  intREAD
    
final static  StringWIKIWORD_REGEX
    
final static  String[]c_externalLinks
     This list contains all IANA registered URI protocol types as of September 2004 + a few well-known extra types.

Constructor Summary
public  JSPWikiMarkupParser(WikiContext context, Reader in)
     Creates a markup parser.

Method Summary
protected  voidcallHeadingListenerChain(Heading param)
     Calls the heading listeners.
protected  StringcallMutatorChain(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  ElementcreateAnchor(int type, String link, String text, String section)
     Creates a JDOM anchor element.
public static  CollectiongetImagePatterns(WikiEngine engine)
     Figure out which image suffixes should be inlined.
public static  booleanisExternalLink(String link)
     Figures out if a link is an off-site link.
public static  ElementmakeError(String error)
     Writes HTML for error message.
public  ElementmakeHeading(int level, String title, Heading hd)
     Returns XHTML for the start of the heading.
public  WikiDocumentparse()
    
protected  intparseToken(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.

Field Detail
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)



WIKIWORD_REGEX
final static String WIKIWORD_REGEX(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.




Constructor Detail
JSPWikiMarkupParser
public JSPWikiMarkupParser(WikiContext context, Reader in)(Code)
Creates a markup parser.




Method Detail
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



parse
public WikiDocument parse() throws IOException(Code)



parseToken
protected int parseToken(int ch) throws IOException(Code)
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.
Parameters:
  ch - JSPWikiMarkupParser.ELEMENT, JSPWikiMarkupParser.CHARACTER or JSPWikiMarkupParser.IGNORE.
throws:
  IOException -



Fields inherited from com.ecyrd.jspwiki.parser.MarkupParser
final protected static String LEGACY_CHARS_ALLOWED(Code)(Java Doc)
final public static String PROP_ALLOWHTML(Code)(Java Doc)
final public static String PROP_RUNPLUGINS(Code)(Java Doc)
final public static String PUNCTUATION_CHARS_ALLOWED(Code)(Java Doc)
final protected static int PUSHBACK_BUFFER_SIZE(Code)(Java Doc)
protected ArrayList m_attachmentLinkMutatorChain(Code)(Java Doc)
protected WikiContext m_context(Code)(Java Doc)
protected WikiEngine m_engine(Code)(Java Doc)
protected ArrayList m_externalLinkMutatorChain(Code)(Java Doc)
protected ArrayList m_headingListenerChain(Code)(Java Doc)
protected PushbackReader m_in(Code)(Java Doc)
protected boolean m_inlineImages(Code)(Java Doc)
protected ArrayList m_linkMutators(Code)(Java Doc)
protected ArrayList m_localLinkMutatorChain(Code)(Java Doc)
protected boolean m_parseAccessRules(Code)(Java Doc)

Methods inherited from com.ecyrd.jspwiki.parser.MarkupParser
public void addAttachmentLinkHook(StringTransmutator mutator)(Code)(Java Doc)
public void addExternalLinkHook(StringTransmutator mutator)(Code)(Java Doc)
public void addHeadingListener(HeadingListener listener)(Code)(Java Doc)
public void addLinkTransmutator(StringTransmutator mutator)(Code)(Java Doc)
public void addLocalLinkHook(StringTransmutator mutator)(Code)(Java Doc)
public static String cleanLink(String link)(Code)(Java Doc)
public static String cleanLink(String link, String allowedChars)(Code)(Java Doc)
public void disableAccessRules()(Code)(Java Doc)
public void enableImageInlining(boolean toggle)(Code)(Java Doc)
public int getPosition()(Code)(Java Doc)
final protected int nextToken() throws IOException(Code)(Java Doc)
abstract public WikiDocument parse() throws IOException(Code)(Java Doc)
protected void pushBack(int c) throws IOException(Code)(Java Doc)
public Reader setInputReader(Reader in)(Code)(Java Doc)
public static String wikifyLink(String link)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.