import com.indexdata.mkjsf.pazpar2.data.ResponseParser;\r
\r
/**\r
- * Represents a Pazpar2 <code>record</code> command. \r
+ * Represents a Pazpar2 <code>record</code> command, can be accessed by <code>pzreq.record</code>\r
* \r
* @author Niels Erik\r
*\r
super("record");\r
}\r
\r
+ /**\r
+ * Special handling of record responses since they come in three distinctly different ways\r
+ * <ol>\r
+ * <li>As a regular <record> document</li>\r
+ * <li>In arbitrary XML format, in case of an offset request to get the native format</li>\r
+ * <li>In binary (non XML) format</li>\r
+ * </ol> \r
+ */\r
@Override\r
public ResponseDataObject run() {\r
ResponseDataObject responseObject = null;\r
for (String parameterName : parameters.keySet()) {\r
newCommand.setParameterInState(parameters.get(parameterName).copy()); \r
} \r
- newCommand.spCommand = this.spCommand;\r
+ newCommand.spCommand = new RecordCommandSp(newCommand);\r
return newCommand;\r
}\r
\r