atg.search.routing.command.search
Class ReportDataControl

java.lang.Object
  extended by atg.search.routing.command.SearchXMLObject
      extended by atg.search.routing.command.search.ReportDataControl
All Implemented Interfaces:
java.io.Serializable

public class ReportDataControl
extends atg.search.routing.command.SearchXMLObject

Controls the generation of NLP reportings data that's passed into the search reporting events to generate NLP-related search reports.

Controls the following reports: Length Report, Number Report, Unknown Report, Null Term Report, Nulx Term Report, Finder Term Report, Custom Term Report, Type Report, Topic Report, Top N Report.

See Also:
Serialized Form

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Constructor Summary
ReportDataControl()
          Constructs a new instance with default settings, which means everything is enabled.
 
Method Summary
protected static ReportDataControl fromXmlParser(atg.search.routing.utils.SearchMessageNode rootIdx)
           
protected  void getAttributeXML(java.lang.StringBuilder sb)
           
 java.lang.String getAutocat()
          Returns the autocat number, optionally followed with a 'p' if pruning is enabled.
 java.lang.Boolean getAutospell()
          Indicates whether autospell is enabled
 java.lang.Boolean getCluster()
          Indicates whether the cluster report is enabled
 java.lang.Boolean getCustom()
          Indicates whether the custom report is enabled
 java.lang.Boolean getDebug()
          Indicatges whether debug is enabled
 java.lang.Boolean getFinder()
          Indicates whether the finder report is enabled
 java.lang.Boolean getLength()
          Returns whether the length report is enabled
 java.lang.Integer getMaxTerms()
          Returns the maximum terms
 java.lang.Integer getMinWeight()
          Returns the minimum weight
 java.lang.Boolean getNull()
          Indicates whether the Null report is enabled
 java.lang.Boolean getNulx()
          Indicates whether the nulx report is enabled
 java.lang.Boolean getNumber()
          Indicates whether the number report is enabled
 java.lang.String getRequestTag()
           
 java.lang.Boolean getTerm()
          Indicates whether the term report is enabled
 java.lang.Boolean getTopic()
          Indicates whether the topic report is enabled
 java.lang.Boolean getType()
          Indicates whether the type report is enabled
 java.lang.Boolean getUnknown()
          Indicates whether the unknown report is enabled
 boolean isEnabled()
          Indicates whether the control should be used.
 void setAutocat(java.lang.String autocat)
          Sets the autocat number, optionally followed with a 'p' if pruning is enabled.
 void setAutospell(java.lang.Boolean autospell)
          Sets whether autospell is enabled
 void setCluster(java.lang.Boolean cluster)
          One of the controls for the Top N Report.
 void setCustom(java.lang.Boolean custom)
          28.7 Custom Term Report

This report is similar to the Unknown Report except it relates to "custom" terms, i.e a term that has related terms defined in either the dictionary adaptors or the custom terminology data.

This report data is controlled by the following query XML attribute:

<query><reportdata custom="bool"> And the response contains the following data in a subelement: <reportdataResults> <CustomData context="adapterName">term</CustomData> The context attribute holds the name of the dictionary adaptor the term was found in, including the special TermTool adaptor used by default for custom terminology.

 void setDebug(java.lang.Boolean debug)
          Controls whether debug is enabled
 void setEnabled(boolean pEnabled)
          Call this to enable/disable the control.
 void setFinder(java.lang.Boolean finder)
          28.6 Finder Term Report

This report is similar to the Unknown Report except it relates to "finder" terms, i.e a complex term that has been identified (and indexed) using the language "TermFinder" patterns.

 void setLength(java.lang.Boolean length)
          28.1 Length Report

This is a simple report that sorts and counts queries by length of "content" terms (excluding punct, prepositions, and operators like 'a').

 void setMaxTerms(java.lang.Integer maxTerms)
          One of the controls for the Top N Report.
 void setMinWeight(java.lang.Integer minWeight)
          One of the controls for the Top N Report.
 void setNull(java.lang.Boolean aNull)
          28.4 Null Term Report

This report is similar to the Unknown Report except it relates to "null" terms, i.e a term and its (thesaurus) related terms that are not in the indexed content.

 void setNulx(java.lang.Boolean nulx)
          28.5 Nulx Term Report

This report is similar to the Unknown Report except it relates to "nulx" terms, i.e a term that is not in the indexed content, but its related terms are.

This report data is controlled by the following query XML attribute:
<query><reportdata nulx="bool">

And the response contains the following data in a subelement:
<reportdataResults>
<NulxData>term</NulxData>

Note that more than one nulx term may appear in a query, so more than one NulxData element maybe returned.

 void setNumber(java.lang.Boolean number)
          28.2 Number Report

This is a simple report that sorts and counts queries by each of their number terms, if any.

 void setTerm(java.lang.Boolean term)
          This is reserved for a future report - should currently be disabled.
 void setTopic(java.lang.Boolean topic)
          28.9 Topic Report

This is a simple report that sorts and counts queries by their categories, if any.

 void setType(java.lang.Boolean type)
          28.8 Type Report

This is a simple report that sorts and counts queries by their "type", i.e.

 void setUnknown(java.lang.Boolean unknown)
          28.3 Unknown Report

This is a simple report that sorts and counts queries by each of their unknown terms, if any.

 void setXml(java.lang.String pXml)
          Use this to override xml generation
 java.lang.String toXML()
          returns reportdata xml unless it has been disabled
static ReportDataControl valueOf(java.lang.String pXml)
           
 
Methods inherited from class atg.search.routing.command.SearchXMLObject
appendComplexXml, appendOptionalAttr, appendOptionalElem, appendOptionalElem, appendOptionalElem, appendOptionalValue, appendRequiredAttr, appendRequiredElem, appendRequiredElem, appendRequiredValue, getAllAttributeXML, getAllBodyXML, getBodyXML, getDefaultXmlBytes, getParentXMLObject, getXmlPath, isPrintedFirstChild, setParentXMLObject, setPrintedFirstChild, toString, toXML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Constructor Detail

ReportDataControl

public ReportDataControl()
Constructs a new instance with default settings, which means everything is enabled. The overhead is negligible.

Method Detail

getDebug

public java.lang.Boolean getDebug()
Indicatges whether debug is enabled

Returns:
whether debug is enabled

setDebug

public void setDebug(java.lang.Boolean debug)
Controls whether debug is enabled

Parameters:
debug - whether debug is enabled

getAutospell

public java.lang.Boolean getAutospell()
Indicates whether autospell is enabled

Returns:
whether autospell is enabled

setAutospell

public void setAutospell(java.lang.Boolean autospell)
Sets whether autospell is enabled

Parameters:
autospell - whether autospell is enabled

getAutocat

public java.lang.String getAutocat()
Returns the autocat number, optionally followed with a 'p' if pruning is enabled.

Returns:
the autocat number, optionally followed with a 'p' if pruning is enabled.

setAutocat

public void setAutocat(java.lang.String autocat)
Sets the autocat number, optionally followed with a 'p' if pruning is enabled.

Parameters:
autocat - the autocat number, optionally followed with a 'p' if pruning is enabled.

getMinWeight

public java.lang.Integer getMinWeight()
Returns the minimum weight

Returns:
the minimum weight

setMinWeight

public void setMinWeight(java.lang.Integer minWeight)
One of the controls for the Top N Report. See the Top N Report description in the ReportDataControl class description.

Parameters:
minWeight - The minimum term weight for a term to be included in the normalization is specified by minWeight.

getMaxTerms

public java.lang.Integer getMaxTerms()
Returns the maximum terms

Returns:
the maximum terms

setMaxTerms

public void setMaxTerms(java.lang.Integer maxTerms)
One of the controls for the Top N Report. See the Top N Report description in the ReportDataControl class description.

Parameters:
maxTerms - The maximum number of terms to include in the cluster data is specified by maxTerms.

getLength

public java.lang.Boolean getLength()
Returns whether the length report is enabled

Returns:
whether the length report is enabled

setLength

