Class 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TapRunner

        protected TapRunner​(java.lang.String description)
        Constructor.
        Parameters:
        description - short description of this object's type
    • 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 destination
        tq - 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 destination
        tq - 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 destination
        query - 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