YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.upnp.search.SearchExpression Class Reference

The search criteria of a ContentDirectory Search action as a tree (UPnP ContentDirectory service, search criteria grammar), pure Java: relations (dc:title contains "x", =, !=, <, <=, >, >=, doesNotContain, derivedfrom, exists true|false) joined by and and or (and binds stronger), brackets, and * for everything. More...

Collaboration diagram for de.yaacc.upnp.search.SearchExpression:
Collaboration graph

Classes

class  And
 
class  InvalidSearchException
 A refused criteria: not valid, too big, or something this server does not do.
 
interface  Node
 A node of the tree: ALL, a Rel, an And or an Or. More...
 
enum  Op
 
class  Or
 
class  Rel
 

Static Public Member Functions

static Node parse (String criteria) throws InvalidSearchException
 

Static Public Attributes

static final int MAX_LENGTH = 8000
 
static final int MAX_RELATIONS = 200
 
static final int MAX_DEPTH = 24
 
static final Node ALL
 Everything matches (*).
 

Detailed Description

The search criteria of a ContentDirectory Search action as a tree (UPnP ContentDirectory service, search criteria grammar), pure Java: relations (dc:title contains "x", =, !=, <, <=, >, >=, doesNotContain, derivedfrom, exists true|false) joined by and and or (and binds stronger), brackets, and * for everything.

Strings are in double quotes; a backslash escapes a backslash or a quote. The text comes from the network: it is limited in size, depth and number of relations before anything is built from it.

Member Function Documentation

◆ parse()

static Node de.yaacc.upnp.search.SearchExpression.parse ( String criteria) throws InvalidSearchException
static
Exceptions
InvalidSearchExceptionif the text is empty, longer than MAX_LENGTH, malformed, too deep or has too many relations

Referenced by de.yaacc.upnp.server.contentdirectory.YaaccContentDirectory.search().

Here is the caller graph for this function:

Member Data Documentation

◆ ALL

final Node de.yaacc.upnp.search.SearchExpression.ALL
static
Initial value:
= new Node() {
@Override
public String toString() {
return "*";
}
}

Everything matches (*).

Referenced by de.yaacc.upnp.search.SearchSql.build(), and de.yaacc.upnp.search.SearchExpression.parse().


The documentation for this class was generated from the following file: