Oracle Fusion Middleware Java API Reference for Oracle Data Visualization Components
11g Release 2 (11.1.2.1.0)

E17492-02

oracle.dss.rules.discriminator
Class ConditionDiscriminator

java.lang.Object
  extended by oracle.dss.rules.discriminator.ConditionDiscriminator
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Discriminator, DiscriminatorXML

public class ConditionDiscriminator
extends java.lang.Object
implements DiscriminatorXML

See Also:
Serialized Form

Field Summary
protected  java.lang.Object m_dataCondition
           
protected  java.lang.String m_dataMap
           
static java.lang.String NAME_DC_DISC
           
 
Constructor Summary
ConditionDiscriminator()
          Constructor that does not specify a data condition If you use this constructor, call the setDataCondition method to specify a DataCondition either SimpleCondition or CompoundCondition for this Discriminator.
ConditionDiscriminator(java.lang.Object dc, java.lang.String dataMap)
          Constructor that specifies a data condition.
 
Method Summary
 boolean applies(RuleContext context)
          Specifies whether this Discriminator applies.
 java.lang.Object clone()
          Clones this Discriminator.
 java.lang.Object getDataCondition()
          get the data condition
 oracle.dss.util.xml.ObjectNode getXML(boolean allProperties, ComponentTypeConverter converter, boolean emptyElement)
          Retrieves XML that represents properties and their values in the form of and ObjectNode.
 void setDataCondition(java.lang.Object dc, java.lang.String dataMap)
          set the specified DataCondition.
 boolean setXML(oracle.dss.util.xml.ObjectNode node, ComponentTypeConverter converter, java.lang.String version, int reset)
          Specifies XML that represents properties and values.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_dataCondition

protected java.lang.Object m_dataCondition

m_dataMap

protected java.lang.String m_dataMap

NAME_DC_DISC

public static final java.lang.String NAME_DC_DISC
See Also:
Constant Field Values
For internal use only. Application developers should not use this
Constructor Detail

ConditionDiscriminator

public ConditionDiscriminator()
Constructor that does not specify a data condition If you use this constructor, call the setDataCondition method to specify a DataCondition either SimpleCondition or CompoundCondition for this Discriminator.


ConditionDiscriminator

public ConditionDiscriminator(java.lang.Object dc,
                              java.lang.String dataMap)
Constructor that specifies a data condition.

Parameters:
dc - DataCondition either SimpleCondition or CompoundCondition that should be satisfied in order for this ConditionDiscriminator to apply.
dataMap - DataMap type associated with the given condition. This DataMap can be retrieved using the setExpressions in DataDirector3.
See Also:
SimpleCondition, CompoundCondition, oracle.dss.util.DataDirector3#getCompatibleDataItemMetadata, oracle.dss.util.DataDirector3#setExpressions
Method Detail

setDataCondition

public void setDataCondition(java.lang.Object dc,
                             java.lang.String dataMap)
set the specified DataCondition.

Parameters:
dc - DataCondition either SimpleCondition or CompoundCondition that should be satisfied in order for this ConditionDiscriminator to apply.
dataMap - DataMap type associated with the given condition. This DataMap can be retrieved using the setExpressions in DataDirector3.
See Also:
SimpleCondition, CompoundCondition, oracle.dss.util.DataDirector3#getCompatibleDataItemMetadata, oracle.dss.util.DataDirector3#setExpressions

getDataCondition

public java.lang.Object getDataCondition()
get the data condition

Returns:
DataCondition either SimpleCondition or CompoundCondition that should be satisfied in order for this ConditionDiscriminator to apply.
See Also:
SimpleCondition, CompoundCondition

applies

public boolean applies(RuleContext context)
Specifies whether this Discriminator applies. Compares the information in the specified RuleContext with its internal information. If they match, this Discriminator applies.

Specified by:
applies in interface Discriminator
Parameters:
context - The context of the item to be painted.
Returns:
true if the information from the context meets the condition specified in this Discriminator, false if not.

clone

public java.lang.Object clone()
Clones this Discriminator.

Specified by:
clone in interface Discriminator
Overrides:
clone in class java.lang.Object
Returns:
The clone of this Discriminator.

getXML

public oracle.dss.util.xml.ObjectNode getXML(boolean allProperties,
                                             ComponentTypeConverter converter,
                                             boolean emptyElement)
Retrieves XML that represents properties and their values in the form of and ObjectNode.

Specified by:
getXML in interface DiscriminatorXML
Parameters:
allProperties - true to store all property values in XML, false to store only values that are different from default values.
converter - A converter that converts component strings to integers and integers to strings.
emptyElement - true if an empty element needs to be returned when none of the property values have changed from default. false if null should should be returned when none of the property values have changed from default. This argument is considered only if allProperties is false.
Returns:
XML for the properties and values.

setXML

public boolean setXML(oracle.dss.util.xml.ObjectNode node,
                      ComponentTypeConverter converter,
                      java.lang.String version,
                      int reset)
Specifies XML that represents properties and values. This method applies the values of the properties in the XML to the ConditionDiscriminator.

Specified by:
setXML in interface DiscriminatorXML
Parameters:
node - ObjectNode that has the properties and their values.
converter - A converter that converts component strings to integers and vice versa.
version - The XML version.
reset - A constant that indicates how much to reset when XML is applied. Valid values are listed in the See Also section.
Returns:
true if XML is properly applied, false if the XML cannot be applied.
See Also:
Rule.RESET_NONE, Rule.RESET_XML_PROPERTIES, Rule.RESET_EVERYTHING

Oracle Fusion Middleware Java API Reference for Oracle Data Visualization Components
11g Release 2 (11.1.2.1.0)

E17492-02

Copyright © 1997, 2011, Oracle. All rights reserved.