PropertyRestrictNode


@ExperimentalAppSearchApi
class PropertyRestrictNode : Node


Node that represents a property restrict.

A property restrict is an expression in the query language that allows a querier to restrict the results of a query expression to those contained in a given property path. Written as a query string, this node should be equivalent to the query `property:child`, where `property` is the property path to restrict results to and `child` is the query subexpression.

This node is a comparator that should correspond with HAS in the Google AIP EBNF Filtering Definition.

Summary

Public constructors

PropertyRestrictNode(propertyPath: PropertyPath, childNode: Node)

Constructor for building a PropertyRestrictNode that represents a restriction on a query subexpression by some property i.e. the query `property:subexpression`.

Public functions

Node

Get the subexpression in the property restriction as a Node (i.e. the right hand side of the property restrict sign (":")).

(Mutable)List<Node!>

Get the child Node of PropertyRestrictNode as a list containing the only child Node.

PropertyPath

Get the property in the property restriction (i.e. the left hand side of the property restrict sign (":")).

Unit
setChild(childNode: Node)

Set the query subexpression in the property restriction (i.e. the right hand side of the property restrict sign (":")).

Unit
setProperty(propertyPath: PropertyPath)

Set the property in the property restriction (i.e. the left hand side of the property restrict sign (":")).

Public constructors

PropertyRestrictNode

Added in 1.1.0-alpha06
PropertyRestrictNode(propertyPath: PropertyPath, childNode: Node)

Constructor for building a PropertyRestrictNode that represents a restriction on a query subexpression by some property i.e. the query `property:subexpression`.

Parameters
propertyPath: PropertyPath

The property that will restrict results returned by the subexpression in the property restrict

childNode: Node

The subexpression to be restricted in the property restrict

Public functions

getChild

Added in 1.1.0-alpha06
fun getChild(): Node

Get the subexpression in the property restriction as a Node (i.e. the right hand side of the property restrict sign (":")).

getChildren

fun getChildren(): (Mutable)List<Node!>

Get the child Node of PropertyRestrictNode as a list containing the only child Node.

getProperty

Added in 1.1.0-alpha06
fun getProperty(): PropertyPath

Get the property in the property restriction (i.e. the left hand side of the property restrict sign (":")).

setChild

Added in 1.1.0-alpha06
fun setChild(childNode: Node): Unit

Set the query subexpression in the property restriction (i.e. the right hand side of the property restrict sign (":")).

setProperty

Added in 1.1.0-alpha06
fun setProperty(propertyPath: PropertyPath): Unit

Set the property in the property restriction (i.e. the left hand side of the property restrict sign (":")).