Constructor and Description |
---|
Library() |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Library arg0) |
boolean |
equals(java.lang.Object obj)
Evaluates, whether this object represents the same library as the given
one.
|
static Library |
fromJSON(java.lang.String ident,
org.json.JSONObject input)
Create a Library object based on a
JSONObject . |
java.lang.String |
getApi()
Get the name of the API implementation used for this library
|
java.lang.String |
getCity()
Get the city the library is located in
|
java.lang.String |
getCountry() |
org.json.JSONObject |
getData()
Get additional data from JSON configuration
|
java.lang.String |
getDisplayName()
The official name of the library to display e.g. in the account detail
view.
|
float |
getGeo_distance() |
double[] |
getGeo()
Get latitude and longitude of the library's geolocation
|
java.lang.String |
getIdent()
Get the library's identifier (in OpacClient app this is the filename in
assets/bibs/ without the .json extension)
|
java.lang.String |
getInformation()
Gets the URL of this library's information webpage
|
java.lang.String |
getReplacedBy() |
java.lang.String |
getState() |
java.lang.String |
getTitle()
Get an additional name of the library if it is not the main public
library in the city it is located in
|
int |
hashCode() |
boolean |
isAccountSupported()
Get whether this library supports accounts.
|
boolean |
isNfcSupported()
Get if this library is known to have NFC tags inside their books which work with the app's
NFC search feature.
|
void |
setAccountSupported(boolean account_supported)
Set whether this library supports accounts
|
void |
setApi(java.lang.String api)
Set the name of the API implementation used for this library
|
void |
setCity(java.lang.String city)
Set the city the library is located in
|
void |
setCountry(java.lang.String country) |
void |
setData(org.json.JSONObject data)
Set additional data from JSON configuration
|
void |
setDisplayName(java.lang.String displayName)
Set the official name of the library to display e.g. in the account
detail view.
|
void |
setGeo_distance(float geo_distance) |
void |
setGeo(double[] geo)
Set latitude and longitude of the library's geolocation
|
void |
setIdent(java.lang.String ident)
Set the library's unique identifier.
|
void |
setInformation(java.lang.String information)
Sets the URL of this library's information webpage
|
void |
setNfcSupported(boolean nfcSupported)
Set if this library is known to have NFC tags inside their books which work with the app's
NFC search feature.
|
void |
setReplacedBy(java.lang.String replacedby) |
void |
setState(java.lang.String state) |
void |
setTitle(java.lang.String title)
Set an additional name of the library if it is not the main public
library in the city it is located in
|
public static Library fromJSON(java.lang.String ident, org.json.JSONObject input) throws org.json.JSONException
JSONObject
.ident
- identifierinput
- input dataorg.json.JSONException
- if parsing failed or objects were missinggetIdent()
public java.lang.String getIdent()
public void setIdent(java.lang.String ident)
ident
- Identifierpublic java.lang.String getCity()
public void setCity(java.lang.String city)
city
- city namepublic java.lang.String getTitle()
public void setTitle(java.lang.String title)
title
- a title, not including the city's namepublic java.lang.String getDisplayName()
public void setDisplayName(java.lang.String displayName)
public java.lang.String getApi()
public void setApi(java.lang.String api)
api
- API implementation (like "bond26")public org.json.JSONObject getData()
public void setData(org.json.JSONObject data)
data
- "data" object from JSON filepublic java.lang.String getCountry()
public void setCountry(java.lang.String country)
country
- the country to setpublic java.lang.String getState()
public void setState(java.lang.String state)
state
- the state to setpublic double[] getGeo()
public void setGeo(double[] geo)
geo
- Array of latitude and longitudepublic java.lang.String getReplacedBy()
public void setReplacedBy(java.lang.String replacedby)
public boolean isAccountSupported()
public void setAccountSupported(boolean account_supported)
account_supported
- describing whether this library supports accountspublic java.lang.String getInformation()
public void setInformation(java.lang.String information)
public boolean isNfcSupported()
public void setNfcSupported(boolean nfcSupported)
public float getGeo_distance()
public void setGeo_distance(float geo_distance)
geo_distance
- Set the geo distance - only for temporary use.public int compareTo(Library arg0)
compareTo
in interface java.lang.Comparable<Library>
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object