Package uk.ac.starlink.ttools.taplint
Class TapRunner
- java.lang.Object
-
- uk.ac.starlink.ttools.taplint.TapRunner
-
- Direct Known Subclasses:
BasicTapRunner
,VotLintTapRunner
public abstract class TapRunner extends java.lang.Object
Executes TAP queries for the validator.- Since:
- 9 Jun 2011
- Author:
- Mark Taylor
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
TapRunner(java.lang.String description)
Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description uk.ac.starlink.table.StarTable
attemptGetResultTable(Reporter reporter, uk.ac.starlink.vo.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 uk.ac.starlink.table.StarTable
executeQuery(Reporter reporter, uk.ac.starlink.vo.TapQuery query)
Executes a TAP query, performing reporting as appropriate.java.lang.String
getDescription()
Returns a short description.uk.ac.starlink.table.StarTable
getResultTable(Reporter reporter, uk.ac.starlink.vo.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.
-
-
-
Method Detail
-
getDescription
public java.lang.String getDescription()
Returns a short description.- Returns:
- descriptive label
-
getResultTable
public uk.ac.starlink.table.StarTable getResultTable(Reporter reporter, uk.ac.starlink.vo.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 destinationtq
- TAP query specification- Returns:
- result table, or null if there was an error
-
attemptGetResultTable
public uk.ac.starlink.table.StarTable attemptGetResultTable(Reporter reporter, uk.ac.starlink.vo.TapQuery tq) throws java.io.IOException, org.xml.sax.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 destinationtq
- TAP query specification- Returns:
- result table, not null
- Throws:
java.io.IOException
org.xml.sax.SAXException
-
executeQuery
protected abstract uk.ac.starlink.table.StarTable executeQuery(Reporter reporter, uk.ac.starlink.vo.TapQuery query) throws java.io.IOException, org.xml.sax.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 destinationquery
- query to execute- Returns:
- result table
- Throws:
java.io.IOException
org.xml.sax.SAXException
-
reportSummary
public void reportSummary(Reporter reporter)
Reports a summary of the queries executed by this object.- Parameters:
reporter
- validation message destination
-
-