java.lang.Object
java.util.Observable
com.k_int.IR.SearchTask
com.k_int.test.z3950.BadServer.BadServerSearchTask
- All Implemented Interfaces:
- com.k_int.IR.InformationFragmentSource
- public class BadServerSearchTask
- extends com.k_int.IR.SearchTask
- implements com.k_int.IR.InformationFragmentSource
| Fields inherited from class com.k_int.IR.SearchTask |
create_time, max_messages, message_log, query, requestedSyntax, requestedSyntaxName, TASK_COMPLETE, TASK_EXECUTING, TASK_FAILURE, task_identifier, TASK_IDLE, TASK_MESSAGE_DIAGNOSTIC, TASK_MESSAGE_ERROR, TASK_MESSAGE_INFO, TASK_MESSAGE_WARNING, task_status_code, TASK_UNDEFINED, user_data |
|
Method Summary |
private void |
addElement(org.w3c.dom.Document d,
org.w3c.dom.Element parent,
java.lang.String elem_name,
java.lang.Object value)
|
void |
asyncGetFragment(int starting_fragment,
int count,
com.k_int.IR.RecordFormatSpecification spec,
com.k_int.IR.IFSNotificationTarget target)
|
void |
destroy()
Release all resources and shut down the object |
void |
destroyTask()
From SearchTask abstract base class |
com.k_int.IR.AsynchronousEnumeration |
elements()
Enumerate all the items availabe from this fragment source |
int |
evaluate(int timeout)
Evaluate the query, waiting at most timeout milliseconds, returning the
search status. |
private org.w3c.dom.Document |
getDummyRecordForHit(int n)
|
com.k_int.IR.InformationFragment[] |
getFragment(int starting_fragment,
int count,
com.k_int.IR.RecordFormatSpecification spec)
Position based range access to the result set. |
int |
getFragmentCount()
Current number of fragments available |
int |
getPrivateTaskStatusCode()
|
com.k_int.IR.IRStatusReport |
getStatusReport()
If this source aggregates other sources, there status reports can be found here, return null
if this is an original source of data. |
com.k_int.IR.InformationFragmentSource |
getTaskResultSet()
getTaskResultSet. |
java.lang.String |
lookupPrivateStatusCode(int code)
|
void |
setFragmentCount(int i)
|
void |
setPrivateTaskStatusCode(int i)
|
void |
store(int id,
com.k_int.IR.InformationFragment fragment)
|
| Methods inherited from class com.k_int.IR.SearchTask |
addDiagnosticObserver, addFragmentSourceObserver, broadcastStatusMessage, cancelTask, getLastStatusMessages, getQuery, getRequestedSyntax, getRequestedSyntaxName, getSubtasks, getTaskCreationTime, getTaskIdentifier, getTaskStatusCode, getUserData, hasSubtasks, logStatusMessage, setDiagnosticStatus, setMaxStatusMessageItems, setQuery, setRequestedSyntax, setRequestedSyntaxName, setTaskStatusCode, setUserData, waitForCondition, waitForStatus |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
private_status_types
private static java.lang.String[] private_status_types
demo_search_status
public int demo_search_status
fragment_count
private int fragment_count
source
private BadServerSearchable source
random
private java.util.Random random
BadServerSearchTask
public BadServerSearchTask(BadServerSearchable source,
java.util.Observer[] observers)
getPrivateTaskStatusCode
public int getPrivateTaskStatusCode()
setPrivateTaskStatusCode
public void setPrivateTaskStatusCode(int i)
lookupPrivateStatusCode
public java.lang.String lookupPrivateStatusCode(int code)
evaluate
public int evaluate(int timeout)
- Description copied from class:
com.k_int.IR.SearchTask
- Evaluate the query, waiting at most timeout milliseconds, returning the
search status. InformationFragmentSource object should be used to check
the final number of result records.
getFragment
public com.k_int.IR.InformationFragment[] getFragment(int starting_fragment,
int count,
com.k_int.IR.RecordFormatSpecification spec)
- Description copied from interface:
com.k_int.IR.InformationFragmentSource
- Position based range access to the result set. Implementation must
be 1 based: IE, First record in result set is 1 not 0.
Local mappings (e.g to vector) must account for this!
- Specified by:
getFragment in interface com.k_int.IR.InformationFragmentSource
asyncGetFragment
public void asyncGetFragment(int starting_fragment,
int count,
com.k_int.IR.RecordFormatSpecification spec,
com.k_int.IR.IFSNotificationTarget target)
- Specified by:
asyncGetFragment in interface com.k_int.IR.InformationFragmentSource
store
public void store(int id,
com.k_int.IR.InformationFragment fragment)
setFragmentCount
public void setFragmentCount(int i)
getFragmentCount
public int getFragmentCount()
- Description copied from interface:
com.k_int.IR.InformationFragmentSource
- Current number of fragments available
- Specified by:
getFragmentCount in interface com.k_int.IR.InformationFragmentSource
getDummyRecordForHit
private org.w3c.dom.Document getDummyRecordForHit(int n)
addElement
private void addElement(org.w3c.dom.Document d,
org.w3c.dom.Element parent,
java.lang.String elem_name,
java.lang.Object value)
getTaskResultSet
public com.k_int.IR.InformationFragmentSource getTaskResultSet()
- Description copied from class:
com.k_int.IR.SearchTask
- getTaskResultSet. Search tasks delagate the responsibility of managing a result set to an instance
of the InformationFragmentSource. Often, the SearchTask will implement InformationFragmentSource
itself, and return (this) as the realisation of the getTaskResultSet method. Other SearchTasks
may use some cache managing FragmentSource to wrapper the source result set and return that object.
This method returns a producer object that is used by consumers such as the result set enumeration
to list all the records found by a search task.
destroy
public void destroy()
- Description copied from interface:
com.k_int.IR.InformationFragmentSource
- Release all resources and shut down the object
- Specified by:
destroy in interface com.k_int.IR.InformationFragmentSource
destroyTask
public void destroyTask()
- From SearchTask abstract base class
elements
public com.k_int.IR.AsynchronousEnumeration elements()
- Description copied from interface:
com.k_int.IR.InformationFragmentSource
- Enumerate all the items availabe from this fragment source
- Specified by:
elements in interface com.k_int.IR.InformationFragmentSource
getStatusReport
public com.k_int.IR.IRStatusReport getStatusReport()
- Description copied from interface:
com.k_int.IR.InformationFragmentSource
- If this source aggregates other sources, there status reports can be found here, return null
if this is an original source of data.
- Specified by:
getStatusReport in interface com.k_int.IR.InformationFragmentSource