This class aims to be a simpler more limited version of the CaseDataset Category implementation.

It can only generate "equality" queries for a single field. The category must be configured before it can be used to generate queries.

This category cannot be serialized. If you want to preserve this category's state convert it to CaseDataset with the [transformToCaseDataset()]CaseSimpleDataset#transformToCaseDataset method and serialize the result.

See [configure]CaseSimpleDataset#configure for more information.

Hierarchy (view full)

Constructors

Properties

_allowedOperators: Operator<any>[]

Operators that can be used to generated queries on the above keywords

_fieldId: string
_fieldType: string
_generatedPredicate$: BehaviorSubject<ElementaryPredicate>

Emit a new Predicate if the Category is in a state that it can be created. Emits undefined if the Category is not in such state.

_inputType: SearchInputType

input field type that should be used to enter operator arguments for this category

used to record information about incorrect use of this class

_netIdentifiers: string[]
_operandsFormControls: FormControl<any>[]

Stores the FormControl objects that are pushed into the observable when the number of operands changes.

_operandsFormControls$: ReplaySubject<FormControl<any>[]>

Contains the FormControl objects that can be used to input search arguments.

_OPERATOR_INPUT: ConfigurationInput

Utility variable that can be used as value for the [configurationInputs$]Category#configurationInputs$ Observable.

_operatorFormControl: FormControl<any>

Contains the FormControl object that is used to drive the operator selection.

The category can subscribe to it if it wishes to react to the selection change by the user.

_operatorService: OperatorService

used to resolve serialized operators during deserialization

_operatorTemplate$: BehaviorSubject<OperatorTemplatePart[]>

Contains the operator template parts that make up the operands GUI.

_optionalDependencies: OptionalDependencies
_pfqlKeyword: string
_pfqlKeywords: string[]

PFQL keywords that should be queried by queries generated with this category

_processCategory: CaseProcess
_resourceTypePrefix: ResourceTypeQueryPrefix

resource type prefix in PFQL query

_trackByIdGenerator: IncrementingCounter

Generates IDs for template parts supplied to ng for.

translationPath: string

path to the translation string

Accessors

  • get generatedPredicate$(): Observable<ElementaryPredicate>
  • If you use the Category class as a sort of PredicateBuilder, then you want to use the [generatePredicate()]Category#generatePredicate method instead.

    This stream publishes either a new Predicate object or undefined based on changes to the FormControls that are managed by this class. If (based on user input) the Category reaches a state when construction of a Predicate is possible it will emit this Predicate. If it reaches a state when the Predicate can not longer be created undefined is emitted.

    Returns Observable<ElementaryPredicate>

  • get operandsFormControls(): FormControl<any>[]
  • Returns the current array of FormControl objects that contains as many controls as is the arity of the selected operator. Unlike the [operandsFormControls$]Category#operandsFormControls$ observable, this getter returns the actual array instance directly without wrapping it in an observable.

    Returns FormControl<any>[]

    an array of FormControl objects for the operands, or an empty array if no operator is selected

  • get operandsFormControls$(): Observable<FormControl<any>[]>
  • Returns Observable<FormControl<any>[]>

    an array of FormControl objects that contains as many controls as is the arity of the selected operator. Calling this method multiple times will return the same FormControl instances. When no operator is selected undefined is emitted.

Methods