public class Copy
extends java.lang.Object
DetailledItem
) available in a library.Constructor and Description |
---|
Copy() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
get(java.lang.String key)
Get property using the following keys: barcode, location, department, branch, status,
returndate, reservations, signature, resinfo, url
Dates will be returned in ISO-8601 format (yyyy-MM-dd).
|
java.lang.String |
getBarcode() |
java.lang.String |
getBranch() |
java.lang.String |
getDepartment() |
java.lang.String |
getLocation() |
java.lang.String |
getReservations() |
java.lang.String |
getResInfo() |
org.joda.time.LocalDate |
getReturnDate() |
java.lang.String |
getShelfmark() |
java.lang.String |
getStatus() |
java.lang.String |
getUrl() |
boolean |
notEmpty() |
void |
set(java.lang.String key,
java.lang.String value)
Set property using the following keys: barcode, location, department, branch, status,
returndate, reservations, signature, resinfo, url
If you supply an invalid key, an
IllegalArgumentException will be thrown. |
void |
set(java.lang.String key,
java.lang.String value,
org.joda.time.format.DateTimeFormatter fmt)
Set property using the following keys: barcode, location, department, branch, status,
returndate, reservations, signature, resinfo, url
For "returndate", the given
DateTimeFormatter will be used to parse the date. |
void |
setBarcode(java.lang.String barcode) |
void |
setBranch(java.lang.String branch) |
void |
setDepartment(java.lang.String department) |
void |
setLocation(java.lang.String location) |
void |
setReservations(java.lang.String reservations) |
void |
setResInfo(java.lang.String resInfo) |
void |
setReturnDate(org.joda.time.LocalDate returndate) |
void |
setShelfmark(java.lang.String shelfmark) |
void |
setStatus(java.lang.String status) |
void |
setUrl(java.lang.String url) |
public java.lang.String getBarcode()
public void setBarcode(java.lang.String barcode)
barcode
- The barcode of a copy. Optional.public java.lang.String getLocation()
public void setLocation(java.lang.String location)
location
- The location (like "third floor") of a copy. Optional.public java.lang.String getDepartment()
public void setDepartment(java.lang.String department)
department
- The department (like "music library") of a copy. Optional.public java.lang.String getBranch()
public void setBranch(java.lang.String branch)
branch
- The branch a copy is in. Should be set, if your library has more than one
branch.public java.lang.String getStatus()
public void setStatus(java.lang.String status)
status
- Current status of a copy ("lent", "free", ...). Should be set.public org.joda.time.LocalDate getReturnDate()
public void setReturnDate(org.joda.time.LocalDate returndate)
returndate
- Expected date of return if a copy is lent out. Optional.public java.lang.String getReservations()
public void setReservations(java.lang.String reservations)
reservations
- Number of pending reservations if a copy is currently lent out.
Optional.public java.lang.String getShelfmark()
public void setShelfmark(java.lang.String shelfmark)
shelfmark
- Identification in the libraries' shelf system. Optional.public java.lang.String getResInfo()
OpacApi.reservation(DetailledItem, Account, int, String)
implementation.public void setResInfo(java.lang.String resInfo)
resInfo
- Reservation information for copy-based reservations. Intended for use in your
(DetailledItem,
Account, int, String)
implementation.public java.lang.String getUrl()
public void setUrl(java.lang.String url)
url
- URL to an online copypublic void set(java.lang.String key, java.lang.String value)
IllegalArgumentException
will be thrown.
This method is used to simplify refactoring of old APIs from the Map<String, String> data
structure to this class. If you are creating a new API, you probably don't need to use it.key
- one of the keys mentioned abovevalue
- the value to set. Dates must be in ISO-8601 format (yyyy-MM-dd).public void set(java.lang.String key, java.lang.String value, org.joda.time.format.DateTimeFormatter fmt)
DateTimeFormatter
will be used to parse the date.
If you supply an invalid key, an IllegalArgumentException
will be thrown.
This method is used to simplify refactoring of old APIs from the Map<String, String> data
structure to this class. If you are creating a new API, you probably don't need to use it.key
- one of the keys mentioned abovevalue
- the value to set. Dates must be in a format parseable by the given DateTimeFormatter
, otherwise an IllegalArgumentException
will be
thrown.fmt
- the DateTimeFormatter
to use for parsing datespublic java.lang.String get(java.lang.String key)
IllegalArgumentException
will be thrown.
This method is used to simplify refactoring of old APIs from the Map<String, String> data
structure to this class. If you are creating a new API, you probably don't need to use it.key
- one of the keys mentioned abovepublic boolean notEmpty()