Oracle Fusion Middleware Java API Reference for Oracle Data Visualization Components
11g Release 1 (11.1.1.7.0)

E12063-08

oracle.dss.gauge
Class DataSpecification

java.lang.Object
  extended by oracle.dss.gauge.DataSpecification
All Implemented Interfaces:
java.io.Serializable

public class DataSpecification
extends java.lang.Object
implements java.io.Serializable

This class allows a developer with a DataAccess and DataDirector implementation to control how their data is mapped to the gauges in a Gauge bean. Data such as metric, thresholds, and minimum and maximum values is pulled from the data source by specifying dimension values containing that data. A developer can use this implementation to direct the data in a BI Beans data view to power a Gauge bean. For instance, given a instance of Crosstab with the following data set:

All Channels
SalesQuotaTarget
Boston121113
Chicago141417
Phoenix81012
New York211620
The developer could set up this data specification for their Gauge bean to map the Sales measure as the metric, the Quota measure as the first threshold, and the Target measure as the second threshold. The Gauge bean would create a 1 column, 4 row set of gauges complete with 2 thresholds. The data specification setup code would look something like this: String[] thresholds = {"QUOTA", "TARGET"}; DataSpecification bds = new DataSpecification(); bds.setMetric("SALES"); bds.setThresholds(thresholds); This data specification, together with an implementation of DataSource, will be what is needed to supply data to a Gauge bean. An instance of this class is optional when supplying a DataSource instance to the Gauge bean - each cell in the DataSource will be considered to be a separate gauge if an instance of this class is not provided. By default, the measure names provided in the setMetric, setThresholds, setMinimum, and setMaximum methods are assumed to be valid values in either the default measure dimension or the dimension specified by a call to setMeasureDimensionName.

See Also:
Serialized Form

Field Summary
static java.lang.String a_index
           
static java.lang.String a_name
           
static java.lang.String a_type
           
static java.lang.String BOTTOM_LABEL
          Used for identifying THRESHOLD data within a tabular data column
static int INIT_METRIC_CAPACITY
           
static int INIT_THRESHOLD_CAPACITY
           
static java.lang.String MAXIMUM
          Used for identifying MAXIMUM data within a tabular data column
static java.lang.String METRIC
          Used for identifying METRIC data within a tabular data column
static java.lang.String MINIMUM
          Used for identifying MINIMUM data within a tabular data column
static java.lang.String NAME_DIMENSION
           
static java.lang.String NAME_SPECIFICATION
           
static java.lang.String THRESHOLD
          Used for identifying THRESHOLD data within a tabular data column
static java.lang.String TOP_LABEL
          Used for identifying THRESHOLD data within a tabular data column
 
Constructor Summary
DataSpecification()
          Constructor with no DataSource instance.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Returns whether the two data specifications are equal or not
 java.lang.String getMaximum()
          Returns the measure value name used to pull maximum values from the Bean's DataSource implementation.
 java.lang.String getMeasureDimensionName()
          Returns the name of the dimension from which the measures specified in this class are taken.
 java.lang.String getMetric()
          Returns the measure value name from which to pull metric data from the Bean's DataSource implementation.
 java.lang.String getMetric(int i)
          Returns the measure value name with specific index from which to pull metric data from the Bean's DataSource implementation.
 java.util.List<java.lang.String> getMetrics()
          Returns the list of the measure value names from which to pull metric data from the Bean's DataSource implementation.
 java.lang.String getMinimum()
          Returns the measure name used to pull minimum values from the Bean's DataSource implementation.
 java.lang.String getThreshold(int index)
          Gets the measure value name for the given threshold index.
 java.util.ArrayList getThresholds()
          Returns the measure value name used to pull threshold values from the Bean's DataSource implementation.
protected  boolean getXML(oracle.dss.util.xml.ObjectNode parent)
           
 boolean isEmpty()
          Determines if this DataSpecification is empty, that is, has no data specifications on it.
