www.sdmetrics.com

com.sdmetrics.metrics
Class ProcedureAttributes

java.lang.Object
  extended by com.sdmetrics.metrics.ProcedureAttributes

public class ProcedureAttributes
extends java.lang.Object

Stores the attributes of the calculation procedure definition of a metric, set, matrix, or rule in the metric definition file.


Constructor Summary
ProcedureAttributes()
           
 
Method Summary
 boolean getBooleanValue(java.lang.String attrName, boolean defaultValue)
          Retrieves the value of a boolean attribute.
 ExpressionNode getExpression(java.lang.String attrName)
          Retrieves the operator tree for an optional attribute holding an expression.
 ExpressionNode getRequiredExpression(java.lang.String attrName)
          Retrieves the operator tree for a required attribute holding an expression.
 java.lang.String getRequiredStringValue(java.lang.String attrName)
          Retrieves the value of a required attribute holding a simple string.
 java.lang.String getStringValue(java.lang.String attrName)
          Retrieves the value of an optional attribute holding a simple string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProcedureAttributes

public ProcedureAttributes()
Method Detail

getExpression

public ExpressionNode getExpression(java.lang.String attrName)
Retrieves the operator tree for an optional attribute holding an expression.

Parameters:
attrName - Name of the attribute.
Returns:
Root node of the operator tree of the specified attribute, or null if the attribute is not set.

getRequiredExpression

public ExpressionNode getRequiredExpression(java.lang.String attrName)
                                     throws SDMetricsException
Retrieves the operator tree for a required attribute holding an expression.

Parameters:
attrName - Name of the attribute.
Returns:
Root node of the operator tree of the specified attribute
Throws:
SDMetricsException - The specified attribute is not set.

getStringValue

public java.lang.String getStringValue(java.lang.String attrName)
                                throws SDMetricsException
Retrieves the value of an optional attribute holding a simple string.

Parameters:
attrName - Name of the attribute.
Returns:
String value of the specified attribute, or null if the attribute is not set.
Throws:
SDMetricsException - the specified attribute contains operators rather than a simple string value.

getRequiredStringValue

public java.lang.String getRequiredStringValue(java.lang.String attrName)
                                        throws SDMetricsException
Retrieves the value of a required attribute holding a simple string.

Parameters:
attrName - Name of the attribute.
Returns:
String value of the specified attribute.
Throws:
SDMetricsException - the specified attribute is not set or contains operators rather than a simple string value.

getBooleanValue

public boolean getBooleanValue(java.lang.String attrName,
                               boolean defaultValue)
                        throws SDMetricsException
Retrieves the value of a boolean attribute.

Parameters:
attrName - Name of the attribute.
defaultValue - Value to return if the attribute is not set at all.
Returns:
true if the attribute is set to "true", false if the attribute is set to anything else than "true", defaultValue if the attribute is not set at all.
Throws:
SDMetricsException - the specified attribute contains operators rather than a simple string value.

www.sdmetrics.com