UNPKG

@geogirafe/lib-geoportal

Version:

GeoGirafe is a flexible application to build online geoportals.

67 lines (66 loc) 3.65 kB
import Filter from 'ol/format/filter/Filter.js'; import { XmlTypes } from '../../models/xmlTypes.js'; import { FilterOperator, LogicalFilterOperator } from '../../models/filter.js'; import { BaseFilterCondition } from '../filter/basefilter.js'; /** * Define the supported operators for WfsFilter: WFS supports all available operators */ declare const wfsOperatorsStrList: readonly ["eq", "neq", "gt", "gte", "lt", "lte", "like", "nlike", "in", "nin", "before", "after", "between", "nbetween", "nul", "nnul", "intersects", "within", "contains"]; export type WfsOperator = (typeof wfsOperatorsStrList)[number]; export declare function isWfsOperator(value: string): value is WfsOperator; declare class WfsFilterCondition<WfsXmlTypes extends XmlTypes = XmlTypes> extends BaseFilterCondition<WfsXmlTypes> { operator: WfsOperator; /** * Is this a condition that can be displayed in a simple layer tree filter? */ get isSimpleCondition(): boolean; /** * If the filter value is a geometry, retrieves the OpenLayers Geometry object, otherwise an empty geometry. */ private get olGeometry(); /** * If the filter value is a geometry, retrieves the gml node, otherwise an empty string. */ private get gmlGeometry(); /** * If the filter value is a list, returns the parsed list of values, otherwise an empty array. */ private get valueList(); constructor(property: string, operator: FilterOperator, value?: string, value2?: string, propertyType?: WfsXmlTypes); static get supportedOperators(): Array<{ operator: WfsOperator; displayName: string; }>; /** * Returns the supported operators for the given attribute type. */ static supportedOperatorsByAttributeType(attributeType: string): { operator: FilterOperator; displayName: string; }[]; toOpenLayersFilter(): Filter; /** * * @returns a simple filter string that can be used in a WMS GetMap request, does not provide any XML namespace (xmlns attributes) */ toWmsGetMapFilter(): string; protected static simpleEqFilter(name: string, value: string): string; protected static simpleNeqFilter(name: string, value: string): string; protected static simpleLtFilter(name: string, value: string): string; protected static simpleLteFilter(name: string, value: string): string; protected static simpleGtFilter(name: string, value: string): string; protected static simpleGteFilter(name: string, value: string): string; protected static simpleBetweenFilter(name: string, value: string, value2: string): string; protected static simpleNbetweenFilter(name: string, value: string, value2: string): string; protected static simpleInnerLikeFilter(name: string, value: string, wildCard?: string): string; protected static simpleLikeFilter(name: string, value: string, wildCard?: string): string; protected static simpleNlikeFilter(name: string, value: string, wildCard?: string): string; protected static simpleInFilter(name: string, valueList: string[]): string; protected static simpleNinFilter(name: string, valueList: string[]): string; protected static simpleContainsFilter(name: string, value: string): string; protected static simpleIntersectsFilter(name: string, value: string): string; protected static simpleWithinFilter(name: string, value: string): string; protected static simpleLikeFilterGenerateWildCard(value: string): string; static buildNestedExpression(filterStrings: string[], logicalOperator: LogicalFilterOperator): string; } export default WfsFilterCondition;