Package uk.ac.starlink.topcat

# Class TopcatExtApp

java.lang.Object
uk.ac.starlink.topcat.TopcatExtApp

All Implemented Interfaces:
  `ExtApp`

public class TopcatExtApp extends Object implements ExtApp
ExtApp implementation for TOPCAT. This is the interface via which Aladin talks to external applications. Aladin's model (i.e. the VOPlot model) of what an external application is expected to look like is not quite the same as TOPCAT's, so the methods don't all do exactly what the interface says they should, but it should be enough to implement useful communication.

Since:
  14 Oct 2005
Author:
  Mark Taylor

## Method Summary

Modifier and Type
Method
Description
`String`
`execCommand(String cmd)`
Allow an "external" application to control by script this application
`void`
`loadVOTable(ExtApp app, InputStream in)`
Allow an "external" application to send new data via an InputStream in VOTable format.
`void`
`selectVOTableObject(String[] oids)`
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(String[] oids)`
Call or Callback asking the other application to SHOW objects found in a VOTable previous transmission via loadVOTable() method.
`String`
`toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Method Details

### loadVOTable

public void loadVOTable(ExtApp app, InputStream in)
Description copied from interface: `ExtApp`
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.

Specified by:
  `loadVOTable` in interface `ExtApp`
Parameters:
  `app` - "external" application compliante with ExtApp java interface
  `in` - VOTable stream

### setVisible

public void setVisible(boolean flag)
Description copied from interface: `ExtApp`
Allow an "external" application to show or hide this application

Specified by:
  `setVisible` in interface `ExtApp`

### execCommand

public String execCommand(String cmd)
Description copied from interface: `ExtApp`
Allow an "external" application to control by script this application

Specified by:
  `execCommand` in interface `ExtApp`
Parameters:
  `cmd` - script command depending to this application
Returns:
  error or messages, can be null

### showVOTableObject

public void showVOTableObject(String[] oids)
Description copied from interface: `ExtApp`
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)

Specified by:
  `showVOTableObject` in interface `ExtApp`
Parameters:
  `oids` - list of identifiers found in VOTables (see comment of the loadVOTable() method.

### selectVOTableObject

public void selectVOTableObject(String[] oids)
Description copied from interface: `ExtApp`
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.)

Specified by:
  `selectVOTableObject` in interface `ExtApp`
Parameters:
  `oids` - list of identifiers found in VOTables (see comment of the loadVOTable() method.

### toString

public String toString()

Overrides:
  `toString` in class `Object`