A custom method is used to call a function from a custom Java class in a package. It is declared and used globally for all destination elements.
...
Map Custom Method to Destination Element
Once you have created a custom method, you can map it to a target destination element. To map:
- Ensure that the source and target schemas are loaded and all their elements are listed under their respective nodes.
- Select a destination element . This displays the selected target element node in the Mapping Graph Areaand click Mapping Expression tab from Mapping Functional panel.
Double-click the required custom method under Custom Methods in node in the Parameters Panel. The selected method node is displayed in the Mapping Graph Expression Area.
If the custom method is defined with more than 4 parameters, then double-clicking the custom method will display the warning message. Once you click OK, you need to define the mapping using Textual Rules.
- Click two source elements. The selected source nodes are displayed in the Mapping Graph Area.
- Create a link from the output of the first source element to the first input of the custom method node.
- Create a link from the output of the second source element to the second input of the custom method node.
Create a link from the output of the custom method node to the input of the target element.
Click the Apply Mapping ( ) button. This Double-click the source element to define the custom method and map it to destination element.
- This maps the custom method to the target element.
Save the mapping activity and exit the Data Web Mapper.
You can view and validate the generated mapping XSL, view the target XML and, view and validate mapping output, before saving the mapping activity.