org.ceryle.wiki.filters
Class MacronFilter
java.lang.Object
com.ecyrd.jspwiki.filters.BasicPageFilter
org.ceryle.wiki.filters.MacronFilter
- All Implemented Interfaces:
- PageFilter
public class MacronFilter
- extends BasicPageFilter
MacronFilter is a simple JSPWiki filter that replaces ten
(five upper and five lowercase) vowel codes with macron'd Unicode
equivalents, using a caret (^) character following the
vowel.
- A^ becomes Ā
- a^ becomes ā
- E^ becomes Ē
- e^ becomes ē
- I^ becomes Ī
- i^ becomes ī
- O^ becomes Ō
- o^ becomes ō
- U^ becomes Ū
- u^ becomes ū
In some applications there has been an existing use of the tilde
character (^) following a vowel but this is unfortunately
used by JSPWiki to escape a wiki word from being recognized as a
link. The caret shouldn't be a conflict since it has no current
use within JSPWiki.
Installation
The jar file containing the filter must be available in your wiki's
path, generally in $WIKIHOME/WEB-INF/lib/. Follow the JSPWiki
recommendations on inclusion of a $WIKIHOME/WEB-INF/lib/filters.xml
file in your wiki installation. 'filters.xml' should contain a
<filter> element corresponding to each installed filter.
Each <filter> element contains a <class>
element containing the respective filter's class, e.g.:
<?xml version="1.0"?>
<pagefilters>
<filter>
<class>org.ceryle.wiki.filters.MacronFilter</class>
</filter>
</pagefilters>
This filter might be considered a bit slow since it must do a search
and replace over an entire text ten times.
- Author:
- Murray Altheim
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MacronFilter
public MacronFilter()
preTranslate
public String preTranslate(WikiContext wikiContext,
String content)
- Specified by:
preTranslate in interface PageFilter- Overrides:
preTranslate in class BasicPageFilter
postTranslate
public String postTranslate(WikiContext wikiContext,
String content)
- Specified by:
postTranslate in interface PageFilter- Overrides:
postTranslate in class BasicPageFilter
The Ceryle Project. Copyright ©2001-2007 Murray Altheim, All Rights Reserved. See LICENSE included with distribution.