com.raritantechnologies.concept.classifier
Class ClassifierWebService
java.lang.Object
com.raritantechnologies.webServices.WebServiceMapper
com.raritantechnologies.concept.classifier.ClassifierWebService
- All Implemented Interfaces:
- IConfigurable
- public class ClassifierWebService
- extends WebServiceMapper
Provides a Document Classification SOAP Web Service. Can also be used with any IFieldFormatter as a result
formatting web service. The SOAP request format is flexible. It is assumed that the SOAP request can be
broken into individual 'Result' elements and these can be further subdivided into 'Field=Value' attributes.
The mapping of the SOAP Request to Results and Result attributes is done using XPath mappings in the
XML Configuration.
Example Web Services Request Format:
<ClassifyResult>
<ResultSet>
<Result>
</Result>
</ResultSet>
</ClassifyResult>
The SOAP response is determined by the OutputMapper used.
XML Configuration Template:
<WebServiceMap methodName="ClassifyResult"
mapperClass="com.raritantechnologies.concept.classifier.ClassifierWebService"
resultPath="[ path within SOAP body to the Result elements ]"
classifierFullTextField="[ name of result field to use for classifier full text input ]"
nestedResultField="[ name of nested result field for classification results ]" >
<ResultFields>
<Field xPath="[ xpath in SOAP request ]" fieldID="[ field ID in input result to classifier ]" />
</ResultFields>
<!-- Result formatter that should be applied to input results before submitting to classifier (optional) -->
<Formatter class="[ class of com.raritantechnologies.searchApp.IFieldFormatter ]" >
</Formatter>
<!-- OR may be the classifier itself (if the classifier is an implementation of IFieldFormatter) -->
<Classifier class="[ class of com.raritantechnologies.searchApp.IFieldFormatter ]" >
</Classifier>
<!-- Explicitly specify a Raritan com.raritantechnologies.concept.classifier.DocumentClassifier -->
<DocumentClassifier name="[ name of this classifier ]"
nestedResultField="[ name of field to put nested classification results ]" >
<IndexedFields>
<!-- Unfiltered field: -->
<Field ID="[ ID of result field to be indexed ]" />
<Field ID="[ ID of result field to be indexed ]" >
<StringFilter class="[ class of com.raritantechnologies.utils.filter.IStringFilter ]" >
</StringFilter>
</Field>
</IndexedFields>
<!-- Use a QueryMatcher Parser source -->
<QueryMatcherParser searchSource="[ name of search source to obtain query list ]"
queryField="[ name of field that contains query to parse ]"
nameField="[ name of result field that contains matcher name ]" >
<MatcherParser class="[ class of com.raritantechnologies.concept.classifier.IMatcherParser" >
</MatcherParser>
<InputQuery>
<Field ID=" query field " value=" query value " />
</InputQuery>
<ResultMap>
<Field ID=" result field ID " attributeName=" name of IDocumentMatcher attribute " />
</ResultMap
</QueryMatcherParser>
<!-- Alternatively, can use a IDocumentMatcherFactory -->
<DocumentMatcherFactory class="[ class of com.raritantechnologies.concept.classifier.IDocumentMatcherFactory" >
</DocumentMatcherFactory>
</DocumentClassifier>
<!-- Web Service Output Mapper -->
<OutputMapper outputMapperClass="[ implementation of com.raritantechnologies.webServices.IWebServiceOutputMapper ]" >
</OutputMapper>
</WebServiceMap>
Developed by
Raritan Technologies Inc..
- Author:
- Ted Sullivan
|
Method Summary |
void |
executeService(MessageContext msgContext)
|
void |
executeService(SOAPEnvelope req,
SOAPEnvelope resp)
|
void |
initialize(org.w3c.dom.Element webServiceElem)
Initializes the object from an XML tag or element. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ClassifierWebService
public ClassifierWebService()
executeService
public void executeService(MessageContext msgContext)
throws AxisFault
- Overrides:
executeService in class WebServiceMapper
- Throws:
AxisFault
executeService
public void executeService(SOAPEnvelope req,
SOAPEnvelope resp)
- Specified by:
executeService in class WebServiceMapper
initialize
public void initialize(org.w3c.dom.Element webServiceElem)
- Description copied from interface:
IConfigurable
- Initializes the object from an XML tag or element.
This method is called by the Framework as part of the application initializtion.
see ConfigurationManager, XMLConfigurationManager, XMLSearchFieldMapFactory, XMLSearchSourceFactory.
Configurable objects that are owned or contained by other configurable objects will be initialized
in by the parent object.
- Specified by:
initialize in interface IConfigurable- Specified by:
initialize in class WebServiceMapper