com.pkrete.jsip2.messages
Class SIP2Message

java.lang.Object
  extended by com.pkrete.jsip2.messages.SIP2Message
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
SIP2MessageRequest, SIP2MessageResponse

public abstract class SIP2Message
extends Object
implements Serializable

This abstract class is a base class for all the SIP2 request and response messages.

Author:
Petteri
See Also:
Serialized Form

Field Summary
protected  String bibId
          Bibliographic id of the record.
protected  String checkSum
          Checksum is four ASCII charater digits representing the binary sum of the characters included the message
protected  String code
          Command identifier
protected  CurrencyType currencyType
          The currency in which the fee amount is given.
protected  String currentLocation
          The current location of the item.
protected  String expirationDate
          The expiration date of the hold.
protected  String feeAmount
          The amount of fees.
protected  FeeType feeType
          The type of the fee.
protected  String institutionId
          Library's institution id.
protected  String itemIdentifier
          Identifying value for the item.
protected  String itemProperties
          Specific item information that can be used for identifying an item, such as item weight, size, security marker, etc.
protected  String patronIdentifier
          An identifying value for the patron, library card's barcode number for example.
protected  String pickupLocation
          The pickup location of the hold.
protected  int sequence
          Sequence number of the message (0-9)
protected  String titleIdentifier
          Identifying value for the title.
protected  String transactionDate
          Date and time of the request. 18-char, fixed-length field: YYYYMMDDZZZZHHMMSS.
protected  String transactionId
          A transaction id that is assigned by the ILS or by a payment device, for auditing purposes to track cash flow.
 
Constructor Summary
protected SIP2Message(String code)
          Constructs and initializes a new SIP2Message object.
 
Method Summary
 String getBibId()
          Returns the bibliographic id of a record.
 String getCheckSum()
          Returns the checksum representing the binary sum of the characters included the message.
 String getCode()
          Returns the command identifier of this message.
 CurrencyType getCurrencyType()
          Returns the currency type of fees.
 String getCurrentLocation()
          Returns the current location of the item.
abstract  String getData()
          Returns a string presentation of the message.
 String getExpirationDate()
          Returns the expiration date of the hold. 18-char, fixed-length field: YYYYMMDDZZZZHHMMSS.
 String getFeeAmount()
          Returns the amount of fees.
 FeeType getFeeType()
          Returns the fee type.
 String getInstitutionId()
          Returns the library's id.
 String getItemIdentifier()
          Returns the item identifier.
 String getItemProperties()
          Returns a specific item information that can be used for identifying an item, such as item weight, size, security marker, etc.
 String getPatronIdentifier()
          Returns the patron identifier, library card's barcode number for example.
 String getPickupLocation()
          Returns the pickup location of the hold.
 int getSequence()
          Returns the sequence nnumber of the message that is between 0 and 9.
 String getTitleIdentifier()
          Returns an identifying value for the title.
 String getTransactionDate()
          Return the transaction date in the SIP2 format: 18-char, fixed-length field: YYYYMMDDZZZZHHMMSS.
 String getTransactionId()
          Returns the transaction id that is assigned by the ILS or by a payment device, for auditing purposes to track cash flow.
 boolean isChecksum()
          Returns true, if and only if, the checksum variable is present in the message.
 boolean isSequence()
          Returns true, if and only if, the sequence variable is present in the message.
 void setBibId(String bibId)
          Sets the bibliographic id of a record.
 void setCheckSum(String checkSum)
          Changes the checksum representing the binary sum of the characters included the message.
 void setCode(String code)
          Changes the command identifier of this message
 void setCurrencyType(CurrencyType currencyType)
          Sets the currency type of fees.
 void setCurrentLocation(String currentLocation)
          Sets the current location of the item.
 void setExpirationDate(String expirationDate)
          Sets the expiration date of the hold. 18-char, fixed-length field: YYYYMMDDZZZZHHMMSS.
 void setFeeAmount(String feeAmount)
          Sets the amount of fees.
 void setFeeType(FeeType feeType)
          Sets the fee type.
 void setInstitutionId(String institutionId)
          Sets the library's id.
 void setItemIdentifier(String itemIdentifier)
          Sets the item idetifier.
 void setItemProperties(String itemProperties)
          Changes the specific item information that can be used for identifying an item, such as item weight, size, security marker, etc.
 void setPatronIdentifier(String patronIdentifier)
          Sets the patron idetifier.
 void setPickupLocation(String pickupLocation)
          Sets the pickup location of the hold.
 void setSequence(int sequence)
          Changes the sequence number of the message.
 void setTitleIdentifier(String titleIdentifier)
          Sets the identifying value for the title.
 void setTransactionDate(String transactionDate)
          Sets the transaction date and time.
 void setTransactionId(String transactionId)
          Sets the transaction id that is assigned by the ILS or by a payment device, for auditing purposes to track cash flow.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sequence

protected int sequence
Sequence number of the message (0-9)


checkSum

protected String checkSum
Checksum is four ASCII charater digits representing the binary sum of the characters included the message


code

protected String code
Command identifier


institutionId

protected String institutionId
Library's institution id.


transactionDate

protected String transactionDate
Date and time of the request. 18-char, fixed-length field: YYYYMMDDZZZZHHMMSS.


patronIdentifier

protected String patronIdentifier
An identifying value for the patron, library card's barcode number for example.


itemIdentifier

protected String itemIdentifier
Identifying value for the item.


itemProperties

protected String itemProperties
Specific item information that can be used for identifying an item, such as item weight, size, security marker, etc.


titleIdentifier

protected String titleIdentifier
Identifying value for the title.


transactionId

protected String transactionId
A transaction id that is assigned by the ILS or by a payment device, for auditing purposes to track cash flow.


currencyType

protected CurrencyType currencyType
The currency in which the fee amount is given.


feeAmount

protected String feeAmount
The amount of fees. The amount is given in currency specified by the currency type field.


feeType

protected FeeType feeType
The type of the fee.


currentLocation

protected String currentLocation
The current location of the item.


expirationDate

protected String expirationDate
The expiration date of the hold.


pickupLocation

protected String pickupLocation
The pickup location of the hold.


bibId

protected String bibId
Bibliographic id of the record. This is a Voyager ESIP extension.

Constructor Detail

SIP2Message

protected SIP2Message(String code)
Constructs and initializes a new SIP2Message object.

Parameters:
code - command identifier
Method Detail

getData

public abstract String getData()
Returns a string presentation of the message.

Returns:
string presentation of the message

getCode

public String getCode()
Returns the command identifier of this message.

Returns:
code command identifier of this message

setCode

public void setCode(String code)
Changes the command identifier of this message

Parameters:
code - new command identifier

getSequence

public int getSequence()
Returns the sequence nnumber of the message that is between 0 and 9.

Returns:
sequence number of the message

setSequence

public void setSequence(int sequence)
Changes the sequence number of the message. Aallowed values are between 0 and 9.

Parameters:
sequence - new value

isSequence

public boolean isSequence()
Returns true, if and only if, the sequence variable is present in the message.

Returns:
true if sequence variable is used, otherwise false

isChecksum

public boolean isChecksum()
Returns true, if and only if, the checksum variable is present in the message.

Returns:
true if checksum variable is used, otherwise false

getCheckSum

public String getCheckSum()
Returns the checksum representing the binary sum of the characters included the message. The checksum is formed with four ASCII charater digits.

Returns:
the checkSum

setCheckSum

public void setCheckSum(String checkSum)
Changes the checksum representing the binary sum of the characters included the message. The checksum is formed with four ASCII charater digits.

Parameters:
checkSum - new value

getInstitutionId

public String getInstitutionId()
Returns the library's id.

Returns:
library's id

setInstitutionId

public void setInstitutionId(String institutionId)
Sets the library's id.

Parameters:
institutionId - new value

getTransactionDate

public String getTransactionDate()
Return the transaction date in the SIP2 format: 18-char, fixed-length field: YYYYMMDDZZZZHHMMSS.

Returns:
message date and time in SIP2 format

setTransactionDate

public void setTransactionDate(String transactionDate)
Sets the transaction date and time.

Parameters:
transactionDate - new value: 18-char, fixed-length: YYYYMMDDZZZZHHMMSS

getPatronIdentifier

public String getPatronIdentifier()
Returns the patron identifier, library card's barcode number for example.

Returns:
patron identifier

setPatronIdentifier

public void setPatronIdentifier(String patronIdentifier)
Sets the patron idetifier.

Parameters:
patronIdentifier - new value

getItemIdentifier

public String getItemIdentifier()
Returns the item identifier.

Returns:
item identifier

setItemIdentifier

public void setItemIdentifier(String itemIdentifier)
Sets the item idetifier.

Parameters:
itemIdentifier - new value

getItemProperties

public String getItemProperties()
Returns a specific item information that can be used for identifying an item, such as item weight, size, security marker, etc. Optional field.

Returns:
specific item information

setItemProperties

public void setItemProperties(String itemProperties)
Changes the specific item information that can be used for identifying an item, such as item weight, size, security marker, etc. Optional field.

Parameters:
itemProperties - new value

getTitleIdentifier

public String getTitleIdentifier()
Returns an identifying value for the title.

Returns:
identifying value for the title

setTitleIdentifier

public void setTitleIdentifier(String titleIdentifier)
Sets the identifying value for the title.

Parameters:
titleIdentifier - new identifying value for the title

getTransactionId

public String getTransactionId()
Returns the transaction id that is assigned by the ILS or by a payment device, for auditing purposes to track cash flow.

Returns:
transaction id that is assigned by the ILS or by a payment device, for auditing purposes to track cash flow

setTransactionId

public void setTransactionId(String transactionId)
Sets the transaction id that is assigned by the ILS or by a payment device, for auditing purposes to track cash flow.

Parameters:
transactionId - new value

getCurrencyType

public CurrencyType getCurrencyType()
Returns the currency type of fees.

Returns:
currency type of fees

setCurrencyType

public void setCurrencyType(CurrencyType currencyType)
Sets the currency type of fees.

Parameters:
currencyType - currency type

getFeeAmount

public String getFeeAmount()
Returns the amount of fees. The amount is given in currency specified by the currency type field.

Returns:
fee amount

setFeeAmount

public void setFeeAmount(String feeAmount)
Sets the amount of fees. The new value must be given in the currency specified by the currency type.

Parameters:
feeAmount - new value

getFeeType

public FeeType getFeeType()
Returns the fee type.

Returns:
fee type

setFeeType

public void setFeeType(FeeType feeType)
Sets the fee type.

Parameters:
feeType - new fee type

getCurrentLocation

public String getCurrentLocation()
Returns the current location of the item.

Returns:
current location of the item

setCurrentLocation

public void setCurrentLocation(String currentLocation)
Sets the current location of the item.

Parameters:
currentLocation - new value

getExpirationDate

public String getExpirationDate()
Returns the expiration date of the hold. 18-char, fixed-length field: YYYYMMDDZZZZHHMMSS.

Returns:
expiration date

setExpirationDate

public void setExpirationDate(String expirationDate)
Sets the expiration date of the hold. 18-char, fixed-length field: YYYYMMDDZZZZHHMMSS.

Parameters:
expirationDate - new expiration date

getPickupLocation

public String getPickupLocation()
Returns the pickup location of the hold.

Returns:
pickup location of the hold

setPickupLocation

public void setPickupLocation(String pickupLocation)
Sets the pickup location of the hold.

Parameters:
pickupLocation - new pickup location

getBibId

public String getBibId()
Returns the bibliographic id of a record. This is a Voyager ESIP extension and it's not included in the original SIP2 definition.

Returns:
bibliographic id of the record that will be put on hold

setBibId

public void setBibId(String bibId)
Sets the bibliographic id of a record. This is a Voyager ESIP extension and it's not included in the original SIP2 definition.

Parameters:
bibId - bib id


Copyright © 2012-2014. All Rights Reserved.