com.k_int.IR
Interface Searchable

All Known Implementing Classes:
DefaultSearchable, HeterogeneousSetOfSearchable, Z3950Origin, DemoSearchable

public interface Searchable

Searchable is the core interface of the IRLayer in JZKit. Objects implementing this interface can take part in search operations and potentially be managed as one of a group of resources against which a query is being evaluated. Search results may themselves implement the searchable interface.

Version:
$Id: Searchable.java,v 1.15 2001/06/10 13:15:34 ianibbo Exp $
Author:
Ian Ibbotson
See Also:
IRQuery

Field Summary
static int GROUP_COORDINATOR
          This realisation of the searchable is coordiating several other Searchable objects
static int SPECIFIC_SOURCE
          A Realisation of this interface provides access to a real, specific datasource
 
Method Summary
 SearchTask createTask(IRQuery q, java.lang.Object user_info)
          Create a SearchTask.
 SearchTask createTask(IRQuery q, java.lang.Object user_info, java.util.Observer[] observers)
          Create a SearchTask.
 void destroy()
          destroy the searchable object.
 int getManagerType()
          Provide information about the type of Searchable object this realisation is
 void init(java.util.Properties p)
          Init and Set any properties needed for an instance of Searchable.
 

Field Detail

SPECIFIC_SOURCE

public static final int SPECIFIC_SOURCE
A Realisation of this interface provides access to a real, specific datasource

GROUP_COORDINATOR

public static final int GROUP_COORDINATOR
This realisation of the searchable is coordiating several other Searchable objects
Method Detail

init

public void init(java.util.Properties p)
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

destroy

public void destroy()
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.

getManagerType

public int getManagerType()
Provide information about the type of Searchable object this realisation is
See Also:
SPECIFIC_SOURCE, GROUP_COORDINATOR

createTask

public SearchTask createTask(IRQuery q,
                             java.lang.Object user_info)
Create a SearchTask. Evaluate the query with the Tasks evaluate method.

createTask

public SearchTask createTask(IRQuery q,
                             java.lang.Object user_info,
                             java.util.Observer[] observers)
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.


Copyright © 2001 Knowledge Integration Ltd. All Rights Reserved.