com.ibm.di.config.base
Class FileNamespace

java.lang.Object
  extended by com.ibm.di.config.base.FileNamespace

public class FileNamespace
extends java.lang.Object

This implementation provides access to attribute maps via the file system. Only property style attribute map files are supported by this driver.

If the file extension is ".map" it is interpreted as a property style attribute map. The property style attribute map is a simple file with a one liner for each mapping, where the left hand is the attribute name and the right hand is the assignment. Lines not containing an equal sign are ignored, except while scanning JavaScript.

  attrname=
  attrname=JavaScript
  attrname=[
    multiple lines of JavaScript
  ]
 
If the value of an attribute is blank a simple map is created. In all other cases an advanced map is created using the value as the JavaScript expression. For JavaScript spanning multiple lines, there should be a single [ after the equal sign, and the end is signaled by a single ]

You can also use flags after the attribute name.

  attrname{SAM}=...
 
where
S = Use text with substitution instead of JavaScript
A = Only use this mapping for Add operation, not for Modify
M = Only use this mapping for Modify operation, not for Add


Field Summary
static java.lang.String EXTERNAL_ATTRIBUTE_MAP_EXTENSION
           
 
Constructor Summary
FileNamespace()
           
 
Method Summary
static AttributeMapConfig createMap(java.lang.String name, MetamergeConfig mc)
          Reads a property-style attribute map configuration from the specified file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXTERNAL_ATTRIBUTE_MAP_EXTENSION

public static final java.lang.String EXTERNAL_ATTRIBUTE_MAP_EXTENSION
See Also:
Constant Field Values
Constructor Detail

FileNamespace

public FileNamespace()
Method Detail

createMap

public static AttributeMapConfig createMap(java.lang.String name,
                                           MetamergeConfig mc)
                                    throws java.lang.Exception
Reads a property-style attribute map configuration from the specified file.

Parameters:
file - The input file
Returns:
The attribute map config object
Throws:
java.lang.Exception