com.google.enterprise.adaptor.examples
Class MetadataTransformExample

java.lang.Object
  extended by com.google.enterprise.adaptor.examples.MetadataTransformExample
All Implemented Interfaces:
DocumentTransform

public class MetadataTransformExample
extends Object
implements DocumentTransform

Example transform which will move values from one key to another.

For example the values under key "creator" could be moved to be under the key "author".


Method Summary
static MetadataTransformExample create(Map<String,String> cfg)
          Makes transform from config with "src" and "dest" keys.
 String toString()
           
 void transform(Metadata metadata, Map<String,String> params)
          Any changes to metadata and params will be passed on to subsequent transforms.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

create

public static MetadataTransformExample create(Map<String,String> cfg)
Makes transform from config with "src" and "dest" keys.


transform

public void transform(Metadata metadata,
                      Map<String,String> params)
Description copied from interface: DocumentTransform
Any changes to metadata and params will be passed on to subsequent transforms. This method must be thread-safe.

Specified by:
transform in interface DocumentTransform

toString

public String toString()
Overrides:
toString in class Object