|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jafer.zclient.SRWSession
public class SRWSession
This class represents a session that manages a connection against an srw server
Field Summary | |
---|---|
private gov.loc.www.zing.srw.interfaces.SRWPort |
binding
Stores a reference to the SRWPort that binds this session against a connection to the server - Currently these are SRU Binding or SRWBinding depending on the connection type supported by the server. |
protected static java.util.logging.Logger |
logger
Stores a reference to the logger |
private java.lang.String |
query
Stores a reference to the last query that was executed so that present gets the records for that query |
private static java.lang.String |
RECORD_PACKING_STRING
Stores a reference to record packing ID for string records |
private static java.lang.String |
RECORD_PACKING_XML
Stores a reference to record packing ID for xml records |
Constructor Summary | |
---|---|
SRWSession(gov.loc.www.zing.srw.interfaces.SRWPort binding)
Create the SRW session supplying the SRW or SRU binding to use |
Method Summary | |
---|---|
void |
close()
This method closes the current connection and any underlying binding classes |
java.lang.String |
getGroup()
Returns the group for this session. |
int |
getId()
Return the session Identifier |
java.lang.String |
getName()
Return the name allocatted to this session |
java.lang.String |
getPassword()
Return the password for the user connecting via this session |
java.lang.String |
getUsername()
Return the username for the user connecting via this session |
void |
init(java.lang.String group,
java.lang.String username,
java.lang.String password)
Initalise the session |
java.util.Vector |
present(int nRecord,
int nRecords,
int[] recordOID,
java.lang.String eSpec,
java.lang.String resultSetName)
Obtain the requested records via the sessions connection to the server and return them to the caller |
java.util.Vector |
scan(java.lang.String[] databases,
int nTerms,
int step,
int position,
org.w3c.dom.Node term)
Performs a scan on the sessions connection to the sever to retrieve a list of related terms |
java.util.Vector |
scan(java.lang.String[] databases,
int nTerms,
int step,
int position,
java.lang.Object termObject)
Performs a scan on the sessions connection to the sever to retrieve a list of related terms |
SearchResult[] |
search(java.lang.Object queryObject,
java.lang.String[] databases,
java.lang.String resultSetName)
Performs a search on the sessions connection to the sever to work out how many results would be returned for the search query |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.lang.String RECORD_PACKING_STRING
private static final java.lang.String RECORD_PACKING_XML
protected static java.util.logging.Logger logger
private gov.loc.www.zing.srw.interfaces.SRWPort binding
private java.lang.String query
Constructor Detail |
---|
public SRWSession(gov.loc.www.zing.srw.interfaces.SRWPort binding)
binding
- The binding that connectes this session to the serverMethod Detail |
---|
public void close()
Session
close
in interface Session
public java.lang.String getGroup()
Session
getGroup
in interface Session
public int getId()
Session
getId
in interface Session
public java.lang.String getName()
Session
getName
in interface Session
public java.lang.String getPassword()
Session
getPassword
in interface Session
public java.lang.String getUsername()
Session
getUsername
in interface Session
public void init(java.lang.String group, java.lang.String username, java.lang.String password) throws ConnectionException
Session
init
in interface Session
group
- The group name for this sessionusername
- The username of the user connecting via this sessionpassword
- The password of the user connecting via this session
ConnectionException
public SearchResult[] search(java.lang.Object queryObject, java.lang.String[] databases, java.lang.String resultSetName) throws JaferException, ConnectionException
Session
search
in interface Session
queryObject
- The query object to search against. Normally RPNNode
or a simple Node that represents a JaferQuerydatabases
- The list of databases to be searchedresultSetName
- The name to be given to the result set
JaferException
ConnectionException
public java.util.Vector present(int nRecord, int nRecords, int[] recordOID, java.lang.String eSpec, java.lang.String resultSetName) throws PresentException, ConnectionException
Session
present
in interface Session
nRecord
- The index of the record that the retrieve should start atnRecords
- The maximum number of records that should be returnedrecordOID
- The record object identifiereSpec
- The element spec attribute of the ZClientresultSetName
- The result set name
PresentException
ConnectionException
public java.util.Vector scan(java.lang.String[] databases, int nTerms, int step, int position, org.w3c.dom.Node term) throws JaferException, ConnectionException
Session
scan
in interface Session
databases
- An array of database names that are being scannednTerms
- The maximum number of terms to returnstep
- ?????????????????????????????????????????????????????????position
- ?????????????????????????????????????????????????????term
- ?????????????????????????????????????????????????????????
JaferException
ConnectionException
public java.util.Vector scan(java.lang.String[] databases, int nTerms, int step, int position, java.lang.Object termObject) throws JaferException, ConnectionException
Session
scan
in interface Session
databases
- An array of database names that are being scannednTerms
- The maximum number of terms to returnstep
- ?????????????????????????????????????????????????????????position
- ?????????????????????????????????????????????????????termObject
- ???????????????????????????????????????????????????
JaferException
ConnectionException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |