X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fcom%2Findexdata%2Fmkjsf%2Fpazpar2%2Fcommands%2FSearchCommand.java;h=f2c53da7a97e5c24829cba165a5d0d7adb482c02;hb=86f289cd42ba95846c80d22129ed565e4e9d6dde;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..f2c53da 100644
--- a/src/main/java/com/indexdata/mkjsf/pazpar2/commands/SearchCommand.java
+++ b/src/main/java/com/indexdata/mkjsf/pazpar2/commands/SearchCommand.java
@@ -13,7 +13,7 @@ import com.indexdata.mkjsf.pazpar2.commands.sp.ServiceProxyCommand;
import com.indexdata.mkjsf.pazpar2.data.ResponseDataObject;
/**
- * Represents a Pazpar2 search
command.
+ * Represents a Pazpar2 search
command, can be accessed by pzreq.search
*
* @author Niels Erik
*
@@ -56,14 +56,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();
}
/**
@@ -420,18 +420,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}
+ *