Interface FilterCompoundInterface

The FilterCompoundInterface interface is a very specialized FilterSetInterface.

A FilterCompoundInterface is a combination of metadata filters ((FilterAttributeInterface, FilterRangeInterface, FilterHasFieldInterface, FilterBooleanInterface)) that works on individual metadata documents and not on the joined attribute set (see Available Filters).

Only FilterAttributeInterface, FilterRangeInterface, FilterHasFieldInterface and FilterBooleanInterface may be included in a FilterCompoundInterface by insertFilter.

The FilterItemInterfaces are combined with their operators, but are all matched against the SAME metadata document.

Any empty FilterCompoundInterface is valid and is represented by an empty set.

The FilterCompoundInterface interface is created through the DataSessionInterface.createFilterCompound.

The FilterCompoundInterface has the type FilterType.FT_COMPOUND (FilterItemInterface.getFilterType).

The FilterCompoundInterface has a depth contribution of 1 + Maximum depth contribution of each included FilterItemInterface.

/**
* Sample to illustrate :
* Select electrical `part instances` whose replacement date is within the next 10 days (we assume we are the 26th of jan 2021).
* Test : create two filters in a FilterCompoundInterface and put them in intersection.
*/
import {
AttributesDictionaryInterface, AttributeInfoInterface, AttributeType, DataSessionInterface,
FilterCompoundInterface, FilterRangeItemInterface, WorkingSetInterface, FilterAttributeInterface,
GroupOperator, FilterRangeInterface
} from 'generated_files/documentation/appinfiniteapi';

// the DataSessionInterface has been created previously and is connected
let lDataSession : DataSessionInterface;

// The Filter Solver has been created previously, its Working set has been set
let lFilterSolver : WorkingSetInterface;

// MAKE SURE the attributes "type" and "replacement" are relevant */
const lAttributeDictionary : AttributesDictionaryInterface = lDataSession.getAttributesDictionary();
let lAttributeInfo : AttributeInfoInterface | undefined = lAttributeDictionary.getAttributeInfo('type');
// make sure the attribute is a string one
console.assert((lAttributeInfo !== undefined) && (lAttributeInfo.getAttributeType() === AttributeType.ATTR_STRING));

lAttributeInfo = lAttributeDictionary.getAttributeInfo('replacement');
// make sure the attribute is a date one
console.assert((lAttributeInfo !== undefined) && (lAttributeInfo.getAttributeType() === AttributeType.ATTR_DATE));

// create the electrical filter
const lElectricalFilter : FilterAttributeInterface = lDataSession.createFilterAttribute();
// type set to electrical (exactly)
lElectricalFilter.setAttributeName('type');
lElectricalFilter.setExactValues(['electrical']);
// the filter will be used inside a FilterCompoundInterface, N/A cannot be used (limitation on FilterCompoundInterface)
// lElectricalFilter.setNaValueChecked(false);
// useless, GroupOperator.GO_UNION is the default operator when creating a new filter
// lElectricalFilter.setFilterOperator(GroupOperator.GO_UNION);

const lReplacementFilter : FilterRangeInterface = lDataSession.createFilterRange();
// work on "replacement" metadata
lReplacementFilter.setAttributeName('replacement');
// create a range
{
const lRepRange : FilterRangeItemInterface = lReplacementFilter.createFilterRangeItem();
// we want to include the bounds in the query
lRepRange.setIncludedLower(true);
lRepRange.setIncludedUpper(true);
const lCurrentTime : number = Date.now();
const lCurrentTimePlus10Days : number = lCurrentTime + 10 * 24 * 3600 * 1000;
// range between now and 10 days
lRepRange.setLowerBound(lCurrentTime);
lRepRange.setUpperBound(lCurrentTimePlus10Days);
}
// intersection is the way to go since intersection of type electrical and instances that should be replaced within the next 10 days
lReplacementFilter.setFilterOperator(GroupOperator.GO_INTERSECTION);

const lCompoundFilter : FilterCompoundInterface = lDataSession.createFilterCompound();
// useless, GroupOperator.GO_UNION is the default operator when creating a new filter
// lCompoundFilter.setFilterOperator(GroupOperator.GO_UNION);

// add the filters inside the FilterCompoundInterface
// push back (-1) the electrical filter
lCompoundFilter.insertFilter(-1, lElectricalFilter);
// push back (-1) the replacement filter, as it is the second one, its operator is used and therefore
// intersection is used
lCompoundFilter.insertFilter(-1, lReplacementFilter);

// and add the compound filter
lFilterSolver.insertFilter(-1, lCompoundFilter);

// and tell the DataSessionInterface to update the modified WorkingSetInterfaces
lDataSession.update();

.
Metadata/Filters

interface FilterCompoundInterface {
    addEventListener(pType, pListener, pObject): string;
    addEventListener(pType, pListener): string;
    areSignalsBlocked(): boolean;
    blockSignals(pBlock): void;
    dispose(): void;
    fromJSON(pFilterData): boolean;
    getDepthContribution(): number;
    getFilterById(pFilterId): FilterItemInterface;
    getFilterByOrder(pOrder): FilterItemInterface;
    getFilterCount(): number;
    getFilterId(): string;
    getFilterOperator(): GroupOperator;
    getFilterOrder(pFilterId): number;
    getFilterType(): FilterType;
    getInfiniteObjectType(): InfiniteObjectType;
    getLastError(): InfiniteError;
    getParentFilter(): FilterSetInterface;
    getParentFilterId(): string;
    hasEventListener(pType, pListener): boolean;
    hasEventListenerById(pId): boolean;
    insertFilter(pOrder, pFilter): boolean;
    isDisposed(): boolean;
    isEnabled(): boolean;
    isInverted(): boolean;
    moveFilter(pFilterId, pOrder): boolean;
    removeAllEventListeners(): boolean;
    removeAllFilters(): void;
    removeEventListener(pType, pListener, pObject): boolean;
    removeEventListener(pType, pListener): boolean;
    removeEventListenerById(pId): boolean;
    removeFilter(pFilterId): boolean;
    setEnabled(pEnabled): void;
    setFilterId(pFilterId): void;
    setFilterOperator(pFilterOperator): void;
    setInverted(pInverted): void;
    toJSON(pKey?): Object;
}

Hierarchy (view full)

