|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openstreetmap.osmosis.core.domain.v0_5.Entity
public abstract class Entity
A data class representing a single OSM entity. All top level data types inherit from this class.
Constructor Summary | |
---|---|
Entity(long id,
java.util.Date timestamp,
OsmUser user)
Creates a new instance. |
|
Entity(long id,
TimestampContainer timestampContainer,
OsmUser user)
Creates a new instance. |
|
Entity(StoreReader sr,
StoreClassRegister scr)
Creates a new instance. |
Method Summary | |
---|---|
void |
addTag(Tag tag)
Adds a new tag. |
void |
addTags(java.util.Collection<Tag> tags)
Adds all tags in the collection to the node. |
protected int |
compareTags(java.util.List<Tag> comparisonTagList)
Compares this tag list to the specified tag list. |
java.lang.String |
getFormattedTimestamp(TimestampFormat timestampFormat)
Gets the timestamp in a string format. |
long |
getId()
|
java.util.List<Tag> |
getTagList()
Returns the attached list of tags. |
java.util.Date |
getTimestamp()
|
abstract EntityType |
getType()
Returns the specific data type represented by this entity. |
OsmUser |
getUser()
Returns the user who last edited the entity. |
void |
store(StoreWriter sw,
StoreClassRegister scr)
Stores all state to the specified store writer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Entity(long id, java.util.Date timestamp, OsmUser user)
id
- The unique identifier.timestamp
- The last updated timestamp.user
- The user that last modified this entity.public Entity(long id, TimestampContainer timestampContainer, OsmUser user)
id
- The unique identifier.timestampContainer
- The container holding the timestamp in an alternative
timestamp representation.user
- The user that last modified this entity.public Entity(StoreReader sr, StoreClassRegister scr)
sr
- The store to read state from.scr
- Maintains the mapping between classes and their identifiers
within the store.Method Detail |
---|
public void store(StoreWriter sw, StoreClassRegister scr)
store
in interface Storeable
sw
- The writer that persists data to an underlying store.scr
- Maintains the mapping between classes and their identifiers
within the store.protected int compareTags(java.util.List<Tag> comparisonTagList)
comparisonTagList
- The tagList to compare to.
public abstract EntityType getType()
public long getId()
public java.util.Date getTimestamp()
public java.lang.String getFormattedTimestamp(TimestampFormat timestampFormat)
timestampFormat
- The formatter to use for formatting the timestamp into a
string.
public OsmUser getUser()
public java.util.List<Tag> getTagList()
public void addTag(Tag tag)
tag
- The tag to add.public void addTags(java.util.Collection<Tag> tags)
tags
- The collection of tags to be added.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |