com.endeca.mobile.abstraction
Class RefinementsAbstraction
java.lang.Object
com.endeca.mobile.abstraction.RefinementsAbstraction
public final class RefinementsAbstraction
- extends java.lang.Object
The RefinementsByGroupAbstractionPlugin retrieves refinements available
for the current record set, grouped by dimension group names;
it adds its data to the AbstractedResults object, under the key "Refinements".
If no refinements are relevant to the current navigation/search state,
this key will not exist.
All information added to the AbstractedResult object by the RefinementsByGroupAbstractionPlugin
is contained within one master array. This array contains
a series of hashes. Each hash represents a dimension group. If the group
is an implicit group, the hash will contain only one key, Dimensions.
If the group is explicit, the hash will have two keys, Dimensions and
Group Name (which will contain the name of the group).
The value of the Dimensions key is an array, containing dimension information
represented in a hash.
Dimension hashes contain the following information:
Expansion Link or Contraction Link |
Contains a link that will expand or contract
this particular dimension |
Dimension Name | The dimension's name |
Dimension ID | The dimension's ID |
If available, the following additional information will also be added to each dimension hash:
Dim Value Properties | A hash containing any other
custom properties that are associated with the root dimension value |
If a dimension is expanded, it will contain one additional key, Dimension Values.
The value of this key will be an array, containing the dimension values available for this particular
dimension. Each dimension value will be represented by a hash, with keys as follows:
Dim Value ID |
The ID for this dimension value |
Selection Link | A link that can be used to select a dimension value |
Dim Value Name | The dimension value's name |
If available, the following additional information will also be added to each dimension value hash:
Number of Records |
How many records are available for this selection (the DGraph.Bins property) |
Dim Value Properties | A hash containing any other
custom properties that are associated with the dimension value |
Method Summary |
static java.util.HashMap |
abstractifyDimension(com.endeca.navigation.Dimension dim,
AbstractionContext context)
Converts a dimension to a form suitable for serialization. |
static java.util.ArrayList |
abstractifyDimensions(com.endeca.navigation.DimensionList dimensions,
AbstractionContext context)
Converts a list of dimension groups to a form suitable for serialization. |
static java.util.HashMap |
abstractifyDimVal(com.endeca.navigation.DimVal refinement,
com.endeca.navigation.Dimension dim,
AbstractionContext context)
Converts a dimension value to a form suitable for serialization. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RefinementsAbstraction
public RefinementsAbstraction()
abstractifyDimensions
public static final java.util.ArrayList abstractifyDimensions(com.endeca.navigation.DimensionList dimensions,
AbstractionContext context)
- Converts a list of dimension groups to a form suitable for serialization.
- Parameters:
dimensions
- The list of dimension groupscontext
- The context of the current request
- Returns:
- The converted dimension group list
abstractifyDimension
public static final java.util.HashMap abstractifyDimension(com.endeca.navigation.Dimension dim,
AbstractionContext context)
- Converts a dimension to a form suitable for serialization.
- Parameters:
dim
- The dimensioncontext
- The context of the current request
- Returns:
- The converted dimension
abstractifyDimVal
public static final java.util.HashMap abstractifyDimVal(com.endeca.navigation.DimVal refinement,
com.endeca.navigation.Dimension dim,
AbstractionContext context)
- Converts a dimension value to a form suitable for serialization.
- Parameters:
refinement
- The dimension valuedim
- The parent dimension of the given dimension valuecontext
- The context of the current request
- Returns:
- The converted dimension value