|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.raritantechnologies.xml.XMLResultFormatter
Implementation of IFieldFormatter that uses the
ProgrammableSAXFilter to
extract tags from an IResult field containing XML, and
sets fields on the IResult from tag names, and/or tag text of contained XML tags.
Typically used with the FieldCollectorHandler.
<FieldFormatter class="com.raritantechnologies.xml.XMLResultFormatter"
xmlField="[ the name of the field containing XML to extract from]" >
<FieldCollector handlerClass="[ class of com.raritantechnologies.xml.IHandler ]"
nestedResultField="[ optional name of nested result to put handler data ]" >
</FieldCollector>
</FieldFormatter>
| Field Summary |
| Fields inherited from interface com.raritantechnologies.searchApp.IFieldFormatter |
TEMPLATE |
| Constructor Summary | |
XMLResultFormatter()
|
|
| 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 |
formatResult(IResult res,
java.lang.String xmlString)
|
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.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)
Perform housekeeping and setup required for formatting results. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public XMLResultFormatter()
| 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 void formatResult(IResult res,
java.lang.String xmlString)
res - xmlString - 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)
initialize in interface IFieldFormatterIConfigurable.initialize(org.w3c.dom.Element)public 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 | |||||||||