protected  void setCommonGauge(CommonGauge cg)
           
 boolean setDataSpecByName(java.lang.String type, java.lang.String value)
           
 void setMaximum(java.lang.String value)
          Directs the Gauge bean to use the specified measure name to pull maximum values from the Bean's DataSource implementation.
 void setMeasureDimensionName(java.lang.String dimName)
          Allows the developer to change the name of the dimension from which the measures specified in this class are taken.
 void setMetric(java.lang.String value)
          Directs the Gauge bean to use the specified dimension value to pull metric data from the Bean's DataSource implementation.
 void setMetric(java.lang.String value, int index)
          Directs the Gauge bean to use the specified dimension value with index to pull metric data from the Bean's DataSource implementation.
 void setMetrics(java.util.List<java.lang.String> list)
          Directs the Gauge bean to use the specified dimension list of values to pull metric data from the Bean's DataSource implementation.
 void setMinimum(java.lang.String value)
          Returns the measure name used to pull minimum values from the Bean's DataSource implementation.
 void setThreshold(int index, java.lang.String value)
          Sets the measure value name for the given threshold index.
 void setThresholds(java.util.ArrayList values)
          Directs the Gauge bean to use the specified value names to pull threshold values from the Bean's DataSource implementation.
 void setXML(oracle.dss.util.xml.ContainerNode node)
          Sets the data specification attributes through XML file
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

METRIC

public static final java.lang.String METRIC
Used for identifying METRIC data within a tabular data column

See Also:
Constant Field Values

MINIMUM

public static final java.lang.String MINIMUM
Used for identifying MINIMUM data within a tabular data column

See Also:
Constant Field Values

MAXIMUM

public static final java.lang.String MAXIMUM
Used for identifying MAXIMUM data within a tabular data column

See Also:
Constant Field Values

THRESHOLD

public static final java.lang.String THRESHOLD
Used for identifying THRESHOLD data within a tabular data column

See Also:
Constant Field Values

TOP_LABEL

public static final java.lang.String TOP_LABEL
Used for identifying THRESHOLD data within a tabular data column

See Also:
Constant Field Values

BOTTOM_LABEL

public static final java.lang.String BOTTOM_LABEL
Used for identifying THRESHOLD data within a tabular data column

See Also:
Constant Field Values

NAME_DIMENSION

public static final java.lang.String NAME_DIMENSION
See Also:
getXML(oracle.dss.util.xml.ObjectNode), Constant Field Values
For internal use only. Application developers should not use this
Element name: Dimension.

NAME_SPECIFICATION

public static final java.lang.String NAME_SPECIFICATION
See Also:
getXML(oracle.dss.util.xml.ObjectNode), Constant Field Values
For internal use only. Application developers should not use this
Element name: Specification.

a_type

public static final java.lang.String a_type
See Also:
Constant Field Values

a_index

public static final java.lang.String a_index
See Also:
Constant Field Values

a_name

public static final java.lang.String a_name
See Also:
Constant Field Values

INIT_THRESHOLD_CAPACITY

public static final int INIT_THRESHOLD_CAPACITY
See Also:
Constant Field Values

INIT_METRIC_CAPACITY

public static final int INIT_METRIC_CAPACITY
See Also:
Constant Field Values
Constructor Detail

DataSpecification

public DataSpecification()
Constructor with no DataSource instance. Using this constructor will postpone validation of the settings applied with the methods in this class until the Gauge bean processes the DataSource.

Method Detail

getMeasureDimensionName

public java.lang.String getMeasureDimensionName()
Returns the name of the dimension from which the measures specified in this class are taken. The default is specified by the DEFAULT_MEASURE_NAME constant.

Returns:
Name of the measure dimension to use.

setMeasureDimensionName

public void setMeasureDimensionName(java.lang.String dimName)
Allows the developer to change the name of the dimension from which the measures specified in this class are taken. The default is specified by the DEFAULT_MEASURE_NAME constant.

Parameters:
dimName - Name of the measure dimension to use.

getMetric

public java.lang.String getMetric()
Returns the measure value name from which to pull metric data from the Bean's DataSource implementation. Returns the first metric if there are multiple metrics.

