com.endeca.navigation
Class Dimension

java.lang.Object
  extended by com.endeca.navigation.Dimension

public class Dimension
extends Object

Core component of a navigation state query encapsulating all information known about a dimension at the navigation state. A dimension is a collection of related dimension values (DimVal objects), organized into a tree. The top-most dimension value in a dimension tree is known as the dimension root. A dimension root always has the same name as its dimension.

Each dimension can belong to only a single dimension group (DimGroup object). If a dimension is not assigned to an explicit dimension group, it is placed in an implicit dimension group of its own. These implicit groups have no name and an ID of zero.


Method Summary
 DimValList getAncestors()
          Gets the ancestors pertinent to this dimension.
 DimValList getCompletePath()
          Returns the complete path of dimension values consolidating ancestors, descriptor, and implicits in this order.
 DimVal getDescriptor()
          Gets the descriptor for this dimension.
 long getDimGroupId()
          Gets the ID of the dimension group (DimGroup object) to which this dimension belongs.
 String getDimGroupName()
          Gets the name of the dimension group (DimGroup object) to which this dimension belongs.
 long getId()
          Gets the ID of the dimension.
 DimLocationList getImplicitLocations()
          Gets the implicit dimension locations contained in this dimension.
 DimValList getIntermediates()
          Gets the intermediate non-navigable refinements that have been selected and do not affect the query terms.
 String getName()
          Gets the name of the dimension.
 DimVal getRefinementParent()
          Gets the refinements' parent value in this dimension.
 DimValList getRefinements()
          Gets the refinements available and retrieved in this dimension.
 DimVal getRoot()
          Gets the root value of this dimension.
 boolean isImplicit()
          Determines if the dimension is fully implicit.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDimGroupName

public String getDimGroupName()
Gets the name of the dimension group (DimGroup object) to which this dimension belongs. If the dimension does not belong to a dimension group, the method will return null.

Returns:
Name of the dimension group to which this dimension belongs or null if it does not belong to a dimension group.

getDimGroupId

public long getDimGroupId()
Gets the ID of the dimension group (DimGroup object) to which this dimension belongs. If the dimension does not belong to a dimension group, the method will return 0.

Returns:
ID of the dimension group to which this dimension belongs or 0 if it does not belong to a dimension group.

getId

public long getId()
Gets the ID of the dimension.

Returns:
ID of the dimension.

getName

public String getName()
Gets the name of the dimension.

Returns:
The name of the dimension.

getRoot

public DimVal getRoot()
Gets the root value of this dimension.

Returns:
DimVal object which is the root value of this dimension.

getDescriptor

public DimVal getDescriptor()
Gets the descriptor for this dimension. If there is no descriptor in this dimension, null is returned.

Returns:
DimVal object which is the descriptor for this dimension, or null if there is none.

getRefinementParent

public DimVal getRefinementParent()
Gets the refinements' parent value in this dimension. The parent value is the parent of the refinement options available with respect to the current navigation state in this dimension hierarchy. Returns null if there are no more refinemens possible in this dimension.

Returns:
DimVal object which is the refinements' parent value in this dimension. Returns null if there are no more refinement possiblities in this dimension.

getAncestors

public DimValList getAncestors()
Gets the ancestors pertinent to this dimension. Will still return an empty DimValList if there are no ancestors. Ancestors will only appear if there is a descriptor for this dimension and if the descriptor has ancestors in the hierarchy of the dimension. Does not include the dimension root value. Ancestors are ordered from parent to child.

Returns:
DimValList containing the ancestors of the descriptor of this dimension. If there is no descriptor or if the descriptor has no ancestors, the DimValList returned will be empty.

getIntermediates

public DimValList getIntermediates()
Gets the intermediate non-navigable refinements that have been selected and do not affect the query terms. If there are no intermediates, an empty DimValList will be returned. Intermediates are ordered from parent to child.

Returns:
DimValList containing the intermediates. If there are no intermediates, an empty list will be returned.

getImplicitLocations

public DimLocationList getImplicitLocations()
Gets the implicit dimension locations contained in this dimension.

Returns:
DimLocationList containing the implicit dimension values . If there are no implicit dimensions, an empty list will be returned.

getRefinements

public DimValList getRefinements()
Gets the refinements available and retrieved in this dimension. Returns an empty DimValList when there are no refinements available.

It is possible that while the refinements may return a empty set, refinements are still possible if not all the refinements were retrieved from the MDEX Engine in the original query. Refinements are ordered by the higher ranking to lower ranking, where the rankings are determined by the settings in the MDEX Engine and the data. Each member of this refinement list can be added to the descriptors and will yield at least one results.

Returns:
DimValList containing the refinements available in this dimension. Returns an empty DimValList if no refinements are available.

isImplicit

public boolean isImplicit()
Determines if the dimension is fully implicit. A dimension is considered fully implicit if the dimension has no non-implicit refinements and has no descriptors. That is, the dimension no longer has any refinments that would narrow the size of the results set and has not had any selections made to it.

Returns:
true if the dimension is fully implicit, and false if the dimenension contains any valid refinements or a descriptor.

getCompletePath

public DimValList getCompletePath()
Returns the complete path of dimension values consolidating ancestors, descriptor, and implicits in this order. Implicits are the dimension values that are implicitly shared by all of the results in the remaining result set.

In the case where refinements are present in this dimension, the complete path will offer the complete path of dimension values (DimVal oblects), from the dimension root, ancestors, descriptor, implicit dimension values, to the refinement parent.

In the case where there are multiple assignment of dimension values to a record in the result set and there are no refinements remaining in this dimension, the complete path will offer one of the complete branches of implicit dimension values.

At the minimal case, this list would return the root dimension value of the dimension.

Returns:
Complete list (as a DimValList object) of dimension values from the dimension.


2010 Endeca Technologies, Inc.
Endeca Confidential