Class StyleRule
java.lang.Object
org.eclipse.birt.report.model.core.Structure
org.eclipse.birt.report.model.core.PropertyStructure
org.eclipse.birt.report.model.api.elements.structures.StyleRule
- All Implemented Interfaces:
Cloneable
,IStructure
,org.eclipse.birt.report.model.core.IPropertySet
- Direct Known Subclasses:
HighlightRule
,MapRule
public abstract class StyleRule
extends org.eclipse.birt.report.model.core.PropertyStructure
Base class for highlight and map rules in the style. Choices for the operand
are defined in
DesignChoiceConstants
.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Status that determines whether this structure is used in design time or notprotected Boolean
protected String
The comparison operator.static final String
Name of the comparison operator member.static final String
The expression for this rule.protected Expression
the test expression for this highlight rule.protected List
Expression for the first operand.static final String
Name of the property that gives the expression for the first operator operand.protected Expression
Expression for the second operand.static final String
Name of the property that gives the expression for the second operator operand.Fields inherited from class org.eclipse.birt.report.model.core.PropertyStructure
propValues
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Object
getIntrinsicProperty
(String propName) Returns the value of a structure property represented as a member variable.Returns the operator.gets the test expression value of this rule.Returns the expression for the first operand.Gets the value1 expression list.Deprecated.Returns the expression for the second operand.boolean
Justifies whether the structure is generated in design time or not.void
setDesignTime
(boolean isDesignTime) Sets the design time status for this structure.protected void
setIntrinsicProperty
(String propName, Object value) Sets the value of of a structure property represented as a member variable.void
setOperator
(String operator) Sets the operator.void
setTestExpression
(String expression) sets the test expression for the rule.void
Set expression for the first operand.void
Sets the value 1 expression.void
Set expression for the second operand.Methods inherited from class org.eclipse.birt.report.model.core.PropertyStructure
clone, getLocalProperty, getLocalProperty, setProperty
Methods inherited from class org.eclipse.birt.report.model.core.Structure
checkStringMember, copy, equals, getCompatibleValue, getContext, getDefn, getElement, getExpressionProperty, getHandle, getHandle, getMemberDefn, getObjectDefn, getProperty, getProperty, getReferencableProperty, getStringProperty, handle, isReferencable, setContext, setExpressionProperty, setProperty, setupContext, updateReference, validate
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.birt.report.model.api.core.IStructure
getStructName
-
Field Details
-
OPERATOR_MEMBER
Name of the comparison operator member.- See Also:
-
VALUE1_MEMBER
Name of the property that gives the expression for the first operator operand.- See Also:
-
VALUE2_MEMBER
Name of the property that gives the expression for the second operator operand.- See Also:
-
TEST_EXPR_MEMBER
The expression for this rule.- See Also:
-
IS_DESIGN_TIME_MEMBER
Status that determines whether this structure is used in design time or not- See Also:
-
operator
The comparison operator. Default value isMAP_OPERATOR_EQ
-
value1
Expression for the first operand. -
value2
Expression for the second operand. -
testExpression
the test expression for this highlight rule. -
isDesignTime
-
-
Constructor Details
-
StyleRule
public StyleRule()Default constructor. -
StyleRule
Constructs the style rule with an operator and its operands.- Parameters:
op
- the choice name for the operandv1
- expression for the first operandv2
- expression for the second operandtestExpr
- the expression to check
-
-
Method Details
-
getIntrinsicProperty
Description copied from class:org.eclipse.birt.report.model.core.Structure
Returns the value of a structure property represented as a member variable.- Overrides:
getIntrinsicProperty
in classorg.eclipse.birt.report.model.core.PropertyStructure
- Parameters:
propName
- name of the property- Returns:
- the value of the property, or null if the property is not set
-
setIntrinsicProperty
Description copied from class:org.eclipse.birt.report.model.core.Structure
Sets the value of of a structure property represented as a member variable.- Overrides:
setIntrinsicProperty
in classorg.eclipse.birt.report.model.core.PropertyStructure
- Parameters:
propName
- the name of the property to setvalue
- the property value
-
getOperator
Returns the operator. The possible values are defined inDesignChoiceConstants
, and they are:- MAP_OPERATOR_EQ
- MAP_OPERATOR_NE
- MAP_OPERATOR_LT
- MAP_OPERATOR_LE
- MAP_OPERATOR_GE
- MAP_OPERATOR_GT
- MAP_OPERATOR_BETWEEN
- MAP_OPERATOR_NOT_BETWEEN
- MAP_OPERATOR_NULL
- MAP_OPERATOR_NOT_NULL
- MAP_OPERATOR_TRUE
- MAP_OPERATOR_FALSE
- MAP_OPERATOR_LIKE
- MAP_OPERATOR_ANY
- Returns:
- the operator
-
setOperator
Sets the operator. The allowed values are defined inDesignChoiceConstants
, and they are:- MAP_OPERATOR_EQ
- MAP_OPERATOR_NE
- MAP_OPERATOR_LT
- MAP_OPERATOR_LE
- MAP_OPERATOR_GE
- MAP_OPERATOR_GT
- MAP_OPERATOR_BETWEEN
- MAP_OPERATOR_NOT_BETWEEN
- MAP_OPERATOR_NULL
- MAP_OPERATOR_NOT_NULL
- MAP_OPERATOR_TRUE
- MAP_OPERATOR_FALSE
- MAP_OPERATOR_LIKE
- MAP_OPERATOR_ANY
- Parameters:
operator
- the operator to set
-
getValue1
Returns the expression for the first operand.- Returns:
- the first operand expression
-
getValue1List
Deprecated.Gets the value1 expression list. For most map operator, there is only one expression in the returned list. However, map operator 'in' may contain more than one expression.- Returns:
- the value1 expression list.
-
getValue1ExpressionList
Gets the value1 expression list. For most map operator, there is only one expression in the returned list. However, map operator 'in' may contain more than one expression.- Returns:
- the value1 expression list. Each item is
Expression
object.
-
setValue1
Set expression for the first operand.- Parameters:
value
- the first operand expression.
-
setValue1
Sets the value 1 expression.- Parameters:
value1List
- the value 1 expression list to set
-
getValue2
Returns the expression for the second operand.- Returns:
- the second operand expression
-
setValue2
Set expression for the second operand.- Parameters:
value
- the second operand expression.
-
setTestExpression
sets the test expression for the rule.- Parameters:
expression
- the expression value
-
getTestExpression
gets the test expression value of this rule.- Returns:
- the expression
-
isDesignTime
public boolean isDesignTime()Description copied from interface:IStructure
Justifies whether the structure is generated in design time or not.- Specified by:
isDesignTime
in interfaceIStructure
- Overrides:
isDesignTime
in classorg.eclipse.birt.report.model.core.Structure
- Returns:
if the structure is generated in design time, otherwise return .
-
setDesignTime
public void setDesignTime(boolean isDesignTime) Sets the design time status for this structure.- Parameters:
isDesignTime
-
-
getValue1ExpressionList()