
com.afrigis.services.search.extension.intiendols.api2.params.CensusParams Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of search-extension Show documentation
Show all versions of search-extension Show documentation
Search extensions for API's such as Census and Postal Codes
The newest version!
package com.afrigis.services.search.extension.intiendoLS.api2.params;
import com.afrigis.services.Response;
import com.afrigis.services.search.extension.CensusGetType;
import com.afrigis.services.search.extension.impl.CensusResponseDownloadImpl;
import com.afrigis.services.search.extension.impl.CensusResponseImpl;
/**
*
* Object contains service specific parameters for Census service call
*
*
* @author Takalani
*/
public class CensusParams extends SeoidLatLongAbstractParams {
private CensusGetType censusGetType;
public void setCensusGetType(CensusGetType censusGetType) {
this.censusGetType = censusGetType;
}
public CensusGetType getCensusGetType() {
return this.censusGetType;
}
/**
*
* Get Census report using seoid
*
*
* @param email AfriGIS service client email making service call
* @param seoid location identifier
* @param censusGetType get JSON or PDF report
*/
public CensusParams(String email, String seoid, CensusGetType censusGetType) {
super(email, seoid);
this.censusGetType = censusGetType;
}
/**
*
*
* Get Census report using latitude and longitude
*
*
* @param email AfriGIS service client email making service call
* @param latitude identify location
* @param longitude identify location
* @param censusGetType get JSON or PDF report
*/
public CensusParams(String email, String latitude, String longitude, CensusGetType censusGetType) {
super(email, latitude, longitude);
this.censusGetType = censusGetType;
}
/**
*
* Service to call, this based on censusGetType
*
*
* @return String service to call
*/
@Override
public String getServiceName() {
return censusGetType.toString();
}
@Override
public Class extends Response> getResponseType() {
return censusGetType == CensusGetType.JSON ? CensusResponseImpl.class : CensusResponseDownloadImpl.class;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy