If you choose to use the custom function, create the following two items, which are used for the custom function:
The following describes the procedure for creating the items above.
service-platform-installation-directory\CSCTE\resources\customfunc
Table 5-12 Information to be defined in the transformation function definition file
Element | Information to be defined |
---|---|
xml | version="1.0" encoding="UTF-8" |
func:customFunc | -- |
xmlns:func | http://www.hitachi.co.jp/soft/xml/cosminexus/cscdt/functions |
xmlns:xsi | http://www.w3.org/2001/XMLSchema-instance |
xsi:schemaLocation | http://www.hitachi.co.jp/soft/xml/cosminexus/cscdt/functions customfunction_XMLSchema.xsd |
func:jar | -- |
name | CustomFunctions.jar |
func:package | -- |
name | sample.transform.CustomFunction |
func:class | -- |
name | CustomFunctions |
func:method | -- |
name | changeCase |
func:comment | The alphabetic characters included in the transform-from string are output to the transform-to string by changing all lowercase letters to uppercase letters, or vise versa, according to the specified transformation flag. |
func:arguments | -- |
func:argument | -- |
name | text |
func:comment | Transform-from string |
func:argument | -- |
name | flag |
func:comment | Transformation flag (upper | lower) |
func:method | -- |
name | currentDateTime |
func:comment | The current date and time is output in yyyy/MM/dd HH:mm:ss.SSS format. |
In the CustomFunction sample program, you create a custom function that calls the following Java program.
Figure 5-4 Java program called by the custom function
The CustomFunction sample program provides a source file (CustomFunctions.java) that contains the Java code above. Import and package this source file to create a Java program to be called by the custom function.
The following is the procedure for creating a Java program.
service-platform-installation-directory\CSC\userlib\customfunc