© 2005 BEA Systems, Inc.

com.bea.p13n.content.document.ref.loader
Class EntityFixer

java.lang.Object
  extended bycom.bea.p13n.content.document.ref.loader.EntityFixer

public class EntityFixer
extends Object

A utility class for replacing standard XML entities with their character values.


Field Summary
protected static String[][] defReplaceEntities
          Deprecated. Default XML/HTML entities that represent special character sequences.
protected  Hashtable entities
          Deprecated. Our character to entity mapping.
protected static EntityFixer instance
          Deprecated. The singleton EntityFixer.
 
Constructor Summary
EntityFixer()
          Deprecated. Constructor.
 
Method Summary
 String addEntityMapping(String chars, String value)
          Deprecated. Add a characters to value mapping (i.e. "%" -> "&pect;")
 String fixEntities(String in)
          Deprecated.  
 String getEntityMapping(String chars)
          Deprecated. Retrive the a current entity mapping.
static EntityFixer getInstance()
          Deprecated. Get the singleton instance.
 String removeEntityMapping(String chars)
          Deprecated. Remove an entity mapping.
static String replace(String inStr, String find, String replace)
          Deprecated. 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

defReplaceEntities

protected static final String[][] defReplaceEntities
Deprecated. 
Default XML/HTML entities that represent special character sequences.


entities

protected Hashtable entities
Deprecated. 
Our character to entity mapping.


instance

protected static EntityFixer instance
Deprecated. 
The singleton EntityFixer.

Constructor Detail

EntityFixer

public EntityFixer()
Deprecated. 
Constructor.

This will initialize the entity mapping with the default values.

Method Detail

addEntityMapping

public String addEntityMapping(String chars,
                               String value)
Deprecated. 
Add a characters to value mapping (i.e. "%" -> "&pect;")

Parameters:
chars - the characters ("%").
value - the string to replace chars with ("&pect;").
Returns:
the previous value, or null if none.
Throws:
IllegalArgumentException - thrown if chars is "&".

fixEntities

public String fixEntities(String in)
Deprecated. 

getEntityMapping

public String getEntityMapping(String chars)
Deprecated. 
Retrive the a current entity mapping.


getInstance

public static EntityFixer getInstance()
Deprecated. 
Get the singleton instance.


removeEntityMapping

public String removeEntityMapping(String chars)
Deprecated. 
Remove an entity mapping.


replace

public static String replace(String inStr,
                             String find,
                             String replace)
Deprecated. 
String search and replace method.


© 2005 BEA Systems, Inc.

Copyright © 2005 BEA Systems, Inc. All Rights Reserved