ru.biosoft.access
Interface Transformer

All Known Implementing Classes:
AbstractTransformer

public interface Transformer

Transforms DataElement from one type to another.

Version:
1.0
Author:
DevelopmentOnTheEdge
Pendung:
comments

Method Summary
 java.lang.Class getInputType()
          Return class of input data element.
 java.lang.Class getOutputType()
          Return class of output data element.
 DataCollection getPrimaryCollection()
          Return data collection which contain output data element.
 DataCollection getTransformedCollection()
          Return data collection which contain input data element.
 void init(DataCollection dcInput, DataCollection dcOutput)
          Initialize transformer for support optional methods.
 boolean isInputType(java.lang.Class type)
          Returns is specified class accepted as input type.
 boolean isOutputType(java.lang.Class type)
          Returns is specified class accepted as output type.
 DataElement transformInput(DataElement input)
          Transform input data element to output data element.
 DataElement transformOutput(DataElement output)
          Transform output data element to input data element.
 

Method Detail

getInputType

public java.lang.Class getInputType()
Return class of input data element. Input data element stored in primary data collection.

Returns:
Class of input data element.

getOutputType

public java.lang.Class getOutputType()
Return class of output data element. Output data element stored in transformed data collection.

Returns:
Class of output data element.

isOutputType

public boolean isOutputType(java.lang.Class type)
Returns is specified class accepted as output type.

Parameters:
type - Class for checking.
Returns:
true - if type is output type, false otherwise.

isInputType

public boolean isInputType(java.lang.Class type)
Returns is specified class accepted as input type.

Parameters:
type - Class for checking.
Returns:
true - if type is input type, false otherwise.

transformInput

public DataElement transformInput(DataElement input)
                           throws java.lang.Exception
Transform input data element to output data element.

Returns:
Transformed data element.
Throws:
java.lang.Exception - If error occured.

transformOutput

public DataElement transformOutput(DataElement output)
                            throws java.lang.Exception
Transform output data element to input data element.

Returns:
Primary data element.
Throws:
java.lang.Exception - If error occured.

init

public void init(DataCollection dcInput,
                 DataCollection dcOutput)
Initialize transformer for support optional methods.

See Also:
getPrimaryCollection(), getTransformedCollection()

getTransformedCollection

public DataCollection getTransformedCollection()
Return data collection which contain input data element. This optional operation. If this operation not supported then null always returns.

Returns:
Data collection which contain input data element or null.
See Also:
init(DataCollection,DataCollection)

getPrimaryCollection

public DataCollection getPrimaryCollection()
Return data collection which contain output data element. This optional operation. If this operation not supported then null always returns.

Returns:
Data collection which contain output data element or null.
See Also:
init(DataCollection,DataCollection)


Copyright © 2001-2003 Biosof.Ru. All Rights Reserved.