com.oopreserch.web
Class BreakForXml
java.lang.Object
|
+--com.oopreserch.web.BreakForXml
- All Implemented Interfaces:
- FormValueBreaker
- public class BreakForXml
- extends java.lang.Object
- implements FormValueBreaker
The implementation of FormValueBreaker interface.
Replace the line separators with the tags for line break.
If the String with the line separators is inserted into the
XHTML or WML tags,
the inserted String will be shown without any line breaks
on the web (or WAP) browser.
To be shown with lines breaks, the line separators in the
String must be replaced with the tags for lines break
(<br />),
before it is inserted into the XHTML or WML tags.
And this is the responsibility of this class.
The implementations for HTML and HDML is also included
in this package. It is:
All the available implementations of this interface must be
defined in:
- (docBase)/WEB-INF/classes/FormValueBreakerFactory.properties
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 break.type
attribute in d.value element in the source XML.
For details about this property resource file, please look
into FormValueBreakerFactory.
- Author:
- Jun Inamori
|
Method Summary |
java.lang.String |
getBreaked(java.lang.String str)
Replace the line separators with the tags for line break,
<br />. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BreakForXml
public BreakForXml()
getBreaked
public java.lang.String getBreaked(java.lang.String str)
- Replace the line separators with the tags for line break,
<br />.
- Specified by:
getBreaked in interface FormValueBreaker
- Parameters:
str - The original String.- Returns:
- The String in which the line separators were
replaced with the tags for line breaks.
ALL CONTENTS COPYRIGHT 2002, Jun Inamori. All rights reserved.
Any questions and comments are welcome to Jun Inamori.