|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.apelon.apelonserver.client.BasicQuery
public abstract class BasicQuery
A BasicQuery provides common methods for queries. BasicQuery provides multiple connections to Remote server using setVersion(). A class which extends BasicQuery can direct a query to a specific query server by calling setVersion().
For example, To direct a query to a query server with DTS1_HEADER,//create a socke connection srvr_conn = new ServerConnectionSocket(host,port); earchServer which extends BasicQueryServer SearchServer srvr = SearchServer.createInstance(srvr_conn); call setVersion to prefix header to a query. srvr.setVersion(com.apelon.apelonserver.ApelonHeader.DTS1_HEADER);
| Field Summary | |
|---|---|
protected String |
ADMIN
|
protected String |
queryHeader
|
| Constructor Summary | |
|---|---|
protected |
BasicQuery()
|
| Method Summary | |
|---|---|
protected Document |
executeQuery(String query)
|
protected String |
executeQueryNoParse(String query)
|
protected abstract ServerConnection |
getServerConnection()
|
protected void |
initializeDtds(String newQueryDtdUri,
Class newResultDtdRes,
String newResultDtdUri,
String newResDtdFileName)
Initialize the Server's DTDs. |
protected void |
initializeDtds(String newQueryDtdUri,
Class newResultDtdRes,
String newResultDtdUri,
String newResDtdFileName,
boolean isValidingParser)
Initialize the Server's DTDs. |
String |
ping(boolean db)
Ping the server |
void |
setVersion(String qh)
setVesion sets query header which will be prepended to a query before the query is sent to the server. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String queryHeader
protected String ADMIN
| Constructor Detail |
|---|
protected BasicQuery()
| Method Detail |
|---|
public void setVersion(String qh)
qh - query header of 7 length characters
protected void initializeDtds(String newQueryDtdUri,
Class newResultDtdRes,
String newResultDtdUri,
String newResDtdFileName)
newQueryDtdUri - The DTD URI for all queries sent by this object.newResultDtdRes - The resource class used to locate the (jarred) DTD file for result
documentsnewResultDtdUri - The URI that all results parsed by this object will usenewResDtdFileName - The name of the DTD file that will be loaded using newResultDtdRes
when parsing the result document.
protected void initializeDtds(String newQueryDtdUri,
Class newResultDtdRes,
String newResultDtdUri,
String newResDtdFileName,
boolean isValidingParser)
newQueryDtdUri - The DTD URI for all queries sent by this object.newResultDtdRes - The resource class used to locate the (jarred) DTD file for result
documentsnewResultDtdUri - The URI that all results parsed by this object will usenewResDtdFileName - The name of the DTD file that will be loaded using newResultDtdRes
when parsing the result document.isValidingParser - true to turn on validation of response otherwise
false
public String ping(boolean db)
throws com.apelon.common.xml.XMLException
db - if true, return date from db
com.apelon.common.xml.XMLException
protected Document executeQuery(String query)
throws ApelonException
ApelonException
protected String executeQueryNoParse(String query)
throws ApelonException
ApelonExceptionprotected abstract ServerConnection getServerConnection()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||