|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.raritantechnologies.searchApp.formatters.ContentHandlerFormatter
FieldFormatter that uses an IContentHandler to add a content field.
XML Configuration Template:
<FieldFormatter class="com.raritantechnologies.searchApp.formatters.ContentHandlerFormatter"
outputID="[ field that gets the content (default - contents)]"
sizeOutputID="[ field that gets the content size (default contentSize) ]"
setContentSize="[ true|false(default) - if true gets content size]"
isBinary="[ true|false(default) - if true Base64 encode the content ]" >
<LoginProcess>
<UserName>[ user name ]</UserName>
<!-- Password can be in the clear or encrypted: -->
<Password>[ clear text password ]</Password>
<PasswordEnc>[ encrypted password ]</PasswordEnc>
</LoginProcess>
<!-- Optional IResult field to DocumentContentHandler parameter map -->
<ResultParameterMap>
<!-- One or more Param tags: -->
<Param resultField="[ result field ID ]" handlerParam="[ DocumentContentHandler parameter ]" >
</ResultParameterMap>
<!-- Map of result field value to IStreamFilter type: Used to extract Text from a binary stream -->
<StreamFilterMap streamFilterField="[ result field that contains information needed to select an IStreamFilter ]" >
<!-- Optional StringFilter to modify or parse the result value for subsequent StreamFilter selection -->
<!-- may be needed to extract a file extension from a file name (for example) -->
<StringFilter class="[ class of com.raritantechnologies.utils.filter.IStringFilter ]" >
</StringFilter>
<!-- One or More StreamFilter tags to handle different types of binary content -->
<StreamFilter class="[ class of com.raritantechnologies.utils.filter.IStreamFilter ]"
fieldValues="[ value(s) of result 'streamFilterField' that trigger the selection of this IStreamFilter ]" >
</StreamFilter>
</StreamFilterMap>
<ContentHandler class="[ class of com.raritantechnologies.quickstart.userInterface.IDocumentContentHandler ]"
usernameField="[ field name that gets userID value ]"
passwordField="[ field name that gets password value ]" >
</ContentHandler>
</FieldFormatter>
| Field Summary |
| Fields inherited from interface com.raritantechnologies.searchApp.IFieldFormatter |
TEMPLATE |
| Constructor Summary | |
ContentHandlerFormatter()
|
|
| 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 result)
Formats a result field "in place". |
void |
formatResultField(java.lang.String sessionID,
IResult result)
Formats a result field "in place", incorporating session context. |
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 ContentHandlerFormatter()
| Method Detail |
public void formatResultField(java.lang.String sessionID,
IResult result)
IFieldFormatter
formatResultField in interface IFieldFormattersessionID - The session key needed to lookup any session content stored
in the session data cache.result - The result object that is to be formatted.public void formatResultField(IResult result)
IFieldFormatter
formatResultField in interface IFieldFormatterresult - The result object that is to be formatted.public java.lang.String getFieldName()
IFieldFormatter
getFieldName in interface IFieldFormatter
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 java.lang.String formatField(java.lang.String fieldVal)
IFieldFormatter
formatField in interface IFieldFormatterfieldVal - The field value to be reformatted.
public void initialize(org.w3c.dom.Element elem)
initialize in interface IFieldFormatterpublic java.lang.String getConfigurationXML()
getConfigurationXML in interface IFieldFormatterpublic java.lang.String getConfigurationXML(java.lang.String configurationTemplate)
getConfigurationXML in interface IFieldFormatter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||