property.java
来自「数据仓库展示程序」· Java 代码 · 共 506 行 · 第 1/2 页
JAVA
506 行
public static final Property DESCRIPTION =
new Property("DESCRIPTION", TYPE_STRING, DESCRIPTION_ORDINAL, false, true, false, "Optional. A human-readable description of the member.");
public static final int VISIBLE_ORDINAL = 28;
/**
* Definition of the internal property which holds the
* name of the system property which determines whether to show a member
* (especially a measure or calculated member) in a user interface such as
* JPivot.
*/
public static final Property VISIBLE =
new Property("$visible", TYPE_BOOLEAN, VISIBLE_ORDINAL, true, false, false, null);
// Cell properties
public static final int BACK_COLOR_ORDINAL = 30;
public static final Property BACK_COLOR =
new Property("BACK_COLOR", TYPE_STRING, BACK_COLOR_ORDINAL, false, false, true, "The background color for displaying the VALUE or FORMATTED_VALUE property. For more information, see FORE_COLOR and BACK_COLOR Contents.");
public static final int CELL_EVALUATION_LIST_ORDINAL = 31;
public static final Property CELL_EVALUATION_LIST =
new Property("CELL_EVALUATION_LIST", TYPE_STRING, CELL_EVALUATION_LIST_ORDINAL, false, false, true, "The semicolon-delimited list of evaluated formulas applicable to the cell, in order from lowest to highest solve order. For more information about solve order, see Understanding Pass Order and Solve Order");
public static final int CELL_ORDINAL_ORDINAL = 32;
public static final Property CELL_ORDINAL =
new Property("CELL_ORDINAL", TYPE_NUMERIC, CELL_ORDINAL_ORDINAL, false, false, true, "The ordinal number of the cell in the dataset.");
public static final int FORE_COLOR_ORDINAL = 33;
public static final Property FORE_COLOR =
new Property("FORE_COLOR", TYPE_STRING, FORE_COLOR_ORDINAL, false, false, true, "The foreground color for displaying the VALUE or FORMATTED_VALUE property. For more information, see FORE_COLOR and BACK_COLOR Contents.");
public static final int FONT_NAME_ORDINAL = 34;
public static final Property FONT_NAME =
new Property("FONT_NAME", TYPE_STRING, FONT_NAME_ORDINAL, false, false, true, "The font to be used to display the VALUE or FORMATTED_VALUE property.");
public static final int FONT_SIZE_ORDINAL = 35;
public static final Property FONT_SIZE =
new Property("FONT_SIZE", TYPE_STRING, FONT_SIZE_ORDINAL, false, false, true, "Font size to be used to display the VALUE or FORMATTED_VALUE property.");
public static final int FONT_FLAGS_ORDINAL = 36;
public static final Property FONT_FLAGS =
new Property("FONT_FLAGS", TYPE_NUMERIC, FONT_FLAGS_ORDINAL, false, false, true, "The bitmask detailing effects on the font. The value is the result of a bitwise OR operation of one or more of the following constants: MDFF_BOLD = 1, MDFF_ITALIC = 2, MDFF_UNDERLINE = 4, MDFF_STRIKEOUT = 8. For example, the value 5 represents the combination of bold (MDFF_BOLD) and underline (MDFF_UNDERLINE) font effects.");
public static final int FORMATTED_VALUE_ORDINAL = 37;
/**
* Definition of the property which
* holds the formatted value of a cell.
*/
public static final Property FORMATTED_VALUE =
new Property("FORMATTED_VALUE", TYPE_STRING, FORMATTED_VALUE_ORDINAL, false, false, true, "The character string that represents a formatted display of the VALUE property.");
public static final int FORMAT_STRING_ORDINAL = 38;
/**
* Definition of the property which
* holds the format string used to format cell values.
*/
public static final Property FORMAT_STRING =
new Property("FORMAT_STRING", TYPE_STRING, FORMAT_STRING_ORDINAL, false, false, true, "The format string used to create the FORMATTED_VALUE property value. For more information, see FORMAT_STRING Contents.");
public static final int NON_EMPTY_BEHAVIOR_ORDINAL = 39;
public static final Property NON_EMPTY_BEHAVIOR =
new Property("NON_EMPTY_BEHAVIOR", TYPE_STRING, NON_EMPTY_BEHAVIOR_ORDINAL, false, false, true, "The measure used to determine the behavior of calculated members when resolving empty cells.");
public static final int SOLVE_ORDER_ORDINAL = 40;
/**
* Definition of the property which
* determines the solve order of a calculated member with respect to other
* calculated members.
*/
public static final Property SOLVE_ORDER =
new Property("SOLVE_ORDER", TYPE_NUMERIC, SOLVE_ORDER_ORDINAL, false, false, true, "The solve order of the cell.");
public static final int VALUE_ORDINAL = 41;
/**
* Definition of the property which
* holds the value of a cell. Is usually numeric (since most measures are
* numeric) but is occasionally another type.
*
* <p>It is also applicable to members.
*/
public static final Property VALUE =
new Property("VALUE", TYPE_NUMERIC, VALUE_ORDINAL, false, true, true, "The unformatted value of the cell.");
public static final int DATATYPE_ORDINAL = 42;
/**
* Definition of the property which
* holds the datatype of a cell. Valid values are "String",
* "Numeric", "Integer". The property's value derives from the
* "datatype" attribute of the "Measure" element; if the datatype attribute
* is not specified, the datatype is "Numeric" by default, except measures
* whose aggregator is "Count", whose datatype is "Integer".
*/
public static final Property DATATYPE =
new Property("DATATYPE", TYPE_STRING, DATATYPE_ORDINAL, false, false, true, "The datatype of the cell.");
/**
* The various property names which define a format string.
*/
static final String[] FORMAT_PROPERTIES = {
"format", "format_string", "FORMAT", FORMAT_STRING.name,
};
// ~ Data members ---------------------------------------------------------
/**
* The datatype of the property. One of the following:
* {@link #TYPE_STRING}, {@link #TYPE_NUMERIC}, {@link #TYPE_BOOLEAN},
* {@link #TYPE_OTHER}.
*/
private final int type;
/**
* Whether the property is internal.
*/
private final boolean internal;
private final boolean member;
private final boolean cell;
private static int nextOrdinal = 100;
// ~ Methods --------------------------------------------------------------
/**
* Creates a property definition. If ordinal is negative, generates a
* unique positive ordinal.
*/
protected Property(
String name,
int type,
int ordinal,
boolean internal,
boolean member,
boolean cell,
String description) {
super(name, ordinal < 0 ? nextOrdinal++ : ordinal, description);
this.type = type;
this.internal = internal;
this.member = member;
this.cell = cell;
}
/**
* Returns the datatype of the property. One of the following:
* {@link #TYPE_STRING}, {@link #TYPE_NUMERIC}, {@link #TYPE_BOOLEAN},
* {@link #TYPE_OTHER}.
*/
public int getType() {
return type;
}
public PropertyFormatter getFormatter() {
return null;
}
/**
* Returns the caption of this property.
*/
public String getCaption() {
return name;
}
/**
* Returns whether this property is for system use only.
*/
public boolean isInternal() {
return internal;
}
/**
* Returns whether this property is a standard member property.
*/
public boolean isMemberProperty() {
return member;
}
/**
* Returns whether this property is a standard member property.
*/
public boolean isCellProperty() {
return cell && ordinal <= VALUE_ORDINAL;
}
/**
* Returns whether this property is standard.
*/
public boolean isStandard() {
return ordinal <= VALUE_ORDINAL;
}
public static final EnumeratedValues enumeration = new EnumeratedValues(
new Property[] {
FORMAT_EXP,
AGGREGATION_TYPE,
NAME,
CAPTION,
CONTRIBUTING_CHILDREN,
FORMULA,
CATALOG_NAME,
SCHEMA_NAME,
CUBE_NAME,
DIMENSION_UNIQUE_NAME,
HIERARCHY_UNIQUE_NAME,
LEVEL_UNIQUE_NAME,
LEVEL_NUMBER,
MEMBER_UNIQUE_NAME,
MEMBER_NAME,
MEMBER_TYPE,
MEMBER_GUID,
MEMBER_CAPTION,
MEMBER_ORDINAL,
CHILDREN_CARDINALITY,
PARENT_LEVEL,
PARENT_UNIQUE_NAME,
PARENT_COUNT,
DESCRIPTION,
VISIBLE,
BACK_COLOR,
CELL_EVALUATION_LIST,
CELL_ORDINAL,
FORE_COLOR,
FONT_NAME,
FONT_SIZE,
FONT_FLAGS,
FORMAT_STRING,
FORMATTED_VALUE,
NON_EMPTY_BEHAVIOR,
SOLVE_ORDER,
VALUE,
DATATYPE,
});
/**
* Looks up a Property with a given ordinal.
* Returns null if not found.
*/
public static Property lookup(int ordinal) {
return (Property) enumeration.getValue(ordinal);
}
/**
* Looks up a Property with a given name.
* Returns null if not found.
*/
public static Property lookup(String name) {
return (Property) enumeration.getValue(name, false);
}
}
// End Property.java
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?