info.informatica.text.mapper
Class CombinedTextMapper

java.lang.Object
  extended by info.informatica.text.mapper.CombinedTextMapper
All Implemented Interfaces:
TextMapper

public class CombinedTextMapper
extends Object
implements TextMapper

A mapper that combines all of the Textmapper types

Version:
1.01
Author:
amengual at informatica dot info

Constructor Summary
CombinedTextMapper()
           
CombinedTextMapper(Properties env)
           
 
Method Summary
 void addMapping(short a, String b, String c)
           
 void addMapping(String b, String c)
          Adds a mapping rule between a and b
 void init(Reader re)
          Initialize the mapper
 void init(short[] ma, List<Object> mb, List<String> mc)
           
 void init(String initString)
          Deprecated.  
 String map(String canon)
          Maps arg to another String and returns it.
 String map(String canon, String unmatch)
          Maps arg to another String and returns it.
 String map(String canon, String unmatch, String def)
          Maps arg to another String and returns it.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CombinedTextMapper

public CombinedTextMapper()

CombinedTextMapper

public CombinedTextMapper(Properties env)
Method Detail

init

public void init(String initString)
          throws IOException,
                 MapperException
Deprecated. 

Initialize the mapper

Specified by:
init in interface TextMapper
Parameters:
initString - the String used to initialize the map
Throws:
IOException
MapperException

init

public void init(Reader re)
          throws IOException,
                 MapperException
Initialize the mapper

Specified by:
init in interface TextMapper
Parameters:
re - the stream reader used to initialize the map
Throws:
IOException
MapperException

init

public void init(short[] ma,
                 List<Object> mb,
                 List<String> mc)

addMapping

public void addMapping(String b,
                       String c)
Description copied from interface: TextMapper
Adds a mapping rule between a and b

Specified by:
addMapping in interface TextMapper

addMapping

public void addMapping(short a,
                       String b,
                       String c)

map

public String map(String canon)
Description copied from interface: TextMapper
Maps arg to another String and returns it.

Specified by:
map in interface TextMapper
Parameters:
canon - the String to be mapped
Returns:
the String in the "Range Set" resulting from the map, or null if arg was not in the Domain Set (or if the mapping result was null itself).

map

public String map(String canon,
                  String unmatch)
Description copied from interface: TextMapper
Maps arg to another String and returns it.

Specified by:
map in interface TextMapper
Parameters:
canon - the String to be mapped
unmatch - the String to be returned if the argument does not match any mapping.
Returns:
the String in the "Range Set" resulting from the map, or unmatch if arg was not contained in the Domain Set, and the mapper therefore did not know how to map.

map

public String map(String canon,
                  String unmatch,
                  String def)
Description copied from interface: TextMapper
Maps arg to another String and returns it.

Specified by:
map in interface TextMapper
Parameters:
canon - the String to be mapped
unmatch - the String to be returned if the argument does not match any mapping.
def - the value to be returned if the argument maps to null.
Returns:
the String in the "Range Set" resulting from the map, or unmatch if arg was not contained in the Domain Set of the mapper, or def if the mapper returned null.