|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openstreetmap.josm.data.osm.Changeset
public final class Changeset
Represents a single changeset in JOSM. For now its only used during upload but in the future we may do more.
Field Summary | |
---|---|
private java.util.Date |
closedAt
the date this changeset was closed at |
private ChangesetDataSet |
content
the changeset content |
private java.util.Date |
createdAt
date this changeset was created at |
private int |
id
the changeset id |
private boolean |
incomplete
indicates whether this changeset is incomplete. |
private LatLon |
max
the max. |
static int |
MAX_COMMENT_LENGTH
The maximum changeset comment text length allowed by API 0.6 |
private LatLon |
min
the min. |
private boolean |
open
indicates whether this changeset is still open or not |
private java.util.Map<java.lang.String,java.lang.String> |
tags
the map of tags |
private User |
user
the user who owns the changeset |
Constructor Summary | |
---|---|
Changeset()
Creates a new changeset with id 0. |
|
Changeset(Changeset other)
Creates a clone of other |
|
Changeset(int id)
Creates a changeset with id id . |
Method Summary | |
---|---|
int |
compareTo(Changeset other)
|
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
get(java.lang.String key)
Replies the value of the given key; null, if there is no value for this key |
Bounds |
getBounds()
|
java.util.Date |
getClosedAt()
|
ChangesetDataSet |
getContent()
|
java.util.Date |
getCreatedAt()
|
java.lang.String |
getDisplayName(NameFormatter formatter)
|
int |
getId()
|
java.util.Map<java.lang.String,java.lang.String> |
getKeys()
Replies the map of key/value pairs. |
LatLon |
getMax()
|
LatLon |
getMin()
|
java.lang.String |
getName()
|
User |
getUser()
|
boolean |
hasContent()
|
boolean |
hasEqualSemanticAttributes(Changeset other)
|
int |
hashCode()
|
boolean |
hasKeys()
Replies true, if there is at least one key/value pair; false, otherwise |
boolean |
isIncomplete()
|
boolean |
isNew()
|
boolean |
isOpen()
|
java.util.Collection<java.lang.String> |
keySet()
Replies the set of keys |
void |
mergeFrom(Changeset other)
|
void |
put(java.lang.String key,
java.lang.String value)
Sets a key/value pairs |
void |
remove(java.lang.String key)
Removes a given key/value pair |
void |
removeAll()
Removes all tags |
void |
setClosedAt(java.util.Date closedAt)
|
void |
setContent(ChangesetDataSet content)
|
void |
setCreatedAt(java.util.Date createdAt)
|
void |
setId(int id)
|
void |
setIncomplete(boolean incomplete)
|
void |
setKeys(java.util.Map<java.lang.String,java.lang.String> keys)
Sets the map of key/value pairs |
void |
setMax(LatLon max)
|
void |
setMin(LatLon min)
|
void |
setOpen(boolean open)
|
void |
setUser(User user)
|
void |
visit(Visitor v)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MAX_COMMENT_LENGTH
private int id
private User user
private java.util.Date createdAt
private java.util.Date closedAt
private boolean open
private LatLon min
private LatLon max
private java.util.Map<java.lang.String,java.lang.String> tags
private boolean incomplete
private ChangesetDataSet content
Constructor Detail |
---|
public Changeset()
public Changeset(int id)
id
. If id > 0, sets incomplete to true.
id
- the idpublic Changeset(Changeset other)
other
other
- the other changeset. If null, creates a new changeset with id 0.Method Detail |
---|
public void visit(Visitor v)
public int compareTo(Changeset other)
public java.lang.String getName()
public java.lang.String getDisplayName(NameFormatter formatter)
public int getId()
public void setId(int id)
public User getUser()
public void setUser(User user)
public java.util.Date getCreatedAt()
public void setCreatedAt(java.util.Date createdAt)
public java.util.Date getClosedAt()
public void setClosedAt(java.util.Date closedAt)
public boolean isOpen()
public void setOpen(boolean open)
public LatLon getMin()
public void setMin(LatLon min)
public LatLon getMax()
public Bounds getBounds()
public void setMax(LatLon max)
public java.util.Map<java.lang.String,java.lang.String> getKeys()
Tagged
getKeys
in interface Tagged
public void setKeys(java.util.Map<java.lang.String,java.lang.String> keys)
Tagged
setKeys
in interface Tagged
keys
- the map of key value pairs. If null, reset to the empty map.public boolean isIncomplete()
public void setIncomplete(boolean incomplete)
public void put(java.lang.String key, java.lang.String value)
Tagged
put
in interface Tagged
key
- the keyvalue
- the value. If null, removes the key/value pair.public java.lang.String get(java.lang.String key)
Tagged
get
in interface Tagged
key
- the key
public void remove(java.lang.String key)
Tagged
remove
in interface Tagged
key
- the keypublic void removeAll()
Tagged
removeAll
in interface Tagged
public boolean hasEqualSemanticAttributes(Changeset other)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public boolean hasKeys()
Tagged
hasKeys
in interface Tagged
public java.util.Collection<java.lang.String> keySet()
Tagged
keySet
in interface Tagged
public boolean isNew()
public void mergeFrom(Changeset other)
public boolean hasContent()
public ChangesetDataSet getContent()
public void setContent(ChangesetDataSet content)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |