gov.sns.xal.smf
Class TransformFactory

java.lang.Object
  |
  +--gov.sns.xal.smf.TransformFactory

public class TransformFactory
extends java.lang.Object

TransformFactory generates a ValueTransform from a DataAdaptor.


Constructor Summary
protected TransformFactory()
          Creates a new instance of TransformFactory
 
Method Summary
static ValueTransform doubleArrayLinearTransform(DataAdaptor adaptor)
          Generate a value transform which applies a simple linear transform (scale and offset) to a double array of values.
static ValueTransform doubleArrayScaleTransform(DataAdaptor adaptor)
          Generate a value transform which simply scales a double array of values.
static ValueTransform doubleArrayTranslationTransform(DataAdaptor adaptor)
          Generate a value transform which applies a simple offset transform to a double array of values.
static ValueTransform doubleLinearTransform(DataAdaptor adaptor)
          Generate a value transform which applies a simple linear transform (scale and offset) to a double value scalar.
static ValueTransform doubleScaleTransform(DataAdaptor adaptor)
          Generate a value transform which simply scales a double value.
static ValueTransform doubleTranslationTransform(DataAdaptor adaptor)
          Generate a value transform which applies a simple offset transform to a double value scalar.
static ValueTransform getTransform(DataAdaptor adaptor)
          Generate a transform from the given adaptor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransformFactory

protected TransformFactory()
Creates a new instance of TransformFactory

Method Detail

getTransform

public static ValueTransform getTransform(DataAdaptor adaptor)
                                   throws NoSuchTransformException
Generate a transform from the given adaptor. The adaptor defines the properties of the desired transform including the type and any supporting parameters. The static method called to generate the transform is determined by the type and constructed by appending "Transform" to get the method name. All generator methods must be declared static and take an adaptor as its only argument.

Parameters:
adaptor - The adaptor defining the transform.
Returns:
A value transform with the properties specified by the adaptor.
Throws:
NoSuchTransformException - if the transform of the specified type cannot be generated.

doubleScaleTransform

public static ValueTransform doubleScaleTransform(DataAdaptor adaptor)
Generate a value transform which simply scales a double value.

Parameters:
adaptor - The adaptor defining the transform.
Returns:
A value transform with the properties specified by the adaptor.

doubleTranslationTransform

public static ValueTransform doubleTranslationTransform(DataAdaptor adaptor)
Generate a value transform which applies a simple offset transform to a double value scalar.

Parameters:
adaptor - The adaptor defining the transform.
Returns:
A value transform with the properties specified by the adaptor.

doubleLinearTransform

public static ValueTransform doubleLinearTransform(DataAdaptor adaptor)
Generate a value transform which applies a simple linear transform (scale and offset) to a double value scalar.

Parameters:
adaptor - The adaptor defining the transform.
Returns:
A value transform with the properties specified by the adaptor.

doubleArrayScaleTransform

public static ValueTransform doubleArrayScaleTransform(DataAdaptor adaptor)
Generate a value transform which simply scales a double array of values.

Parameters:
adaptor - The adaptor defining the transform.
Returns:
A value transform with the properties specified by the adaptor.

doubleArrayTranslationTransform

public static ValueTransform doubleArrayTranslationTransform(DataAdaptor adaptor)
Generate a value transform which applies a simple offset transform to a double array of values.

Parameters:
adaptor - The adaptor defining the transform.
Returns:
A value transform with the properties specified by the adaptor.

doubleArrayLinearTransform

public static ValueTransform doubleArrayLinearTransform(DataAdaptor adaptor)
Generate a value transform which applies a simple linear transform (scale and offset) to a double array of values.

Parameters:
adaptor - The adaptor defining the transform.
Returns:
A value transform with the properties specified by the adaptor.