|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--org.jafer.interfaces.Databean
|
+--org.jafer.zclient.ZClient
| Field Summary | |
private int |
attempts
|
static int |
AUTO_RECONNECT
int AUTO_RECONNECT |
private int |
autoReconnect
|
private Cache |
cache
Cache cache |
private boolean |
checkRecordFormat
|
private java.lang.String[] |
dataBases
String[] dataBases |
private int |
dataCacheSize
|
private boolean |
debug
|
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 java.lang.String |
DEFAULT_RESULTSET_NAME
String DEFAULT_DATABASE_NAME |
static java.lang.String |
DEFAULT_SEARCH_PROFILE
String DEFAULT_ELEMENT_SPEC |
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
|
private 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 QueryBuilder |
queryBuilder
QueryBuilder queryBuilder |
private org.w3c.dom.Document |
queryDocument
Document queryDocument |
private java.lang.Integer |
recordCursor
|
private RecordFactory |
recordFactory
RecordFactory recordFactory |
private java.lang.String |
recordSchema
|
private java.lang.String |
recordSyntax
|
private java.lang.String |
remoteAddress
|
private java.lang.String |
resultSetName
|
private java.lang.String |
searchProfile
|
private Session |
session
Session session |
private int |
startRecordNumber
|
private int |
timeout
|
static int |
TIMEOUT
int TIMEOUT |
private java.lang.String |
userIP
|
private java.lang.String |
username
|
| Constructor Summary | |
ZClient()
Empty Constructor for the ZClient object |
|
| Method Summary | |
private boolean |
allowReconnect()
returns true if ZClient should attempt reconnect |
void |
close()
close |
private void |
connect()
Description of the Method |
protected void |
finalize()
|
private int |
getAttempts()
Gets the attempts attribute of the ZClient object |
int |
getAutoReconnect()
Gets the autoReconnect attribute of the ZClient object |
private Cache |
getCache()
|
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 |
private int |
getNumberOfRequestRecords()
Gets the numberOfRequestRecords attribute of the ZClient object |
int |
getNumberOfResults()
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 |
org.w3c.dom.Node |
getQuery()
Gets the query attribute of the ZClient object |
private QueryBuilder |
getQueryBuilder()
Description of the Method |
private org.w3c.dom.Document |
getQueryDocument()
|
int |
getRecordCursor()
Gets the RecordCursor attribute of the ZClient object |
private java.lang.Integer |
getRecordCursorAsInteger()
Gets the RecordCursor attribute of the ZClient object |
private RecordFactory |
getRecordFactory()
|
java.lang.String |
getRecordSchema()
Get currently set record schema |
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 |
java.lang.String |
getSearchProfile()
Gets SearchProfile attribute of the ZClient object |
private Session |
getSession()
|
private 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 |
private void |
handleError(java.lang.String message)
|
private 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 |
QueryBuilder |
newQueryBuilder()
Description of the Method |
private void |
reConnect()
Description of the Method |
void |
saveQuery(java.lang.String file)
Description of the Method |
private 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 |
private void |
setCache(Cache cache)
|
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)
Sets the Databases attribute of the ZClient object |
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 |
private void |
setNumberOfRequestRecords(int numberOfRequestRecords)
Sets the numberOfRequestRecords attribute of the ZClient object |
private int |
setNumberOfResults(int nResults)
Sets the nResults attribute of the ZClient object |
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(org.w3c.dom.Node query)
Sets the query attribute of the ZClient object |
private QueryBuilder |
setQueryBuilder(QueryBuilder queryBuilder)
Description of the Method |
private void |
setQueryDocument(org.w3c.dom.Document queryDocument)
|
void |
setRecordCursor(int nRecord)
Sets the RecordCursor attribute of the ZClient object |
private void |
setRecordFactory(RecordFactory recordFactory)
|
void |
setRecordSchema(java.lang.String recordSchema)
Set current prefered record schema |
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 |
void |
setSearchProfile(java.lang.String searchProfile)
Sets the SearchProfile attribute of the ZClient object |
private void |
setSession(Session session)
|
private 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(org.w3c.dom.Node query)
Description of the Method |
| Methods inherited from class org.jafer.interfaces.Databean |
|
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String DEFAULT_DATABASE_NAME
public static final java.lang.String DEFAULT_RESULTSET_NAME
public static final java.lang.String DEFAULT_SEARCH_PROFILE
public static final java.lang.String DEFAULT_ELEMENT_SPEC
public static final int DEFAULT_FETCH_SIZE
public static final double DEFAULT_FETCH_VIEW
public static final int DEFAULT_DATACACHE_SIZE
public static final int MAX_DATACACHE_SIZE
public static final int TIMEOUT
public static final int AUTO_RECONNECT
public static final java.lang.String DEFAULT_RECORD_SCHEMA
private int fetchSize
private int dataCacheSize
private int autoReconnect
private int timeout
private int attempts
private int numberOfRequestRecords
private int startRecordNumber
private int nResults
private int port
private double fetchView
private boolean debug
private boolean checkRecordFormat
private boolean parseQuery
private java.lang.Integer recordCursor
private java.lang.String elementSpec
private java.lang.String userIP
private java.lang.String remoteAddress
private java.lang.String resultSetName
private java.lang.String recordSchema
private java.lang.String recordSyntax
private java.lang.String searchProfile
private java.lang.String host
private java.lang.String username
private java.lang.String password
private java.lang.String group
private java.lang.String[] dataBases
private Session session
private Cache cache
private RecordFactory recordFactory
private QueryBuilder queryBuilder
private org.w3c.dom.Document document
private org.w3c.dom.Document queryDocument
private static java.util.logging.Logger logger
| Constructor Detail |
public ZClient()
| Method Detail |
private void setDefaults()
JaferException - Description of Exception
public int submitQuery(org.w3c.dom.Node query)
throws JaferException
submitQuery in interface Searchquery - Description of Parameter
JaferException
private void connect()
throws JaferException
JaferException - Description of Exception
private void reConnect()
throws JaferException
JaferException - Description of Exception
private int search()
throws JaferException
JaferException - -
public void setRecordCursor(int nRecord)
throws JaferException
setRecordCursor in interface PresentnRecord - The new RecordCursor value
JaferException - Description of Exceptionprivate void handleError(java.lang.String message)
private void handleError(java.lang.String message,
JaferException e)
throws JaferException
JaferExceptionpublic int getRecordCursor()
getRecordCursor in interface Presentpublic void setDocument(org.w3c.dom.Document document)
public org.w3c.dom.Document getDocument()
private java.lang.String getDatabaseNames()
protected void finalize()
throws JaferException
finalize in class java.lang.ObjectJaferException
public void close()
throws JaferException
close in interface ConnectionJaferExceptionpublic void setRemoteAddress(java.lang.String remoteAddress)
setRemoteAddress in interface LoggingremoteAddress - The new remoteAddress valuepublic java.lang.String getRemoteAddress()
getRemoteAddress in interface Loggingpublic void setParseQuery(boolean parseQuery)
setParseQuery in interface SearchparseQuery - The new parseQuery valuepublic boolean isParseQuery()
isParseQuery in interface Searchpublic void setRecordSchema(java.lang.String recordSchema)
Present
setRecordSchema in interface PresentrecordSchema - record schemapublic java.lang.String getRecordSchema()
Present
getRecordSchema in interface Presentprivate void setRecordFactory(RecordFactory recordFactory)
private RecordFactory getRecordFactory()
private void setSession(Session session)
private Session getSession()
private void setCache(Cache cache)
private Cache getCache()
private void setQueryDocument(org.w3c.dom.Document queryDocument)
private org.w3c.dom.Document getQueryDocument()
public void setTimeout(int timeout)
setTimeout in interface Connectiontimeout - The new timeout valuepublic int getTimeout()
getTimeout in interface Connectionpublic void setAutoReconnect(int autoReconnect)
setAutoReconnect in interface ConnectionautoReconnect - number of times to attempt reconnectionpublic int getAutoReconnect()
getAutoReconnect in interface Connectionprivate void setAttempts(int attempts)
private int getAttempts()
private boolean allowReconnect()
private void setNumberOfRequestRecords(int numberOfRequestRecords)
numberOfRequestRecords - The new numberOfRequestRecords valueprivate int getNumberOfRequestRecords()
private void setStartRecordNumber(int nRecord)
nRecord - The value of setRecordCursorprivate int getStartRecordNumber()
public Field getCurrentRecord()
throws JaferException
getCurrentRecord in interface PresentJaferException - Description of Exception
public DataObject getCurrentDataObject()
throws JaferException
JaferException - Description of Exception
public java.lang.String getCurrentDatabase()
throws JaferException
getCurrentDatabase in interface PresentJaferException - Description of Exception
public java.lang.String getCurrentRecordSyntax()
throws JaferException
JaferException - Description of Exception
public java.lang.String getCurrentRecordSyntaxName()
throws JaferException
JaferException - Description of Exceptionpublic void setHost(java.lang.String host)
setHost in interface Z3950Connectionhost - The new Host valuepublic void setPort(int port)
setPort in interface Z3950Connectionport - The new Port valuepublic void setResultSetName(java.lang.String resultSetName)
setResultSetName in interface SearchresultSetName - The new resultSetName valuepublic void setDatabases(java.lang.String[] databases)
setDatabases in interface Searchdatabases - The new Databases valuepublic void setDatabases(java.lang.String database)
setDatabases in interface Searchdatabase - The new Databases valuepublic void setUsername(java.lang.String username)
setUsername in interface Authenticationusername - The new username valuepublic void setPassword(java.lang.String password)
setPassword in interface Authenticationpassword - The new password valuepublic void setSearchProfile(java.lang.String searchProfile)
setSearchProfile in interface SearchsearchProfile - The new searchProfile valuepublic void setCheckRecordFormat(boolean checkRecordFormat)
setCheckRecordFormat in interface PresentcheckRecordFormat - The new checkRecordFormat valuepublic boolean isCheckRecordFormat()
isCheckRecordFormat in interface Presentpublic void setElementSpec(java.lang.String elementSpec)
setElementSpec in interface PresentelementSpec - The new ElementSpec valuepublic void setDataCacheSize(int dataCacheSize)
setDataCacheSize in interface CachedataCacheSize - The new DataCacheSize valuepublic void setFetchSize(int fetchSize)
setFetchSize in interface CachefetchSize - The new fetchSize valuepublic void setFetchView(double fetchView)
setFetchView in interface CachefetchView - The new FetchView valueprivate int setNumberOfResults(int nResults)
nResults - The new nResults value
public java.lang.String getHost()
getHost in interface Z3950Connectionpublic int getPort()
getPort in interface Z3950Connectionpublic java.lang.String getResultSetName()
getResultSetName in interface Searchpublic java.lang.String[] getDatabases()
getDatabases in interface Searchpublic java.lang.String getUsername()
getUsername in interface Authenticationpublic java.lang.String getPassword()
getPassword in interface Authenticationpublic java.lang.String getGroup()
Authentication
getGroup in interface Authenticationpublic void setGroup(java.lang.String group)
Authentication
setGroup in interface Authenticationgroup - Group name to setpublic java.lang.String getSearchProfile()
getSearchProfile in interface Searchpublic java.lang.String getElementSpec()
getElementSpec in interface Presentpublic org.w3c.dom.Node getQuery()
getQuery in interface Searchpublic int getDataCacheSize()
getDataCacheSize in interface Cachepublic int getFetchSize()
getFetchSize in interface Cachepublic double getFetchView()
getFetchView in interface Cachepublic int getNumberOfResults()
getNumberOfResults in interface Searchprivate java.lang.Integer getRecordCursorAsInteger()
public QueryBuilder newQueryBuilder()
newQueryBuilder in interface Queriableprivate QueryBuilder setQueryBuilder(QueryBuilder queryBuilder)
private QueryBuilder getQueryBuilder()
public void saveQuery(java.lang.String file)
throws JaferException
saveQuery in interface Searchfile - Description of Parameter
JaferException
public Field[] getTerms(int noOfTerms,
org.w3c.dom.Node term)
Scan
getTerms in interface ScannoOfTerms - no of terms to retrieveterm - query to identify first term
public Field[] getTerms(int noOfTerms,
int termStep,
int termPosition,
org.w3c.dom.Node term)
Scan
getTerms in interface ScannoOfTerms - no of terms to retrievetermStep - value to step through termstermPosition - position of identified term in responseterm - query to identify first term
private void setQuery(org.w3c.dom.Node query)
query - The new query value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||