atg.repository.search.refinement
Class FacetValue

java.lang.Object
  extended by atg.repository.search.refinement.FacetValue
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
CategoryFacetValue, FacetDisjunctionMultiValue, RangeFacetValue

public class FacetValue
extends java.lang.Object
implements java.lang.Cloneable

This is a bean class that holds reference to a facet and one of its values.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
static java.lang.String DEFAULT_IDVALUE_SEPARATOR
           
protected  atg.repository.search.refinement.Facet mFacet
           
protected  long mMatchingDocsCount
           
protected  RefinementValue mRefinementValue
           
protected  int mScore
          The relevancy of this facet value.
protected  java.lang.String mSeparator
           
protected  java.lang.Object mValue
           
 
Constructor Summary
FacetValue(atg.repository.search.refinement.Facet pFacet, java.lang.Object pValue, long pMatchingDocsCount, int pScore)
          Constructor method
FacetValue(atg.repository.search.refinement.Facet pFacet, java.lang.Object pValue, java.lang.String pSeparator)
          Constructor method.
FacetValue(atg.repository.search.refinement.Facet pFacet, RefinementValue pRefineValue, int pScore)
          Constructor method
 
Method Summary
 java.lang.Object clone()
          Override clone to copy this object
 boolean equals(java.lang.Object o)
           
 java.lang.String getDebug()
          If this is not null then it returns the reason why the facet value was excluded in the response.
 atg.repository.search.refinement.Facet getFacet()
           
 long getMatchingDocsCount()
          Getter for the count of matching documents for this facet value
 RefinementValue getRefinementValue()
          Getter for RefinementValue from response
 int getScore()
           
 java.lang.String getSeparator()
           
 java.lang.String getTrailString()
          Returns a String representation of the facet value intended for use in a URL trail parameter.
 java.lang.Object getValue()
           
 int hashCode()
           
 void setFacet(atg.repository.search.refinement.Facet pFacet)
           
 void setMatchingDocsCount(long pMatchingDocsCount)
          Setter for the count of matching documents for this facet value
 void setRefinementValue(RefinementValue pRefinementValue)
          Setter for RefinementValue from response
 void setScore(int pScore)
           
 void setSeparator(java.lang.String pSeparator)
           
 void setValue(java.lang.Object pValue)
           
 java.lang.String toString()
          Returns a String representation of the facet value intended for use in a URL trail parameter.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string


DEFAULT_IDVALUE_SEPARATOR

public static final java.lang.String DEFAULT_IDVALUE_SEPARATOR
See Also:
Constant Field Values

mFacet

protected atg.repository.search.refinement.Facet mFacet

mRefinementValue

protected RefinementValue mRefinementValue

mValue

protected java.lang.Object mValue

mMatchingDocsCount

protected long mMatchingDocsCount

mSeparator

protected java.lang.String mSeparator

mScore

protected int mScore
The relevancy of this facet value.

Constructor Detail

FacetValue

public FacetValue(atg.repository.search.refinement.Facet pFacet,
                  java.lang.Object pValue,
                  long pMatchingDocsCount,
                  int pScore)
Constructor method

Parameters:
pFacet - Facet reference
pValue - Object value
pMatchingDocsCount - The number of matching documents for this facet value.
pScore - The relevancy of this facet value

FacetValue

public FacetValue(atg.repository.search.refinement.Facet pFacet,
                  RefinementValue pRefineValue,
                  int pScore)
Constructor method

Parameters:
pFacet - Facet reference
pRefineValue - RefinementValue reference
pScore - The relevancy of this facet value

FacetValue

public FacetValue(atg.repository.search.refinement.Facet pFacet,
                  java.lang.Object pValue,
                  java.lang.String pSeparator)
Constructor method.

Parameters:
pFacet - Facet reference
pValue - Object value
pSeparator - String separator
Method Detail

getFacet

public atg.repository.search.refinement.Facet getFacet()

setFacet

public void setFacet(atg.repository.search.refinement.Facet pFacet)

getRefinementValue

public RefinementValue getRefinementValue()
Getter for RefinementValue from response

Returns:
RefinementValue

setRefinementValue

public void setRefinementValue(RefinementValue pRefinementValue)
Setter for RefinementValue from response

Parameters:
pRefinementValue - RefinementValue

getSeparator

public java.lang.String getSeparator()

setSeparator

public void setSeparator(java.lang.String pSeparator)

getValue

public java.lang.Object getValue()

setValue

public void setValue(java.lang.Object pValue)

getMatchingDocsCount

public long getMatchingDocsCount()
Getter for the count of matching documents for this facet value

Returns:
A long value >= 0.

setMatchingDocsCount

public void setMatchingDocsCount(long pMatchingDocsCount)
Setter for the count of matching documents for this facet value

Parameters:
mMatchingDocsCount - A long value >= 0.

getScore

public int getScore()
Returns:
The relevancy of this facet valju

setScore

public void setScore(int pScore)
Parameters:
pScore - The relevancy to set.

getDebug

public java.lang.String getDebug()
If this is not null then it returns the reason why the facet value was excluded in the response. This will only come back in search testing where facet details mode is turned on for the query.

Returns:
String with reason why facet value is excluded

getTrailString

public java.lang.String getTrailString()
Returns a String representation of the facet value intended for use in a URL trail parameter.

Returns:
A String of the format ""

toString

public java.lang.String toString()
Returns a String representation of the facet value intended for use in a URL trail parameter.

Overrides:
toString in class java.lang.Object
Returns:
A String of the format ""

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Override clone to copy this object

Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException
See Also:
Object.clone()