org.apache.lucene.facet.enhancements.association
Class AssociationProperty

java.lang.Object
  extended by org.apache.lucene.facet.enhancements.association.AssociationProperty
All Implemented Interfaces:
Serializable, CategoryProperty
Direct Known Subclasses:
AssociationFloatProperty, AssociationIntProperty

public abstract class AssociationProperty
extends Object
implements CategoryProperty

A CategoryProperty associating a single integer value to a CategoryAttribute. It should be used to describe the association between the category and the document.

This class leave to extending classes the definition of CategoryProperty.merge(CategoryProperty) policy for the integer associations.

Note: The association value is added both to a special category list, and to the category tokens.

See Also:
AssociationEnhancement, Serialized Form
WARNING: This API is experimental and might change in incompatible ways in the next release.

Field Summary
protected  long association
           
 
Constructor Summary
AssociationProperty(int value)
          Construct an AssociationProperty.
 
Method Summary
 int getAssociation()
          Returns the association value.
 boolean hasBeenSet()
          Returns whether this attribute has been set (not all categories have an association).
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.lucene.facet.index.attributes.CategoryProperty
merge
 

Field Detail

association

protected long association
Constructor Detail

AssociationProperty

public AssociationProperty(int value)
Construct an AssociationProperty.

Parameters:
value - The association value.
Method Detail

getAssociation

public int getAssociation()
Returns the association value.

Returns:
The association value.

hasBeenSet

public boolean hasBeenSet()
Returns whether this attribute has been set (not all categories have an association).


toString

public String toString()
Overrides:
toString in class Object