/** * @file Terminus Rules * @license Apache Version 2 * Abstract object to support applying matching rules to result sets and documents * sub-classes are FrameRule and WOQLRule - this just has common functions */ export function TerminusRule(): void; export class TerminusRule { /** * @param {Boolean} tf - the rule will match all literals or all non-literals */ literal(tf: boolean): any; /** * @param {...string} list - parameters are types identified by prefixed URLS (xsd:string...) */ type(...list: string[]): any; /** * Specifies the scope of a rule - row / cell / object / property / * .. what part * of the result does the rule apply to */ scope(scope: any): any; /** * Specifies that the rule matches a specific value */ value(...val: any[]): any; /** * Produces a canonical json format to represent the rule */ json(mjson: any): TerminusRule | { pattern: any; rule: any; }; rule: any; } /** * Contained Pattern Object to encapsulate pattern matching * @param {Object} pattern */ export function TerminusPattern(pattern: any): void; export class TerminusPattern { /** * Contained Pattern Object to encapsulate pattern matching * @param {Object} pattern */ constructor(pattern: any); setPattern(pattern: any): void; literal: any; type: any; scope: any; value: any; json(): { literal: any; type: any; scope: any; value: any; }; /** * Tests whether the passed values matches the basic pattern */ testBasics(scope: any, value: any): boolean; testValue(value: any, constraint: any): any; /** * Unpacks an array into a list of arguments * @param {Boolean} nonstring - if set, the values will be double-quoted only when * they are strings, otherwise, all will be quoted as strings */ unpack(arr: any, nonstring: boolean): string; IDsMatch(ida: any, idb: any): boolean; classIDsMatch(ida: any, idb: any): boolean; propertyIDsMatch(ida: any, idb: any): boolean; rangeIDsMatch(ida: any, idb: any): boolean; valuesMatch(vala: any, valb: any): boolean; numberMatch(vala: any, valb: any): any; stringMatch(vala: any, valb: any): boolean; }