OOP FormGenerator Version 3.1

com.oopreserch.web
Class EscapeForWml

java.lang.Object
  |
  +--com.oopreserch.web.EscapeForWml
All Implemented Interfaces:
FormValueEscaper

public class EscapeForWml
extends java.lang.Object
implements FormValueEscaper

The implementation of FormValueEscaper interface. Replace the special characters with the escaped ones.

If the String with the special characters (such as < or >) is inserted into the WML tags, the concatenated String will be invalid as the WML tags. To avoid this kind of problems, the String should be escaped before it is inserted into the WML tags.

This class replaces the special characters for WML. The table below lists the special characters and their corresponding escaped characters:

Original Character Escaped Character
< &lt;
> &gt;
& &amp;
" &quot;
' &apos;
$ $$


The implementations for HTML, HDML and XML are also included in this package. They are:
All the available implementations of this interface must be defined in: In this property resource file, the value is the fully qualified class name of each implementation. The corresponding key is the arbitrary String, and you can specify it as the value of escape.type attribute in d.value element in the XML. For details about this property resource file, please look into FormValueEscaperFactory.

Author:
Jun Inamori

Constructor Summary
EscapeForWml()
           
 
Method Summary
 java.lang.String getEscaped(java.lang.String org)
          Escape the special characters for WML.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EscapeForWml

public EscapeForWml()
Method Detail

getEscaped

public java.lang.String getEscaped(java.lang.String org)
Escape the special characters for WML.

Specified by:
getEscaped in interface FormValueEscaper
Parameters:
org - The original String
Returns:
The escaped String

OOP FormGenerator Version 3.1

ALL CONTENTS COPYRIGHT 2002, Jun Inamori. All rights reserved.
Any questions and comments are welcome to Jun Inamori.