X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fcom%2Findexdata%2Fmkjsf%2Fpazpar2%2Fcommands%2FShowCommand.java;h=a24172a9955067db5065dd4d5d3b0fd1a087a04a;hb=017a20f6da489d3d968025f0442213aee7252c41;hp=89e6c73a0bb38d8d53a4b6d090c425233fd8f855;hpb=11ff48b9d37193a89a4b74da75db8c58415c46a6;p=mkjsf-moved-to-github.git
diff --git a/src/main/java/com/indexdata/mkjsf/pazpar2/commands/ShowCommand.java b/src/main/java/com/indexdata/mkjsf/pazpar2/commands/ShowCommand.java
index 89e6c73..a24172a 100644
--- a/src/main/java/com/indexdata/mkjsf/pazpar2/commands/ShowCommand.java
+++ b/src/main/java/com/indexdata/mkjsf/pazpar2/commands/ShowCommand.java
@@ -2,6 +2,13 @@ package com.indexdata.mkjsf.pazpar2.commands;
import com.indexdata.mkjsf.pazpar2.commands.sp.ServiceProxyCommand;
+
+/**
+ * Represents a Pazpar2 show
command.
+ *
+ * @author Niels Erik
+ *
+ */
public class ShowCommand extends Pazpar2Command implements ServiceProxyCommand {
private static final long serialVersionUID = -8242768313266051307L;
@@ -12,21 +19,14 @@ public class ShowCommand extends Pazpar2Command implements ServiceProxyCommand {
}
/**
- * Sets the sort order for results, the updates the 'show' data object
- * from pazpar2. Set valid sort options in the documentation for pazpar2.
- *
- * The parts of the UI that display 'show' data should be rendered following
- * this request.
- *
- * @param sortOption
+ * Sets Pazpar2 parameter sort
. See Pazpar2 documentation for details.
*/
public void setSort (String sort) {
setParameter(new CommandParameter("sort","=",sort));
}
/**
- * Retrieves the current sort order for results
- * @return sort order - i.e. 'relevance'
+ * Gets parameter value for sort
*/
public String getSort () {
return getParameter("sort") != null ? getParameter("sort").value : "relevance";
@@ -56,13 +56,7 @@ public class ShowCommand extends Pazpar2Command implements ServiceProxyCommand {
}
/**
- * Sets the first record to show - starting at record '0'. After setting
- * first record number, the 'show' data object will be updated from pazpar2,
- * and the parts of the UI displaying show data should be re-rendered.
- *
- * To be used by the UI for paging.
- *
- * @param start first record to show
+ * Sets Pazpar2 parameter start
. See Pazpar2 documentation for details.
*/
public void setStart (int start) {
setParameter(new CommandParameter("start","=",start));
@@ -79,30 +73,63 @@ public class ShowCommand extends Pazpar2Command implements ServiceProxyCommand {
return getParameter("start") != null ? Integer.parseInt(getParameter("start").value) : 0;
}
+ /**
+ * Sets Pazpar2 parameter num
. See Pazpar2 documentation for details.
+ */
public void setNum (int num) {
setParameter(new CommandParameter("num","=",num));
}
-
+
+ /**
+ * Get the parameter value for num
+ */
public int getNum () {
return getParameter("num") != null ? Integer.parseInt(getParameter("num").value) : 0;
}
+ /**
+ * Sets Pazpar2 parameter block
. See Pazpar2 documentation for details.
+ */
public void setBlock(String block) {
setParameterInState(new CommandParameter("block","=",block));
}
-
+
+ /**
+ * Get the parameter value for block
+ */
public String getBlock() {
return getParameterValue("block");
}
+ /**
+ * Sets Pazpar2 parameter mergekey
. See Pazpar2 documentation for details.
+ */
public void setMergekey (String mergekey) {
setParameter(new CommandParameter("mergekey","=",mergekey));
}
+ /**
+ * Get the parameter value for mergekey
+ */
public String getMergekey () {
return getParameterValue("mergekey");
}
+ /**
+ * Sets Pazpar2 parameter rank
. See Pazpar2 documentation for details.
+ */
+ public void setRank (String rank) {
+ setParameter(new CommandParameter("rank","=",rank));
+ }
+
+ /**
+ * Get the parameter value for rank
+ */
+ public String getRank () {
+ return getParameterValue("rank");
+ }
+
+
public ShowCommand copy () {
ShowCommand newCommand = new ShowCommand();
for (String parameterName : parameters.keySet()) {