Skip navigation links

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

E17492-03


oracle.dss.rules.discriminator
Class QDRDiscriminator

java.lang.Object
  extended by oracle.dss.rules.discriminator.QDRDiscriminator

All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Discriminator, DiscriminatorState, DiscriminatorXML

public class QDRDiscriminator
extends java.lang.Object
implements DiscriminatorXML, DiscriminatorState

Discriminator for a rule that applies based on one or more dimension members. For example, you could use this Discriminator to specify that a DiscriminatorRule should apply to any crosstab cell that displays a value for boots, in New York, in December 1999. The item will be formatted, then, regardless of where the data appears in the crosstab.

This Discriminator compares an internal QDR class to a QDR class that is in the RuleContext that describes the item to be painted.

See Also:
DiscriminatorRule, RuleContext, QDR, Serialized Form

Field Summary
protected static java.lang.String a_setOperator
           
protected static java.lang.String equals
           
static int EQUALS
          The QDR for this Discriminator must be equivalent to the QDR from the RuleContext.
protected  java.util.Hashtable m_context
           
protected static QDRDiscriminator m_defaultDiscriminator
           
protected  QDR m_QDR
           
protected  int m_setOperator
           
static java.lang.String NAME_QDR_DISC
           
protected static java.lang.String proper_subset
           
static int PROPER_SUBSET
          The QDR for this Discriminator must be a proper subset of the QDR from the RuleContext.
protected static java.lang.String proper_superset
           
static int PROPER_SUPERSET
          The QDR for this Discriminator must be a proper superset of the QDR from the RuleContext.
protected static java.lang.String QDR_NAME
           
protected static java.lang.String S_NAME_QDR_DISC
           
protected static java.lang.String s_qdrString
           
protected static java.lang.String s_setOperator
           
protected static int setOperator
           
protected static java.lang.String subset
           
static int SUBSET
          The QDR for this Discriminator must be a subset of the QDR from the RuleContext.
protected static java.lang.String superset
           
static int SUPERSET
          The QDR for this Discriminator must be a superset of the QDR from the RuleContext.

 

Constructor Summary
QDRDiscriminator()
          Constructor that does not specify a QDR or an operator for comparison.
QDRDiscriminator(QDR qdr, int setOp)
          Constructor that specifies a QDR and an operator for comparison.

 

Method Summary
 boolean applies(RuleContext context)
          Specifies whether the data reference from the specified RuleContext meets the conditions set in this QDRDiscriminator.
 java.lang.Object clone()
          Clones this QDRDiscriminator.
protected static QDRDiscriminator createDefaultDiscriminator()
           
 boolean equals(java.lang.Object o)
           
 QDR getQDR()
          Retrieves the QDR of this QDRDiscriminator.
 int getSetOperator()
          Retrieves the comparison operator of this QDRDiscriminator.
 oracle.dss.util.xml.ObjectNode getStateAsObjectNode(java.util.List context, DiscriminatorState baseState)
           
 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 setContext(java.util.Hashtable context)
           
 void setQDR(QDR qdr)
          Specifes the QDR object for this QDRDiscriminator.
 void setSetOperator(int setOp)
          Specifies the comparison operator for this QDRDiscriminator.
 void setStateAsObjectNode(java.util.List context, oracle.dss.util.xml.ObjectNode node, DiscriminatorState baseState)
           
 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
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

m_QDR

protected QDR m_QDR
For internal use only. Application developers should not use this

m_setOperator

protected int m_setOperator
For internal use only. Application developers should not use this

SUBSET

public static final int SUBSET
The QDR for this Discriminator must be a subset of the QDR from the RuleContext.
See Also:
QDR.isSubsetOf(oracle.dss.util.QDRInterface), Constant Field Values

PROPER_SUBSET

public static final int PROPER_SUBSET
The QDR for this Discriminator must be a proper subset of the QDR from the RuleContext.
See Also:
QDR.isProperSubsetOf(oracle.dss.util.QDR), Constant Field Values

PROPER_SUPERSET

public static final int PROPER_SUPERSET
The QDR for this Discriminator must be a proper superset of the QDR from the RuleContext.
See Also:
QDR.isProperSupersetOf(oracle.dss.util.QDR), Constant Field Values

EQUALS

public static final int EQUALS
The QDR for this Discriminator must be equivalent to the QDR from the RuleContext.
See Also:
QDR.equals(oracle.dss.util.QDR), Constant Field Values

SUPERSET

public static final int SUPERSET
The QDR for this Discriminator must be a superset of the QDR from the RuleContext.
See Also:
QDR.isSupersetOf(oracle.dss.util.QDRInterface), Constant Field Values

QDR_NAME

protected static final java.lang.String QDR_NAME
See Also:
Constant Field Values
For internal use only. Application developers should not use this
Property for storing class of QDR being stored in persistence

S_NAME_QDR_DISC

protected static final java.lang.String S_NAME_QDR_DISC
See Also:
Constant Field Values
For internal use only. Application developers should not use this

s_setOperator

protected static final java.lang.String s_setOperator
See Also:
Constant Field Values
For internal use only. Application developers should not use this

s_qdrString

protected static final java.lang.String s_qdrString
See Also:
Constant Field Values
For internal use only. Application developers should not use this

m_defaultDiscriminator

protected static QDRDiscriminator m_defaultDiscriminator
For internal use only. Application developers should not use this

m_context

