|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bretth.osmosis.core.domain.v0_6.Entity
com.bretth.osmosis.core.domain.v0_6.Relation
public class Relation
A data class representing a single OSM relation.
Constructor Summary | |
---|---|
Relation(long id,
int version,
java.util.Date timestamp,
OsmUser user)
Creates a new instance. |
|
Relation(long id,
int version,
TimestampContainer timestampContainer,
OsmUser user)
Creates a new instance. |
|
Relation(StoreReader sr,
StoreClassRegister scr)
Creates a new instance. |
Method Summary | |
---|---|
void |
addMember(RelationMember member)
Adds a new member. |
void |
addMembers(java.util.Collection<RelationMember> members)
Adds all members in the collection to the relation. |
protected int |
compareMemberList(java.util.List<RelationMember> comparisonMemberList)
Compares this member list to the specified member list. |
int |
compareTo(Relation comparisonRelation)
Compares this relation to the specified relation. |
boolean |
equals(java.lang.Object o)
|
java.util.List<RelationMember> |
getMemberList()
Returns the attached list of relation members. |
EntityType |
getType()
Returns the specific data type represented by this entity. |
void |
store(StoreWriter sw,
StoreClassRegister scr)
Stores all state to the specified store writer. |
Methods inherited from class com.bretth.osmosis.core.domain.v0_6.Entity |
---|
addTag, addTags, compareTags, getFormattedTimestamp, getId, getTagList, getTimestamp, getUser, getVersion |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Relation(long id, int version, java.util.Date timestamp, OsmUser user)
id
- The unique identifier.version
- The version of the entity.timestamp
- The last updated timestamp.user
- The user that last modified this entity.public Relation(long id, int version, TimestampContainer timestampContainer, OsmUser user)
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.public Relation(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
store
in class Entity
sw
- The writer that persists data to an underlying store.scr
- Maintains the mapping between classes and their identifiers
within the store.public EntityType getType()
getType
in class Entity
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
protected int compareMemberList(java.util.List<RelationMember> comparisonMemberList)
comparisonMemberList
- The member list to compare to.
public int compareTo(Relation comparisonRelation)
compareTo
in interface java.lang.Comparable<Relation>
comparisonRelation
- The relation to compare to.
public java.util.List<RelationMember> getMemberList()
public void addMember(RelationMember member)
member
- The member to add.public void addMembers(java.util.Collection<RelationMember> members)
members
- The collection of members to be added.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |