public abstract class Criterion extends Object implements Serializable
Location
object.
Following table relates Criterion
implementations to their respective
syntax and semantics:
SingleValuedCriterion |
attribute=value | equals to value |
attribute<value | small or equal to value | |
attribute>value | greater or equal to value | |
value1<attribute<value2 | between values | |
value1>attribute>value2 | between values | |
MultiValuedCriterion |
attribute={value1,value2,...} | equals to set |
attribute<{value1,value2,...} | contained in (subset of) | |
attribute>{value1,value2,...} | contains | attribute>{value1;value2;...} | contains at least one out of |
!attribute>{value} | does not contain | |
FunctionCriterion |
function_name(argument,...)=value | function with arguments must be equal to value |
function_name(argument,...)<value | function with arguments must be less than a value | |
function_name(argument,...)>value | function with arguments must be greater than a value | |
SearchCriterion |
$s=search_phrase;t=profile;p=passId | search for search_phrase with profile and passId |
Modifier and Type | Class and Description |
---|---|
static class |
Criterion.Operator
An enumeration of all possible criterion operators.
|
Modifier and Type | Field and Description |
---|---|
static char |
NEGATION
Deprecated.
Use the more appropriately located constant
NegatableCriterion.NEGATION instead. |
Modifier | Constructor and Description |
---|---|
protected |
Criterion(String attribute)
Initialises a new
Criterion instance that operates on the given
attribute. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
String |
getAttributeName()
Returns the attribute on which this criterion operates.
|
int |
hashCode() |
String |
toLocation()
Returns the string representation of this criterion
with a leading slash.
|
abstract void |
toLocation(StringBuilder buffer)
Appends the string representation of this criterion to the given
StringBuilder . |
String |
toString() |
@Deprecated public static final char NEGATION
NegatableCriterion.NEGATION
instead.NegatableCriterion
class.protected Criterion(String attribute)
Criterion
instance that operates on the given
attribute.attribute
- The non-ML name of the attribute on which this criterion
operates.IllegalArgumentException
- If the attribute is null
or empty.public final String getAttributeName()
public String toLocation()
public abstract void toLocation(StringBuilder buffer)
StringBuilder
.
The general contract of this method is that if the StringBuilder
contains a valid location ending in a forward slash string prior
to invocation of this method, then its contents must also form a valid
location string upon completion of this method.
Important: this method will not itself insert a leading slash!
buffer
- The StringBuilder
to which the string representation of
this criterion is to be appended.public String toString()
toString
in class Object
toLocation()
.Copyright © 2021 RWS Group for and on behalf of its affiliates and subsidiaries. All rights reserved.