|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.raritantechnologies.searchApp.formatters.LookupFormatter
Formats an IResult
by looking up data from another SearchSource
based on values of the result fields.
<Formatter
formatterClass="com.raritantechnologies.searchApp.formatters.LookupFormatter"
searchSource="[search source name of lookup]"
use="[ FIRST(default) | ALL - determines how many of the lookup results should be used ]"
nestedResultField="field to use to hold entire lookup result(s) if any" >
<!-- Parameters to extract from the result to create a query to search with -->
<LookupParams>
<Param resultID="[ a field in the input result ]" searchID="[ name of param in source ]" >
<!-- Optional String Filter to modify the result value before using in search query -->
<StringFilter class="[ class of com.raritantechnologies.utils.filter.IStringFilter ]" >
</StringFilter>
</Param>
</LookupParams>
<!-- Parameters from the lookup result to add to the source IResult -->
<ResultParams>
<Param ID="[ a lookup result field to be added to result ]"
append="[ true|false(default) ]"
delimiter="[ delimiter for appending ]" >
<!-- Optional String Filter to modify the lookup result value -->
<StringFilter class="[ class of com.raritantechnologies.utils.filter.IStringFilter ]" >
</StringFilter>
</Param>
</ResultParams>
</Formatter>
| Field Summary |
| Fields inherited from interface com.raritantechnologies.searchApp.IFieldFormatter |
TEMPLATE |
| Constructor Summary | |
LookupFormatter()
|
|
| Method Summary | |
java.lang.String |
formatField(java.lang.String fieldVal)
Reformats a field value. |
java.lang.String |
formatField(java.lang.String sessionID,
java.lang.String fieldVal)
Reformats a field value. |
void |
formatResultField(IResult res)
Formats a result field "in place". |
void |
formatResultField(java.lang.String sessionID,
IResult res)
Formats a result field "in place", incorporating session context. |
java.util.List |
getAttributes()
|
java.lang.String |
getConfigurationXML()
|
java.lang.String |
getConfigurationXML(java.lang.String configurationTemplate)
|
java.lang.String |
getFieldName()
Returns the name of the result field that this formatter can reformat. |
void |
initialize(org.w3c.dom.Element elem)
Initializes the formatter from configuration XML element. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public LookupFormatter()
| Method Detail |
public void formatResultField(IResult res)
IFieldFormatter
formatResultField in interface IFieldFormatterres - The result object that is to be formatted.
public void formatResultField(java.lang.String sessionID,
IResult res)
IFieldFormatter
formatResultField in interface IFieldFormattersessionID - The session key needed to lookup any session content stored
in the session data cache.res - The result object that is to be formatted.public java.lang.String getFieldName()
IFieldFormatter
getFieldName in interface IFieldFormatterpublic java.lang.String formatField(java.lang.String fieldVal)
IFieldFormatter
formatField in interface IFieldFormatterfieldVal - The field value to be reformatted.
public java.lang.String formatField(java.lang.String sessionID,
java.lang.String fieldVal)
IFieldFormatter
formatField in interface IFieldFormattersessionID - The session key needed to lookup any session content stored
in the session data cache.fieldVal - The field value to be reformatted.
public void initialize(org.w3c.dom.Element elem)
IFieldFormatter
initialize in interface IFieldFormatterpublic java.lang.String getConfigurationXML()
getConfigurationXML in interface IFieldFormatterpublic java.lang.String getConfigurationXML(java.lang.String configurationTemplate)
getConfigurationXML in interface IFieldFormatterpublic java.util.List getAttributes()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||