/** * Appends the string <i>area</i> to the current query. * * @return the current query object */ public OverpassFilterQuery area() { applySeparator(); builder.append("area"); return this; }
/** * Adds a <i>["name"]</i> filter tag to the current query. * * @param name the filter name * * @return the current query object */ public OverpassFilterQuery tag(String name) { builder.standaloneParam(name); return this; }
/** * Adds a <i>(around:radius)</i> around radius filter to the current query. * * @param radius in meters around a predecessor input node * @return the current query object */ public OverpassFilterQuery around(double radius) { builder.around(radius); return this; }
/** * Adds a <i>["name"~value]</i> filter tag to the current query. * * @param name the filter name * @param value the filter value * * @return the current query object */ public OverpassFilterQuery tagRegex(String name, String value) { builder.regexMatches(name, value); return this; }
/** * Creates a map query to embed its output in the current query. * * @return the map query */ public OverpassFilterQuery filterQuery() { return new OverpassFilterQuery(this); }
private void applySeparator() { if (separateNext) { builder.append("; "); } separateNext = false; }
/** * Adds a <i>["name"!~value]</i> filter tag to the current query. * * @param name the filter name * @param value the filter value * * @return the current query object */ public OverpassFilterQuery tagRegexNot(String name, String value) { builder.regexDoesntMatch(name, value); return this; }
/** * A convenience method filtering the output for multiple amenities. * It's equivalent to calling {@link #tagMultiple(String, Set)} with ("amenity", amenities) * * @param amenities the filter values * * @return the current query object */ public OverpassFilterQuery amenities(Set<String> amenities) { builder.multipleValues("amenity", amenities); return this; }
/** * Adds a <i>["name"=value]</i> filter tag to the current query. * * @param name the filter name * @param value the filter value * * @return the current query object */ public OverpassFilterQuery tag(String name, String value) { builder.equals(name, value); return this; }
/** * Adds a <i>["name"!=value]</i> filter tag to the current query. * * @param name the filter name * @param value the filter value * * @return the current query object */ public OverpassFilterQuery tagNot(String name, String value) { builder.notEquals(name, value); return this; }
public OverpassFilterQuery(OverpassQuery parent) { super(parent); init(); }
public final OverpassQuery end() { parent.onSubQueryResult(this); return parent; } }
/** * Appends the string <i>way</i> to the current query. * * @return the current query object */ public OverpassFilterQuery way() { applySeparator(); builder.append("way"); return this; }
/** * Adds a <i>(around:radius, centerLat, centerLon)</i> around radius with center filter to the current query. * * @param radius in meters around the specified center * @param lat latitude of the center coordinate * @param lon longitude of the center coordinate * @return the current query object */ public OverpassFilterQuery around(double radius, double lat, double lon) { builder.around(radius, lat, lon); return this; }
OverpassFilterQuery(OverpassQuery parent, OverpassQueryBuilder builder) { super(parent, builder); init(); }
/** * Appends the string <i>rel</i> to the current query. * * @return the current query object */ public OverpassFilterQuery rel() { applySeparator(); builder.append("rel"); return this; }
/** * Appends the string <i>node</i> to the current query. * * @return the current query object */ public OverpassFilterQuery node() { applySeparator(); builder.append("node"); return this; }