uk.ac.starlink.ttools.example
Class AllWiseAsciiStarTable

java.lang.Object
  extended by uk.ac.starlink.table.AbstractStarTable
      extended by uk.ac.starlink.table.formats.StreamStarTable
          extended by uk.ac.starlink.ttools.example.AllWiseAsciiStarTable
All Implemented Interfaces:
uk.ac.starlink.table.StarTable

public class AllWiseAsciiStarTable
extends uk.ac.starlink.table.formats.StreamStarTable

StarTable implementation which can read data from the AllWise data release. At time of writing these files are available from http://irsadist.ipac.caltech.edu/wise-allwise/. The files are formatted as pipe-separated ASCII, and optionally compressed. The metadata is stored in an external schema table file.

Since:
6 Feb 2014
Author:
Mark Taylor

Field Summary
 
Fields inherited from class uk.ac.starlink.table.formats.StreamStarTable
END
 
Constructor Summary
AllWiseAsciiStarTable(uk.ac.starlink.util.DataSource datsrc, URL schemaUrl, long nrow)
          Constructor.
 
Method Summary
protected  uk.ac.starlink.table.formats.RowEvaluator.Metadata obtainMetadata()
          Obtains metadata for the table by reading the schema provided at construction time.
protected  List readRow(PushbackInputStream in)
           
protected  uk.ac.starlink.table.formats.RowEvaluator.Metadata readSchema(uk.ac.starlink.util.DataSource datsrc)
          Given a PostgreSQL/2MASS-type schema file, works out what the column metadata will look like for each column of the table.
 
Methods inherited from class uk.ac.starlink.table.formats.StreamStarTable
getColumnCount, getColumnInfo, getInputStream, getRowCount, getRowSequence, init
 
Methods inherited from class uk.ac.starlink.table.AbstractStarTable
checkedLongToInt, getCell, getColumnAuxDataInfos, getName, getParameterByName, getParameters, getRow, getURL, isRandom, setName, setParameter, setParameters, setURL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AllWiseAsciiStarTable

public AllWiseAsciiStarTable(uk.ac.starlink.util.DataSource datsrc,
                             URL schemaUrl,
                             long nrow)
                      throws IOException
Constructor. You have to supply the number of rows that getRowCount will report.

Parameters:
datsrc - input data source
schemaUrl - URL for 'schema' table which describes data types
nrow - reported number of rows in table, -1 if unknown
Throws:
IOException
Method Detail

readRow

protected List readRow(PushbackInputStream in)
                throws uk.ac.starlink.table.TableFormatException,
                       IOException
Specified by:
readRow in class uk.ac.starlink.table.formats.StreamStarTable
Throws:
uk.ac.starlink.table.TableFormatException
IOException

obtainMetadata

protected uk.ac.starlink.table.formats.RowEvaluator.Metadata obtainMetadata()
                                                                     throws IOException
Obtains metadata for the table by reading the schema provided at construction time.

Specified by:
obtainMetadata in class uk.ac.starlink.table.formats.StreamStarTable
Throws:
IOException

readSchema

protected uk.ac.starlink.table.formats.RowEvaluator.Metadata readSchema(uk.ac.starlink.util.DataSource datsrc)
                                                                 throws IOException
Given a PostgreSQL/2MASS-type schema file, works out what the column metadata will look like for each column of the table.

Parameters:
datsrc - data source for schema file
Returns:
metadata object
Throws:
IOException


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