Package org.ka2ddo.yaac.osm
Class ChangeSet
- All Implemented Interfaces:
Serializable
,Comparable<ChangeSet>
public class ChangeSet
extends GenericTaggedNode<ChangeSet>
implements Comparable<ChangeSet>, Serializable
This class contains the data extracted from a OSM changeset record.
- Author:
- Andrew Pavlin, KA2DDO
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.ka2ddo.yaac.osm.GenericTaggedNode
GenericTaggedNode.ExtendedGTNAttr
-
Field Summary
Modifier and TypeFieldDescriptionint
Sequential ID number assigned to this changeset.The timestamp when this changeset was submitted to OpenStreetMap.User ID of the user who submitted this changeset to OpenStreetMap.Name of the user who submitted this changeset to OpenStreetMap.static final int
Constant for indicating structural changes to YAAC compilation of OSM data.int
The OSM binary encoding structure version of YAAC that was used to create the tile files.Fields inherited from class org.ka2ddo.yaac.osm.GenericTaggedNode
decodedtagArray, extraAmenities, FIXME, FIXME_OBJ, flags, flags2, FLAGS2_BOGUS, FLAGS2_BOGUS_OBJ, FLAGS2_IS_LIT, FLAGS2_IS_LIT_OBJ, FLAGS2_UNDERGROUND, FLAGS2_WHEELCHAIR_ACCESSIBLE, FLAGS2_WHEELCHAIR_ACCESSIBLE_OBJ, HAS_COLOR, HAS_ID, HAS_ID64, HAS_INTERNET_ACCESS, HAS_INTERNET_ACCESS_OBJ, HAS_TOLL, HAS_TOLL_OBJ, IS_AREA, IS_AREA_OBJ, IS_BRIDGE, IS_BRIDGE_OBJ, IS_BUILDING, IS_BUILDING_OBJ, IS_DISUSED, IS_DISUSED_OBJ, IS_HOLE, IS_INCOMPLETE, IS_ISLAND, IS_ISLAND_OBJ, IS_ONEWAY, IS_ONEWAY_BACKWARDS, IS_ONEWAY_BACKWARDS_OBJ, IS_ONEWAY_OBJ, IS_TUNNEL, IS_TUNNEL_OBJ, IS_WATER, MARINE, RENDERABLE_FLAGS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Compares this object with the specified object for order.dup()
Create a deep copy of this ChangeSet.boolean
Indicates whether some other object is "equal to" this one.getId()
Return the ID of this OSM record as a sub-class of Number.int
hashCode()
Returns a hash code value for the object.static ChangeSet
Read a ChangeSet from the provided input stream.void
write
(DataOutput dos) Write this ChangeSet to a file stream.void
writeGPX
(PrintStream ps) Write this ChangeSet to the specified stream as the XML tags one element in GPX schema format.protected void
writeId
(DataOutput dos) Handle writing the ID field to the binary data stream (handles larger ID ranges in varying subclasses).Methods inherited from class org.ka2ddo.yaac.osm.GenericTaggedNode
addAmenityType, compareGTNAttributes, decodedTagArrayToString, ensureElementHasTagArray, hasDecodedTags, hasThisAmenity, putTag, readTags, readTags, removeRedundantAmenityTypes, replaceAmenityType, writeTags
-
Field Details
-
YAAC_STRUCTURE_VERSION
public static final int YAAC_STRUCTURE_VERSIONConstant for indicating structural changes to YAAC compilation of OSM data.- See Also:
-
id
public int idSequential ID number assigned to this changeset. -
user
Name of the user who submitted this changeset to OpenStreetMap. -
uid
User ID of the user who submitted this changeset to OpenStreetMap. -
timestamp
The timestamp when this changeset was submitted to OpenStreetMap. -
yaacStructureVersion
public int yaacStructureVersionThe OSM binary encoding structure version of YAAC that was used to create the tile files.- See Also:
-
-
Constructor Details
-
ChangeSet
public ChangeSet()
-
-
Method Details
-
write
Write this ChangeSet to a file stream.- Parameters:
dos
- DataOutput interface implementer to use for the writing- Throws:
IOException
- if write fails for any reason.
-
writeId
Handle writing the ID field to the binary data stream (handles larger ID ranges in varying subclasses).- Specified by:
writeId
in classGenericTaggedNode<ChangeSet>
- Parameters:
dos
- DataOutput to use to append the binary ID value- Throws:
IOException
- if write fails for any reason
-
getId
Return the ID of this OSM record as a sub-class of Number.- Specified by:
getId
in classGenericTaggedNode<ChangeSet>
- Returns:
- Number subclass instance
-
read
Read a ChangeSet from the provided input stream.- Parameters:
dis
- DataInput interface implementer from which to read the ChangeSet- Returns:
- a filled-in ChangeSet structure
- Throws:
IOException
- if the read failed for any reason
-
dup
Create a deep copy of this ChangeSet. Similar to the Object method clone(), but without the exceptions and casting.- Specified by:
dup
in classGenericTaggedNode<ChangeSet>
- Returns:
- copy of this ChangeSet
-
writeGPX
Write this ChangeSet to the specified stream as the XML tags one element in GPX schema format.- Specified by:
writeGPX
in classGenericTaggedNode<ChangeSet>
- Parameters:
ps
- PrintStream to write to
-
hashCode
public int hashCode()Returns a hash code value for the object. -
equals
Indicates whether some other object is "equal to" this one. -
compareTo
Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.- Specified by:
compareTo
in interfaceComparable<ChangeSet>
- Parameters:
o
- the object to be compared.- Returns:
- a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
- Throws:
NullPointerException
- if the specified object is nullClassCastException
- if the specified object's type prevents it from being compared to this object.
-