Methods

  • Adds a listener to an event type.

    When an event of the type pType fires, the callback pListener will be called. This function returns a unique string id that may be used in removeEventListenerById to allow simple listener removal. It is possible to add an object that will be included in the callback to avoid creating too many closures. Calling twice addEventListener with the same parameters results in the second call to be ignored, only unique pairs callback / object are allowed, in order to avoid calling multiple times the same thing.

    Parameters

    • pType: string
      in
      The type of the event pListener will be called upon.
    • pListener: tListenerCallback
      in
      The listener function that fires when the given event type occurs.
    • pObject: Object
      in
      The optional object the callback will be called with when the given event fires.

    Returns string

    The id of the inserted callback (actually an UUID).

  • Adds a listener to an event type.

    When an event of the type pType fires, the callback pListener will be called. This function returns a unique string id that may be used in removeEventListenerById to allow simple listener removal.

    Parameters

    • pType: string
      in
      The type of the event pListener will be called upon.
    • pListener: tListenerCallback
      in
      The listener function that fires when the given event type occurs.

    Returns string

    The id of the inserted callback (actually an UUID).

  • Tells if signals sent by the object are blocked or not.

    If signals are blocked, no signal will be emitted nor buffered, such signal will be lost.

    Returns boolean

    true if signals are blocked.

  • Blocks / Unblocks all signals sent by the object.

    If signals are blocked, no signal will be emitted nor buffered, such signal will be lost.

    Parameters

    • pBlock: boolean
      in
      If set to true, all further signals will be silently discarded.

    Returns void

  • Sets the content of the FilterItemInterface from a former call to toJSON.

    Use addEventListener on the event FilterItemInterfaceSignal.FilterDataChanged to know when the FilterItemInterface internal data changed.

    {
    "$defs": {
    "all": {
    "additionalProperties": false,
    "properties": {
    "enabled": {
    "default": true,
    "description": "If disabled, this filter is completely ignored during all the computations",
    "example": true,
    "type": "boolean"
    },
    "id": {
    "description": "an object id : only ascii non control and non blank characters",
    "example": "123e4567e89b12d3a456426614174000",
    "maxLength": 64,
    "pattern": "^[\\x21-\\x7E]{1,64}$",
    "type": "string"
    },
    "inverted": {
    "description": "When 'inverted', a filter elects all the `part instances` that would not be selected if it was not inverted.",
    "example": true,
    "type": "boolean"
    },
    "operator": {
    "default": "and",
    "description": "Operator to apply with this filter and its closest enabled predecessor in its parent container.",
    "enum": [
    "or",
    "and",
    "minus"
    ],
    "example": "or",
    "type": "string"
    },
    "type": {
    "const": "all",
    "description": "Type of the filter",
    "type": "string"
    },
    "version": {
    "description": "Define the version of the object",
    "example": 1,
    "type": "integer"
    }
    },
    "required": [
    "type",
    "operator",
    "enabled",
    "inverted",
    "id"
    ],
    "title": "Filter all definition",
    "type": "object"
    },
    "attribute": {
    "additionalProperties": false,
    "properties": {
    "attribute": {
    "description": "Name of the attribute to filter with",
    "example": "PartNumber",
    "minLength": 0,
    "type": "string"
    },
    "containsValues": {
    "description": "Elects all the `part instances` having the attribute whose name set with attribute in their `joined attribute set` that have a value that contains at least one of the values in the given string array",
    "items": {
    "type": "string"
    },
    "type": "array"
    },
    "enabled": {
    "default": true,
    "description": "If disabled, this filter is completely ignored during all the computations",
    "example": true,
    "type": "boolean"
    },
    "exactValues": {
    "description": "Elects all the `part instances` having the attribute whose name set with `attribute` in their `joined attribute set` that have a value exactly included in the given string array.",
    "items": {
    "type": "string"
    },
    "type": "array"
    },
    "id": {
    "description": "an object id : only ascii non control and non blank characters",
    "example": "123e4567e89b12d3a456426614174000",
    "maxLength": 64,
    "pattern": "^[\\x21-\\x7E]{1,64}$",
    "type": "string"
    },
    "inverted": {
    "description": "When 'inverted', a filter elects all the `part instances` that would not be selected if it was not inverted.",
    "example": true,
    "type": "boolean"
    },
    "na": {
    "description": "Include `part instances` with the `N/A` value",
    "type": "boolean"
    },
    "operator": {
    "default": "and",
    "description": "Operator to apply with this filter and its closest enabled predecessor in its parent container.",
    "enum": [
    "or",
    "and",
    "minus"
    ],
    "example": "or",
    "type": "string"
    },
    "type": {
    "const": "attribute",
    "description": "Type of the filter",
    "type": "string"
    },
    "version": {
    "description": "Define the version of the object",
    "example": 1,
    "type": "integer"
    }
    },
    "required": [
    "type",
    "enabled",
    "operator",
    "inverted",
    "exactValues",
    "containsValues",
    "na",
    "attribute",
    "id"
    ],
    "title": "Filter attribute definition",
    "type": "object"
    },
    "boolean": {
    "additionalProperties": false,
    "properties": {
    "attribute": {
    "description": "Name of the attribute to filter with",
    "example": "PartNumber",
    "minLength": 0,
    "type": "string"
    },
    "enabled": {
    "default": true,
    "description": "If disabled, this filter is completely ignored during all the computations",
    "example": true,
    "type": "boolean"
    },
    "id": {
    "description": "an object id : only ascii non control and non blank characters",
    "example": "123e4567e89b12d3a456426614174000",
    "maxLength": 64,
    "pattern": "^[\\x21-\\x7E]{1,64}$",
    "type": "string"
    },
    "inverted": {
    "description": "When 'inverted', a filter elects all the `part instances` that would not be selected if it was not inverted.",
    "example": true,
    "type": "boolean"
    },
    "operator": {
    "default": "and",
    "description": "Operator to apply with this filter and its closest enabled predecessor in its parent container.",
    "enum": [
    "or",
    "and",
    "minus"
    ],
    "example": "or",
    "type": "string"
    },
    "type": {
    "const": "boolean",
    "description": "Type of the filter",
    "type": "string"
    },
    "value": {
    "default": false,
    "description": "Boolean value of the filter",
    "example": false,
    "type": "boolean"
    },
    "version": {
    "description": "Define the version of the object",
    "example": 1,
    "type": "integer"
    }
    },
    "required": [
    "type",
    "operator",
    "enabled",
    "inverted",
    "attribute",
    "value",
    "id"
    ],
    "title": "Filter boolean definition",
    "type": "object"
    },
    "box": {
    "additionalProperties": false,
    "properties": {
    "enabled": {
    "default": true,
    "description": "If disabled, this filter is completely ignored during all the computations",
    "example": true,
    "type": "boolean"
    },
    "id": {
    "description": "an object id : only ascii non control and non blank characters",
    "example": "123e4567e89b12d3a456426614174000",
    "maxLength": 64,
    "pattern": "^[\\x21-\\x7E]{1,64}$",
    "type": "string"
    },
    "inverted": {
    "description": "When 'inverted', a filter elects all the `part instances` that would not be selected if it was not inverted.",
    "example": true,
    "type": "boolean"
    },
    "max": {
    "description": "Define the coordinates [x,y,z] of the max point of the AABB",
    "items": {
    "type": "number"
    },
    "maxItems": 3,
    "minItems": 3,
    "type": "array"
    },
    "min": {
    "description": "Define the coordinates [x,y,z] of the min point of the AABB",
    "items": {
    "type": "number"
    },
    "maxItems": 3,
    "minItems": 3,
    "type": "array"
    },
    "operator": {
    "default": "and",
    "description": "Operator to apply with this filter and its closest enabled predecessor in its parent container.",
    "enum": [
    "or",
    "and",
    "minus"
    ],
    "example": "or",
    "type": "string"
    },
    "overlap": {
    "description": "Specify if AABB test is included or overlap",
    "example": true,
    "type": "boolean"
    },
    "precision": {
    "description": "Numeric precision will be subtracted/added to min/max point of AABB",
    "type": "number"
    },
    "type": {
    "const": "box",
    "description": "Type of the filter",
    "type": "string"
    },
    "version": {
    "description": "Define the version of the object",
    "example": 1,
    "type": "integer"
    }
    },
    "required": [
    "type",
    "operator",
    "inverted",
    "enabled",
    "min",
    "max",
    "overlap",
    "precision",
    "id"
    ],
    "title": "Filter box definition",
    "type": "object"
    },
    "compound": {
    "additionalProperties": false,
    "properties": {
    "enabled": {
    "default": true,
    "description": "If disabled, this filter is completely ignored during all the computations",
    "example": true,
    "type": "boolean"
    },
    "id": {
    "description": "an object id : only ascii non control and non blank characters",
    "example": "123e4567e89b12d3a456426614174000",
    "maxLength": 64,
    "pattern": "^[\\x21-\\x7E]{1,64}$",
    "type": "string"
    },
    "inverted": {
    "description": "When 'inverted', a filter elects all the `part instances` that would not be selected if it was not inverted.",
    "example": true,
    "type": "boolean"
    },
    "operator": {
    "default": "and",
    "description": "Operator to apply with this filter and its closest enabled predecessor in its parent container.",
    "enum": [
    "or",
    "and",
    "minus"
    ],
    "example": "or",
    "type": "string"
    },
    "subfilters": {
    "description": "list of metadata sub filters",
    "items": {
    "$ref": "#/$defs/compoundfilters"
    },
    "type": "array"
    },
    "type": {
    "const": "compound",
    "description": "Type of the filter",
    "type": "string"
    },
    "version": {
    "description": "Define the version of the object",
    "example": 1,
    "type": "integer"
    }
    },
    "required": [
    "type",
    "operator",
    "enabled",
    "inverted",
    "subfilters",
    "id"
    ],
    "title": "Filter compound definition",
    "type": "object"
    },
    "compoundfilters": {
    "oneOf": [
    {
    "$ref": "#/$defs/boolean"
    },
    {
    "$ref": "#/$defs/hasfield"
    },
    {
    "$ref": "#/$defs/attribute"
    },
    {
    "$ref": "#/$defs/range"
    }
    ]
    },
    "diagonal": {
    "additionalProperties": false,
    "properties": {
    "enabled": {
    "default": true,
    "description": "If disabled, this filter is completely ignored during all the computations",
    "example": true,
    "type": "boolean"
    },
    "id": {
    "description": "an object id : only ascii non control and non blank characters",
    "example": "123e4567e89b12d3a456426614174000",
    "maxLength": 64,
    "pattern": "^[\\x21-\\x7E]{1,64}$",
    "type": "string"
    },
    "inverted": {
    "description": "When 'inverted', a filter elects all the `part instances` that would not be selected if it was not inverted.",
    "example": true,
    "type": "boolean"
    },
    "operator": {
    "default": "and",
    "description": "Operator to apply with this filter and its closest enabled predecessor in its parent container.",
    "enum": [
    "or",
    "and",
    "minus"
    ],
    "example": "or",
    "type": "string"
    },
    "rangeitems": {
    "description": "List of range item",
    "items": {
    "$ref": "#/$defs/rangeitem"
    },
    "type": "array"
    },
    "type": {
    "const": "diagonal",
    "description": "Type of the filter",
    "type": "string"
    },
    "version": {
    "description": "Define the version of the object",
    "example": 1,
    "type": "integer"
    }
    },
    "required": [
    "type",
    "operator",
    "enabled",
    "inverted",
    "rangeitems",
    "id"
    ],
    "title": "Filter diagonal definition",
    "type": "object"
    },
    "filter": {
    "oneOf": [
    {
    "$ref": "#/$defs/box"
    },
    {
    "$ref": "#/$defs/all"
    },
    {
    "$ref": "#/$defs/attribute"
    },
    {
    "$ref": "#/$defs/boolean"
    },
    {
    "$ref": "#/$defs/literal"
    },
    {
    "$ref": "#/$defs/compound"
    },
    {
    "$ref": "#/$defs/diagonal"
    },
    {
    "$ref": "#/$defs/hasfield"
    },
    {
    "$ref": "#/$defs/partinstanceidlist"
    },
    {
    "$ref": "#/$defs/range"
    },
    {
    "$ref": "#/$defs/filterset"
    }
    ]
    },
    "filterset": {
    "additionalProperties": false,
    "properties": {
    "enabled": {
    "default": true,
    "description": "If disabled, this filter is completely ignored during all the computations",
    "example": true,
    "type": "boolean"
    },
    "id": {
    "description": "an object id : only ascii non control and non blank characters",
    "example": "123e4567e89b12d3a456426614174000",
    "maxLength": 64,
    "pattern": "^[\\x21-\\x7E]{1,64}$",
    "type": "string"
    },
    "inverted": {
    "description": "When 'inverted', a filter elects all the `part instances` that would not be selected if it was not inverted.",
    "example": true,
    "type": "boolean"
    },
    "operator": {
    "default": "and",
    "description": "Operator to apply with this filter and its closest enabled predecessor in its parent container.",
    "enum": [
    "or",
    "and",
    "minus"
    ],
    "example": "or",
    "type": "string"
    },
    "subfilters": {
    "description": "List of sub filters",
    "items": {
    "oneOf": [
    {
    "$ref": "#/$defs/box"
    },
    {
    "$ref": "#/$defs/all"
    },
    {
    "$ref": "#/$defs/attribute"
    },
    {
    "$ref": "#/$defs/boolean"
    },
    {
    "$ref": "#/$defs/literal"
    },
    {
    "$ref": "#/$defs/compound"
    },
    {
    "$ref": "#/$defs/diagonal"
    },
    {
    "$ref": "#/$defs/hasfield"
    },
    {
    "$ref": "#/$defs/partinstanceidlist"
    },
    {
    "$ref": "#/$defs/range"
    },
    {
    "$ref": "#/$defs/filterset"
    }
    ]
    },
    "type": "array"
    },
    "type": {
    "const": "set",
    "description": "Type of the filter",
    "type": "string"
    },
    "version": {
    "description": "Define the version of the object",
    "example": 1,
    "type": "integer"
    }
    },
    "required": [
    "type",
    "enabled",
    "operator",
    "inverted",
    "subfilters",
    "id"
    ],
    "title": "Filter set definition",
    "type": "object"
    },
    "hasfield": {
    "additionalProperties": false,
    "properties": {
    "attribute": {
    "description": "Name of the attribute to filter with",
    "example": "PartNumber",
    "minLength": 0,
    "type": "string"
    },
    "enabled": {
    "default": true,
    "description": "If disabled, this filter is completely ignored during all the computations",
    "example": true,
    "type": "boolean"
    },
    "id": {
    "description": "an object id : only ascii non control and non blank characters",
    "example": "123e4567e89b12d3a456426614174000",
    "maxLength": 64,
    "pattern": "^[\\x21-\\x7E]{1,64}$",
    "type": "string"
    },
    "inverted": {
    "description": "When 'inverted', a filter elects all the `part instances` that would not be selected if it was not inverted.",
    "example": true,
    "type": "boolean"
    },
    "operator": {
    "default": "and",
    "description": "Operator to apply with this filter and its closest enabled predecessor in its parent container.",
    "enum": [
    "or",
    "and",
    "minus"
    ],
    "example": "or",
    "type": "string"
    },
    "type": {
    "const": "hasfield",
    "description": "Type of the filter",
    "type": "string"
    },
    "version": {
    "description": "Define the version of the object",
    "example": 1,
    "type": "integer"
    }
    },
    "required": [
    "type",
    "operator",
    "enabled",
    "inverted",
    "attribute",
    "id"
    ],
    "title": "Filter Has field definition",
    "type": "object"
    },
    "literal": {
    "additionalProperties": false,
    "properties": {
    "enabled": {
    "default": true,
    "description": "If disabled, this filter is completely ignored during all the computations",
    "example": true,
    "type": "boolean"
    },
    "id": {
    "description": "an object id : only ascii non control and non blank characters",
    "example": "123e4567e89b12d3a456426614174000",
    "maxLength": 64,
    "pattern": "^[\\x21-\\x7E]{1,64}$",
    "type": "string"
    },
    "inverted": {
    "description": "When 'inverted', a filter elects all the `part instances` that would not be selected if it was not inverted.",
    "example": true,
    "type": "boolean"
    },
    "operator": {
    "default": "and",
    "description": "Operator to apply with this filter and its closest enabled predecessor in its parent container.",
    "enum": [
    "or",
    "and",
    "minus"
    ],
    "example": "or",
    "type": "string"
    },
    "query": {
    "description": "Sets the query string in the 3djuump infinite literal and search query language",
    "example": ":PartNumber=='bolt'",
    "type": "string"
    },
    "type": {
    "const": "literal",
    "description": "Type of the filter",
    "type": "string"
    },
    "version": {
    "description": "Define the version of the object",
    "example": 1,
    "type": "integer"
    }
    },
    "required": [
    "type",
    "operator",
    "enabled",
    "inverted",
    "query",
    "id"
    ],
    "title": "Filter literal definition",
    "type": "object"
    },
    "partinstanceidlist": {
    "additionalProperties": false,
    "properties": {
    "buildid": {
    "description": "Id of the build use to create the part list instance",
    "type": "string"
    },
    "enabled": {
    "default": true,
    "description": "If disabled, this filter is completely ignored during all the computations",
    "example": true,
    "type": "boolean"
    },
    "id": {
    "description": "an object id : only ascii non control and non blank characters",
    "example": "123e4567e89b12d3a456426614174000",
    "maxLength": 64,
    "pattern": "^[\\x21-\\x7E]{1,64}$",
    "type": "string"
    },
    "inverted": {
    "description": "When 'inverted', a filter elects all the `part instances` that would not be selected if it was not inverted.",
    "example": true,
    "type": "boolean"
    },
    "list": {
    "description": "List of part instance ids",
    "items": {
    "type": "number"
    },
    "type": "array"
    },
    "operator": {
    "default": "and",
    "description": "Operator to apply with this filter and its closest enabled predecessor in its parent container.",
    "enum": [
    "or",
    "and",
    "minus"
    ],
    "example": "or",
    "type": "string"
    },
    "type": {
    "const": "partinstanceidlist",
    "description": "Type of the filter",
    "type": "string"
    },
    "version": {
    "description": "Define the version of the object",
    "example": 1,
    "type": "integer"
    }
    },
    "required": [
    "type",
    "operator",
    "enabled",
    "inverted",
    "buildid",
    "list",
    "id"
    ],
    "title": "Filter Part instance list definition",
    "type": "object"
    },
    "range": {
    "additionalProperties": false,
    "properties": {
    "attribute": {
    "description": "Name of the attribute to filter with",
    "example": "PartNumber",
    "minLength": 0,
    "type": "string"
    },
    "enabled": {
    "default": true,
    "description": "If disabled, this filter is completely ignored during all the computations",
    "example": true,
    "type": "boolean"
    },
    "id": {
    "description": "an object id : only ascii non control and non blank characters",
    "example": "123e4567e89b12d3a456426614174000",
    "maxLength": 64,
    "pattern": "^[\\x21-\\x7E]{1,64}$",
    "type": "string"
    },
    "inverted": {
    "description": "When 'inverted', a filter elects all the `part instances` that would not be selected if it was not inverted.",
    "example": true,
    "type": "boolean"
    },
    "operator": {
    "default": "and",
    "description": "Operator to apply with this filter and its closest enabled predecessor in its parent container.",
    "enum": [
    "or",
    "and",
    "minus"
    ],
    "example": "or",
    "type": "string"
    },
    "rangeitems": {
    "description": "List of range item",
    "items": {
    "$ref": "#/$defs/rangeitem"
    },
    "type": "array"
    },
    "type": {
    "const": "range",
    "description": "Type of the filter",
    "type": "string"
    },
    "version": {
    "description": "Define the version of the object",
    "example": 1,
    "type": "integer"
    }
    },
    "required": [
    "type",
    "operator",
    "enabled",
    "inverted",
    "attribute",
    "rangeitems",
    "id"
    ],
    "title": "Filter range definition",
    "type": "object"
    },
    "rangeitem": {
    "additionalProperties": false,
    "properties": {
    "includedLower": {
    "description": "Sets if the lower bound value should be included or excluded",
    "type": "boolean"
    },
    "includedUpper": {
    "description": "Sets if the upper bound value should be included or excluded",
    "type": "boolean"
    },
    "lower": {
    "description": "Lower bound of the range item",
    "type": "number"
    },
    "upper": {
    "description": "Upper bound of the range item",
    "type": "number"
    }
    },
    "required": [
    "includedLower",
    "includedUpper"
    ],
    "title": "Range item definition",
    "type": "object"
    }
    },
    "$ref": "#/$defs/filter",
    "$schema": "https://json-schema.org/draft-07/schema#"
    }

    This schema may evolve in the future.

    Parameters

    • pFilterData: string | Object
      in
      Internal FilterItemInterface data to set.

    Returns boolean

    true if the data is set.

    See

    toJSON

  • Gets the depth contribution of the FilterItemInterface.

    This value is usually one.

    Returns number

    The depth contribution of the FilterItemInterface.

  • Gets the identifier of the FilterItemInterface.

    Returns string

    The identifier of the FilterItemInterface.

  • Tells if the EventDispatcher has such a callback registered for the given event type.

    Parameters

    • pType: string
      in
      The type of the event to test.
    • pListener: tListenerCallback
      in
      The listener function that gets tested.

    Returns boolean

    true if such a listener is installed for the given type of event.

  • Tells if the EventDispatcher has such a callback registered for the given callback id.

    Parameters

    • pId: string
      in
      The id of the callback to test.

    Returns boolean

    true if such a listener is installed for the given callback id.

  • Tells if the FilterItemInterface is enabled.

    If disabled, this FilterItemInterface is completely ignored during all the computations (the behavior is the same as if it had not been created).

    A FilterItemInterface is enabled by default.

    Returns boolean

    true if the FilterItemInterface is enabled.

  • Tells if the FilterItemInterface is "inverted".

    When "inverted", a FilterItemInterface elects all the part instances that were not selected if it was not inverted.

    A FilterItemInterface is not "inverted" by default.

    Returns boolean

    true if such a FilterItemInterface is "inverted".

  • Removes a listener from an event type.

    If no such listener is found, then the function returns false and does nothing. You must use the exact parameters that were used in addEventListener to actually remove the listener.

    Parameters

    • pType: string
      in
      The type of the listener that gets removed.
    • pListener: tListenerCallback

      The listener function that gets removed.

    • pObject: Object

      The listener object that was used when addEventListener was called.

    Returns boolean

    true if the callback was removed else false.

  • Removes a listener from an event type.

    If no such listener is found, then the function returns false and does nothing. You must use the exact parameters that were used in addEventListener to actually remove the listener.

    Parameters

    • pType: string
      in
      The type of the listener that gets removed.
    • pListener: tListenerCallback

      The listener function that gets removed.

    Returns boolean

    true if the callback was removed else false.

  • Removes a listener by its id.

    If no such listener is found, then the function returns false and does nothing. You must use the return value of addEventListener to actually remove the listener.

    Parameters

    • pId: string
      in
      The id returned by the call to addEventListener that you want to remove.

    Returns boolean

    true if the callback was removed else false.

  • Sets the FilterItemInterface enabled/disabled status.

    If disabled, this FilterItemInterface is completely ignored during all the computations (the behavior is the same as if it had not been created). Use addEventListener on the event FilterItemInterfaceSignal.FilterEnabledChanged to know when the FilterItemInterface has changed its enabled status. Modifying a disabled FilterItemInterface will not trigger any change in the containing FilterSetInterface / WorkingSetInterface.

    A FilterItemInterface is enabled by default.

    Parameters

    • pEnabled: boolean
      in
      If true, the given FilterItemInterface is enabled.

    Returns void

  • Sets the identifier of the FilterItemInterface.

    Make sure the id is unique across the application.

    Parameters

    • pFilterId: string
      in
      The new identifier of the FilterItemInterface.

    Returns void

  • Sets the "inverted" status of the FilterItemInterface.

    When "inverted", a FilterItemInterface elects all the part instances that were not selected if it was not inverted. Use addEventListener on the event FilterItemInterfaceSignal.FilterInvertedChanged to know when the FilterItemInterface has changed its "inverted" status.

    A FilterItemInterface is not "inverted" by default.

    Parameters

    • pInverted: boolean
      in
      If true, such a FilterItemInterface will be "inverted".

    Returns void

  • Gets a deep copy of the internal data of the FilterItemInterface.

    Please refer to JSON.stringify.

    Parameters

    • Optional pKey: any
      in
      Unused.

    Returns Object

    The internal FilterItemInterface data.