org.eclipse.birt.report.model.api.elements.structures
Class StyleRule

java.lang.Object
  extended by org.eclipse.birt.report.model.core.Structure
      extended by org.eclipse.birt.report.model.core.PropertyStructure
          extended by org.eclipse.birt.report.model.api.elements.structures.StyleRule
All Implemented Interfaces:
java.lang.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:
DesignChoiceConstants

Field Summary
static java.lang.String IS_DESIGN_TIME_MEMBER
          Status that determines whether this structure is used in design time or not
protected  java.lang.Boolean isDesignTime
           
protected  java.lang.String operator
          The comparison operator.
static java.lang.String OPERATOR_MEMBER
          Name of the comparison operator member.
static java.lang.String TEST_EXPR_MEMBER
          The expression for this rule.
protected  java.lang.String testExpression
          the test expression for this highlight rule.
protected  java.util.List value1
          Expression for the first operand.
static java.lang.String VALUE1_MEMBER
          Name of the property that gives the expression for the first operator operand.
protected  java.lang.String value2
          Expression for the second operand.
static java.lang.String VALUE2_MEMBER
          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
StyleRule()
          Default constructor.
StyleRule(java.lang.String op, java.lang.String v1, java.lang.String v2, java.lang.String testExpr)
          Constructs the style rule with an operator and its operands.
 
Method Summary
protected  java.lang.Object getIntrinsicProperty(java.lang.String propName)
           
 java.lang.String getOperator()
          Returns the operator.
 java.lang.String getTestExpression()
          gets the test expression value of this rule.
 java.lang.String getValue1()
          Returns the expression for the first operand.
 java.util.List getValue1List()
          Gets the value1 expression list.
 java.lang.String getValue2()
          Returns the expression for the second operand.
 boolean isDesignTime()
          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(java.lang.String propName, java.lang.Object value)
           
 void setOperator(java.lang.String operator)
          Sets the operator.
 void setTestExpression(java.lang.String expression)
          sets the test expression for the rule.
 void setValue1(java.util.List value1List)
          Sets the value 1 expression.
 void setValue1(java.lang.String value)
          Set expression for the first operand.
 void setValue2(java.lang.String value)
          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
copy, equals, getContext, getDefn, getElement, getHandle, getHandle, getListMemberRef, getObjectDefn, getProperty, getProperty, getReferencableProperty, handle, isReferencable, setContext, setProperty, 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 Detail

OPERATOR_MEMBER

public static final java.lang.String OPERATOR_MEMBER
Name of the comparison operator member.

See Also:
Constant Field Values

VALUE1_MEMBER

public static final java.lang.String VALUE1_MEMBER
Name of the property that gives the expression for the first operator operand.

See Also:
Constant Field Values

VALUE2_MEMBER

public static final java.lang.String VALUE2_MEMBER
Name of the property that gives the expression for the second operator operand.

See Also:
Constant Field Values

TEST_EXPR_MEMBER

public static final java.lang.String TEST_EXPR_MEMBER
The expression for this rule.

See Also:
Constant Field Values

IS_DESIGN_TIME_MEMBER

public static final java.lang.String IS_DESIGN_TIME_MEMBER
Status that determines whether this structure is used in design time or not

See Also:
Constant Field Values

operator

protected java.lang.String operator
The comparison operator. Default value is MAP_OPERATOR_EQ


value1

protected java.util.List value1
Expression for the first operand.


value2

protected java.lang.String value2
Expression for the second operand.


testExpression

protected java.lang.String testExpression
the test expression for this highlight rule.


isDesignTime

protected java.lang.Boolean isDesignTime
Constructor Detail

StyleRule

public StyleRule()
Default constructor.


StyleRule

public StyleRule(java.lang.String op,
                 java.lang.String v1,
                 java.lang.String v2,
                 java.lang.String testExpr)
Constructs the style rule with an operator and its operands.

Parameters:
op - the choice name for the operand
v1 - expression for the first operand
v2 - expression for the second operand
testExpr - the expression to check
Method Detail

getIntrinsicProperty

protected java.lang.Object getIntrinsicProperty(java.lang.String propName)
Overrides:
getIntrinsicProperty in class org.eclipse.birt.report.model.core.PropertyStructure

setIntrinsicProperty

protected void setIntrinsicProperty(java.lang.String propName,
                                    java.lang.Object value)
Overrides:
setIntrinsicProperty in class org.eclipse.birt.report.model.core.PropertyStructure

getOperator

public java.lang.String getOperator()
Returns the operator. The possible values are defined in DesignChoiceConstants, and they are:

Returns:
the operator

setOperator

public void setOperator(java.lang.String operator)
Sets the operator. The allowed values are defined in DesignChoiceConstants, and they are:

Parameters:
operator - the operator to set

getValue1

public java.lang.String getValue1()
Returns the expression for the first operand.

Returns:
the first operand expression

getValue1List

public java.util.List getValue1List()
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.

setValue1

public void setValue1(java.lang.String value)
Set expression for the first operand.

Parameters:
value - the first operand expression.

setValue1

public void setValue1(java.util.List value1List)
Sets the value 1 expression.

Parameters:
value1List - the value 1 expression list to set

getValue2

public java.lang.String getValue2()
Returns the expression for the second operand.

Returns:
the second operand expression

setValue2

public void setValue2(java.lang.String value)
Set expression for the second operand.

Parameters:
value - the second operand expression.

setTestExpression

public void setTestExpression(java.lang.String expression)
sets the test expression for the rule.

Parameters:
expression - the expression value

getTestExpression

public java.lang.String 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 interface IStructure
Overrides:
isDesignTime in class org.eclipse.birt.report.model.core.Structure
Returns:

setDesignTime

public void setDesignTime(boolean isDesignTime)
Sets the design time status for this structure.

Parameters:
isDesignTime -


Copyright © 2008 Actuate Corp. All rights reserved.