com.iphrase.runtime.query.result
Class TallyFeature.Value

java.lang.Object
  |
  +--com.iphrase.runtime.query.result.TallyFeature.Value
Enclosing class:
TallyFeature

public static class TallyFeature.Value
extends java.lang.Object

Represent a tally feature value.


Method Summary
 boolean equals(java.lang.Object obj)
          Override Object.equals(java.lang.Object)
 TallyFeature.Value[] getChildren()
          Get the tally feature value children associated with this tally feature value.
 java.lang.Object[] getComponents()
          Get the array of Object components for this tally feature value.
 Constraint getConstraint(java.lang.String featureId)
          Get a Constraint instance used to compute the tallies for this value.
 java.lang.String getConstraintLabel()
          Get the (optional) constraint label used to compute the tallies for this value.
 java.lang.String getConstraintOp()
          Get the constraint op used to compute the tallies for this value.
 java.lang.String getConstraintType()
          Get the constraint type used to compute the tallies for this value.
 java.lang.Object getFeatureValue()
          Get the feature value associated with this tally feature value.
 int getFlags(FeatureMetaData meta)
          Get the tally feature flags specialized for this value.
 int getTallyCount()
          Get the tally count for this tally feature value.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getFeatureValue

public java.lang.Object getFeatureValue()
Get the feature value associated with this tally feature value.
Returns:
Object feature value of type FeatureMetaData.getBaseType()

getTallyCount

public int getTallyCount()
Get the tally count for this tally feature value.
Returns:
int tally count

getConstraintType

public java.lang.String getConstraintType()
Get the constraint type used to compute the tallies for this value.
Returns:
String query string constraint type

getConstraintOp

public java.lang.String getConstraintOp()
Get the constraint op used to compute the tallies for this value. The constraint op is optional depending on the constraint type.
Returns:
String query string constraint op

getConstraintLabel

public java.lang.String getConstraintLabel()
Get the (optional) constraint label used to compute the tallies for this value. The constraint label is optional depending on the constraint type, and at this point can be non-null only for DateTime constraints.
Returns:
String query string constraint label

getConstraint

public Constraint getConstraint(java.lang.String featureId)
                         throws ArgumentError
Get a Constraint instance used to compute the tallies for this value. This is useful for building a drillDown or drillSideways control.
Parameters:
featureId - String feature id
Returns:
Constraint new Constraint subclass instance
Throws:
ArgumentError -  

getChildren

public TallyFeature.Value[] getChildren()
Get the tally feature value children associated with this tally feature value. This is non-null only for hierarchical types such as Taxonomy.
Returns:
array of TallyFeature.Value

getComponents

public java.lang.Object[] getComponents()
Get the array of Object components for this tally feature value. Object components provide an abstract, structural representation that can be used to compare hierarchical tally feature values. This can be used to determine sibling-hood for rendering drillSideways, for example. If featureValue is an instance of Taxonomy, return Taxonomy.getComponents(). Else for non-hierarchical values, return a 0-length Object array.

Currently, Taxonomy is the only hierarchical feature value. But by returning Object[] instead of String[], we support future hierarchical feature values that do not have String components (as Taxonomy does).

Returns:
array of Object components (can be 0-length but never null)

getFlags

public int getFlags(FeatureMetaData meta)
Get the tally feature flags specialized for this value.
Parameters:
meta - the parent feature meta data or tally feature containing this value

equals

public boolean equals(java.lang.Object obj)
Override Object.equals(java.lang.Object)
Overrides:
equals in class java.lang.Object
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.

© Copyright 2005, 2006. IBM Corporation. All rights reserved.