|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.ttools.cone.CdsUploadMatcher
public class CdsUploadMatcher
UploadMatcher implementation for the CDS Xmatch service. This class encapsulates all the information about the CDS Xmatch I/O interface.
Nested Class Summary | |
---|---|
static class |
CdsUploadMatcher.VizierMeta
Metadata provided for Vizier tables by the CDS Xmatch service. |
Field Summary | |
---|---|
static String |
SIMBAD_NAME
Alias for Simbad flat view table. |
static boolean |
UPLOAD_EMPTY
Whether it is safe/recommended to upload empty tables to match. |
static String |
XMATCH_URL
URL for the CDS Xmatch service. |
Constructor Summary | |
---|---|
CdsUploadMatcher(URL serviceUrl,
String tableId,
double srArcsec,
ServiceFindMode serviceMode,
uk.ac.starlink.util.ContentCoding coding)
Constructor. |
Method Summary | |
---|---|
ColumnPlan |
getColumnPlan(uk.ac.starlink.table.ColumnInfo[] resultCols,
uk.ac.starlink.table.ColumnInfo[] uploadCols)
Returns an object that understands what columns are where in an output table generated from the raw result produced by this matcher. |
static String[] |
readAliases()
Reads the list of VizieR table aliases that can be used with the Xmatch service. |
static CdsUploadMatcher.VizierMeta |
readVizierMetadata(String vizName)
Reads basic table metadata for a given VizieR table. |
static String[] |
readVizierNames()
Reads the list of VizieR table names that can be used with the Xmatch service. |
boolean |
streamRawResult(ConeQueryRowSequence coneSeq,
uk.ac.starlink.table.TableSink rawResultSink,
RowMapper<?> rowMapper,
long maxrec)
Scans a sequence of positional queries, uploads it to a remote service, and writes the returned values to a given sink. |
static String |
toCdsId(String txt)
Turns a user-supplied string referencing a CDS table into an identifier recognisable by the CDS Xmatch service. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String XMATCH_URL
public static final String SIMBAD_NAME
public static final boolean UPLOAD_EMPTY
Constructor Detail |
---|
public CdsUploadMatcher(URL serviceUrl, String tableId, double srArcsec, ServiceFindMode serviceMode, uk.ac.starlink.util.ContentCoding coding)
serviceUrl
- URL of Xmatch servicetableId
- identifier of remote tablesrArcsec
- match radius in arcsecondsserviceMode
- type of matchcoding
- configures HTTP compression for resultMethod Detail |
---|
public boolean streamRawResult(ConeQueryRowSequence coneSeq, uk.ac.starlink.table.TableSink rawResultSink, RowMapper<?> rowMapper, long maxrec) throws IOException
UploadMatcher
Both the read and the write should ideally be streamed (read as uploaded and written as received) so that progress can be logged properly.
The result is written to the given rawResultSink
(which will probably be a RowStore
).
To make sense of the table thus written, it is necessary to
use the RowMapper
supplied to this method and the
ColumnPlan
available from this object.
The RowMapper associates result rows with queries from the input
row sequence, and the ColumnPlan knows where the special and other
columns are in the result table.
streamRawResult
in interface UploadMatcher
coneSeq
- sequence of cone-like positional queriesrawResultSink
- destination for result rows obtained from
the target matcher servicerowMapper
- used to label rows; queries are labelled with the
value returned from the getIndex
method of coneSeq
maxrec
- user-supplied limit on the maximum number of
output rows, though the service may truncate
the result; if <0, no limit is requested
IOException
public ColumnPlan getColumnPlan(uk.ac.starlink.table.ColumnInfo[] resultCols, uk.ac.starlink.table.ColumnInfo[] uploadCols)
UploadMatcher
getColumnPlan
in interface UploadMatcher
resultCols
- columns in the raw result table written by
this object's streamRawResult
methoduploadCols
- columns from the table that will be joined to
the raw result to get the output table
public static String toCdsId(String txt)
txt
- table name
public static String[] readAliases() throws IOException
IOException
public static String[] readVizierNames() throws IOException
IOException
public static CdsUploadMatcher.VizierMeta readVizierMetadata(String vizName) throws IOException
vizName
- vizier table name or ID
IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |