org.norther.tammi.core.rt.util
Class MappingFilter

java.lang.Object
  extended by org.norther.tammi.core.rt.util.MappingFilter
All Implemented Interfaces:
AttributeFilter

public class MappingFilter
extends Object
implements AttributeFilter

A mapping filter for importing and exporting attributes.

Author:
Ilkka Priha

Constructor Summary
MappingFilter(Map map)
          Constructs a new filter.
 
Method Summary
 Attribute filter(Variable var, Attribute attribute)
          Filters an attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MappingFilter

public MappingFilter(Map map)
Constructs a new filter. The map must contain source attribute names as keys and target attribute names as values.

Parameters:
map - attribute name mappings.
Method Detail

filter

public Attribute filter(Variable var,
                        Attribute attribute)
Description copied from interface: AttributeFilter
Filters an attribute. This method is called within the importAttributes and exportAttributes methods of Variable.

Specified by:
filter in interface AttributeFilter
Parameters:
var - the variable importing or exporting the attribute.
attribute - the attribute to filter.
Returns:
the filtered attribute or null if discarded.


Copyright © 2004 The Norther Organization. All rights reserved.