Class OsmServerObjectReader


  • public class OsmServerObjectReader
    extends OsmServerReader
    OsmServerObjectReader reads an individual object from the OSM server. It can either download the object including or not including its immediate children. The former case is called a "full download". It can also download a specific version of the object (however, "full" download is not possible in that case).
    • Field Detail

      • id

        private final PrimitiveId id
        the id of the object to download
      • full

        private final boolean full
        true if a full download is required, i.e. a download including the immediate children
      • version

        private final int version
        the specific version number, if required (incompatible with full), or -1 else
    • Constructor Detail

      • OsmServerObjectReader

        public OsmServerObjectReader​(long id,
                                     OsmPrimitiveType type,
                                     boolean full)
        Creates a new server object reader for a given id and a primitive type.
        Parameters:
        id - the object id. > 0 required.
        type - the type. Must not be null.
        full - true, if a full download is requested (i.e. a download including immediate children); false, otherwise
        Throws:
        java.lang.IllegalArgumentException - if id <= 0
        java.lang.IllegalArgumentException - if type is null
      • OsmServerObjectReader

        public OsmServerObjectReader​(long id,
                                     OsmPrimitiveType type,
                                     int version)
        Creates a new server object reader for a given id and a primitive type.
        Parameters:
        id - the object id. > 0 required.
        type - the type. Must not be null.
        version - the specific version number, if required; -1, otherwise
        Throws:
        java.lang.IllegalArgumentException - if id <= 0
        java.lang.IllegalArgumentException - if type is null
      • OsmServerObjectReader

        public OsmServerObjectReader​(PrimitiveId id,
                                     boolean full)
        Creates a new server object reader for an object with the given id
        Parameters:
        id - the object id. Must not be null. Unique id > 0 required.
        full - true, if a full download is requested (i.e. a download including immediate children); false, otherwise
        Throws:
        java.lang.IllegalArgumentException - if id is null
        java.lang.IllegalArgumentException - if id.getUniqueId() <= 0
      • OsmServerObjectReader

        public OsmServerObjectReader​(PrimitiveId id,
                                     int version)
        Creates a new server object reader for an object with the given id
        Parameters:
        id - the object id. Must not be null. Unique id > 0 required.
        version - the specific version number, if required; -1, otherwise
        Throws:
        java.lang.IllegalArgumentException - if id is null
        java.lang.IllegalArgumentException - if id.getUniqueId() <= 0