protected Map<String, Object> toUrlParams() { Parameters additional = null; if (includeRowCount) { additional = new Parameters(); additional.setParam(Constants.INCLUDE_COUNT, true); } return queryParams.toUrlParams(additional); }
/** * Set a reference to a URL, title, person, etc. that is the source of this data * * @param reference a reference to a URL, title, person, etc. that is the source of this data * @return new Metadata, with a reference set */ public Metadata reference(String reference) { Parameters params = queryParams.copy(); params.setParam(REFERENCE, reference); return new Metadata(params); }
/** * Set a comment that will help to explain your corrections * * @param comment the comment that may help explain your corrections * @return new Metadata, with a comment set */ public Metadata comment(String comment) { Parameters params = queryParams.copy(); params.setParam(COMMENT, comment); return new Metadata(params); }
/** * When true, the request will only be a test query and no actual data will be written. The * default behavior is to NOT include debug. * * @param debug true if you want this to be a test query where no actual date is written * @return new Metadata, marked with whether or not this is a debug request */ private Metadata debug(boolean debug) { Parameters params = queryParams.copy(); params.setParam(DEBUG, debug); return new Metadata(params); }
/** * Set a user name for the person submitting the data * * @param username * @return new Metadata, with a username set */ public Metadata user(String username) { Parameters params = queryParams.copy(); params.setParam(USER, username); return new Metadata(params); }
/** * Set a parameter and value pair for specifying url parameters, specifically those not yet * available as convenience methods. * * @param key the field name of the parameter to add * @param value the field value that will be serialized using value.toString() * @return this FacetQuery */ private FacetQuery addParam(String key, Object value) { queryParams.setParam(key, value); return this; }
/** * Adds a filter so that results can only be (roughly) within the specified geographic circle. * * @param circle The circle within which to bound the results. * @return this FacetQuery. */ public FacetQuery within(Circle circle) { queryParams.setParam(Constants.FILTER_GEO, circle); return this; }