|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openstreetmap.josm.io.ChangesetQuery
public class ChangesetQuery
| Nested Class Summary | |
|---|---|
static class |
ChangesetQuery.ChangesetQueryUrlException
|
static class |
ChangesetQuery.ChangesetQueryUrlParser
|
| Field Summary | |
|---|---|
private Bounds |
bounds
the bounding box this query is restricted to. |
private java.lang.Boolean |
closed
indicates whether only closed changesets are queried. |
private java.util.Date |
closedAfter
|
private java.util.Date |
createdBefore
|
private java.lang.Boolean |
open
indicates whether only open changesets are queried. |
private java.lang.Integer |
uid
the user id this query is restricted to. |
private java.lang.String |
userName
the user name this query is restricted to. |
| Constructor Summary | |
|---|---|
ChangesetQuery()
|
|
| Method Summary | |
|---|---|
ChangesetQuery |
beingClosed(boolean isClosed)
Restricts the result to changesets which are or aren't closed, depending on the value of isClosed |
ChangesetQuery |
beingOpen(boolean isOpen)
Restricts the result to changesets which are or aren't open, depending on the value of isOpen |
static ChangesetQuery |
buildFromUrlQuery(java.lang.String query)
Replies a changeset query object from the query part of a OSM API URL for querying changesets. |
ChangesetQuery |
closedAfter(java.util.Date d)
Restricts the result to changesets which have been closed after the date given by d. |
ChangesetQuery |
closedAfterAndCreatedBefore(java.util.Date closedAfter,
java.util.Date createdBefore)
Restricts the result to changesets which have been closed after closedAfter and which
habe been created before createdBefore. |
ChangesetQuery |
forUser(int uid)
Restricts the query to changesets owned by the user with id uid. |
ChangesetQuery |
forUser(java.lang.String username)
Restricts the query to changesets owned by the user with user name username. |
java.lang.String |
getQueryString()
Replies the query string to be used in a query URL for the OSM API. |
java.lang.String |
getUserName()
Replies the user name which this query is restricted to. |
ChangesetQuery |
inBbox(Bounds bbox)
Replies a query which is restricted to a bounding box given by bbox. |
ChangesetQuery |
inBbox(double minLon,
double minLat,
double maxLon,
double maxLat)
Replies a query which is restricted to a bounding box. |
ChangesetQuery |
inBbox(LatLon min,
LatLon max)
Replies a query which is restricted to a bounding box. |
boolean |
isRestrictedToFullyIdentifiedUser()
Replies true if this query is restricted to user whom know the user id for. |
boolean |
isRestrictedToPartiallyIdentifiedUser()
Replies true if this query is restricted to user whom we only know the user name for. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private java.lang.Integer uid
private java.lang.String userName
private Bounds bounds
private java.util.Date closedAfter
private java.util.Date createdBefore
private java.lang.Boolean open
private java.lang.Boolean closed
| Constructor Detail |
|---|
public ChangesetQuery()
| Method Detail |
|---|
public static ChangesetQuery buildFromUrlQuery(java.lang.String query)
throws ChangesetQuery.ChangesetQueryUrlException
query - the query part
ChangesetQuery.ChangesetQueryUrlException - thrown if query doesn't consist of valid query parameters
public ChangesetQuery forUser(int uid)
throws java.lang.IllegalArgumentException
uid.
uid - the uid of the user. >0 expected.
java.lang.IllegalArgumentException - thrown if uid <= 0forUser(String)public ChangesetQuery forUser(java.lang.String username)
username.
Caveat: for historical reasons the username might not be unique! It is recommended to use
forUser(int) to restrict the query to a specific user.
username - the username. Must not be null.
java.lang.IllegalArgumentException - thrown if username is null.forUser(int)public boolean isRestrictedToPartiallyIdentifiedUser()
public java.lang.String getUserName()
isRestrictedToPartiallyIdentifiedUser() is false.
public boolean isRestrictedToFullyIdentifiedUser()
public ChangesetQuery inBbox(double minLon,
double minLat,
double maxLon,
double maxLat)
throws java.lang.IllegalArgumentException
minLon - min longitude of the bounding box. Valid longitude value expected.minLat - min latitude of the bounding box. Valid latitude value expected.maxLon - max longitude of the bounding box. Valid longitude value expected.maxLat - max latitude of the bounding box. Valid latitude value expected.
java.lang.IllegalArgumentException - thrown if either of the parameters isn't a valid longitude or
latitude value
public ChangesetQuery inBbox(LatLon min,
LatLon max)
min - the min lat/lon coordinates of the bounding box. Must not be null.max - the max lat/lon coordiantes of the bounding box. Must not be null.
java.lang.IllegalArgumentException - thrown if min is null
java.lang.IllegalArgumentException - thrown if max is null
public ChangesetQuery inBbox(Bounds bbox)
throws java.lang.IllegalArgumentException
bbox.
bbox - the bounding box. Must not be null.
java.lang.IllegalArgumentException - thrown if bbox is null.
public ChangesetQuery closedAfter(java.util.Date d)
throws java.lang.IllegalArgumentException
d.
d d is a date relative to the current time zone.
d - the date . Must not be null.
java.lang.IllegalArgumentException - thrown if d is null
public ChangesetQuery closedAfterAndCreatedBefore(java.util.Date closedAfter,
java.util.Date createdBefore)
throws java.lang.IllegalArgumentException
closedAfter and which
habe been created before createdBefore. Both dates are expressed relative to the current
time zone.
closedAfter - only reply changesets closed after this date. Must not be null.createdBefore - only reply changesets created before this date. Must not be null.
java.lang.IllegalArgumentException - thrown if closedAfter is null
java.lang.IllegalArgumentException - thrown if createdBefore is nullpublic ChangesetQuery beingOpen(boolean isOpen)
isOpen
isOpen - whether changesets should or should not be open
public ChangesetQuery beingClosed(boolean isClosed)
isClosed
isClosed - whether changesets should or should not be open
public java.lang.String getQueryString()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||