An
AdvertisementSearch
object is an implimentation of the
AdvertisementSearchInterface
interface. It is used to search for a particular advertisement as defined by an
AdvertisementDescriptor
. The search is defined by a single string which must match the following specifications.
- The string must be a proposition or a logical statement.
- A proposition must be in one of the following forms:
- c
==
d
evaluates to true
if c and d are identical; false
otherwise. - c
<
d
evaluates to true
if c and d are both a number and c is less than d or if c and d are both strings and c is lexigraphically before d; false
otherwise. - c
<=
d
evaluates to c <
d ||
c ==
d. - c
>
d
evaluates to true
if c and d are both a number and c is greater than d or if c and d are both strings and c is lexigraphically after d; false
otherwise. - c
>=
d
evaluates to c >
d ||
c ==
d. - c
==
d
evaluates to true
if c and d are not identical; false
otherwise. - c
=re
d
evaluates to true
if c is a string that matches the regular expression d; false
otherwise.
- c and d must be a literal string, literal number, or a variable.
- A logical statement must be in one of the following forms:
- a
||
b
evaluates to false
if a and b both evaluate to false
; true
otherwise. - a
&&
b
evaluates to true
if a and b both evaluate to true
; false
otherwise. !
b
evaluates to true
if b evaluates to false
; false
otherwise. - a
->
b
evaluates to false
if a evaluates to true
and b evaluates to false
; true
otherwise. - a
<-
b
evaluates to false
if a evaluates to false
and b evaluates to true
; true
otherwise. - a
<>
b
evaluates to true
if a and b both evaluate to the same truth value; false
otherwise.
- a and b must be a proposition or a logical statement.
- A literal string is string in the form
"
.*"
that evaluates to the string contained in the quotes ("
s). - A literal number is string in the form "-"?[0-9]*"."?[0-9]* that evaluates to a number.
- A variable is a stored value from the advertisement that evaluates to a string or a number.
- A string is a character string.
- A number is either a integer or floating point number.
Copyright: Copyright 2003-2014, Knowledge Science Group, University of Calgary. Permission to use, copy, modify, distribute and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. The Knowledge Science Group makes no representations about the suitability of this software for any purpose. It is provided "as is" without express or implied warranty.