com.indexdata.mkjsf.pazpar2.commands
Class RecordCommand

java.lang.Object
  extended by com.indexdata.mkjsf.pazpar2.commands.Pazpar2Command
      extended by com.indexdata.mkjsf.pazpar2.commands.RecordCommand
All Implemented Interfaces:
ServiceProxyCommand, Serializable

public class RecordCommand
extends Pazpar2Command
implements ServiceProxyCommand

Represents a Pazpar2 record command, can be accessed by pzreq.record

Author:
Niels Erik
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.indexdata.mkjsf.pazpar2.commands.Pazpar2Command
name, parameters
 
Constructor Summary
RecordCommand()
           
 
Method Summary
 RecordCommand copy()
          Commands must implement this method to provide an completely detached, deep clone of themselves.
 String getBinary()
          Returns the binary parameter value.
 String getChecksum()
          Returns the checksum parameter value.
 String getEsn()
          Returns the esn parameter value.
 String getId()
          Returns the id parameter value.
 String getNativesyntax()
          Returns the nativesyntax parameter value.
 String getOffset()
          Returns the offset parameter value.
 RecordCommandSp getSp()
          Returns a record command object with Service Proxy extension parameters
 String getSyntax()
          Returns the syntax parameter value.
 ResponseDataObject run()
          Special handling of record responses since they come in three distinctly different ways As a regular <record> document In arbitrary XML format, in case of an offset request to get the native format In binary (non XML) format
 void setBinary(String binary)
          Sets the binary parameter.
 void setChecksum(String checksum)
          Sets the checksum parameter.
 void setEsn(String esn)
          Sets the esn parameter.
 void setId(String recId)
          Sets the id parameter.
 void setNativesyntax(String nativesyntax)
          Sets the nativesyntax parameter.
 void setOffset(String offset)
          Sets the offset parameter.
 void setSyntax(String syntax)
          Sets the syntax parameter.
 boolean spOnly()
          Here implementing commands publish whether they only apply to the Service Proxy or can be executed against straight Pazpar2 as well.
 
Methods inherited from class com.indexdata.mkjsf.pazpar2.commands.Pazpar2Command
addExpression, checkInState, equals, getCommandName, getEncodedQueryString, getParameter, getParameterValue, getSession, getValueWithExpressions, hashCode, hasParameters, hasParameterValue, removeExpression, removeExpressions, removeExpressionsAfter, removeParameter, removeParameters, removeParametersInState, run, runWith, setCommandName, setParameter, setParameterInState, setParameters, setParametersInState, setSession, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RecordCommand

public RecordCommand()
Method Detail

run

public ResponseDataObject run()
Special handling of record responses since they come in three distinctly different ways
  1. As a regular <record> document
  2. In arbitrary XML format, in case of an offset request to get the native format
  3. In binary (non XML) format

Overrides:
run in class Pazpar2Command
Returns:
Response data object based on the Pazpar2 service response.

setId

public void setId(String recId)
Sets the id parameter. See Pazpar2 documentation for details.

Parameters:
recId - record ID

getId

public String getId()
Returns the id parameter value.


setOffset

public void setOffset(String offset)
Sets the offset parameter. See Pazpar2 documentation for details.


getOffset

public String getOffset()
Returns the offset parameter value.


setChecksum

public void setChecksum(String checksum)
Sets the checksum parameter. See Pazpar2 documentation for details.


getChecksum

public String getChecksum()
Returns the checksum parameter value.


setNativesyntax

public void setNativesyntax(String nativesyntax)
Sets the nativesyntax parameter. See Pazpar2 documentation for details.


getNativesyntax

public String getNativesyntax()
Returns the nativesyntax parameter value.


setSyntax

public void setSyntax(String syntax)
Sets the syntax parameter. See Pazpar2 documentation for details.


getSyntax

public String getSyntax()
Returns the syntax parameter value.


setEsn

public void setEsn(String esn)
Sets the esn parameter. See Pazpar2 documentation for details.


getEsn

public String getEsn()
Returns the esn parameter value.


setBinary

public void setBinary(String binary)
Sets the binary parameter. See Pazpar2 documentation for details.


getBinary

public String getBinary()
Returns the binary parameter value.


copy

public RecordCommand copy()
Description copied from class: Pazpar2Command
Commands must implement this method to provide an completely detached, deep clone of themselves. The clone is needed by the state manager to transfer commands with current setting from one state to the next. Whenever a non-standard attribute is added to a command class, the copy method must be updated to ensure that the new attribute is brought over as well.

Specified by:
copy in class Pazpar2Command
Returns:
a Pazpar2 command of the given type

getSp

public RecordCommandSp getSp()
Returns a record command object with Service Proxy extension parameters

Specified by:
getSp in class Pazpar2Command
Returns:

spOnly

public boolean spOnly()
Description copied from class: Pazpar2Command
Here implementing commands publish whether they only apply to the Service Proxy or can be executed against straight Pazpar2 as well. This is convenient for a UI that switches between service types either deployment time or run time.

Specified by:
spOnly in interface ServiceProxyCommand
Specified by:
spOnly in class Pazpar2Command
Returns:
false if the command applies to straight Pazpar2


Copyright © 2013. All Rights Reserved.