Framework Professional Edition Package


com.prosyst.mbs.services.datamapper
Interface DataMapper


public interface DataMapper

DataMapper.java is used for converting a byte array to objects (proccess direction) and objects to byte array (generate direction) based on the mapping xml. The mapping xml contains the following sections: scheme - used for converting the byte array to objects and objects to byte array mapper_in - used for converting the input objects to output objects in process direction mapper_out - used for converting the input objects to output objects in generate direction

Author:
Niki Dimitrov

Method Summary
 java.util.Dictionary generateData(java.util.Dictionary data, java.lang.String xmlID)
          Return Dictionary with object mappings for the given input data.
 byte[] generateRawData(java.util.Dictionary data, java.lang.String xmlID)
          Return a generated byte array using the given input data.
 java.util.Dictionary processData(java.util.Dictionary data, java.lang.String xmlID)
          Return Dictionary with object mappings for the given input data.
 java.util.Dictionary processRawData(byte[] data, java.lang.String xmlID)
          Return Dictionary with object mappings for the given byte array data.
 

Method Detail

processRawData

java.util.Dictionary processRawData(byte[] data,
                                    java.lang.String xmlID)
                                    throws java.lang.Exception
Return Dictionary with object mappings for the given byte array data. The rules for evaluation the object mappings are described in the mapping xml with the given xmlID. The evaluation proccess has two phases: Phase one: evaluate the scheme mappings defined in the scheme section in the mapping xml. Phase two : evaluate the mappings defined in mapper_in section in the mapping xml using the result of the first phase. (see processData() method) The result Dictionary contains only those maps values which matched the defined conditions. The keys are the defined map names in the mapping xml, the values are the evaluated values of the maps.

Parameters:
data -
xmlID -
Returns:
Throws:
java.lang.Exception - if the mapping xml with the given xmlID is not found

processData

java.util.Dictionary processData(java.util.Dictionary data,
                                 java.lang.String xmlID)
                                 throws java.lang.Exception
Return Dictionary with object mappings for the given input data. The rules for evaluation the object mappings are described in the mapping xml with the given xmlID. Evaluate the mappings defined in mapper_in section in the mapping xml using the given data. The result Dictionary contains only those maps value which matched the defined conditions. The keys are the defined map names in the mapping xml, the values are the evaluated values of the maps.

Parameters:
data -
xmlID -
Returns:
Throws:
java.lang.Exception - if the mapping xml with the given xmlID is not found

generateRawData

byte[] generateRawData(java.util.Dictionary data,
                       java.lang.String xmlID)
                       throws java.lang.Exception
Return a generated byte array using the given input data. The rules for evaluation the byte array are described in the mapping xml with the given xmlID. The evaluation proccess has two phases: Phase one : evaluate the mappings defined in mapper_out section in the mapping xml using the given input data. (see generateData() method). The result Dictionary MUST contains all keys defined in the scheme section. Phase two: evaluate the scheme mappings defined in the scheme section in the mapping xml using the result of the first phase.

Parameters:
data -
xmlID -
Returns:
Throws:
java.lang.Exception

generateData

java.util.Dictionary generateData(java.util.Dictionary data,
                                  java.lang.String xmlID)
                                  throws java.lang.Exception
Return Dictionary with object mappings for the given input data. The rules for evaluation the object mappings are described in the mapping xml with the given xmlID. Evaluate the mappings defined in mapper_out section in the mapping xml using the given data. The result Dictionary contains only those maps values which matched the defined conditions. The keys are the defined map names in the mapping xml, the values are the evaluated values of the maps.

Parameters:
data -
xmlID -
Returns:
Throws:
java.lang.Exception

Framework Professional Edition Package


Copyright © 1999-2007 ProSyst Software GmbH. All Rights Reserved