public class SearchResult extends java.lang.Object implements CoverHolder
Modifier and Type | Class and Description |
---|---|
static class |
SearchResult.MediaType
Supported media types.
|
static class |
SearchResult.Status
Media status, simplified like a traffic light, e.g. red for "lent out, no reservation
possible", yellow for "reservation needed" or green for "available".
|
Constructor and Description |
---|
SearchResult()
Create an empty object
|
SearchResult(SearchResult.MediaType type,
int nr,
java.lang.String innerhtml)
Create a new SearchResult object
|
Modifier and Type | Method and Description |
---|---|
java.util.List<SearchQuery> |
getChildQuery()
Get the child query (see setChildQuery for details)
|
java.lang.String |
getCover()
Get cover image URL
|
byte[] |
getCoverBitmap()
Get cover image bitmap
|
java.lang.String |
getId()
Get the unique identifier of this object
|
java.lang.String |
getInnerhtml()
Get HTML describing the item to the user in a result list.
|
int |
getNr()
Get this item's position in result list
|
int |
getPage()
Get the page this result was found on
|
SearchResult.Status |
getStatus()
Get item status (if known)
|
SearchResult.MediaType |
getType()
Get this item's media type.
|
void |
setChildQuery(java.util.List<SearchQuery> childQuery)
Set the child query.
|
void |
setCover(java.lang.String cover)
Set cover image URL
|
void |
setCoverBitmap(byte[] coverBitmap)
Set cover image bitmap
|
void |
setId(java.lang.String id)
Set the unique identifier of this object
|
void |
setInnerhtml(java.lang.String innerhtml)
Set HTML describing the item to the user in a result list.
|
void |
setNr(int nr)
Set this item's position in result list
|
void |
setPage(int page)
Set the page this result was found on
|
void |
setStatus(SearchResult.Status status)
Set item status (if known)
|
void |
setType(SearchResult.MediaType type)
Set this item's media type.
|
java.lang.String |
toString() |
public SearchResult(SearchResult.MediaType type, int nr, java.lang.String innerhtml)
type
- media type (like "BOOK")nr
- Position in result listinnerhtml
- HTML to displaypublic SearchResult()
public java.lang.String getId()
null
if unknownpublic void setId(java.lang.String id)
id
- unique identifierpublic SearchResult.MediaType getType()
null
if unknownpublic void setType(SearchResult.MediaType type)
type
- Media typepublic int getNr()
public void setNr(int nr)
nr
- positionpublic java.lang.String getInnerhtml()
public void setInnerhtml(java.lang.String innerhtml)
<b>
, <i>
, etc. can be used.innerhtml
- simple HTML codepublic SearchResult.Status getStatus()
null
if not set.public void setStatus(SearchResult.Status status)
public int getPage()
public void setPage(int page)
public byte[] getCoverBitmap()
getCoverBitmap
in interface CoverHolder
public void setCoverBitmap(byte[] coverBitmap)
setCoverBitmap
in interface CoverHolder
public java.lang.String getCover()
getCover
in interface CoverHolder
public void setCover(java.lang.String cover)
setCover
in interface CoverHolder
public java.util.List<SearchQuery> getChildQuery()
public void setChildQuery(java.util.List<SearchQuery> childQuery)
public java.lang.String toString()
toString
in class java.lang.Object