|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.openstreetmap.osmosis.core.domain.v0_6.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(CommonEntityData entityData)
Creates a new instance. |
|
Entity(long id,
int version,
java.util.Date timestamp,
OsmUser user,
long changesetId)
Creates a new instance. |
|
Entity(long id,
int version,
java.util.Date timestamp,
OsmUser user,
long changesetId,
java.util.Collection<Tag> tags)
Creates a new instance. |
|
Entity(long id,
int version,
TimestampContainer timestampContainer,
OsmUser user,
long changesetId)
Creates a new instance. |
|
Entity(long id,
int version,
TimestampContainer timestampContainer,
OsmUser user,
long changesetId,
java.util.Collection<Tag> tags)
Creates a new instance. |
|
Entity(StoreReader sr,
StoreClassRegister scr)
Creates a new instance. |
|
| Method Summary | |
|---|---|
protected void |
assertWriteable()
Ensures that the object is writeable. |
protected int |
compareTags(java.util.Collection<Tag> comparisonTags)
Compares the tags on this entity to the specified tags. |
long |
getChangesetId()
Gets the id of the changeset that this version of the entity was created by. |
java.lang.String |
getFormattedTimestamp(TimestampFormat timestampFormat)
Gets the timestamp in a string format. |
long |
getId()
Gets the identifier. |
java.util.Collection<Tag> |
getTags()
Returns the attached tags. |
java.util.Date |
getTimestamp()
Gets the timestamp in date form. |
TimestampContainer |
getTimestampContainer()
Gets the timestamp container object which may hold the timestamp in a different format. |
abstract EntityType |
getType()
Returns the specific data type represented by this entity. |
OsmUser |
getUser()
Returns the user who last edited the entity. |
int |
getVersion()
Gets the version. |
abstract Entity |
getWriteableInstance()
Returns a writeable instance of this entity. |
boolean |
isReadOnly()
Indicates if the object has been set to read-only. |
void |
makeReadOnly()
Configures the object to be read-only. |
void |
setChangesetId(long changesetId)
Sets the id of the changeset that this version of the entity was created by. |
void |
setId(long id)
Sets the identifier. |
void |
setTimestamp(java.util.Date timestamp)
Sets the timestamp in date form. |
void |
setTimestampContainer(TimestampContainer timestampContainer)
Sets the timestamp container object allowing the timestamp to be held in a different format. |
void |
setUser(OsmUser user)
Sets the last modification user. |
void |
setVersion(int version)
Sets the version. |
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,
int version,
java.util.Date timestamp,
OsmUser user,
long changesetId)
id - The unique identifier.version - The version of the entity.timestamp - The last updated timestamp.user - The user that last modified this entity.changesetId - The id of the changeset that this version of the entity was created by.
public Entity(long id,
int version,
TimestampContainer timestampContainer,
OsmUser user,
long changesetId)
id - The unique identifier.version - The version of the entity.timestampContainer - The container holding the timestamp in an alternative
timestamp representation.user - The user that last modified this entity.changesetId - The id of the changeset that this version of the entity was created by.
public Entity(long id,
int version,
java.util.Date timestamp,
OsmUser user,
long changesetId,
java.util.Collection<Tag> tags)
id - The unique identifier.version - The version of the entity.timestamp - The last updated timestamp.user - The user that last modified this entity.changesetId - The id of the changeset that this version of the entity was created by.tags - The tags to apply to the object.
public Entity(long id,
int version,
TimestampContainer timestampContainer,
OsmUser user,
long changesetId,
java.util.Collection<Tag> tags)
id - The unique identifier.version - The version of the entity.timestampContainer - The container holding the timestamp in an alternative
timestamp representation.user - The user that last modified this entity.changesetId - The id of the changeset that this version of the entity was created by.tags - The tags to apply to the object.public Entity(CommonEntityData entityData)
entityData - The data to store in the entity. This instance is used directly and is not cloned.
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 Storeablesw - 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.Collection<Tag> comparisonTags)
comparisonTags - The tags to compare to.
public abstract EntityType getType()
public long getId()
public void setId(long id)
id - The identifier.public int getVersion()
public void setVersion(int version)
version - The version.public java.util.Date getTimestamp()
public void setTimestamp(java.util.Date timestamp)
timestamp - The timestamp.public TimestampContainer getTimestampContainer()
public void setTimestampContainer(TimestampContainer timestampContainer)
timestampContainer - The timestamp container.public java.lang.String getFormattedTimestamp(TimestampFormat timestampFormat)
timestampFormat - The formatter to use for formatting the timestamp into a
string.
public OsmUser getUser()
public void setUser(OsmUser user)
user - The user.public long getChangesetId()
public void setChangesetId(long changesetId)
changesetId - The changeset id.public java.util.Collection<Tag> getTags()
public boolean isReadOnly()
protected void assertWriteable()
public void makeReadOnly()
public abstract Entity getWriteableInstance()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||