protected java.util.Hashtable m_context
For internal use only. Application developers should not use this

NAME_QDR_DISC

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

setOperator

protected static final int setOperator
See Also:
Constant Field Values
For internal use only. Application developers should not use this

a_setOperator

protected static final java.lang.String a_setOperator
See Also:
Constant Field Values
For internal use only. Application developers should not use this

subset

protected static final java.lang.String subset
See Also:
Constant Field Values
For internal use only. Application developers should not use this

proper_subset

protected static final java.lang.String proper_subset
See Also:
Constant Field Values
For internal use only. Application developers should not use this

proper_superset

protected static final java.lang.String proper_superset
See Also:
Constant Field Values
For internal use only. Application developers should not use this

equals

protected static final java.lang.String equals
See Also:
Constant Field Values
For internal use only. Application developers should not use this

superset

protected static final java.lang.String superset
See Also:
Constant Field Values
For internal use only. Application developers should not use this

Constructor Detail

QDRDiscriminator

public QDRDiscriminator()
Constructor that does not specify a QDR or an operator for comparison. If you use this constructor, call the setQDR method to specify a QDR for this Discriminator. Call the setSetOperator to specify an operator.

QDRDiscriminator

public QDRDiscriminator(QDR qdr,
                        int setOp)
Constructor that specifies a QDR and an operator for comparison.
Parameters:
qdr - The QDR that identifies the dimension members for which a DataView item must display data in order for this QDRDiscriminator to apply.
setOp - The operator that describes the required relationship between the two QDR objects (such as SUBSET or SUPERSET).

Method Detail

clone

public java.lang.Object clone()
Clones this QDRDiscriminator.
Specified by:
clone in interface Discriminator
Overrides:
clone in class java.lang.Object
Returns:
The clone of this QDRDiscriminator.

setQDR

public void setQDR(QDR qdr)
Specifes the QDR object for this QDRDiscriminator.
Parameters:
qdr - The QDR that identifies the dimension members for which a DataView item must display data in order for this QDRDiscriminator to apply.

getQDR

public QDR getQDR()
Retrieves the QDR of this QDRDiscriminator.
Returns:
The QDR that identifies the dimension members for which a DataView item must display data in order for this QDRDiscriminator to apply.

setSetOperator

public void setSetOperator(int setOp)
Specifies the comparison operator for this QDRDiscriminator.
Parameters:
setOp - A constant for the operator that describes the required relationship between the two QDR objects (such as SUBSET or SUPERSET). Valid constants are listed in the See Also section.
See Also:
EQUALS, SUBSET, PROPER_SUBSET, SUPERSET, PROPER_SUPERSET

getSetOperator

public int getSetOperator()
Retrieves the comparison operator of this QDRDiscriminator.
Returns:
The operator that describes the required relationship between the two QDR objects (such as SUBSET or SUPERSET).
See Also:
EQUALS, SUBSET, PROPER_SUBSET, SUPERSET, PROPER_SUPERSET

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

applies

public boolean applies(RuleContext context)
Specifies whether the data reference from the specified RuleContext meets the conditions set in this QDRDiscriminator. This method compares QDR objects. For example, in a rule that displays all values for December 1999 in bold type, the QDR for the QDRDiscriminator would limit the Month dimension to December 1999, and the operator for would be SUPERSET. For a crosstab cell that displays a value for shoes, in New York, in December 1999, the QDR in the RuleContext would limit Product to shoes, Geography to New York, and Month to December 1999. The QDR for the QDRDiscriminator would refer to superset of the data that is specified in the QDR from the RuleContext, so this method would return true.
Specified by:
applies in interface Discriminator
Parameters:
context - The context of the item to be painted.
Returns:
true if the QDR of the specified RuleContext has the required relationship to the QDR for this QDRDiscriminator, false if not.

setContext

public void setContext(java.util.Hashtable context)
Parameters:
context - A hashtable that a user can use to pass XMLContext One can also use this table to pass more information to its objects.
For internal use only. Application developers should not use this
sets the context

setXML

public boolean setXML(oracle.dss.util.xml.ObjectNode node,
                      ComponentTypeConverter converter,
                      java.lang.String version,
                      int reset)
Description copied from interface: DiscriminatorXML
Specifies XML that represents properties and values. This method applies the values of the properties in the XML to the DiscriminatorXML.
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
For internal use only. Application developers should not use this

getXML

public oracle.dss.util.xml.ObjectNode getXML(boolean allProperties,
                                             ComponentTypeConverter converter,
                                             boolean emptyElement)
Description copied from interface: DiscriminatorXML
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.
For internal use only. Application developers should not use this
Retrieves XML from this component

setStateAsObjectNode

public void setStateAsObjectNode(java.util.List context,
                                 oracle.dss.util.xml.ObjectNode node,
                                 DiscriminatorState baseState)
Specified by:
setStateAsObjectNode in interface DiscriminatorState
For internal use only. Application developers should not use this

getStateAsObjectNode

public oracle.dss.util.xml.ObjectNode getStateAsObjectNode(java.util.List context,
                                                           DiscriminatorState baseState)
Specified by:
getStateAsObjectNode in interface DiscriminatorState
For internal use only. Application developers should not use this

createDefaultDiscriminator

protected static QDRDiscriminator createDefaultDiscriminator()
For internal use only. Application developers should not use this
create the default QDRDiscriminator

Skip navigation links

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

E17492-03


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