Customization

(This document is for AVH developers.)

The document addresses the customization of AVH to suit your local requirements. AVH is designed to be flexible to handling different XML input/output, query forms, XSLT transformation to other formats. All these are configurable by using data.xml. Other customization includes Javascripts on query pages, which will be described in Misc section.

data.xml records all mappings that AVH uses.

Basic Attributes
Each specimen field has several basic attributes. See the following example:




 * type is the type of this field, it can be String/Date/numeric
 * name is the name of this field
 * attribute is the attribute of the main class
 * title is used in the result.

XML Input/Output
Here you need to give the XPath of this field. See the following example:

/Unit/SourceInstitutionID


 * standard specifies the name of a XML standard. When you request XML of a specific standard, all fields with this standard will be output. More standards can be added as required.

XSLT transformation
Here you give the sequence order of a XSLT output. For example,



This indicates for csv format, this fields will be output in the 8th place. There can be multiple XSLTs. Also you can use title to give it a title, otherwise the default title specified for this field will be used.

Query Forms
Query form is defined here. For instance,

There are a few query types:
 * exact - Query the exact value.
 * select - Use drop down list. Options need to be supplied.
 * checkbox - Use check box. Options need to be supplied.
 * date - The query form gives three boxes for day/month/year. If no day is input, the whole month will be queried. If no day/month is given, the whole year will be queried.
 * datelow - This is the lower boundary of a range query for a date field.
 * datehigh - This is the higher boundary of a range query for a date field.
 * wildcard - This is a wildcard query.
 * combobox - This is a combobox(can input and select from a drop down list). Options need to be supplied.
 * multiple-select - This is a multiple-select box. Can select more than one items from the list.
 * doublelow - This is the lower boundary of a range query for a double field.
 * doublehigh - This is the higher boundary of a range query for a double field.
 * longlow - This is the lower boundary of a range query for longitude. The query form gives three input boxes(second/minute/hour) and a drop down box(N/S).
 * longhigh - This is the higher boundary of a range query for longitude. The query form gives three input boxes(second/minute/hour) and a drop down box(N/S).
 * latlow - This is the lower boundary of a range query for latitude. The query form gives three input boxes(second/minute/hour) and a drop down box(E/W).
 * lathigh - This is the higher boundary of a range query for latitude. The query form gives three input boxes(second/minute/hour) and a drop down box(E/W).
 * double - This is a double value.
 * integer - This is an integer.

Other attributes for query:
 * group - All fields in the same group will be combined as an 'and' relation in the query.
 * class - A user-defined class used to generate SQL.

Web Page
In query pages, AVH taglib is designed to specify how a field in data.xml is used in the current query form.