uk.ac.starlink.ttools.taplint
Class TapRunner

java.lang.Object
  extended by uk.ac.starlink.ttools.taplint.TapRunner
Direct Known Subclasses:
BasicTapRunner, VotLintTapRunner

public abstract class TapRunner
extends Object

Executes TAP queries for the validator.

Since:
9 Jun 2011
Author:
Mark Taylor

Constructor Summary
protected TapRunner(String description)
          Constructor.
 
Method Summary
 StarTable attemptGetResultTable(Reporter reporter, TapQuery tq)
          Attempts to execute a TAP query and returns the result table, or throws an exception if the query failed for some reason.
protected abstract  StarTable executeQuery(Reporter reporter, TapQuery query)
          Executes a TAP query, performing reporting as appropriate.
 String getDescription()
          Returns a short description.
 StarTable getResultTable(Reporter reporter, TapQuery tq)
          Executes a TAP query and returns the result table, or null if the query failed for some reason.
 void reportSummary(Reporter reporter)
          Reports a summary of the queries executed by this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TapRunner

protected TapRunner(String description)
Constructor.

Parameters:
description - short description of this object's type
Method Detail

getDescription

public String getDescription()
Returns a short description.

Returns:
descriptive label

getResultTable

public StarTable getResultTable(Reporter reporter,
                                TapQuery tq)
Executes a TAP query and returns the result table, or null if the query failed for some reason. Errors are reported through the reporter as appropriate.

Parameters:
reporter - validation message destination
tq - TAP query specification
Returns:
result table, or null if there was an error

attemptGetResultTable

public StarTable attemptGetResultTable(Reporter reporter,
                                       TapQuery tq)
                                throws IOException,
                                       SAXException
Attempts to execute a TAP query and returns the result table, or throws an exception if the query failed for some reason.

Parameters:
reporter - validation message destination
tq - TAP query specification
Returns:
result table, not null
Throws:
IOException
SAXException

executeQuery

protected abstract StarTable executeQuery(Reporter reporter,
                                          TapQuery query)
                                   throws IOException,
                                          SAXException
Executes a TAP query, performing reporting as appropriate. The result may be null, but will normally be either a table or an IOException will result.

Parameters:
reporter - validation message destination
query - query to execute
Returns:
result table
Throws:
IOException
SAXException

reportSummary

public void reportSummary(Reporter reporter)
Reports a summary of the queries executed by this object.

Parameters:
reporter - validation message destination


Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.