|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.indexdata.mkjsf.pazpar2.commands.Expression
public class Expression
Represents a complex command parameter value, in form of an expression with an equality operator
An expression consist of a left-of-operator field or key, an equality operator (= or ~), a right-of-operator value, and optionally a label describing the value for UI display.
Examples:
pz:id=1234
"My Target"category~libcatalog
"Library Catalogs"author="Steinbeck, John"
Constructor Summary | |
---|---|
Expression(String expressionString)
Instantiates an expression by parsing the provided expression string, which must be on the form {name}({=}or{~}){value}. |
|
Expression(String field,
String operator,
String value,
String label)
Instantiates an expression with a label |
Method Summary | |
---|---|
Expression |
copy()
Clones the expression |
String |
getField()
Returns the left-of-operator field (or name or key). |
String |
getLabel()
Returns the label describing the value of the expression or, if no label was provided, the value itself. |
String |
getOperator()
Returns the operator |
String |
getValue()
Returns the right-of-operator value of the expression |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Expression(String field, String operator, String value, String label)
leftEntity
- left-of-operator field name (or 'key')operator
- an equality operatorrightEntity
- right-of-operator valuelabel
- to be used for display, for instance in a UI control that adds or removes the expression
from a command parameterpublic Expression(String expressionString)
Currently only '=' and '~' are recognized as operators
expressionString
- Method Detail |
---|
public Expression copy()
public String toString()
toString
in class Object
public String getLabel()
public String getField()
public String getOperator()
public String getValue()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |