Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Fixed diagram and example links
Info
titleModel Documentation

Class: WhereClauseCompoundExpression

The abstract WhereClauseCompoundExpression class is provides a template for classes that are used to define compound expressions in the compoundExpression attribute of the WhereClause class (and any of its specializations). Excerpt IncludeARSP:Class Diagram: WhereClauseCompoundExpressionARSP:Class Diagram: WhereClauseCompoundExpressionother data selection classes). There are 3 specializations of the WhereClauseCompoundExpression class:

  • The CompoundSetExpression specialization is used to define compound expressions in the AnalysisSet specialization of the WhereClause class, as shown in the AnalysisSet section.
  • The CompoundSubsetExpression specialization is used to define compound expressions in the DataSubset specialization of the WhereClause class, as shown in the DataSubset section.
  • The CompoundGroupExpression specialization class is used to define compound expressions in the Group specialization of the WhereClause class, as shown in the GroupingFactor section.

Excerpt Include
ARSP:ER Diagram: WhereClauseCompoundExpression
ARSP:ER Diagram: WhereClauseCompoundExpression

In each instance of a WhereClauseCompoundExpression classIn each instance of the WhereClauseCompoundExpression class (or any of its specializations):

  • The logicalOperator attribute contains a value from the ExpressionLogicalOperatorEnum enumeration:
    • "AND" or "OR" are used in compound expressions that combine 2 or more " subclauses", each of which may be either a simple condition or , another compound expression, or a reference to an instance of an identified WhereClause class (see below).
    • "NOT" is used in compound expressions that negate another (single) subclause. The subclause , which will be either another compound expression or a reference to an identified WhereClause class (see below). Note that a compound expression should generally not be created to negate a single simple condition; another simple condition using the inverse comparator should be created instead (i.e., using "NE" vs. "EQ", "LT" vs. "GE", "GT" vs. "LE", or "NOTIN" vs. "IN").
  • The whereClauses attribute contains ,either the 2 or more subclauses being combined by the compound expression, or the single subclause being negated. Each subclause contains the level and order attributes (to position the subclause relative to other subclauses) and 1 of the following attributes:
    • condition, from
    • in a compound expression that combines selection criteria: 2 or more subclauses, each represented as an instance of the WhereClause class or 1 of its specializations; orin a compound expression that negates another compound expression: a single subclause represented as defining the subclause as a simple condition,
    • compoundExpression, from an instance of the WhereClause class or 1 of its specializations.

The representation of the instance(s) of the WhereClause class (or its specializations) in the whereClauses attribute depends which type of WhereClauseCompoundExpression is being used.

...

  • The level is 1 greater than the level of the instance of the WhereClause in which the compound expression is being defined.
  • The order attribute is:
    • used to order this subclause with respect to the other subclauses with which it is being combined (i.e., 1 for the first, 2 for the second, and so on)
    • assigned as "1" for a subclause that is being negated.
  • Either the condition attribute is used to specify the subclause as a simple condition (for subclauses being combined) or the compoundExpression attribute is used to specify the subclause as another compound expression.

...

    • defining the subclause as another compound expression,
    • subClauseId, from an instance of one of the specializations of the ReferencedWhereClause class (see below) and containing the identifier value of a referenced instance of an identified WhereClause class.

The abstract ReferencedWhereClause class provides a template for the 3 classes that are each used to reference instances of 1 of the identified WhereClause classes:

  • The ReferencedAnalysisSet class is used in whereClauses attribute of the CompoundSetExpression class to reference an instance of the AnalysisSet class.
  • The ReferencedDataSubset class is used in whereClauses attribute of the CompoundSubsetExpression class to reference an instance of the DataSubset class.
  • The ReferencedGroup class is used in whereClauses attribute of the CompoundGroupExpression class to reference an instance of the Group class.

...

Each instance of a ReferencedWhereClause class contains the level and order attributes, and the subClauseId attribute which holds the identifier value for the referenced instance of the identified WhereClause class

.

Example

Include Page
ARSP:compoundExpression: AND and OR
ARSP:compoundExpression: AND and OR

Example

Include Page
ARSP:compoundExpression: NOT
ARSP:compoundExpression: NOT

Example

Include Page
ARSP:analysisGroupings: Compound Expression
ARSP:analysisGroupings: Compound Expression

Example
inlinetrue

See the AnalysisSet section for an example of a compound expression that uses instances of the ReferencedAnalysisSet class to reference instances of the AnalysisSet class.

Note

Note that the ARS model Model is designed to support the specification of analyses of data in ADaM datasets, which are expected to be "analysis-ready." . In analysis-ready datasets, any complex criteria needed to define either subject populations or the grouping of data for analysis will usually have been applied to create flagging or grouping variables. These flagging and grouping variables can usually then be referenced in the specification of simple conditions, so compound expressions should generally not be required for the definition of subject populations (using the AnalysisSet class) or groups within grouping factors (using either the AnalysisGroup or DataGroup specialization of the Group class).

Pagenav