org.jafer.zclient
Class AbstractClient

java.lang.Object
  extended by org.jafer.interfaces.Databean
      extended by org.jafer.zclient.AbstractClient
All Implemented Interfaces:
java.io.Serializable, Authentication, Cache, Connection, Logging, Present, Scan, Search, Z3950Connection
Direct Known Subclasses:
SRWClient, ZClient

public abstract class AbstractClient
extends Databean
implements Cache, Logging, Connection, Z3950Connection, Authentication, Search, Present, Scan

See Also:
Serialized Form

Field Summary
private  int attempts
           
static int AUTO_RECONNECT
          int AUTO_RECONNECT
private  int autoReconnect
           
protected  Cache cache
          Cache - cache made protected due to fact that ZClientDB still needs the cache
private  boolean checkRecordFormat
           
private  java.lang.String[] dataBases
          String[] dataBases
private  int dataCacheSize
           
static java.lang.String DEFAULT_DATABASE_NAME
          String DEFAULT_DATABASE_NAME
static int DEFAULT_DATACACHE_SIZE
          int DEFAULT_DATACACHE_SIZE
static java.lang.String DEFAULT_ELEMENT_SPEC
          String DEFAULT_ELEMENT_SPEC
static int DEFAULT_FETCH_SIZE
          int DEFAULT_FETCH_SIZE
static double DEFAULT_FETCH_VIEW
          double DEFAULT_FETCH_VIEW
static java.lang.String DEFAULT_RECORD_SCHEMA
          String DEFAULT_RECORD_SCHEMA
static int[] DEFAULT_RECORD_SYNTAX
           
static java.lang.String DEFAULT_RESULTSET_NAME
          String DEFAULT_RESULTSET_NAME
private  org.w3c.dom.Document document
          Document document
private  java.lang.String elementSpec
           
private  int fetchSize
           
private  double fetchView
           
private  java.lang.String group
           
private  java.lang.String host
           
protected static java.util.logging.Logger logger
          Logger logger
static int MAX_DATACACHE_SIZE
          int MAX_DATACACHE_SIZE
private  int nResults
           
private  int numberOfRequestRecords
           
private  boolean parseQuery
           
private  java.lang.String password
           
private  int port
           
private  java.lang.Object query
          Node query
protected  java.lang.Integer recordCursor
           
private  java.lang.String recordSchema
           
private  int[] recordSyntax
           
private  java.lang.String remoteAddress
           
private  java.util.Hashtable resultsByDB
          int[] dataBases
private  java.lang.String resultSetName
           
private  java.util.Hashtable searchExceptions
          Stores a reference to exception that occured in the last search or null if no errors occured
private  Session session
          Session session
private  int startRecordNumber
           
private  int timeout
           
static int TIMEOUT
          int TIMEOUT
protected  java.lang.String userIP
           
private  java.lang.String username
           
 
Constructor Summary
AbstractClient()
          Empty Constructor for the ZClient object
 
Method Summary
protected  boolean allowReconnect()
          returns true if ZClient should attempt reconnect
 void close()
          close
private  void connect()
          Description of the Method
protected abstract  Session createSession()
           
protected  void finalize()
           
private  int getAttempts()
          Gets the attempts attribute of the ZClient object
 int getAutoReconnect()
          Gets the autoReconnect attribute of the ZClient object
 int getAvailableSlots()
          Returns the number of available slots currently in the cache
 Cache getCache()
          Returns the current record cache object being used
 java.lang.String getCurrentDatabase()
          Gets the CurrentDataBase attribute of the ZClient object
 DataObject getCurrentDataObject()
          Gets the CurrentDataObject attribute of the ZClient object
 Field getCurrentRecord()
          Gets the CurrentRecord attribute of the ZClient object
 java.lang.String getCurrentRecordSyntax()
          Gets the CurrentRecordSyntax attribute of the ZClient object
 java.lang.String getCurrentRecordSyntaxName()
          Gets the CurrentRecordSyntaxName value of the ZClient object
