Package org.openstreetmap.josm.tools
Class SearchCompilerQueryWizard
java.lang.Object
org.openstreetmap.josm.tools.SearchCompilerQueryWizard
Builds an Overpass QL from a
SearchAction query.- Since:
- 8744 (using tyrasd/overpass-wizard), 16262 (standalone)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringconstructQuery(String search) Builds an Overpass QL from aSearchActionlike query.private static StringconstructQuery(SearchCompiler.Match match, String bounds, String queryLineSuffix) private static StringconstructQuery(SearchCompiler.Match match, Set<OsmPrimitiveType> types) private static List<SearchCompiler.Match>Normalizes the match to disjunctive normal form: A∧(B∨C) ⇔ (A∧B)∨(A∧C)private static StringQuotes the given string for its use in Overpass QL
-
Constructor Details
-
SearchCompilerQueryWizard
private SearchCompilerQueryWizard()
-
-
Method Details
-
constructQuery
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 String constructQuery(SearchCompiler.Match match, String bounds, String queryLineSuffix) -
constructQuery
-
quote
Quotes the given string for its use in Overpass QL- Parameters:
s- the string to quote- Returns:
- the quoted string
-
normalizeToDNF
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
-