ch.interlis.iom_j.itf
Class EnumCodeMapper

java.lang.Object
  extended by ch.interlis.iom_j.itf.EnumCodeMapper

public class EnumCodeMapper
extends java.lang.Object

Utility to map between xtf-code and itf-code of a given enumeration type.

Author:
ceis

Constructor Summary
EnumCodeMapper()
           
 
Method Summary
 java.lang.String mapItfCode2XtfCode(ch.interlis.ili2c.metamodel.EnumerationType type, java.lang.String itfCode)
          Maps from an itf-code to an xtf-code.
 java.lang.String mapXtfCode2ItfCode(ch.interlis.ili2c.metamodel.EnumerationType type, java.lang.String xtfCode)
          Maps from a xtf-code to an itf-code.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnumCodeMapper

public EnumCodeMapper()
Method Detail

mapXtfCode2ItfCode

public java.lang.String mapXtfCode2ItfCode(ch.interlis.ili2c.metamodel.EnumerationType type,
                                           java.lang.String xtfCode)
Maps from a xtf-code to an itf-code.

Parameters:
type - enumeration type.
xtfCode - xtf-code
Returns:
itf-code of null if not a existing/valid xtf-code.

mapItfCode2XtfCode

public java.lang.String mapItfCode2XtfCode(ch.interlis.ili2c.metamodel.EnumerationType type,
                                           java.lang.String itfCode)
Maps from an itf-code to an xtf-code.

Parameters:
type - enumeration type.
itfCode - itf-code
Returns:
xtf-code or null if not an existing/valid itf-code