From 0c6760bcfe354f233870b023d2845f8b9d432781 Mon Sep 17 00:00:00 2001 From: "Niels Erik G. Nielsen" Date: Mon, 22 Apr 2013 16:50:15 -0400 Subject: [PATCH] Adds remaining command parameters ref. Pazpar2 protocol doc. --- .../mkjsf/pazpar2/commands/RecordCommand.java | 46 +++++++++++++++++++- .../mkjsf/pazpar2/commands/ShowCommand.java | 4 ++ .../mkjsf/pazpar2/commands/TermlistCommand.java | 15 +++++++ 3 files changed, 64 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/indexdata/mkjsf/pazpar2/commands/RecordCommand.java b/src/main/java/com/indexdata/mkjsf/pazpar2/commands/RecordCommand.java index 78d192e..8713ece 100644 --- a/src/main/java/com/indexdata/mkjsf/pazpar2/commands/RecordCommand.java +++ b/src/main/java/com/indexdata/mkjsf/pazpar2/commands/RecordCommand.java @@ -16,7 +16,51 @@ public class RecordCommand extends Pazpar2Command { public String getId () { return getParameterValue("id"); - } + } + + public void setOffset (String offset) { + setParameter(new CommandParameter("offset","=",offset)); + } + + public String getOffset () { + return getParameterValue("offset"); + } + + public void setChecksum (String checksum) { + setParameter(new CommandParameter("checksum","=",checksum)); + } + + public String getChecksum () { + return getParameterValue("checksum"); + } + + public void setNativesyntax (String nativesyntax) { + setParameterInState(new CommandParameter("nativesyntax","=",nativesyntax)); + } + + public String getNativesyntax () { + return getParameterValue("nativesyntax"); + } + + public void setSyntax (String syntax) { + setParameterInState(new CommandParameter("syntax","=",syntax)); + } + + public String getSyntax () { + return getParameterValue("syntax"); + } + + public void setEsn (String esn) { + setParameter(new CommandParameter("esn","=",esn)); + } + + public String getEsn () { + return getParameterValue("esn"); + } + + public void setBinary (String binary) { + setParameter(new CommandParameter("binary","=",binary)); + } @Override public RecordCommand copy () { 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 a4e9047..f9e7931 100644 --- a/src/main/java/com/indexdata/mkjsf/pazpar2/commands/ShowCommand.java +++ b/src/main/java/com/indexdata/mkjsf/pazpar2/commands/ShowCommand.java @@ -87,6 +87,10 @@ public class ShowCommand extends Pazpar2Command { return getParameter("num") != null ? Integer.parseInt(getParameter("num").value) : 0; } + public void setBlock(String block) { + setParameterInState(new CommandParameter("block","=",block)); + } + public ShowCommand copy () { ShowCommand newCommand = new ShowCommand(stateMgr); for (String parameterName : parameters.keySet()) { diff --git a/src/main/java/com/indexdata/mkjsf/pazpar2/commands/TermlistCommand.java b/src/main/java/com/indexdata/mkjsf/pazpar2/commands/TermlistCommand.java index 789186c..3188b64 100644 --- a/src/main/java/com/indexdata/mkjsf/pazpar2/commands/TermlistCommand.java +++ b/src/main/java/com/indexdata/mkjsf/pazpar2/commands/TermlistCommand.java @@ -10,4 +10,19 @@ public class TermlistCommand extends Pazpar2Command { super("termlist",stateMgr); } + public void setName(String names) { + setParameter(new CommandParameter("name","name",names)); + } + + public String getName () { + return getParameterValue("name"); + } + + public void setNum (String num) { + setParameter(new CommandParameter("num","=",num)); + } + + public String getNum () { + return getParameterValue("num"); + } } -- 1.7.10.4