private  java.lang.String getDatabaseNames()
          getDatabaseNames
 java.lang.String[] getDatabases()
          Gets the DataBases attribute of the ZClient object
 int getDataCacheSize()
          Gets the DataCacheSize attribute of the ZClient object
 org.w3c.dom.Document getDocument()
           
 java.lang.String getElementSpec()
          Gets the ElementSpec attribute of the ZClient object
 int getFetchSize()
          Gets the fetchSize attribute of the ZClient object
 double getFetchView()
          Gets the FetchView attribute of the ZClient object
 java.lang.String getGroup()
          Get the group name set for accessing the datasource
 java.lang.String getHost()
          Gets the Host attribute of the ZClient object
protected  int getNumberOfRequestRecords()
          Gets the numberOfRequestRecords attribute of the ZClient object
 int getNumberOfResults()
          Gets the NumberOfResults attribute of the ZClient object
 int getNumberOfResults(java.lang.String databaseName)
          Gets the NumberOfResults attribute of the ZClient object
 java.lang.String getPassword()
          Gets the Password attribute of the ZClient object
 int getPort()
          Gets the Port attribute of the ZClient object
 java.lang.Object getQuery()
          Gets the query attribute of the ZClient object
 int getRecordCursor()
          Gets the RecordCursor attribute of the ZClient object
protected  java.lang.Integer getRecordCursorAsInteger()
          Gets the RecordCursor attribute of the ZClient object
 java.lang.String getRecordSchema()
          Get currently set record schema
 int[] getRecordSyntax()
           
 java.lang.String getRemoteAddress()
          Gets the remoteAddress attribute of the ZClient object (for Servlets)
 java.lang.String getResultSetName()
          Gets the resultSetName attribute of the ZClient object
 JaferException getSearchException(java.lang.String database)
          If a search fails this method will return the JaferException for the specified database
 JaferException[] getSearchException(java.lang.String[] databases)
          If a search fails this method will return the JaferException for the specified databases
protected  Session getSession()
           
protected  int getStartRecordNumber()
          Gets setStartRecordNumber record number for Present
 Field[] getTerms(int noOfTerms, int termStep, int termPosition, org.w3c.dom.Node term)
          Get keywords or terms
 Field[] getTerms(int noOfTerms, org.w3c.dom.Node term)
          Get keywords or terms
 int getTimeout()
          Gets the timeout attribute of the ZClient object
 java.lang.String getUsername()
          Gets the Username attribute of the ZClient object
protected  void handleError(java.lang.String message)
           
protected  void handleError(java.lang.String message, JaferException e)
           
 boolean isCheckRecordFormat()
          Gets the checkRecordFormat attribute of the ZClient object
 boolean isParseQuery()
          Gets the parseQuery attribute of the ZClient object
protected  void reConnect()
          Description of the Method
 void saveQuery(java.lang.String file)
          Description of the Method
protected  int search()
          search
private  void setAttempts(int attempts)
          Sets the reTry attribute of the ZClient object
 void setAutoReconnect(int autoReconnect)
          Sets the autoReconnect attribute of the ZClient object
 void setCache(Cache cache)
          Sets the record cache object to use
 void setCheckRecordFormat(boolean checkRecordFormat)
          Sets the checkRecordFormat attribute of the ZClient object
 void setDatabases(java.lang.String database)
          Sets the Databases attribute of the ZClient object
 void setDatabases(java.lang.String[] databases)
          Set databases to search
 void setDataCacheSize(int dataCacheSize)
          Sets the DataCacheSize attribute of the ZClient object
private  void setDefaults()
          sets/checks default properties of the ZClient object
 void setDocument(org.w3c.dom.Document document)
           
 void setElementSpec(java.lang.String elementSpec)
          Sets the ElementSpec attribute of the ZClient object
 void setFetchSize(int fetchSize)
          Sets the fetchSize attribute of the ZClient object
 void setFetchView(double fetchView)
          Sets the FetchView attribute of the ZClient object
 void setGroup(java.lang.String group)
          Set group name for accessing the data source
 void setHost(java.lang.String host)
          Sets the Host attribute of the ZClient object
