|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object infovis.metadata.ValueCategory
public abstract class ValueCategory
Qualify what the column values expresses.
A Column can contain values of five categories:
The representation of value should take the category into account. For example, coloring should be different: ordered values are usually depicted with intensity, nominal and categorical value with different hues, differential may use black for the the nominal value and to two other colors for above and below.
Controls for dynamic queries should also take the category into account. Range Sliders can be used with ordered value, differential and nominal values if that makes sense (an order can usually be derived from a nominal value, like lexicographical order, but this is somewhat artificial). For categorical value, radio shapes or other buttons can be used.
When nothing is known about a column, we assign it a category depending on its type.
Field Summary | |
---|---|
static String[] |
CATEGORY_NAME
String names of integer categories. |
static int |
TYPE_CATEGORIAL
integer constant for categorical type. |
static int |
TYPE_DIFFERENTIAL
integer constant for differential type. |
static int |
TYPE_EXPLICIT
integer constant for explicit type. |
static int |
TYPE_NOMINAL
integer constant for nominal type. |
static int |
TYPE_ORDERED
integer constant for ordered type. |
static int |
TYPE_UNKOWN
integer constant for unkown type. |
static String |
VALUE_CATEGORY_TYPE
Key for the metadata. |
static String |
VALUE_CATEGORY_TYPE_CATEGORICAL
Values are categorical. |
static String |
VALUE_CATEGORY_TYPE_DIFFERENTIAL
Values are differential (for example, around 0). |
static String |
VALUE_CATEGORY_TYPE_DIFFERENTIAL_REFERENCE
When the VALUE_TYPE is differential, the reference value can be stored as the value of this metadata property. |
static String |
VALUE_CATEGORY_TYPE_EXPLICIT
Values are explicit color values. |
static String |
VALUE_CATEGORY_TYPE_NOMINAL
Value are nominal. |
static String |
VALUE_CATEGORY_TYPE_ORDERED
Values are ordered. |
Fields inherited from interface infovis.metadata.Constants |
---|
CONTRIBUTOR, COVERAGE, CREATOR, DATE, DESCRITION, FORMAT, IDENTIFIER, LANGUAGE, PUBLISHER, RELATION, RIGHTS, SOURCE, SUBJECT, TITLE, TYPE |
Constructor Summary | |
---|---|
ValueCategory()
|
Method Summary | |
---|---|
static String |
categoryName(int cat)
Returns the category name of a specified category. |
static int |
categoryValue(String catString)
Returns a value category given its category name. |
static int |
findValueCategory(Column c)
Returns a category constant associated with the specified column, guessing one is none is associated with the column. |
static int |
getValueCategory(Column c)
Returns the category constant associated with the specified column. |
static String |
getValueCategoryString(Column c)
Returns the category string associated with the specified column or null. |
static void |
setValueCategory(Column c,
int cat)
Associates a value category to a column. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String VALUE_CATEGORY_TYPE
public static final String VALUE_CATEGORY_TYPE_ORDERED
public static final String VALUE_CATEGORY_TYPE_NOMINAL
public static final String VALUE_CATEGORY_TYPE_CATEGORICAL
public static final String VALUE_CATEGORY_TYPE_DIFFERENTIAL
public static final String VALUE_CATEGORY_TYPE_EXPLICIT
public static final int TYPE_UNKOWN
public static final int TYPE_ORDERED
public static final int TYPE_NOMINAL
public static final int TYPE_CATEGORIAL
public static final int TYPE_DIFFERENTIAL
public static final int TYPE_EXPLICIT
public static final String[] CATEGORY_NAME
public static final String VALUE_CATEGORY_TYPE_DIFFERENTIAL_REFERENCE
Constructor Detail |
---|
public ValueCategory()
Method Detail |
---|
public static String getValueCategoryString(Column c)
c
- the column,
public static int getValueCategory(Column c)
c
- the column.
public static void setValueCategory(Column c, int cat)
c
- the columncat
- the categorypublic static int findValueCategory(Column c)
c
- the column
public static String categoryName(int cat)
cat
- the category
public static int categoryValue(String catString)
catString
- the category name
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |