IMAGE
- The type of Image
instance held by the dataset.public class BingImageDataset<IMAGE extends Image<?,IMAGE>> extends ReadableListDataset<IMAGE,InputStream> implements Identifiable
reader
modCount
Modifier | Constructor and Description |
---|---|
protected |
BingImageDataset(InputStreamObjectReader<IMAGE> reader,
List<net.billylieurance.azuresearch.AzureSearchImageResult> results,
net.billylieurance.azuresearch.AzureSearchImageQuery query) |
Modifier and Type | Method and Description |
---|---|
static <IMAGE extends Image<?,IMAGE>> |
create(InputStreamObjectReader<IMAGE> reader,
net.billylieurance.azuresearch.AzureSearchImageQuery query,
int number)
Perform a search with the given query.
|
static <IMAGE extends Image<?,IMAGE>> |
create(InputStreamObjectReader<IMAGE> reader,
BingAPIToken token,
net.billylieurance.azuresearch.AzureSearchImageQuery query,
int number)
Perform a search with the given query.
|
static <IMAGE extends Image<?,IMAGE>> |
create(InputStreamObjectReader<IMAGE> reader,
BingAPIToken token,
String query,
int number)
Perform a search with the given query string.
|
static <IMAGE extends Image<?,IMAGE>> |
create(InputStreamObjectReader<IMAGE> reader,
BingAPIToken token,
String query,
String imageFilters,
int number)
Perform a search with the given query string and filters.
|
String |
getID() |
net.billylieurance.azuresearch.AzureSearchImageResult |
getImage(int index)
Get the specific underlying
AzureSearchImageResult for the given
index. |
List<net.billylieurance.azuresearch.AzureSearchImageResult> |
getImages()
Get the underlying
AzureSearchImageResult objects that back the
dataset. |
IMAGE |
getInstance(int index)
Returns the instance at the specified position in this dataset.
|
int |
numInstances()
Returns the number of instances in this dataset.
|
get, getID, getRandomInstance, indexOfID, size, toIdentifiable
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
equals
protected BingImageDataset(InputStreamObjectReader<IMAGE> reader, List<net.billylieurance.azuresearch.AzureSearchImageResult> results, net.billylieurance.azuresearch.AzureSearchImageQuery query)
public IMAGE getInstance(int index)
ListDataset
getInstance
in interface ListDataset<IMAGE extends Image<?,IMAGE>>
index
- index of the instance to returnpublic int numInstances()
Dataset
numInstances
in interface Dataset<IMAGE extends Image<?,IMAGE>>
public List<net.billylieurance.azuresearch.AzureSearchImageResult> getImages()
AzureSearchImageResult
objects that back the
dataset.AzureSearchImageResult
objectspublic net.billylieurance.azuresearch.AzureSearchImageResult getImage(int index)
AzureSearchImageResult
for the given
index.index
- the indexAzureSearchImageResult
for the given index.public static <IMAGE extends Image<?,IMAGE>> BingImageDataset<IMAGE> create(InputStreamObjectReader<IMAGE> reader, net.billylieurance.azuresearch.AzureSearchImageQuery query, int number)
reader
- the reader with which to load the imagesquery
- the querynumber
- the target number of results; the resultant dataset may
contain fewer images than specified.BingImageDataset
created from the query.AbstractAzureSearchQuery.setAppid(String)
public static <IMAGE extends Image<?,IMAGE>> BingImageDataset<IMAGE> create(InputStreamObjectReader<IMAGE> reader, BingAPIToken token, net.billylieurance.azuresearch.AzureSearchImageQuery query, int number)
reader
- the reader with which to load the imagestoken
- the api authentication tokenquery
- the querynumber
- the target number of results; the resultant dataset may
contain fewer images than specified.BingImageDataset
created from the query.public static <IMAGE extends Image<?,IMAGE>> BingImageDataset<IMAGE> create(InputStreamObjectReader<IMAGE> reader, BingAPIToken token, String query, String imageFilters, int number)
reader
- the reader with which to load the imagestoken
- the api authentication tokenquery
- the queryimageFilters
- the image filtersnumber
- the target number of results; the resultant dataset may
contain fewer images than specified.BingImageDataset
created from the query.public static <IMAGE extends Image<?,IMAGE>> BingImageDataset<IMAGE> create(InputStreamObjectReader<IMAGE> reader, BingAPIToken token, String query, int number)
reader
- the reader with which to load the imagestoken
- the api authentication tokenquery
- the querynumber
- the target number of results; the resultant dataset may
contain fewer images than specified.BingImageDataset
created from the query.public String getID()
getID
in interface Identifiable