TPTP 4.5.0 Platform Project
Internal API Specification

org.eclipse.hyades.ui.internal.filters
Class BasicFeatureFilterAttribute

java.lang.Object
  extended by org.eclipse.hyades.ui.internal.filters.BasicFeatureFilterAttribute
All Implemented Interfaces:
org.eclipse.hyades.ui.filters.IFilterAttribute
Direct Known Subclasses:
BasicTraceFeatureFilterAttribute, CreationTimeFeatureFilterAttribute

public class BasicFeatureFilterAttribute
extends java.lang.Object
implements org.eclipse.hyades.ui.filters.IFilterAttribute

Constructs a basic filter attribute for the advanved tab for view filters. Values entered can be separated with '|' characters, to mean OR. So Package_name() may be the feature given with relational operators = and like, these will displayed. A user could then enter [feature] [=] [A | B] and this will handle it as feature == A || feature == B.


Field Summary
protected  java.lang.String _displayText
           
protected  org.eclipse.emf.ecore.EStructuralFeature _feature
           
protected  java.lang.String _id
           
protected  org.eclipse.hyades.models.hierarchy.extensions.RelationalOperators[] _operators
           
protected  boolean _useNotLikeOperator
           
static java.lang.String OR_SEPARATOR
           
 
Constructor Summary
BasicFeatureFilterAttribute(java.lang.String id, java.lang.String displayText, org.eclipse.emf.ecore.EStructuralFeature feature, org.eclipse.hyades.models.hierarchy.extensions.RelationalOperators[] operators, boolean useNotLikeOperator)
          The contstructor, initializes an object of this type.
 
Method Summary
 java.lang.String defaultValue()
           
 java.lang.String displayText()
           
 org.eclipse.emf.ecore.EStructuralFeature feature()
           
protected  java.lang.String getDisplayValue(java.lang.String value)
          Returns the display value from the given value.
static org.eclipse.hyades.models.hierarchy.extensions.RelationalOperators getOperator(java.lang.String operator)
          Get the RelationalOperator for the given operator String
 java.lang.String getOperator(org.eclipse.hyades.models.hierarchy.extensions.WhereExpression whereExpression)
           
static java.lang.String getOperatorString(org.eclipse.hyades.models.hierarchy.extensions.RelationalOperators operator)
          Get the operator String for the given RelationalOperators
protected  org.eclipse.hyades.models.hierarchy.extensions.WhereExpression getSubWhereExpression(org.eclipse.emf.ecore.EStructuralFeature feature, org.eclipse.hyades.models.hierarchy.extensions.RelationalOperators operator, java.lang.String value, boolean notExpression)
           
 java.lang.String getValue(org.eclipse.hyades.models.hierarchy.extensions.WhereExpression whereExpression)
           
protected  java.lang.String getValueFromDisplayValue(java.lang.String value)
          Returns the value from the given entered display value
protected  java.lang.String[] getValues(java.lang.String valuesStr)
          Returns the set of values separated by OR separators ('|').
 org.eclipse.hyades.models.hierarchy.extensions.WhereExpression getWhereExpression(java.lang.String operator, java.lang.String value)
           
 java.lang.String id()
           
 java.lang.String[] operators()
           
 java.lang.String validate(java.lang.String operator, java.lang.String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OR_SEPARATOR

public static java.lang.String OR_SEPARATOR

_id

protected java.lang.String _id

_displayText

protected java.lang.String _displayText

_operators

protected org.eclipse.hyades.models.hierarchy.extensions.RelationalOperators[] _operators

_feature

protected org.eclipse.emf.ecore.EStructuralFeature _feature

_useNotLikeOperator

protected boolean _useNotLikeOperator
Constructor Detail

BasicFeatureFilterAttribute

public BasicFeatureFilterAttribute(java.lang.String id,
                                   java.lang.String displayText,
                                   org.eclipse.emf.ecore.EStructuralFeature feature,
                                   org.eclipse.hyades.models.hierarchy.extensions.RelationalOperators[] operators,
                                   boolean useNotLikeOperator)
The contstructor, initializes an object of this type.

Parameters:
id - String The unique id for the advanced tab associated with this attribute.
displayText - String The text displayed in the attribute tab.
feature - EStructuralFeature The feature that we filter by in this attribute.
operators - RelationalOperators[] The list of relational operators that will be displayed in the advanced tab.
useNotLikeOperator - Whether to show a "Not like" operator or not.
Method Detail

feature

public org.eclipse.emf.ecore.EStructuralFeature feature()

id

public java.lang.String id()
Specified by:
id in interface org.eclipse.hyades.ui.filters.IFilterAttribute
See Also:
IFilterAttribute.id()

displayText

public java.lang.String displayText()
Specified by:
displayText in interface org.eclipse.hyades.ui.filters.IFilterAttribute
See Also:
IFilterAttribute.displayText()

validate

public java.lang.String validate(java.lang.String operator,
                                 java.lang.String value)
Specified by:
validate in interface org.eclipse.hyades.ui.filters.IFilterAttribute
See Also:
IFilterAttribute.validate(String, String)

operators

public java.lang.String[] operators()
Specified by:
operators in interface org.eclipse.hyades.ui.filters.IFilterAttribute
See Also:
IFilterAttribute.operators()

getValueFromDisplayValue

protected java.lang.String getValueFromDisplayValue(java.lang.String value)
Returns the value from the given entered display value


getSubWhereExpression

protected org.eclipse.hyades.models.hierarchy.extensions.WhereExpression getSubWhereExpression(org.eclipse.emf.ecore.EStructuralFeature feature,
                                                                                               org.eclipse.hyades.models.hierarchy.extensions.RelationalOperators operator,
                                                                                               java.lang.String value,
                                                                                               boolean notExpression)

getWhereExpression

public org.eclipse.hyades.models.hierarchy.extensions.WhereExpression getWhereExpression(java.lang.String operator,
                                                                                         java.lang.String value)
Specified by:
getWhereExpression in interface org.eclipse.hyades.ui.filters.IFilterAttribute
See Also:
IFilterAttribute.getWhereExpression(String, String)

getDisplayValue

protected java.lang.String getDisplayValue(java.lang.String value)
Returns the display value from the given value.


getValue

public java.lang.String getValue(org.eclipse.hyades.models.hierarchy.extensions.WhereExpression whereExpression)
Specified by:
getValue in interface org.eclipse.hyades.ui.filters.IFilterAttribute
See Also:
IFilterAttribute.getValue(WhereExpression)

getOperator

public java.lang.String getOperator(org.eclipse.hyades.models.hierarchy.extensions.WhereExpression whereExpression)
Specified by:
getOperator in interface org.eclipse.hyades.ui.filters.IFilterAttribute
See Also:
IFilterAttribute.getOperator(WhereExpression)

defaultValue

public java.lang.String defaultValue()
Specified by:
defaultValue in interface org.eclipse.hyades.ui.filters.IFilterAttribute
See Also:
IFilterAttribute.defaultValue()

getValues

protected java.lang.String[] getValues(java.lang.String valuesStr)
Returns the set of values separated by OR separators ('|').

Parameters:
valuesStr -
Returns:

getOperator

public static org.eclipse.hyades.models.hierarchy.extensions.RelationalOperators getOperator(java.lang.String operator)
Get the RelationalOperator for the given operator String

Parameters:
operator -
Returns:

getOperatorString

public static java.lang.String getOperatorString(org.eclipse.hyades.models.hierarchy.extensions.RelationalOperators operator)
Get the operator String for the given RelationalOperators

Parameters:
operator -
Returns:

TPTP 4.5.0 Platform Project
Internal API Specification