Java Schema

Shared Configuration

The Java Schema shared configuration resource allows you to specify a Java class that is used to configure a Java To XML or XML To Java activity.

The Java class is converted to an XML schema using the following rules:

  • Only the public data members of the Java class are mapped to XML elements. Private and protected members are not included.

  • The Java class member public variable name is mapped to an XML element with the same name. For example, a Java class member variable declared as public int ZipCode is mapped to an XML element named ZipCode.

  • Java Bean accessors and modifiers are mapped to appropriate XML element names. For example, a Java class method public int getBalance() or public void setBalance(int Balance) are mapped to an XML element named Balance.

  • Only one XML element is created regardless of how many members of the Java class share the same name. For example, there may be an attribute named MySalary and accessors named getMySalary() and setMySalary(). This translates to one element named MySalary in the resulting XML document.

  • Conversion is case-sensitive. For example, if you have a data member declared as public int zipCode and an accessor method declared public void setZipCode(int NewZipCode), there are two elements in the resulting XML schema, zipCode (for the data member) and ZipCode (for the accessor). You must make sure to use the correct element when using the resulting XML in input mappings of subsequent activities.

  • All Java primitive types are supported. Datatypes that extend java.util.Collections are also supported (for example, List, ArrayList, andVectors). Arrays (for example, int[] and string[]) are also supported.

  • The datatype java.util.Map or any types that extend java.util.Map are not supported. For example, HashMap is not supported.