|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.harvard.cfa.vo.tapclient.tap.Job
public abstract class Job
This object provides an implementation of common aspects of the AsyncJob and SyncJob.
Two implementations are provided, AsyncJob
and SyncJob
, which excercise the TAP asynchronous and synchronous data query interfaces respectively.
Field Summary | |
---|---|
protected java.util.Map<java.lang.String,java.net.URI> |
inlineContent
|
protected java.util.Map<java.lang.String,java.lang.String> |
parameters
|
Constructor Summary | |
---|---|
protected |
Job()
Creates a Job object. |
Method Summary | |
---|---|
void |
addInlineUpload(java.lang.String tableName,
java.net.URI uri)
Adds to the TAP UPLOAD parameter. |
void |
addUpload(java.lang.String tableName,
java.net.URI uri)
Adds to the TAP UPLOAD parameter. |
void |
setFormat(java.lang.String newValue)
Sets the format of this job. |
void |
setInlineUpload(java.lang.String tableName,
java.net.URI uri)
Sets the TAP UPLOAD parameter. |
void |
setLang(java.lang.String newValue)
Sets the lang of this job. |
void |
setMaxRec(int newValue)
Sets the maximum number of records of this job. |
void |
setParameter(java.lang.String name,
int value)
Sets the named parameter equal to the value. |
abstract void |
setParameter(java.lang.String name,
java.lang.String value)
Sets the named parameter equal to the value. |
void |
setQuery(java.lang.String newValue)
Sets the query of this job. |
void |
setRunId(java.lang.String newValue)
Sets the run id of this job. |
void |
setUpload(java.lang.String tableName,
java.net.URI uri)
Sets the TAP UPLOAD parameter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Map<java.lang.String,java.lang.String> parameters
protected java.util.Map<java.lang.String,java.net.URI> inlineContent
Constructor Detail |
---|
protected Job()
Method Detail |
---|
public abstract void setParameter(java.lang.String name, java.lang.String value)
name
- of the parametervalue
- of the parameterpublic void setParameter(java.lang.String name, int value)
name
- of the parametervalue
- of the parameterpublic void setFormat(java.lang.String newValue)
newValue
- the formatpublic void setLang(java.lang.String newValue)
newValue
- the langpublic void setMaxRec(int newValue)
newValue
- the maximum number of recordspublic void setQuery(java.lang.String newValue)
newValue
- the querypublic void setRunId(java.lang.String newValue)
newValue
- the run idpublic void setUpload(java.lang.String tableName, java.net.URI uri)
job = new SyncJob(service); job.setParameter("QUERY", "select count(*) from service_schema.service_table t1, TAP_UPLOAD.usrtbl t2 where contains(point('ICRS-GEO', t1.ra, t1.dec), circle('ICRS-GEO', t2.ra, t2.dec, t2.radius)) = 1"); // TAP service will call the VO cone search service. URI uri = new URI("http://cda.cfa.harvard.edu/cscvo/coneSearch?RA=188.97&DEC=26.36&SR=1.0"); job.setUpload("usrtbl", uri); job.run();
public void addUpload(java.lang.String tableName, java.net.URI uri)
public void setInlineUpload(java.lang.String tableName, java.net.URI uri)
job = new SyncJob(service); job.setParameter("QUERY", "select count(*) from service_schema.service_table t1, TAP_UPLOAD.usrtbl t2 where contains(point('ICRS-GEO', t1.ra, t1.dec), circle('ICRS-GEO', t2.ra, t2.dec, t2.radius)) = 1"); // User's local data to send inline with query request File file = new File("myvotable.xml"); job.setInlineUploadParameter("usrtbl", file.toURI()); job.run();
public void addInlineUpload(java.lang.String tableName, java.net.URI uri)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |