Schema

You can use the information provided here to have an understanding on the schema.

A sample querySchema function is provided in the configuration parameter Script. It assumes the default case where we read from a text file one line at a time; hence, the schema returned from this function has only one field named 'line' of type java.lang.String. If you want specific behavior, you must override this function.

In it there are two predefined objects which are accessible from these two script objects:
list
This is a Vector object. The querySchema(Object) function should add Entry objects to this Vector.
Source
This is an Object parameter passed to the querySchema(Object) function when it is called.
For building a meaningful query schema you must populate the predefined list object with entries containing at least one attribute called "name" and optional attributes: "syntax" or "extsyntax". This can be done by creating an Entry object and calling its addAttributeValue function to set the required values to the attributes.
According to the success in retrieving schema you can set three different types of exit codes, calling the predefined result object's function setStatus(int) with one of the following values:
  • 0 - End of Input
  • 1 - Status OK
  • 2 - Error
For setting more detailed information about the result you can use the setMessage(String) function which takes one textual parameter. Only if the exit code is 1 a schema is returned by the querySchema(Object) function, otherwise null is returned.