Package org.openstreetmap.josm.tools
Class SearchCompilerQueryWizard
- java.lang.Object
-
- org.openstreetmap.josm.tools.SearchCompilerQueryWizard
-
public final class SearchCompilerQueryWizard extends java.lang.Object
Builds an Overpass QL from aSearchActionquery.- Since:
- 8744 (using tyrasd/overpass-wizard), 16262 (standalone)
-
-
Constructor Summary
Constructors Modifier Constructor Description privateSearchCompilerQueryWizard()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringconstructQuery(java.lang.String search)Builds an Overpass QL from aSearchActionlike query.private static java.lang.StringconstructQuery(SearchCompiler.Match match, java.lang.String bounds, java.lang.String queryLineSuffix)private static java.lang.StringconstructQuery(SearchCompiler.Match match, java.util.Set<OsmPrimitiveType> types)private static java.util.List<SearchCompiler.Match>normalizeToDNF(SearchCompiler.Match match)Normalizes the match to disjunctive normal form: A∧(B∨C) ⇔ (A∧B)∨(A∧C)private static java.lang.Stringquote(java.lang.String s)Quotes the given string for its use in Overpass QL
-
-
-
Constructor Detail
-
SearchCompilerQueryWizard
private SearchCompilerQueryWizard()
-
-
Method Detail
-
constructQuery
public static java.lang.String constructQuery(java.lang.String search)
Builds an Overpass QL from aSearchActionlike query.- Parameters:
search- theSearchActionlike query- Returns:
- an Overpass QL query
- Throws:
UncheckedParseException- when the parsing fails
-
constructQuery
private static java.lang.String constructQuery(SearchCompiler.Match match, java.lang.String bounds, java.lang.String queryLineSuffix)
-
constructQuery
private static java.lang.String constructQuery(SearchCompiler.Match match, java.util.Set<OsmPrimitiveType> types)
-
quote
private static java.lang.String quote(java.lang.String s)
Quotes the given string for its use in Overpass QL- Parameters:
s- the string to quote- Returns:
- the quoted string
-
normalizeToDNF
private static java.util.List<SearchCompiler.Match> normalizeToDNF(SearchCompiler.Match match)
Normalizes the match to disjunctive normal form: A∧(B∨C) ⇔ (A∧B)∨(A∧C)- Parameters:
match- the match to normalize- Returns:
- the match in disjunctive normal form
-
-