com.indexdata.mkjsf.pazpar2.commands
Class QueryParameter

java.lang.Object
  extended by com.indexdata.mkjsf.pazpar2.commands.CommandParameter
      extended by com.indexdata.mkjsf.pazpar2.commands.QueryParameter
All Implemented Interfaces:
Serializable

public class QueryParameter
extends CommandParameter

Represents a query parameter as it applies to the Pazpar2 search command

A query parameter can consist of a term value and/or one or more expressions separated by boolean operators.

A complex query can be represented in the object as either one long string set by setQuery(string) or as a series of expressions set by setQueryExpression(...) (or a combination of the two). The difference between the two approaches would be the option of easily removing individual expressions again or otherwise treat them has separate entities in the UI.

Author:
Niels Erik
See Also:
Serialized Form

Constructor Summary
QueryParameter(String name)
           
QueryParameter(String name, String operator, Expression... expressions)
           
QueryParameter(String name, String operator, int value)
           
QueryParameter(String name, String operator, String value)
           
QueryParameter(String name, String operator, String value, Expression... expressions)
           
 
Method Summary
 QueryParameter copy()
          Clones the CommandParameter
 String getValueWithExpressions()
          Returns the simple parameter value and/or any expressions, separated by 'AND'
 void setBooleanOperator(String operator)
           
 
Methods inherited from class com.indexdata.mkjsf.pazpar2.commands.CommandParameter
addExpression, equals, getEncodedQueryString, getExpressions, getExpressions, getName, getSimpleValue, hasExpressions, hasExpressions, hashCode, hasOperator, hasValue, removeExpression, removeExpressions, removeExpressionsAfter, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

QueryParameter

public QueryParameter(String name)

QueryParameter

public QueryParameter(String name,
                      String operator,
                      String value,
                      Expression... expressions)

QueryParameter

public QueryParameter(String name,
                      String operator,
                      Expression... expressions)

QueryParameter

public QueryParameter(String name,
                      String operator,
                      String value)

QueryParameter

public QueryParameter(String name,
                      String operator,
                      int value)
Method Detail

setBooleanOperator

public void setBooleanOperator(String operator)

getValueWithExpressions

public String getValueWithExpressions()
Description copied from class: CommandParameter
Returns the simple parameter value and/or any expressions, separated by 'AND'

Overrides:
getValueWithExpressions in class CommandParameter
Returns:
the simple parameter value and/or any expressions separated by 'AND'

copy

public QueryParameter copy()
Description copied from class: CommandParameter
Clones the CommandParameter

Overrides:
copy in class CommandParameter
Returns:
a deep, detached clone of this command parameter, for copying a parameter to a new state.


Copyright © 2013. All Rights Reserved.