protected  void setNumberOfRequestRecords(int numberOfRequestRecords)
          Sets the numberOfRequestRecords attribute of the ZClient object
protected  void setNumberOfResults(java.lang.String databaseName, int numberOfResults)
           
 void setParseQuery(boolean parseQuery)
          Sets the parseQuery attribute of the ZClient object
 void setPassword(java.lang.String password)
          Sets the password attribute of the ZClient object
 void setPort(int port)
          Sets the Port attribute of the ZClient object
private  void setQuery(java.lang.Object query)
          Sets the query attribute of the ZClient object
 void setRecordCursor(int nRecord)
          Sets the RecordCursor attribute of the ZClient object
 void setRecordSchema(java.lang.String recordSchema)
          Set current prefered record schema
 void setRecordSyntax(int[] recordSyntax)
           
 void setRemoteAddress(java.lang.String remoteAddress)
          Sets the remoteAddress attribute of the ZClient object (for Servlets)
 void setResultSetName(java.lang.String resultSetName)
          Sets the resultSetName attribute of the ZClient object
protected  void setSearchException(java.lang.String[] databases, JaferException exception)
           
protected  void setSearchException(java.lang.String database, JaferException exception)
           
private  int setSearchResults(SearchResult[] resultsByDB)
          Sets the nResults attribute of the ZClient object
private  void setSession(Session session)
           
protected  void setStartRecordNumber(int nRecord)
          sets startRecordNumber for Present
 void setTimeout(int timeout)
          Sets the timeout attribute of the ZClient object
 void setUsername(java.lang.String username)
          Sets the username attribute of the ZClient object
 int submitQuery(java.lang.Object query)
          Description of the Method
 
Methods inherited from class org.jafer.interfaces.Databean
getCacheSupport, getPresentSupport, getScanSupport, getSearchSupport
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_DATABASE_NAME

public static final java.lang.String DEFAULT_DATABASE_NAME
String DEFAULT_DATABASE_NAME

See Also:
Constant Field Values

DEFAULT_RESULTSET_NAME

public static final java.lang.String DEFAULT_RESULTSET_NAME
String DEFAULT_RESULTSET_NAME

See Also:
Constant Field Values

DEFAULT_ELEMENT_SPEC

public static final java.lang.String DEFAULT_ELEMENT_SPEC
String DEFAULT_ELEMENT_SPEC

See Also:
Constant Field Values

DEFAULT_FETCH_SIZE

public static final int DEFAULT_FETCH_SIZE
int DEFAULT_FETCH_SIZE

See Also:
Constant Field Values

DEFAULT_FETCH_VIEW

public static final double DEFAULT_FETCH_VIEW
double DEFAULT_FETCH_VIEW

See Also:
Constant Field Values

DEFAULT_DATACACHE_SIZE

public static final int DEFAULT_DATACACHE_SIZE
int DEFAULT_DATACACHE_SIZE

See Also:
Constant Field Values

MAX_DATACACHE_SIZE

public static final int MAX_DATACACHE_SIZE
int MAX_DATACACHE_SIZE

See Also:
Constant Field Values

TIMEOUT

public static final int TIMEOUT
int TIMEOUT

See Also:
Constant Field Values

AUTO_RECONNECT

public static final int AUTO_RECONNECT
int AUTO_RECONNECT

See Also:
Constant Field Values

DEFAULT_RECORD_SCHEMA

public static final java.lang.String DEFAULT_RECORD_SCHEMA
String DEFAULT_RECORD_SCHEMA

See Also:
Constant Field Values

DEFAULT_RECORD_SYNTAX

public static final int[] DEFAULT_RECORD_SYNTAX

searchExceptions

private java.util.Hashtable searchExceptions
Stores a reference to exception that occured in the last search or null if no errors occured


fetchSize

private int fetchSize

dataCacheSize

private int dataCacheSize

autoReconnect

private int autoReconnect

timeout

private int timeout

attempts

private int attempts

numberOfRequestRecords

