org.enhydra.zeus.transform
Class SimpleTransformer

java.lang.Object
  |
  +--org.enhydra.zeus.transform.BaseTransformer
        |
        +--org.enhydra.zeus.transform.SimpleTransformer
All Implemented Interfaces:
Transformer
Direct Known Subclasses:
DefaultsTransformer

public class SimpleTransformer
extends BaseTransformer

SimpleTransformer is a basic implementation of a Zeus Transformer. It iterates through the supplied Binding objects and assigns each the options for this transformer.

Author:
Brett McLaughlin

Fields inherited from class org.enhydra.zeus.transform.BaseTransformer
source
 
Constructor Summary
SimpleTransformer(Source source)
           This constructor takes in a Source to read mapping information from and allow generation of the transformation mappings from it.
 
Method Summary
 java.util.List transform(java.util.List bindings, boolean recursing)
           This method performs the work of transforming a set of Zeus Binding objects.
 
Methods inherited from class org.enhydra.zeus.transform.BaseTransformer
addValueEnumeration, getTransformerOptions, getValueEnumeration, setTransformerOptions, transform
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleTransformer

public SimpleTransformer(Source source)

This constructor takes in a Source to read mapping information from and allow generation of the transformation mappings from it.

Parameters:
source - Source to read mapping input from.
Method Detail

transform

public java.util.List transform(java.util.List bindings,
                                boolean recursing)
                         throws java.io.IOException,
                                ZeusException

This method performs the work of transforming a set of Zeus Binding objects. It then returns a new set of Binding objects (in List form) with transformed names, types, and values.

When this method is invoked, it attempts to see if parsing of the mapping file has already occurred. If it has not, parsing of that file will occur within this method.

It is important to note that the number of bindings returned from this method may not be the same as the number supplied. This is due to some XML elements/attributes being converted to value objects, while other mapping instructions may actually create new binding objects.

Overrides:
transform in class BaseTransformer
Parameters:
bindings - List of bindings to process for transformation.
recursing - indication of if this is within a recursion loop.
Returns:
List - the transformed bindings.
Throws:
IOException - - when errors occur in parsing a mapping configuration file.
ZeusException - - when errors occuring in transformation.


Copyright © 2002 Enhydra. All Rights Reserved.