Skip to content

Developers guide

Mallory MARCOT edited this page Jul 29, 2014 · 2 revisions

Developers guide

Introduction

The code of ObsTAPQuery is written in Java. It is compounded of 5 packages :

  • fr.obs.view : which contains all view related classes
  • fr.obs.launcher : for launchers
  • fr.obs.listener : contains all the ActionListeners (related to JButton, JComboBox, ...)
  • fr.obs.model : this package is compound of model classes
  • fr.obs.test : unit tests with JUnit

ObsTAPQuery run with the Aladin jar which have to be related in your project. You can download it from http://aladin.u-strasbg.fr/aladin.gml

Package fr.obs.view

See the panels arrangement there : Panel composition

The following classes are independent from the previous layout (new JFrame) :

  • PanneauConfServeur which contains the frame that allow you to type the URL of a TAP service
  • PanneauAide for the help

The class AbstractLigne is the parent of LigneDeContrainte and LigneDePosition, it regroups common features.

Package fr.obs.launcher

This package is composed of two main class :

  • LanceurAladin : useful to export ObsTAPQuery into a jar file and really test our plug-in with Aladin.
  • Principale : express launcher to test visual features or functionality which doesn't need Aladin.

Package fr.obs.listener

It contains all the complex listeners were needs more than 2 or 3 instructions. The really simple listeners are hard coded in anonymous classes. There is nothing special to say except that I decided to use the method getParent() several times to get the reference of the parent that interesting me. In order to avoid to always give in parameter a reference of PluginLayout, and redefine a constructor ...

Package fr.obs.model

Contains all classes were are directly linked with model such as UnChamps which represent an ObsCore field or a generic TAP field if you deals with a regular TAP service.

Package fr.obs.util

It is composed of tools and utilities.

  • The class BoiteOutils regroups generic static methods that are useful in a lot of contexts.
  • Configuration contains a set of constants and variables that allow you to simply configure a lot of features of ObsTAPQuery in one class.
  • The Langage class allow you to switch between different languages easily (currently there are only 2 possibilities : English and French)

Package fr.obs.test

This package is about unit tests made with JUnit framework

Clone this wiki locally