|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.raritantechnologies.searchApp.SearchSource
com.raritantechnologies.HTML.HTTPRestSearchSource
SearchSource that accesses an HTTP REST API (XML over HTTP). Enables RTI Framework to do "Mashups".
Converts an OrderedMap query (and or information from the User ILoginInfo) into an HTTP request and transforms the returned XML to a Result or ResultSet. XML Configuration Template:
<SourceType name="[ source name ]" type="HTTPRestSearchSource"
sourceFactoryClass="com.raritantechnologies.HTML.HTTPRestSearchSourceFactory"
queryProcessor="com.raritantechnologies.HTML.HTTPRestSearchSource" >
<SecurityModel alternateLogin="[ name of alternate login ID in user info ]"
defaultUser="[ name of default user ]"
defaultPassword="[ name of default pw ]" >
<search>[public|restricted]</search>
<fullText>[public|restricted]</fullText>
<loginName>[(optional) login name for this source]</loginName>
</SecurityModel>
<!-- Query Parser used to translate the query and/or user information to an HTTP request -->
<!-- A likely choice for this is the PatternQueryParser -->
<QueryParser class="[ class of com.raritantechnologies.searchApp.IQueryParser ]" >
</QueryParser>
<!-- IXMLResultParser used to translate the returned XML into an IResultSet -->
<XMLResultParser class="[ class of com.raritantechnologies.xml.IXMLResultParser ]" >
</XMLResultParser>
</SourceType>
| Field Summary |
| Fields inherited from class com.raritantechnologies.searchApp.SearchSource |
ID_FIELD, IS_FEDERATED, NUMBER_OF_FIELDS, SECURE, SOURCE_NAME, SOURCE_TYPE, TITLE_FIELD, URL_FIELD |
| Constructor Summary | |
HTTPRestSearchSource()
|
|
| Method Summary | |
IResultSet |
executeQuery(java.lang.Integer queryID,
ISearchFieldMap searchMap,
SourceLoginInfo[] sources,
OrderedMap inputParameters,
java.lang.Integer pageSize,
java.lang.Integer startRec)
Executes a Query. |
protected OrderedMap |
getCookies(ILoginInfo fromUser)
|
java.lang.Object |
getProperty(java.lang.String property)
returns a Source Property. |
IQueryProcessor |
getQueryProcessor()
returns the type of QueryProcessor that can access this SearchSource. |
java.lang.String[] |
getSourcePropertyNames()
Returns a list of Source type specific property names. |
void |
reset()
|
void |
setAlternateLogin(java.lang.String alternateLogin)
|
void |
setDefaultPassword(java.lang.String defaultPassword)
|
void |
setDefaultUser(java.lang.String defaultUser)
|
void |
setQueryParser(IQueryParser queryParser)
|
void |
setXMLResultParser(IXMLResultParser xmlResultParser)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public HTTPRestSearchSource()
| Method Detail |
public IQueryProcessor getQueryProcessor()
SearchSource
getQueryProcessor in class SearchSource
public IResultSet executeQuery(java.lang.Integer queryID,
ISearchFieldMap searchMap,
SourceLoginInfo[] sources,
OrderedMap inputParameters,
java.lang.Integer pageSize,
java.lang.Integer startRec)
throws QueryProcessorException
IQueryProcessor
executeQuery in interface IQueryProcessorqueryID - Unique ID for this query. Used by front end to manage queries and
query pages. QueryProcessor may use this parameter to organize its search results, and
to organize any state information it needs to process future page requests
(future executeQuery( ) calls with the same queryID.searchMap - Provides mapping information needed to translate the inputParameters
into a search string appropriate for this type of QueryProcessor.
Mapping information is obtained by the application framework from
local configuration data.sources - The LoginInfo and SearchSource(s) to be used for this query. The SearchSource(s)
must be of the appropriate type for the QueryProcessor.inputParameters - Form inputs. Use ISearchFieldMap to translate these into
implementation and source-specific fields.pageSize - Integer specifying the number of results to include in the returned
Document.
if null - use the default page size.startRec - Integer specifying the starting record in the result set to be returned.
if null - start with the first record.
QueryProcessorExceptionprotected OrderedMap getCookies(ILoginInfo fromUser)
public void reset()
public java.lang.String[] getSourcePropertyNames()
SearchSource
getSourcePropertyNames in class SearchSourcepublic java.lang.Object getProperty(java.lang.String property)
SearchSource
getProperty in class SearchSourcepublic void setXMLResultParser(IXMLResultParser xmlResultParser)
public void setQueryParser(IQueryParser queryParser)
public void setAlternateLogin(java.lang.String alternateLogin)
public void setDefaultUser(java.lang.String defaultUser)
public void setDefaultPassword(java.lang.String defaultPassword)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||