Package org.openstreetmap.josm.io
Class ChangesetQuery.ChangesetQueryUrlParser
- java.lang.Object
-
- org.openstreetmap.josm.io.ChangesetQuery.ChangesetQueryUrlParser
-
- Enclosing class:
- ChangesetQuery
public static class ChangesetQuery.ChangesetQueryUrlParser extends java.lang.Object
Changeset query URL parser.
-
-
Constructor Summary
Constructors Constructor Description ChangesetQueryUrlParser()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected ChangesetQuery
createFromMap(java.util.Map<java.lang.String,java.lang.String> queryParams)
protected java.util.Map<java.lang.String,java.lang.String>
createMapFromQueryString(java.lang.String query)
ChangesetQuery
parse(java.lang.String query)
Parses the changeset query given as URL query parameters and replies aChangesetQuery
.protected boolean
parseBoolean(java.lang.String value, java.lang.String parameter)
protected java.time.Instant
parseDate(java.lang.String value, java.lang.String parameter)
protected java.util.Collection<java.lang.Long>
parseLongs(java.lang.String value)
protected java.time.Instant[]
parseTime(java.lang.String value)
protected int
parseUid(java.lang.String value)
-
-
-
Constructor Detail
-
ChangesetQueryUrlParser
public ChangesetQueryUrlParser()
-
-
Method Detail
-
parseUid
protected int parseUid(java.lang.String value) throws ChangesetQuery.ChangesetQueryUrlException
-
parseBoolean
protected boolean parseBoolean(java.lang.String value, java.lang.String parameter) throws ChangesetQuery.ChangesetQueryUrlException
-
parseDate
protected java.time.Instant parseDate(java.lang.String value, java.lang.String parameter) throws ChangesetQuery.ChangesetQueryUrlException
-
parseTime
protected java.time.Instant[] parseTime(java.lang.String value) throws ChangesetQuery.ChangesetQueryUrlException
-
parseLongs
protected java.util.Collection<java.lang.Long> parseLongs(java.lang.String value)
-
createFromMap
protected ChangesetQuery createFromMap(java.util.Map<java.lang.String,java.lang.String> queryParams) throws ChangesetQuery.ChangesetQueryUrlException
-
createMapFromQueryString
protected java.util.Map<java.lang.String,java.lang.String> createMapFromQueryString(java.lang.String query)
-
parse
public ChangesetQuery parse(java.lang.String query) throws ChangesetQuery.ChangesetQueryUrlException
Parses the changeset query given as URL query parameters and replies aChangesetQuery
.query
is the query part of an API url for querying changesets, see OSM API.Example for a query string:
uid=1234&open=true
- Parameters:
query
- the query string. If null, an empty query (identical to a query for all changesets) is assumed- Returns:
- the changeset query
- Throws:
ChangesetQuery.ChangesetQueryUrlException
- if the query string doesn't represent a legal query for changesets
-
-