org.openstreetmap.josm.plugins.streetside

## Class StreetsideImportedImage

- java.lang.Object
- - org.openstreetmap.josm.plugins.streetside.StreetsideAbstractImage
  - - org.openstreetmap.josm.plugins.streetside.StreetsideImportedImage

- All Implemented Interfaces:
    Comparable<StreetsideAbstractImage>

      public class StreetsideImportedImage
      extends StreetsideAbstractImage

  A StreetsideImoprtedImage object represents a picture imported locally.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected File` | `file` The picture file.

    - ### Fields inherited from class org.openstreetmap.josm.plugins.streetside.StreetsideAbstractImage

      `cd, he, id, latLon, movingHe`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `StreetsideImportedImage(String id, LatLon latLon, double ca, File file)` Creates a new StreetsideImportedImage object using as date the current date.
    `StreetsideImportedImage(String id, LatLon latLon, double he, File file, long ca)`
    `StreetsideImportedImage(String id, LatLon latLon, double ca, File file, String datetimeOriginal)` Main constructor of the class.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `compareTo(StreetsideAbstractImage image)`
    `static StreetsideImportedImage` | `createInstance(ImageEntry geoImage)` Constructs a new image from an image entry of a `GeoImageLayer`.
    `boolean` | `equals(Object obj)`
    `File` | `getFile()` Returns the `File` object where the picture is located.
    `BufferedImage` | `getImage()` Returns the pictures of the file.
    `int` | `hashCode()`
    `private static long` | `parseTimestampElseCurrentTime(String timestamp)`

    - ### Methods inherited from class org.openstreetmap.josm.plugins.streetside.StreetsideAbstractImage

      `getCd, getDate, getDate, getHe, getId, getLatLon, getMovingHe, getMovingLatLon, getSequence, getTempHe, getTempLatLon, isModified, isVisible, move, next, previous, setCd, setHe, setId, setLatLon, setSequence, setVisible, stopMoving, turn`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### file

          protected File file

      The picture file.

  - ### Constructor Detail

    - #### StreetsideImportedImage

          public StreetsideImportedImage(String id,
                                         LatLon latLon,
                                         double ca,
                                         File file)

      Creates a new StreetsideImportedImage object using as date the current date. Using when the EXIF tags doesn't contain that info.
      Parameters:
        `id` - The Streetside image id
        `latLon` - The latitude and longitude where the picture was taken.
        `ca` - Direction of the picture (0 means north).
        `file` - The file containing the picture.

    - #### StreetsideImportedImage

          public StreetsideImportedImage(String id,
                                         LatLon latLon,
                                         double ca,
                                         File file,
                                         String datetimeOriginal)

      Main constructor of the class.
      Parameters:
        `id` - The Streetside image id
        `latLon` - Latitude and Longitude where the picture was taken.
        `ca` - Direction of the picture (0 means north),
        `file` - The file containing the picture.
        `datetimeOriginal` - The date the picture was taken.

    - #### StreetsideImportedImage

          public StreetsideImportedImage(String id,
                                         LatLon latLon,
                                         double he,
                                         File file,
                                         long ca)

  - ### Method Detail

    - #### createInstance

          public static StreetsideImportedImage createInstance(ImageEntry geoImage)

      Constructs a new image from an image entry of a `GeoImageLayer`.
      Parameters:
        `geoImage` - the `ImageEntry`, from which the corresponding fields are taken
      Returns:
        new image

    - #### parseTimestampElseCurrentTime

          private static long parseTimestampElseCurrentTime(String timestamp)

    - #### getImage

          public BufferedImage getImage()
                                 throws IOException

      Returns the pictures of the file.
      Returns:
        A `BufferedImage` object containing the picture, or null if the `File` given in the constructor was null.
      Throws:
        `IOException` - If the file parameter of the object isn't an image.

    - #### getFile

          public File getFile()

      Returns the `File` object where the picture is located.
      Returns:
        The `File` object where the picture is located.

    - #### compareTo

          public int compareTo(StreetsideAbstractImage image)

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

JOSM Plugins