X-Git-Url: http://lists.indexdata.dk/cgi-bin?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fcom%2Findexdata%2Fmkjsf%2Fpazpar2%2Fcommands%2FShowCommand.java;h=d290f7445775ca3fbb1b060060445fa55870f9ed;hb=6c92dd9a72ae1fa27dd061c1897531879b8c0ba6;hp=223f8f48758fee2dc183be448c4542fce95afcf8;hpb=45227f6391b905193adcf192a0b20328401ff95f;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 223f8f4..d290f74 100644
--- a/src/main/java/com/indexdata/mkjsf/pazpar2/commands/ShowCommand.java
+++ b/src/main/java/com/indexdata/mkjsf/pazpar2/commands/ShowCommand.java
@@ -1,7 +1,15 @@
package com.indexdata.mkjsf.pazpar2.commands;
import com.indexdata.mkjsf.pazpar2.commands.sp.ServiceProxyCommand;
+import com.indexdata.mkjsf.pazpar2.commands.sp.ShowCommandSp;
+
+/**
+ * show
Pazpar2 command, referenced as: pzreq.show
+ *
+ * @author Niels Erik
+ *
+ */
public class ShowCommand extends Pazpar2Command implements ServiceProxyCommand {
private static final long serialVersionUID = -8242768313266051307L;
@@ -12,21 +20,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 +57,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,34 +74,58 @@ 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");
}
@@ -122,7 +141,7 @@ public class ShowCommand extends Pazpar2Command implements ServiceProxyCommand {
@Override
public ServiceProxyCommand getSp() {
- return this;
+ return new ShowCommandSp(this);
}
@Override