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:
  • Field Details

    • YAAC_STRUCTURE_VERSION

      public static final int YAAC_STRUCTURE_VERSION
      Constant for indicating structural changes to YAAC compilation of OSM data.
      See Also:
    • id

      public int id
      Sequential ID number assigned to this changeset.
    • user

      public String user
      Name of the user who submitted this changeset to OpenStreetMap.
    • uid

      public String uid
      User ID of the user who submitted this changeset to OpenStreetMap.
    • timestamp

      public String timestamp
      The timestamp when this changeset was submitted to OpenStreetMap.
    • yaacStructureVersion

      public int yaacStructureVersion
      The 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

      public void write(DataOutput dos) throws IOException
      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

      protected void writeId(DataOutput dos) throws IOException
      Handle writing the ID field to the binary data stream (handles larger ID ranges in varying subclasses).
      Specified by:
      writeId in class GenericTaggedNode<ChangeSet>
      Parameters:
      dos - DataOutput to use to append the binary ID value
      Throws:
      IOException - if write fails for any reason
    • getId

      public Number getId()
      Return the ID of this OSM record as a sub-class of Number.
      Specified by:
      getId in class GenericTaggedNode<ChangeSet>
      Returns:
      Number subclass instance
    • read

      public static ChangeSet read(DataInput dis) throws IOException
      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

      public ChangeSet dup()
      Create a deep copy of this ChangeSet. Similar to the Object method clone(), but without the exceptions and casting.
      Specified by:
      dup in class GenericTaggedNode<ChangeSet>
      Returns:
      copy of this ChangeSet
    • writeGPX

      public void writeGPX(PrintStream ps)
      Write this ChangeSet to the specified stream as the XML tags one element in GPX schema format.
      Specified by:
      writeGPX in class GenericTaggedNode<ChangeSet>
      Parameters:
      ps - PrintStream to write to
    • hashCode

      public int hashCode()
      Returns a hash code value for the object.
      Overrides:
      hashCode in class Object
      Returns:
      a hash code value for this object.
      See Also:
    • equals

      public boolean equals(Object obj)
      Indicates whether some other object is "equal to" this one.
      Overrides:
      equals in class Object
      Parameters:
      obj - the reference object with which to compare.
      Returns:
      true if this object is the same as the obj argument; false otherwise.
      See Also:
    • compareTo

      public int compareTo(ChangeSet o)
      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 interface Comparable<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 null
      ClassCastException - if the specified object's type prevents it from being compared to this object.