Q - the child class that extends this abstract classR - the type the child class' execute()-function returnsS - the shard type the child class acceptspublic abstract class CensusQuery<Q extends CensusQuery,R,S extends Shard> extends ShardQuery<Q,R,S>
shardsgeneralRateLimiter, resourceValueuserAgent| Constructor and Description |
|---|
CensusQuery(IXmlConverter xmlConverter,
IRateLimiter generalRateLimiter,
IRateLimiter scrapingRateLimiter,
String baseUrl,
String userAgent,
int apiVersion,
String resourceValue)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
buildURL()
Generates a String URL based on the supplied values.
|
Q |
censusHistoryFrom(long timestamp)
Sets the lower bound in UNIX timestamp for the History census mode.
|
Q |
censusHistoryTo(long timestamp)
Sets the upper bound in UNIX timestamp for the History census mode.
|
Q |
censusIds(CensusId... censusIds)
Sets the census id's.
|
Q |
censusModes(CensusMode... censusModes)
Sets the census modes.
|
shardsexecute, getRateLimiter, resourceString, slowMode, validateQueryParameterscloseInputStreamQuietly, execute, makeRequest, translateResponsepublic CensusQuery(IXmlConverter xmlConverter, IRateLimiter generalRateLimiter, IRateLimiter scrapingRateLimiter, String baseUrl, String userAgent, int apiVersion, String resourceValue)
xmlConverter - resourceValue - the resource valuegeneralRateLimiter - baseUrl - userAgent - apiVersion - scrapingRateLimiter - public final Q censusIds(CensusId... censusIds)
censusIds - the census id's to setpublic final Q censusModes(CensusMode... censusModes)
censusModes - the census modes to selectpublic final Q censusHistoryFrom(long timestamp)
timestamp - the lower bound in UNIX timestamp for the History census
modepublic final Q censusHistoryTo(long timestamp)
timestamp - the upper bound in UNIX timestamp for the History census
modeprotected String buildURL()
AbstractQuerybuildURL in class ShardQuery<Q extends CensusQuery,R,S extends Shard>Copyright © 2017. All rights reserved.