Returns:
Name of the measure value used for the metric.

getMetric

public java.lang.String getMetric(int i)
Returns the measure value name with specific index from which to pull metric data from the Bean's DataSource implementation.

Parameters:
i, - the index of the metric name which is getting.
Returns:
name of the measure value used for the metric.

getMetrics

public java.util.List<java.lang.String> getMetrics()
Returns the list of the measure value names from which to pull metric data from the Bean's DataSource implementation.

Returns:
list of the names of the measure value used for the metric.

setMetric

public void setMetric(java.lang.String value)
Directs the Gauge bean to use the specified dimension value to pull metric data from the Bean's DataSource implementation. Sets the first metric if there are multiple metrics.

Parameters:
value - Name of the measure value to use as the metric.

setMetric

public void setMetric(java.lang.String value,
                      int index)
Directs the Gauge bean to use the specified dimension value with index to pull metric data from the Bean's DataSource implementation.

Parameters:
value - name of the measure value to use as the metric.
index - the index of the metric name which is setting.

setMetrics

public void setMetrics(java.util.List<java.lang.String> list)
Directs the Gauge bean to use the specified dimension list of values to pull metric data from the Bean's DataSource implementation.

Parameters:
list - the list of names of the measure value to use as the metrics.

getMinimum

public java.lang.String getMinimum()
Returns the measure name used to pull minimum values from the Bean's DataSource implementation.

Returns:
Name of the measure value to use as the minimum.

setMinimum

public void setMinimum(java.lang.String value)
Returns the measure name used to pull minimum values from the Bean's DataSource implementation.

Parameters:
value - Name of the measure value to use as the minimum.

getMaximum

public java.lang.String getMaximum()
Returns the measure value name used to pull maximum values from the Bean's DataSource implementation.


setMaximum

public void setMaximum(java.lang.String value)
Directs the Gauge bean to use the specified measure name to pull maximum values from the Bean's DataSource implementation.

Parameters:
value - Name of the measure value to use as the maximum.

getThresholds

public java.util.ArrayList getThresholds()
Returns the measure value name used to pull threshold values from the Bean's DataSource implementation.


setThresholds

public void setThresholds(java.util.ArrayList values)
Directs the Gauge bean to use the specified value names to pull threshold values from the Bean's DataSource implementation.

Parameters:
values - ArrayList instance of threshold measure names

getThreshold

public java.lang.String getThreshold(int index)
Gets the measure value name for the given threshold index.

Parameters:
index - Threshold for which to get measure name
Returns:
String Name of measure specifying values for this threshold

setThreshold

public void setThreshold(int index,
                         java.lang.String value)
Sets the measure value name for the given threshold index.

Parameters:
index - Threshold for which to set measure name
value - Name of measure providing values for this threshold

setDataSpecByName

public boolean setDataSpecByName(java.lang.String type,
                                 java.lang.String value)
Parameters:
type - String representation of the data spec type. Valid values can be found in GaugeAttributes beginning with dst_.
value - String representation of the value of this spec.
Returns:
True if the spec value was applied, False otherwise.
For internal use only. Application developers should not use this
Applies the value of a data specification based on the given spec name.

equals

public boolean equals(java.lang.Object obj)
Returns whether the two data specifications are equal or not

Overrides:
equals in class java.lang.Object
Parameters:
obj - returns true if they are equal, otherwise false
Returns:

isEmpty

public boolean isEmpty()
Determines if this DataSpecification is empty, that is, has no data specifications on it.

Returns:
True if this DataSpecification has no data specifications on it, False otherwise.

setXML

public void setXML(oracle.dss.util.xml.ContainerNode node)
Sets the data specification attributes through XML file

Parameters:
node - The node of the data specification in the XML file

getXML

protected boolean getXML(oracle.dss.util.xml.ObjectNode parent)

setCommonGauge

protected void setCommonGauge(CommonGauge cg)
For internal use only. Application developers should not use this

Oracle Fusion Middleware Java API Reference for Oracle Data Visualization Components
11g Release 1 (11.1.1.7.0)

E12063-08

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