private int numberOfRequestRecords

startRecordNumber

private int startRecordNumber

nResults

private int nResults

port

private int port

fetchView

private double fetchView

checkRecordFormat

private boolean checkRecordFormat

parseQuery

private boolean parseQuery

recordCursor

protected java.lang.Integer recordCursor

elementSpec

private java.lang.String elementSpec

userIP

protected java.lang.String userIP

remoteAddress

private java.lang.String remoteAddress

resultSetName

private java.lang.String resultSetName

recordSchema

private java.lang.String recordSchema

recordSyntax

private int[] recordSyntax

host

private java.lang.String host

username

private java.lang.String username

password

private java.lang.String password

group

private java.lang.String group

dataBases

private java.lang.String[] dataBases
String[] dataBases


resultsByDB

private java.util.Hashtable resultsByDB
int[] dataBases


session

private Session session
Session session


cache

protected Cache cache
Cache - cache made protected due to fact that ZClientDB still needs the cache


document

private org.w3c.dom.Document document
Document document


query

private java.lang.Object query
Node query


logger

protected static java.util.logging.Logger logger
Logger logger

Constructor Detail

AbstractClient

public AbstractClient()
Empty Constructor for the ZClient object

Method Detail

setDefaults

private void setDefaults()
sets/checks default properties of the ZClient object

Throws:
JaferException - Description of Exception

submitQuery

public int submitQuery(java.lang.Object query)
                throws JaferException
Description of the Method

Specified by:
submitQuery in interface Search
Parameters:
query - Description of Parameter
Returns:
Description of the Returned Value
Throws:
JaferException

createSession

protected abstract Session createSession()

connect

private void connect()
              throws JaferException
Description of the Method

Throws:
JaferException - Description of Exception

reConnect

protected void reConnect()
                  throws JaferException
Description of the Method

Throws:
JaferException - Description of Exception

search

protected int search()
              throws JaferException
search

Returns:
the returned int
Throws:
JaferException - -

setRecordCursor

public void setRecordCursor(int nRecord)
                     throws JaferException
Sets the RecordCursor attribute of the ZClient object

Specified by:
setRecordCursor in interface Present
Parameters:
nRecord - The new RecordCursor value
Throws:
JaferException - Description of Exception

handleError

protected void handleError(java.lang.String message)

handleError

protected void handleError(java.lang.String message,
                           JaferException e)
                    throws JaferException
Throws:
JaferException

getRecordCursor

public int getRecordCursor()
Gets the RecordCursor attribute of the ZClient object

Specified by:
getRecordCursor in interface Present
Returns:
The RecordCursor value as int

setDocument

public void setDocument(org.w3c.dom.Document document)

getDocument

public org.w3c.dom.Document getDocument()

getDatabaseNames

private java.lang.String getDatabaseNames()
getDatabaseNames

Returns:
the returned String

finalize

protected void finalize()
                 throws JaferException
Overrides:
finalize in class java.lang.Object
Throws:
JaferException

close

public void close()
           throws JaferException
close

Specified by:
close in interface Connection
Throws:
JaferException

setRemoteAddress

public void setRemoteAddress(java.lang.String remoteAddress)
Sets the remoteAddress attribute of the ZClient object (for Servlets)

Specified by:
setRemoteAddress in interface Logging
Parameters:
remoteAddress - The new remoteAddress value

getRemoteAddress

public java.lang.String getRemoteAddress()
Gets the remoteAddress attribute of the ZClient object (for Servlets)

Specified by:
getRemoteAddress in interface Logging
Returns:
remoteAddress The remoteAddress value

setParseQuery

public void setParseQuery(boolean parseQuery)
Sets the parseQuery attribute of the ZClient object

Specified by:
setParseQuery in interface Search
Parameters:
parseQuery - The new parseQuery value

isParseQuery

public boolean isParseQuery()
Gets the parseQuery attribute of the ZClient object

Specified by:
isParseQuery in interface Search
Returns:
parseQuery The parseQuery value

setRecordSchema

