java.lang.Object
com.k_int.z3950.server.demo.DemoSearchable
- All Implemented Interfaces:
- com.k_int.IR.Scanable, com.k_int.IR.Searchable
- public class DemoSearchable
- extends java.lang.Object
- implements com.k_int.IR.Searchable, com.k_int.IR.Scanable
A sample implementation of searchable that returns random numbers of hits
and random result records
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
properties
private java.util.Hashtable properties
cat
private static LoggingContext cat
naming_context
private javax.naming.Context naming_context
DemoSearchable
public DemoSearchable()
init
public void init(java.util.Properties p)
- Description copied from interface:
com.k_int.IR.Searchable
- Init and Set any properties needed for an instance of Searchable. Often different realisations
will require different parameters to be avaialable, for example ServerHost and ServerPort
or JDBCPoolName. Create a new naming context for this object.
- Specified by:
init in interface com.k_int.IR.Searchable
init
public void init(java.util.Properties p,
javax.naming.Context naming_context)
destroy
public void destroy()
- Description copied from interface:
com.k_int.IR.Searchable
- destroy the searchable object. Shut down the searchable object entirely. Release all
held resources, make the object ready for GC. Try to release in here instead of on finalize.
- Specified by:
destroy in interface com.k_int.IR.Searchable
getManagerType
public int getManagerType()
- Description copied from interface:
com.k_int.IR.Searchable
- Provide information about the type of Searchable object this realisation is
- Specified by:
getManagerType in interface com.k_int.IR.Searchable
createTask
public com.k_int.IR.SearchTask createTask(com.k_int.IR.IRQuery q,
java.lang.Object user_data)
- Description copied from interface:
com.k_int.IR.Searchable
- Create a SearchTask. Evaluate the query with the Tasks evaluate method.
- Specified by:
createTask in interface com.k_int.IR.Searchable
createTask
public com.k_int.IR.SearchTask createTask(com.k_int.IR.IRQuery q,
java.lang.Object user_data,
java.util.Observer[] observers)
- Description copied from interface:
com.k_int.IR.Searchable
- Create a SearchTask. Evaluate the query with the Tasks evaluate method.
Any observers will be passwd to the SearchTask and will be notified of search events.
- Specified by:
createTask in interface com.k_int.IR.Searchable
isScanSupported
public boolean isScanSupported()
- Specified by:
isScanSupported in interface com.k_int.IR.Scanable
doScan
public com.k_int.IR.ScanInformation doScan(com.k_int.IR.ScanRequestInfo req)
- Description copied from interface:
com.k_int.IR.Scanable
- doScan MUST return a vector of TermInformation
- Specified by:
doScan in interface com.k_int.IR.Scanable