public void setLength(java.lang.Boolean length)
28.1 Length Report

This is a simple report that sorts and counts queries by length of "content" terms (excluding punct, prepositions, and operators like 'a'). Multi-token terms are counted as 1 (e.g. F-14). The search engine would simply compute the length, and the summarizer would insert into the table, as illustrated below.

How do I install -> length=3
What is your phone number -> length=4

Parameters:
length - true enables capture of the data needed to populate the data needed for this report.

getNumber

public java.lang.Boolean getNumber()
Indicates whether the number report is enabled

Returns:
whether the number report is enabled

setNumber

public void setNumber(java.lang.Boolean number)
28.2 Number Report

This is a simple report that sorts and counts queries by each of their number terms, if any. The search engine would simply determine the number terms, as illustrated below.

How do I install ->
what is error 89 -> 89
why is shipping $5 not $3 -> 5,3

Parameters:
number - true enables capture of the data needed to populate the data needed for this report.

getUnknown

public java.lang.Boolean getUnknown()
Indicates whether the unknown report is enabled

Returns:
whether the unknown report is enabled

setUnknown

public void setUnknown(java.lang.Boolean unknown)
28.3 Unknown Report

This is a simple report that sorts and counts queries by each of their unknown terms, if any. An "unknown" is a term not in the dictionary, excluding terms automatically added by language "TermFinder" patterns. The search engine would simply determine the unknown terms, as illustrated below.

what is fxp -> fxp
I hate ths stpid site -> ths, stpid

Parameters:
unknown - true enables capture of the data needed to populate the data needed for this report.

getType

public java.lang.Boolean getType()
Indicates whether the type report is enabled

Returns:
whether the type report is enabled

setType

public void setType(java.lang.Boolean type)
28.8 Type Report

This is a simple report that sorts and counts queries by their "type", i.e. the style of input, such as a 'how' question. The search engine would simply determine the type of the query, as illustrated below. The types are defined in the language

what is support -> Definitional
how do I install -> How-do-I

Parameters:
type - true enables capture of the data needed to populate the data needed for this report.

getTopic

public java.lang.Boolean getTopic()
Indicates whether the topic report is enabled

Returns:
whether the topic report is enabled

setTopic

public void setTopic(java.lang.Boolean topic)
28.9 Topic Report

This is a simple report that sorts and counts queries by their categories, if any. The categories are determined by the topic taxonomy, used for categorizing documents as well. The search engine would simply determine the categories of the query, as illustrated below.

install error -> /Topics/Installation, /Topics/Errors
price gouging -> /Topics/Cost

Parameters:
topic - true enables capture of the data needed to populate the data needed for this report.

getCluster

public java.lang.Boolean getCluster()
Indicates whether the cluster report is enabled

Returns:
whether the cluster report is enabled

setCluster

public void setCluster(java.lang.Boolean cluster)
One of the controls for the Top N Report. See the Top N Report description in the ReportDataControl class description.

Parameters:
cluster - true use clustering in the Top N Report

getTerm

public java.lang.Boolean getTerm()
Indicates whether the term report is enabled

Returns:
whether the term report is enabled

setTerm

public void setTerm(java.lang.Boolean term)
This is reserved for a future report - should currently be disabled.

Parameters:
term - true enables capture of the data needed to populate the data needed for this report.

getCustom

public java.lang.Boolean getCustom()
Indicates whether the custom report is enabled

Returns:
whether the custom report is enabled

setCustom

public void setCustom(java.lang.Boolean custom)
28.7 Custom Term Report

This report is similar to the Unknown Report except it relates to "custom" terms, i.e a term that has related terms defined in either the dictionary adaptors or the custom terminology data.

This report data is controlled by the following query XML attribute:

<query><reportdata custom="bool"> And the response contains the following data in a subelement: <reportdataResults> <CustomData context="adapterName">term</CustomData> The context attribute holds the name of the dictionary adaptor the term was found in, including the special TermTool adaptor used by default for custom terminology. Note that more than one custom term may appear in a query (and a term may appear in more than one adapter), so more than one CustomData element maybe returned. The reports may choose to analyze just a single adapter (e.g. TermTool), analyze them all separately, or analyze them in sum.

