Java Doc for MarkupParser.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

All known Subclasses:   com.ecyrd.jspwiki.parser.JSPWikiMarkupParser,
MarkupParser
abstract public class MarkupParser (Code)
Provides an abstract class for the parser instances.
author:
   Janne Jalkanen
since:
   2.4


Field Summary
final protected static  StringLEGACY_CHARS_ALLOWED
     Lists all punctuation characters allowed in WikiMarkup.
final public static  StringPROP_ALLOWHTML
     If set to "true", allows using raw HTML within Wiki text.
final public static  StringPROP_RUNPLUGINS
    
final public static  StringPUNCTUATION_CHARS_ALLOWED
     Lists all punctuation characters allowed in page names.
final protected static  intPUSHBACK_BUFFER_SIZE
     Allow this many characters to be pushed back in the stream.
protected  ArrayListm_attachmentLinkMutatorChain
    
protected  WikiContextm_context
    
protected  WikiEnginem_engine
    
protected  ArrayListm_externalLinkMutatorChain
    
protected  ArrayListm_headingListenerChain
    
protected  PushbackReaderm_in
    
protected  booleanm_inlineImages
    
protected  ArrayListm_linkMutators
    
protected  ArrayListm_localLinkMutatorChain
    
protected  booleanm_parseAccessRules
    

Constructor Summary
protected  MarkupParser(WikiContext context, Reader in)
    

Method Summary
public  voidaddAttachmentLinkHook(StringTransmutator mutator)
     Adds a hook for processing attachment links.
Parameters:
  mutator - The hook to call.
public  voidaddExternalLinkHook(StringTransmutator mutator)
     Adds a hook for processing external links.
public  voidaddHeadingListener(HeadingListener listener)
    
public  voidaddLinkTransmutator(StringTransmutator mutator)
     Adds a hook for processing link texts.
public  voidaddLocalLinkHook(StringTransmutator mutator)
     Adds a hook for processing local links.
public static  StringcleanLink(String link)
     Cleans a Wiki name.
public static  StringcleanLink(String link, String allowedChars)
     Cleans a Wiki name based on a list of characters.
public  voiddisableAccessRules()
    
public  voidenableImageInlining(boolean toggle)
     Use this to turn on or off image inlining.
public  intgetPosition()
     Return the current position in the reader stream.
final protected  intnextToken()
     Returns the next token in the stream.
abstract public  WikiDocumentparse()
     Parses the document.
protected  voidpushBack(int c)
     Push back any character to the current input.
public  ReadersetInputReader(Reader in)
     Replaces the current input character stream with a new one.
Parameters:
  in - New source for input.
public static  StringwikifyLink(String link)
     Cleans away extra legacy characters.

Field Detail
LEGACY_CHARS_ALLOWED
final protected static String LEGACY_CHARS_ALLOWED(Code)
Lists all punctuation characters allowed in WikiMarkup. These will not be cleaned away. This is for compatibility for older versions of JSPWiki.



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_RUNPLUGINS
final public static String PROP_RUNPLUGINS(Code)
If set to "true", enables plugins during parsing



PUNCTUATION_CHARS_ALLOWED
final public static String PUNCTUATION_CHARS_ALLOWED(Code)
Lists all punctuation characters allowed in page names.



PUSHBACK_BUFFER_SIZE
final protected static int PUSHBACK_BUFFER_SIZE(Code)
Allow this many characters to be pushed back in the stream. In effect, this limits the size of a single line.



m_attachmentLinkMutatorChain
protected ArrayList m_attachmentLinkMutatorChain(Code)



m_context
protected WikiContext m_context(Code)



m_engine
protected WikiEngine m_engine(Code)



m_externalLinkMutatorChain
protected ArrayList m_externalLinkMutatorChain(Code)



m_headingListenerChain
protected ArrayList m_headingListenerChain(Code)



m_in
protected PushbackReader m_in(Code)



m_inlineImages
protected boolean m_inlineImages(Code)



m_linkMutators
protected ArrayList m_linkMutators(Code)



m_localLinkMutatorChain
protected ArrayList m_localLinkMutatorChain(Code)
Optionally stores internal wikilinks



m_parseAccessRules
protected boolean m_parseAccessRules(Code)




Constructor Detail
MarkupParser
protected MarkupParser(WikiContext context, Reader in)(Code)




Method Detail
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. The functionality of this method was changed in 2.6 so that the list of allowed characters is much larger. Use wikifyLink() to get the legacy behaviour.

[ This is a link ] -> This is a link
Parameters:
  link - Link to be cleared. Null is safe, and causes this to return null. A cleaned link.
since:
   2.0




cleanLink
public static String cleanLink(String link, String allowedChars)(Code)
Cleans a Wiki name based on a list of characters. Also, any multiple whitespace is collapsed into a single space, and any leading or trailing space is removed.
Parameters:
  link - Link to be cleared. Null is safe, and causes this to return null.
Parameters:
  allowedChars - Characters which are allowed in the string. A cleaned link.
since:
   2.6



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



getPosition
public int getPosition()(Code)
Return the current position in the reader stream. The value will be -1 prior to reading. the reader position as an int.



nextToken
final protected int nextToken() throws IOException(Code)
Returns the next token in the stream. This is the most called method in the entire parser, so it needs to be lean and mean. The next token in the stream; or, if the stream is ended, -1.
throws:
  IOException - If something bad happens
throws:
  NullPointerException - If you have not yet created an input document.



parse
abstract public WikiDocument parse() throws IOException(Code)
Parses the document. the parsed document, as a WikiDocument
throws:
  IOException -



pushBack
protected void pushBack(int c) throws IOException(Code)
Push back any character to the current input. Does not push back a read EOF, though.



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



wikifyLink
public static String wikifyLink(String link)(Code)
Cleans away extra legacy characters. This method functions exactly like pre-2.6 cleanLink()

[ 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.6




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.