X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fcom%2Findexdata%2Fmkjsf%2Fpazpar2%2Fcommands%2FSearchCommand.java;h=7d74b6cba24b55e578153bc12b53536031107916;hb=0c500bea459cf05157e0f753755466ce1b46604c;hp=671e723f26fcee8a0505157542659a1aff50915f;hpb=969f879c807d127cbf47c5656771fcf5adc27a02;p=mkjsf-moved-to-github.git
diff --git a/src/main/java/com/indexdata/mkjsf/pazpar2/commands/SearchCommand.java b/src/main/java/com/indexdata/mkjsf/pazpar2/commands/SearchCommand.java
index 671e723..7d74b6c 100644
--- a/src/main/java/com/indexdata/mkjsf/pazpar2/commands/SearchCommand.java
+++ b/src/main/java/com/indexdata/mkjsf/pazpar2/commands/SearchCommand.java
@@ -9,11 +9,12 @@ import javax.inject.Named;
import org.apache.log4j.Logger;
import com.indexdata.mkjsf.pazpar2.Pz2Service;
+import com.indexdata.mkjsf.pazpar2.commands.sp.SearchCommandSp;
import com.indexdata.mkjsf.pazpar2.commands.sp.ServiceProxyCommand;
import com.indexdata.mkjsf.pazpar2.data.ResponseDataObject;
/**
- * Represents a Pazpar2 search
command.
+ * search
Pazpar2 command, referenced as: pzreq.search
*
* @author Niels Erik
*
@@ -56,14 +57,14 @@ public class SearchCommand extends Pazpar2Command implements ServiceProxyCommand
* were added as expressions (that is, not set with setQuery()
).
*/
public String getQuery () {
- return getParameter("query") == null ? null : getParameter("query").getSimpleValue();
+ return getParameter("query") == null ? null : ((QueryParameter)getParameter("query")).getSimpleValue();
}
/**
* Returns the complete query
parameter value, including expressions.
*/
public String getExtendedQuery () {
- return getParameter("query") == null ? null : getParameter("query").getValueWithExpressions();
+ return getParameter("query") == null ? null : ((QueryParameter)getParameter("query")).getValueWithExpressions();
}
/**
@@ -231,7 +232,7 @@ public class SearchCommand extends Pazpar2Command implements ServiceProxyCommand
* Returns the limit
parameter value.
*/
public String getLimit () {
- return getParameter("limit") == null ? null : ((FilterParameter)getParameter("limit")).getValueWithExpressions();
+ return getParameter("limit") == null ? null : ((LimitParameter)getParameter("limit")).getValueWithExpressions();
}
/**
@@ -420,18 +421,32 @@ public class SearchCommand extends Pazpar2Command implements ServiceProxyCommand
/**
- * Sets a facet, in CQL, to restrict the current results
+ * Adds an expression - for instance a facet criterion, with an optional label - to the query parameter
*
- * @param facetKey i.e. 'au' for author
- * @param term i.e. 'Dickens, Charles'
+ *
Example:
+ *{au}{=}{"Steinbeck, John"}{Steinbeck, John}
+ *