public void setRecordSchema(java.lang.String recordSchema)
Description copied from interface: Present
Set current prefered record schema

Specified by:
setRecordSchema in interface Present
Parameters:
recordSchema - record schema

getRecordSchema

public java.lang.String getRecordSchema()
Description copied from interface: Present
Get currently set record schema

Specified by:
getRecordSchema in interface Present
Returns:
record schema

setRecordSyntax

public void setRecordSyntax(int[] recordSyntax)

getRecordSyntax

public int[] getRecordSyntax()

setSession

private void setSession(Session session)

getSession

protected Session getSession()

setCache

public void setCache(Cache cache)
Description copied from interface: Cache
Sets the record cache object to use

Specified by:
setCache in interface Cache
Parameters:
cache - The concrete class implementing the org.jafer.record.Cache interface

getCache

public Cache getCache()
Description copied from interface: Cache
Returns the current record cache object being used

Specified by:
getCache in interface Cache
Returns:
The concrete class implementing the org.jafer.record.Cache interface

getAvailableSlots

public int getAvailableSlots()
Returns the number of available slots currently in the cache

Specified by:
getAvailableSlots in interface Cache
Returns:
The number of currently availiable slots

setTimeout

public void setTimeout(int timeout)
Sets the timeout attribute of the ZClient object

Specified by:
setTimeout in interface Connection
Parameters:
timeout - The new timeout value

getTimeout

public int getTimeout()
Gets the timeout attribute of the ZClient object

Specified by:
getTimeout in interface Connection
Returns:
The timeout value

setAutoReconnect

public void setAutoReconnect(int autoReconnect)
Sets the autoReconnect attribute of the ZClient object

Specified by:
setAutoReconnect in interface Connection
Parameters:
autoReconnect - number of times to attempt reconnection

getAutoReconnect

public int getAutoReconnect()
Gets the autoReconnect attribute of the ZClient object

Specified by:
getAutoReconnect in interface Connection
Returns:
The autoReconnect value

setAttempts

private void setAttempts(int attempts)
Sets the reTry attribute of the ZClient object


getAttempts

private int getAttempts()
Gets the attempts attribute of the ZClient object

Returns:
The attempts value

allowReconnect

protected boolean allowReconnect()
returns true if ZClient should attempt reconnect

Returns:
true if getAttempts() <= getAutoReconnect()

setNumberOfRequestRecords

protected void setNumberOfRequestRecords(int numberOfRequestRecords)
Sets the numberOfRequestRecords attribute of the ZClient object

Parameters:
numberOfRequestRecords - The new numberOfRequestRecords value

getNumberOfRequestRecords

protected int getNumberOfRequestRecords()
Gets the numberOfRequestRecords attribute of the ZClient object

Returns:
The numberOfRequestRecords value

setStartRecordNumber

protected void setStartRecordNumber(int nRecord)
sets startRecordNumber for Present

Parameters:
nRecord - The value of setRecordCursor

getStartRecordNumber

protected int getStartRecordNumber()
Gets setStartRecordNumber record number for Present

Returns:
startRecordNumber the startRecordNumber value

getCurrentRecord

public Field getCurrentRecord()
                       throws JaferException
Gets the CurrentRecord attribute of the ZClient object

Specified by:
getCurrentRecord in interface Present
Returns:
The CurrentRecord value
Throws:
JaferException - Description of Exception

getCurrentDataObject

public DataObject getCurrentDataObject()
                                throws JaferException
Gets the CurrentDataObject attribute of the ZClient object

Returns:
The CurrentDataObject value
Throws:
JaferException - Description of Exception

getCurrentDatabase

public java.lang.String getCurrentDatabase()
                                    throws JaferException
Gets the CurrentDataBase attribute of the ZClient object

Specified by:
getCurrentDatabase in interface Present
Returns:
The CurrentDataBase value
Throws:
JaferException - Description of Exception

getCurrentRecordSyntax

public java.lang.String getCurrentRecordSyntax()
                                        throws JaferException
Gets the CurrentRecordSyntax attribute of the ZClient object

Returns:
The CurrentRecordSyntax value
Throws:
JaferException - Description of Exception

getCurrentRecordSyntaxName

public java.lang.String getCurrentRecordSyntaxName()
                                            throws JaferException
Gets the CurrentRecordSyntaxName value of the ZClient object

Returns:
The CurrentRecordSyntaxName value
Throws:
JaferException - Description of Exception

setHost

public void setHost(java.lang.String host)
Sets the Host attribute of the ZClient object

Specified by:
setHost in interface Z3950Connection
Parameters:
host - The new Host value

setPort

public void setPort(int port)
Sets the Port attribute of the ZClient object

Specified by:
setPort in interface Z3950Connection
Parameters:
port - The new Port value

setResultSetName

public void setResultSetName(java.lang.String resultSetName)
Sets the resultSetName attribute of the ZClient object

Specified by:
setResultSetName in interface Search
Parameters:
resultSetName - The new resultSetName value

setDatabases

public void setDatabases(java.lang.String[] databases)
Description copied from interface: Search
Set databases to search

Specified by:
setDatabases in interface Search
Parameters:
databases - databases

setDatabases

public void setDatabases(java.lang.String database)
Sets the Databases attribute of the ZClient object

Specified by:
setDatabases in interface Search
Parameters:
database - The new Databases value

setUsername

public void setUsername(java.lang.String username)
Sets the username attribute of the ZClient object

Specified by:
setUsername in interface Authentication
Parameters:
username - The new username value

setPassword

public void setPassword(java.lang.String password)
Sets the password attribute of the ZClient object

Specified by:
setPassword in interface Authentication
Parameters:
password - The new password value

setCheckRecordFormat

public void setCheckRecordFormat(boolean checkRecordFormat)
Sets the checkRecordFormat attribute of the ZClient object

Specified by:
setCheckRecordFormat in interface Present
Parameters:
checkRecordFormat - The new checkRecordFormat value

isCheckRecordFormat

public boolean isCheckRecordFormat()
Gets the checkRecordFormat attribute of the ZClient object

Specified by:
isCheckRecordFormat in interface Present
Returns:
checkRecordFormat The checkRecordFormat value

setElementSpec

public void setElementSpec(java.lang.String elementSpec)
Sets the ElementSpec attribute of the ZClient object

Specified by:
setElementSpec in interface Present
Parameters:
elementSpec - The new ElementSpec value

setDataCacheSize

public void setDataCacheSize(int dataCacheSize)
Sets the DataCacheSize attribute of the ZClient object

Specified by:
setDataCacheSize in interface Cache
Parameters:
dataCacheSize - The new DataCacheSize value

setFetchSize

public void setFetchSize(int fetchSize)
Sets the fetchSize attribute of the ZClient object

Specified by:
setFetchSize in interface Cache
Parameters:
fetchSize - The new fetchSize value

setFetchView

public void setFetchView(double fetchView)
Sets the FetchView attribute of the ZClient object

Specified by:
setFetchView in interface Cache
Parameters:
fetchView - The new FetchView value

setSearchResults

private int setSearchResults(SearchResult[] resultsByDB)
Sets the nResults attribute of the ZClient object

Parameters:
nResults - The new nResults value
Returns:
nResults The new nResults value

getHost

public java.lang.String getHost()
Gets the Host attribute of the ZClient object

Specified by:
getHost in interface Z3950Connection
Returns:
The Host value

getPort

public int getPort()
Gets the Port attribute of the ZClient object

Specified by:
getPort in interface Z3950Connection
Returns:
The Port value

getResultSetName

public java.lang.String getResultSetName()
Gets the resultSetName attribute of the ZClient object

Specified by:
getResultSetName in interface Search
Returns:
The resultSetName value

getDatabases

public java.lang.String[] getDatabases()
Gets the DataBases attribute of the ZClient object

Specified by:
getDatabases in interface Search
Returns:
The DataBases value

getUsername

public java.lang.String getUsername()
Gets the Username attribute of the ZClient object

Specified by:
getUsername in interface Authentication
Returns:
The Username value

