cds.tools
Interface VOApp

All Known Implementing Classes:
Aladin

public interface VOApp

Interface between two Virtual Observatory applications, such as Aladin (CDS), VOPlot( VO-India), TOPcat, APT (STScI) to exchange data and have an object selection mechanism. This interface is totally symmetrical, it has to be implemented in both applications NOTA: This interface is based on a previous version called ExtApp but as some methods have been modified, VOApp do not extend ExtApp but reimplements its methods. ExtApp is deprecated.

Version:
1.0 : 17 september 2005
Author:
Pierre Fernique [CDS]

Field Summary
static int MEASURE
          Measure event, see addObserver()
static int PIXEL
          Pixel event, see addObserver()
static int POSITION
          Position event, see addObserver()
 
Method Summary
 void addObserver(VOObserver app, int eventMasq)
          To register an observer of VO events implementing VOObserver interface.
 java.lang.String execCommand(java.lang.String cmd)
          Allow an "external" application to control by script this application
 java.io.InputStream getFITS(java.lang.String dataID)
          To get a dataset in FITS format (typically for images)
 java.io.InputStream getVOTable(java.lang.String dataID)
          To get a dataset in VOTable format (typically for catalogs).
 java.lang.String putFITS(java.io.InputStream in, java.lang.String label)
          To load an image to another application
 java.lang.String putVOTable(java.io.InputStream in, java.lang.String label)
          To load a VOTable to another application
 java.lang.String putVOTable(VOApp app, java.io.InputStream in, java.lang.String label)
          Allow an "external" application to send new data via an InputStream in VOTable format.
 void selectVOTableObject(java.lang.String[] oid)
          Call or Callback asking the other application to SELECT objects found in a VOTable previous transmission via loadVOTable() method.
 void setVisible(boolean flag)
          Allow an "external" application to show or hide this application
 void showVOTableObject(java.lang.String[] oid)
          Call or Callback asking the other application to SHOW objects found in a VOTable previous transmission via loadVOTable() method.
 

Field Detail

POSITION

static final int POSITION
Position event, see addObserver()

See Also:
Constant Field Values

PIXEL

static final int PIXEL
Pixel event, see addObserver()

See Also:
Constant Field Values

MEASURE

static final int MEASURE
Measure event, see addObserver()

See Also:
Constant Field Values
Method Detail

putVOTable

java.lang.String putVOTable(java.io.InputStream in,
                            java.lang.String label)
To load a VOTable to another application

Parameters:
in - VOTable stream
dataset - label, or null

putVOTable

java.lang.String putVOTable(VOApp app,
                            java.io.InputStream in,
                            java.lang.String label)
Allow an "external" application to send new data via an InputStream in VOTable format. The reference to this "external" application has to passed in order to eventually calls back the "external" application, or to be called again by the "external" application concerning the VOTable objects that it had sent before (see showVOTableObject() and selectVOTableObject() methods below) For this calls or callbacks, the "external" application has to create a new VOTable column giving an unique identifier for each object that it has sent. This column has to be described by the following VOTable FIELD tag : . It is strongly recommended to add an unambigus prefix to avoid conflicts with the assignations done by the "external" application and its own assignations. The unicity has to be maintained during all the session. It means that successive VOTables must have difference unique identifiers.

Parameters:
app - "external" application compliante with ExtApp java interface
in - VOTable stream
dataset - label, or null
Returns:
an unique ID for this dataset (application dependent - for instance, the plane name in Aladin)

getVOTable

java.io.InputStream getVOTable(java.lang.String dataID)
To get a dataset in VOTable format (typically for catalogs).

Parameters:
dataID - the dataset identifier (application dependent for instance, the plane name in Aladin)
Returns:
a stream containing the VOTable

putFITS

java.lang.String putFITS(java.io.InputStream in,
                         java.lang.String label)
To load an image to another application

Parameters:
in - FITS stream
dataset - label, or null

getFITS

java.io.InputStream getFITS(java.lang.String dataID)
To get a dataset in FITS format (typically for images)

Parameters:
dataID - the dataset identifier (application dependent for instance, the plane name in Aladin)
Returns:
a stream containing the FITS

showVOTableObject

void showVOTableObject(java.lang.String[] oid)
Call or Callback asking the other application to SHOW objects found in a VOTable previous transmission via loadVOTable() method. The action "SHOW" is a choice of the other application (for example a blink)

Parameters:
oid - list of identifiers found in VOTables (see comment of the loadVOTable() method.

selectVOTableObject

void selectVOTableObject(java.lang.String[] oid)
Call or Callback asking the other application to SELECT objects found in a VOTable previous transmission via loadVOTable() method. The action "SELECT" is a choice of the other application (for example select objects by showing the corresponding measurements, it can be the same thing that the "SHOW" action - see showVOTableObject() method.)

Parameters:
oid - list of identifiers found in VOTables (see comment of the loadVOTable() method.

setVisible

void setVisible(boolean flag)
Allow an "external" application to show or hide this application


execCommand

java.lang.String execCommand(java.lang.String cmd)
Allow an "external" application to control by script this application

Parameters:
cmd - script command depending to this application
Returns:
error or messages, can be null

addObserver

void addObserver(VOObserver app,
                 int eventMasq)
To register an observer of VO events implementing VOObserver interface. see VOObserver.position() and VOObserver.pixel() associated callback methods ex: addObserver(this,VOApp.POSITION|VOApp.PIXEL)

Parameters:
app - the application to register
eventMasq - a bit field (use POSITION or PIXEL), (0 to remove the observer)


Copyright © 2009 UDS/CNRS