Chapter 2. Reference Material
Prev |  | Next

# Chapter 2. Reference Material

This chapter will hold reference material for java treeview development

## Structure of XML Configuration Files

There are two types of xml configuration files used by java treeview, a global xml configuration file and a per-document configuration file or JTV. The location of the global xml configuration file is described in the user manual.

### Structure of Global XML Configuration File

There is a single global XML configuration file in which java treeview stores the following information

1. recently used files list

2. last style used

3. whether parse quoted strings was used

4. defaults settings for views

#### Java Treeview 1.1.1 Global XML config

- ProgramConfig

  Root node of XML config

  - FileMru arributes (style, quotes)

    Node holds recent files, style attribute indicates last style used to open file, quotes indicate whether parseQuotedStrings was selected

    - File attributes (root, dir, style) optional (cdt)

      Node represents an individual file, with the dir it is found in, the root of the filename, and the style to open with. If cdt is specified, it means to use that extension instead of cdt to find the GCDT file.

  - GeneUrlPresets attribute (default)

    Holds default gene url presets, default attribute indicated default preset. -1 means do not link at all by default.

    - Preset attributes (name, template, header, enabled)

      Holds info for one url preset. Name is the name of the preset, template is the template to fill in, header is which header to fill it in with (by name, not index) and enabled is whether the preset is enabled. I'm not sure when or why I added an enabled flag to all presets.

  - ArrayUrlPresets attribute (default)

    Holds default array url presets, default attribute indicated default preset. -1 means do not link at all by default.

    - Preset attributes (name, template, header, enabled)

      Holds info for one url preset. Name is the name of the preset, template is the template to fill in, header is which header to fill it in with (by name, not index) and enabled is whether the preset is enabled. I'm not sure when or why I added an enabled flag to all presets.

  - Plugins

    Presets and defaults for particular plugins.

    - PluginPresets attrbutes (name)

      presets for plugin identified by name. Nodes will be provided to "presets configuration" dialogs that plugins make available, as well as the plugins themselves.

    - PluginDefaults attributes (name)

      Defaults for particular plugin, identified by name. These defaults shadow the configuration of the plugin in the per-document jtv, and are not directly modified by the plugin.

  - Registration

    registration status

    - Entry attributes (jtv_version, java_version, java_vendor, os_name, os_arch, os_version, install_ip, install_host, install_date, status, first_name, last_name, email, institution, contactOkay)

      Registration entry, with various info about the installation. status keeps track of the status of that registration, and has values "deferred", "declined", "pending" and "complete". The meaning of these settings, as of all settings, is currently defined only in the source code of java treeview.

#### Java Treeview 1.0.12 Global XML config

In Java Treeview up until 1.0.12, the global configuration did not make any real distinction between places in which view-specific default values were stored, and places where program-wide defaults were stored. Moving forward, view specific defaults are now placed in a special "Defaults" node, which has subnodes for each type of view, and view-specific presets are put in a special "Presets" node. There are two things that are retained as view-indpendent general presets, the url and gene linking configuration. These pieces are actually provided to the views by the ViewFrame through the getUrlExtractor and getArrayUrlExtractor methods. Moving the per-view presets to their own nodes removes management of the dialogs from the main program, as well as weird calls such as "getKaryoColorPresets" that are clearly used by only one type of view from the LinkedViewFrame interface.

The following is the structure of the global configuration as of JTV 1.0.12

- ProgramConfig

  Root node of XML config

  - FileMru arributes (style, quotes)

    Node holds recent files, style attribute indicates last style used to open file, quotes indicate whether parseQuotedStrings was selected

    - File attributes (root, dir, style) optional (cdt)

      Node represents an individual file, with the dir it is found in, the root of the filename, and the style to open with. If cdt is specified, it means to use that extension instead of cdt to find the GCDT file.

  - GeneUrlPresets attribute (default)

    Holds default gene url presets, default attribute indicated default preset. -1 means do not link at all by default.

    - Preset attributes (name, template, header, enabled)

      Holds info for one url preset. Name is the name of the preset, template is the template to fill in, header is which header to fill it in with (by name, not index) and enabled is whether the preset is enabled. I'm not sure when or why I added an enabled flag to all presets.

  - ArrayUrlPresetsattribute (default)

    Holds default array url presets, default attribute indicated default preset. -1 means do not link at all by default.

    - Preset attributes (name, template, header, enabled)

      Holds info for one url preset. Name is the name of the preset, template is the template to fill in, header is which header to fill it in with (by name, not index) and enabled is whether the preset is enabled. I'm not sure when or why I added an enabled flag to all presets.

  - ColorPresets

    color presets for dendrogram

    - ColorSet attrbutes (name, up, down)

      Set of colors to use for dendrogram view. name is name, up is up color, down is down color.

  - KaryoColorPresets

    color presets forkaryoscope

    - KaryoColorSet attribute (name)

      Set of colors for karyoscope view. name is name of set.

      - Color attribute (type, hex)

        Particular color in set. Type is type of color, hex is hex value for color.

  - ScatterColorPresets

    sctterview color presets

    - ScatterColorSet attribute (name)

      Set of colors for karyoscope view. name is name of set.

      - Color attribute (type, hex)

        Particular color in set. Type is type of color, hex is hex value for color.

  - CoordsPresets

    coordinates presets for karyoscope

  - Registration

    registration status

    - Entry attributes (jtv_version, java_version, java_vendor, os_name, os_arch, os_version, install_ip, install_host, install_date, status, first_name, last_name, email, institution, contactOkay)

      Registration entry, with various info about the installation. status keeps track of the status of that registration, and has values "deferred", "declined", "pending" and "complete". The meaning of these settings, as of all settings, is currently defined only in the source code of java treeview.

### Structure of JTV XML Configuration File

Each document also has a local JTV file for document-level settings. The nodes i

- UrlExtractor attribute (urlTemplate,isEnabled, index)

  used for gene url linking

- ArrayUrlExtractor attribute (urlTemplate,isEnabled, index)

  used for array url linking

Prev |  | Next
Building the documentation | Home | Architecture of Karyoscope Plugin