Package org.openstreetmap.josm.tools
Class SearchCompilerQueryWizard
- java.lang.Object
-
- org.openstreetmap.josm.tools.SearchCompilerQueryWizard
-
public final class SearchCompilerQueryWizard extends Object
Builds an Overpass QL from aSearchAction
query.- Since:
- 8744 (using tyrasd/overpass-wizard), 16262 (standalone)
-
-
Constructor Summary
Constructors Modifier Constructor Description private
SearchCompilerQueryWizard()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
constructQuery(String search)
Builds an Overpass QL from aSearchAction
like query.private static String
constructQuery(SearchCompiler.Match match, String bounds, String queryLineSuffix)
private static String
constructQuery(SearchCompiler.Match match, Set<OsmPrimitiveType> types)
private static List<SearchCompiler.Match>
normalizeToDNF(SearchCompiler.Match match)
Normalizes the match to disjunctive normal form: A∧(B∨C) ⇔ (A∧B)∨(A∧C)private static String
quote(String s)
Quotes the given string for its use in Overpass QL
-
-
-
Constructor Detail
-
SearchCompilerQueryWizard
private SearchCompilerQueryWizard()
-
-
Method Detail
-
constructQuery
public static String constructQuery(String search)
Builds an Overpass QL from aSearchAction
like query.- Parameters:
search
- theSearchAction
like 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
private static String constructQuery(SearchCompiler.Match match, Set<OsmPrimitiveType> types)
-
quote
private static String quote(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 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
-
-