Parameters:
custom - true enables capture of the data needed to populate the data needed for this report.

getFinder

public java.lang.Boolean getFinder()
Indicates whether the finder report is enabled

Returns:
whether the finder report is enabled

setFinder

public void setFinder(java.lang.Boolean finder)
28.6 Finder Term Report

This report is similar to the Unknown Report except it relates to "finder" terms, i.e a complex term that has been identified (and indexed) using the language "TermFinder" patterns. Typical examples include alpha-numeric expressions, such as "F-14". For some customers, custom patterns may be written to expand the identification of such terms, such as product codes.

This report data is controlled by the following query XML attribute:
<query><reportdata finder="bool">

And the response contains the following data in a subelement:
<reportdataResults> <FinderData>term</FinderData>

Note that more than one finder term may appear in a query, so more than one FinderData element maybe returned.

Parameters:
finder - true enables capture of the data needed to populate the data needed for this report.

getNull

public java.lang.Boolean getNull()
Indicates whether the Null report is enabled

Returns:
whether the Null report is enabled

setNull

public void setNull(java.lang.Boolean aNull)
28.4 Null Term Report

This report is similar to the Unknown Report except it relates to "null" terms, i.e a term and its (thesaurus) related terms that are not in the indexed content. These terms can not retrieve any content at all.

This report data is controlled by the following query XML attribute:
<query><reportdata null="bool">
And the response contains the following data in a subelement:
<reportdataResults>
<NullData>term</NullData>
Note that more than one null term may appear in a query, so more than one NullData element maybe returned.
Note that more than one unknown may appear in a query, so more than one UnknownData element maybe returned.

Parameters:
aNull - true enables capture of the data needed to populate the data needed for this report.

getNulx

public java.lang.Boolean getNulx()
Indicates whether the nulx report is enabled

Returns:
whether the nulx report is enabled

setNulx

public void setNulx(java.lang.Boolean nulx)
28.5 Nulx Term Report

This report is similar to the Unknown Report except it relates to "nulx" terms, i.e a term that is not in the indexed content, but its related terms are.

This report data is controlled by the following query XML attribute:
<query><reportdata nulx="bool">

And the response contains the following data in a subelement:
<reportdataResults>
<NulxData>term</NulxData>

Note that more than one nulx term may appear in a query, so more than one NulxData element maybe returned.

Parameters:
nulx - true enables capture of the data needed to populate the data needed for this report.

setXml

public void setXml(java.lang.String pXml)
Use this to override xml generation

Parameters:
pXml - xml

isEnabled

public boolean isEnabled()
Indicates whether the control should be used. If it is false, nothing will be sent.

Returns:
true if this control is enabled

setEnabled

public void setEnabled(boolean pEnabled)
Call this to enable/disable the control. It is enabled by default. If it is disabled, it will not generate any xml.

Parameters:
pEnabled - true/false to enable/disable the control

fromXmlParser

protected static ReportDataControl fromXmlParser(atg.search.routing.utils.SearchMessageNode rootIdx)

valueOf

public static ReportDataControl valueOf(java.lang.String pXml)
Parameters:
pXml - xml
Returns:
a new ReportDataControl, or null if the input was null

getRequestTag

public java.lang.String getRequestTag()
Specified by:
getRequestTag in class atg.search.routing.command.SearchXMLObject

getAttributeXML

protected void getAttributeXML(java.lang.StringBuilder sb)
                        throws atg.search.routing.command.IncompleteCommandException
Overrides:
getAttributeXML in class atg.search.routing.command.SearchXMLObject
Throws:
atg.search.routing.command.IncompleteCommandException

toXML

public java.lang.String toXML()
                       throws atg.search.routing.command.IncompleteCommandException
returns reportdata xml unless it has been disabled

Overrides:
toXML in class atg.search.routing.command.SearchXMLObject
Returns:
xml
Throws:
atg.search.routing.command.IncompleteCommandException