getPassword

public java.lang.String getPassword()
Gets the Password attribute of the ZClient object

Specified by:
getPassword in interface Authentication
Returns:
The Password value

getGroup

public java.lang.String getGroup()
Description copied from interface: Authentication
Get the group name set for accessing the datasource

Specified by:
getGroup in interface Authentication
Returns:
Group name set

setGroup

public void setGroup(java.lang.String group)
Description copied from interface: Authentication
Set group name for accessing the data source

Specified by:
setGroup in interface Authentication
Parameters:
group - Group name to set

getElementSpec

public java.lang.String getElementSpec()
Gets the ElementSpec attribute of the ZClient object

Specified by:
getElementSpec in interface Present
Returns:
The ElementSpec value

getQuery

public java.lang.Object getQuery()
Gets the query attribute of the ZClient object

Specified by:
getQuery in interface Search
Returns:
The query value

getDataCacheSize

public int getDataCacheSize()
Gets the DataCacheSize attribute of the ZClient object

Specified by:
getDataCacheSize in interface Cache
Returns:
The DataCacheSize value

getFetchSize

public int getFetchSize()
Gets the fetchSize attribute of the ZClient object

Specified by:
getFetchSize in interface Cache
Returns:
The fetchSize value

getFetchView

public double getFetchView()
Gets the FetchView attribute of the ZClient object

Specified by:
getFetchView in interface Cache
Returns:
The FetchView value

getNumberOfResults

public int getNumberOfResults()
Gets the NumberOfResults attribute of the ZClient object

Specified by:
getNumberOfResults in interface Search
Returns:
The NumberOfResults value

getNumberOfResults

public int getNumberOfResults(java.lang.String databaseName)
Gets the NumberOfResults attribute of the ZClient object

Specified by:
getNumberOfResults in interface Search
Returns:
The NumberOfResults value

setNumberOfResults

protected void setNumberOfResults(java.lang.String databaseName,
                                  int numberOfResults)

getRecordCursorAsInteger

protected java.lang.Integer getRecordCursorAsInteger()
Gets the RecordCursor attribute of the ZClient object

Returns:
The RecordCursor value as Integer

saveQuery

public void saveQuery(java.lang.String file)
               throws JaferException
Description of the Method

Specified by:
saveQuery in interface Search
Parameters:
file - Description of Parameter
Throws:
JaferException

getTerms

public Field[] getTerms(int noOfTerms,
                        org.w3c.dom.Node term)
Description copied from interface: Scan
Get keywords or terms

Specified by:
getTerms in interface Scan
Parameters:
noOfTerms - no of terms to retrieve
term - query to identify first term
Returns:
terms

getTerms

public Field[] getTerms(int noOfTerms,
                        int termStep,
                        int termPosition,
                        org.w3c.dom.Node term)
Description copied from interface: Scan
Get keywords or terms

Specified by:
getTerms in interface Scan
Parameters:
noOfTerms - no of terms to retrieve
termStep - value to step through terms
termPosition - position of identified term in response
term - query to identify first term
Returns:
terms

setQuery

private void setQuery(java.lang.Object query)
Sets the query attribute of the ZClient object

Parameters:
query - The new query value

setSearchException

protected void setSearchException(java.lang.String database,
                                  JaferException exception)

setSearchException

protected void setSearchException(java.lang.String[] databases,
                                  JaferException exception)

getSearchException

public JaferException getSearchException(java.lang.String database)
                                  throws JaferException
Description copied from interface: Search
If a search fails this method will return the JaferException for the specified database

Specified by:
getSearchException in interface Search
Parameters:
database - The name of the database to check
Returns:
null if no errors were found
Throws:
JaferException

getSearchException

public JaferException[] getSearchException(java.lang.String[] databases)
                                    throws JaferException
Description copied from interface: Search
If a search fails this method will return the JaferException for the specified databases

Specified by:
getSearchException in interface Search
Parameters:
databases - The databases to search
Returns:
An empty array if no errors were found
Throws:
JaferException