|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.beasys.commerce.util.dom.EntityFixer
A utility class for replacing standard XML entities with their character values.
Field Summary | |
protected static java.lang.String[][] |
defReplaceEntities
Default XML/HTML entities that represent special character sequences. |
protected java.util.Hashtable |
entities
Our character to entity mapping. |
protected static EntityFixer |
instance
The singleton EntityFixer. |
Constructor Summary | |
EntityFixer()
Constructor. |
Method Summary | |
java.lang.String |
addEntityMapping(java.lang.String chars,
java.lang.String value)
Add a characters to value mapping (i.e. |
java.lang.String |
fixEntities(java.lang.String in)
|
java.lang.String |
getEntityMapping(java.lang.String chars)
Retrive the a current entity mapping. |
static EntityFixer |
getInstance()
Get the singleton instance. |
java.lang.String |
removeEntityMapping(java.lang.String chars)
Remove an entity mapping. |
static java.lang.String |
replace(java.lang.String inStr,
java.lang.String find,
java.lang.String replace)
String search and replace method. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected static EntityFixer instance
protected static final java.lang.String[][] defReplaceEntities
protected java.util.Hashtable entities
Constructor Detail |
public EntityFixer()
This will initialize the entity mapping with the default values.
Method Detail |
public java.lang.String addEntityMapping(java.lang.String chars, java.lang.String value)
chars
- the characters ("%").value
- the string to replace chars with ("&pect;").public java.lang.String removeEntityMapping(java.lang.String chars)
public java.lang.String getEntityMapping(java.lang.String chars)
public java.lang.String fixEntities(java.lang.String in)
public static java.lang.String replace(java.lang.String inStr, java.lang.String find, java.lang.String replace)
public static EntityFixer getInstance()
|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |