| |
|
| java.lang.Object org.apache.commons.betwixt.strategy.BadCharacterReplacingNMapper
BadCharacterReplacingNMapper | public class BadCharacterReplacingNMapper implements NameMapper(Code) | | NameMapper implementation that processes a name by replacing or stripping
illegal characters before passing result down the chain.
author: Robert Burrell Donkin since: 0.5 |
Method Summary | |
public Character | getReplacement() Gets the character that should be used to replace bad characters
if null then bad characters will be deleted. | public String | mapTypeToElementName(String typeName) This implementation processes characters which are not allowed in xml
element names and then returns the result from the next link in the chain.
This processing consists of deleting them if no replacement character
has been set. | public void | setReplacement(Character replacement) Sets the character that should be used to replace bad characters. |
BadCharacterReplacingNMapper | public BadCharacterReplacingNMapper(NameMapper chainedMapper)(Code) | | Constructs a replacing mapper which delegates to given mapper.
Parameters: chainedMapper - next link in processing chain, possibly null |
getReplacement | public Character getReplacement()(Code) | | Gets the character that should be used to replace bad characters
if null then bad characters will be deleted.
the replacement Character possibly null |
mapTypeToElementName | public String mapTypeToElementName(String typeName)(Code) | | This implementation processes characters which are not allowed in xml
element names and then returns the result from the next link in the chain.
This processing consists of deleting them if no replacement character
has been set.
Otherwise, the character will be replaced.
Parameters: typeName - the string to convert the processed input |
setReplacement | public void setReplacement(Character replacement)(Code) | | Sets the character that should be used to replace bad characters.
Parameters: replacement - the Charcter to be used for replacement if not null.Otherwise, indicates that illegal characters should be deleted. |
|
|
|