|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.ornl.csed.csiir.idr.kdd.dataservice.client.DataServiceClient
public class DataServiceClient
Provides an API for accessing the KDD data service. Maintains a thread pool to service asynchronous requests for data set samples, the processing of queries, and the retrieval of documents.
Constructor Summary | |
---|---|
DataServiceClient(java.net.URI uri)
Constructs a data service client object with the supplied URI and the default thread pool size of 16. |
|
DataServiceClient(java.net.URI uri,
int threadPoolSize)
Constructs a data service client object with the supplied URI and the supplied thread pool size. |
Method Summary | |
---|---|
java.util.Set<java.lang.String> |
getActiveProcessIdSet()
Retrieve the unique query ID's for all of the active asynchronous processes. |
java.net.URL |
getDocumentURL(java.lang.String dataSetId,
java.lang.String documentId,
Format format,
java.lang.String logId)
Retrieves the URL for a source document. |
boolean |
requestCancel(java.lang.String queryId)
Request to cancel the asynchronous retrieval of a sample set, query, document, or query count request. |
DataSetInformationResponse |
requestDataSetInformation(java.lang.String dataSetId,
java.lang.String logId)
Retrieves information about a single data set from the server. |
DataSetListResponse |
requestDataSetList(java.lang.String logId)
Retrieves a list of the available data sets from the server. |
java.lang.String |
requestDataSetQuery(java.lang.String dataSetId,
DataSetQueryRequest dataSetQueryRequest,
DataConsumer consumer,
java.lang.String logId)
Retrieves the records resulting from the provided query. |
java.lang.String |
requestDataSetQueryRecordCount(java.lang.String dataSetId,
DataSetQueryRequest dataSetQueryRequest,
RecordCountConsumer consumer,
java.lang.String logId)
Retrieves the total number of records that match the query, along with the time taken to execute the query. |
java.lang.String |
requestDataSetSamples(java.lang.String dataSetId,
DataSetSamplesRequest dataSetSamplesRequest,
DataConsumer consumer,
java.lang.String logId)
Retrieves the sample records from the data set. |
DataSetSchemaResponse |
requestDataSetSchema(java.lang.String dataSetId,
java.lang.String logId)
Retrieves the schema for a data set. |
java.lang.String |
requestDocument(java.lang.String dataSetId,
java.lang.String documentId,
Format format,
DocumentConsumer consumer,
java.lang.String logId)
Retrieves the source document asynchronously. |
void |
shutdown()
Close the connection to the data service and kill the thread pool. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DataServiceClient(java.net.URI uri)
uri
- the URI for the data servicepublic DataServiceClient(java.net.URI uri, int threadPoolSize)
uri
- the URI for the data servicethreadPoolSize
- the size of the thread pool that services asynchronous requestsMethod Detail |
---|
public DataSetListResponse requestDataSetList(java.lang.String logId) throws KDDDataServiceClientException
logId
- a value provided from the Result Set Management System to facilitate log file reconciliation
KDDDataServiceClientException
public DataSetInformationResponse requestDataSetInformation(java.lang.String dataSetId, java.lang.String logId) throws KDDDataServiceClientException
dataSetId
- the data set ID for the requestlogId
- a value provided from the Result Set Management System to facilitate log file reconciliation
KDDDataServiceClientException
public DataSetSchemaResponse requestDataSetSchema(java.lang.String dataSetId, java.lang.String logId) throws KDDDataServiceClientException
dataSetId
- the data set ID for the requestlogId
- a value provided from the Result Set Management System to facilitate log file reconciliation
KDDDataServiceClientException
public java.net.URL getDocumentURL(java.lang.String dataSetId, java.lang.String documentId, Format format, java.lang.String logId) throws KDDDataServiceClientException
dataSetId
- the data set ID for the requestdocumentId
- the document ID for the requestformat
- the format for the returned documentlogId
- a value provided from the Result Set Management System to facilitate log file reconciliation
KDDDataServiceClientException
public java.lang.String requestDocument(java.lang.String dataSetId, java.lang.String documentId, Format format, DocumentConsumer consumer, java.lang.String logId) throws KDDDataServiceClientException
dataSetId
- the data set IDdocumentId
- the document IDformat
- the requested formatconsumer
- a class instance that implements the DocumentConsumer interfacelogId
- a value provided from the Result Set Management System to facilitate log file reconciliation
KDDDataServiceClientException
public java.lang.String requestDataSetSamples(java.lang.String dataSetId, DataSetSamplesRequest dataSetSamplesRequest, DataConsumer consumer, java.lang.String logId) throws KDDDataServiceClientException
dataSetId
- the data set IDdataSetSamplesRequest
- the sample request objectconsumer
- a class instance that implements the DataConsumer interface.logId
- a value provided from the Result Set Management System to facilitate log file reconciliation
KDDDataServiceClientException
public java.lang.String requestDataSetQuery(java.lang.String dataSetId, DataSetQueryRequest dataSetQueryRequest, DataConsumer consumer, java.lang.String logId) throws KDDDataServiceClientException
dataSetId
- the data set IDdataSetQueryRequest
- the queryconsumer
- a class instance that implements the DataConsumer interfacelogId
- a value provided from the Result Set Management System to facilitate log file reconciliation
KDDDataServiceClientException
public java.lang.String requestDataSetQueryRecordCount(java.lang.String dataSetId, DataSetQueryRequest dataSetQueryRequest, RecordCountConsumer consumer, java.lang.String logId) throws KDDDataServiceClientException
dataSetId
- the data set IDdataSetQueryRequest
- the queryconsumer
- a class instance that implements the RecordCountConsumer interfacelogId
- a value provided from the Result Set Management System to facilitate log file reconciliation
KDDDataServiceClientException
public boolean requestCancel(java.lang.String queryId)
queryId
- the unique query ID
public java.util.Set<java.lang.String> getActiveProcessIdSet()
public void shutdown()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |