lumis.search
Class SearchAttributes

Package class diagram package SearchAttributes
java.lang.Object
  extended by lumis.search.SearchAttributes
All Implemented Interfaces:
IAttributeSetReader

@StableMinor(version="4.1",
             sinceVersion="4.0")
public final class SearchAttributes
extends Object
implements IAttributeSetReader

Set of attributes aggregated to a SearchQuery, a SearchHit or a SearchResults. They represent extra information aggregated to these objects. For example, in a SearchQuery, they contain information that affetcs the criteria used in search.

Since:
4.0.4

Field Summary
protected  Map<String,List<String>> attributes
          The Map of attributes and respective values.
 
Constructor Summary
SearchAttributes()
           
 
Method Summary
 void addAttributeValue(String attributeName, String attributeValue)
          Add a value to the set of values of an attribute.
 List<String> getAttributeValues(String attributeName)
          Returns all the values related to the attribute named as specified.
 boolean hasAttribute(String attributeName)
          Checks if the attribute set contains at least one attribute with the specified name.
 void removeAttribute(String attributeName)
          Remove an attribute.
 void setAttributeValues(String attributeName, List<String> attributeValues)
          Set the values of an attribute.
 void setAttributeValues(String attributeName, String[] attributeValues)
          Set the values of an attribute.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

attributes

protected Map<String,List<String>> attributes
The Map of attributes and respective values. The map key is the attribute name, and the map value is a List of attribute values.

Constructor Detail

SearchAttributes

public SearchAttributes()
Method Detail

setAttributeValues

public void setAttributeValues(String attributeName,
                               String[] attributeValues)
Set the values of an attribute.

Parameters:
attributeName - attribute name
attributeValues - attribute values
Since:
4.0.4

setAttributeValues

public void setAttributeValues(String attributeName,
                               List<String> attributeValues)
Set the values of an attribute.

Parameters:
attributeName - attribute name
attributeValues - attribute values
Since:
4.0.4

addAttributeValue

public void addAttributeValue(String attributeName,
                              String attributeValue)
Add a value to the set of values of an attribute.

Parameters:
attributeName - attribute name
attributeValue - new value to be added
Since:
4.0.4

removeAttribute

public void removeAttribute(String attributeName)
Remove an attribute.

Parameters:
attributeName - attribute name
Since:
4.0.4

hasAttribute

public boolean hasAttribute(String attributeName)
Description copied from interface: IAttributeSetReader
Checks if the attribute set contains at least one attribute with the specified name.

Specified by:
hasAttribute in interface IAttributeSetReader
Parameters:
attributeName - name of the attribute.
Returns:
true if at least one attribute with the provided name was found.

getAttributeValues

public List<String> getAttributeValues(String attributeName)
Description copied from interface: IAttributeSetReader
Returns all the values related to the attribute named as specified.

Specified by:
getAttributeValues in interface IAttributeSetReader
Parameters:
attributeName - name of the attribute.
Returns:
all values related to the specified attribute name, or an empty List if there is no value to return.


Lumisportal  4.1.0.071221 - Copyright © 2001-2007, Lumis. All Rights Reserved.