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:
    java.lang.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 java.io.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(java.lang.String id, org.openstreetmap.josm.data.coor.LatLon latLon, double ca, java.io.File file)` Creates a new StreetsideImportedImage object using as date the current date.
    `StreetsideImportedImage(java.lang.String id, org.openstreetmap.josm.data.coor.LatLon latLon, double he, java.io.File file, long ca)`
    `StreetsideImportedImage(java.lang.String id, org.openstreetmap.josm.data.coor.LatLon latLon, double ca, java.io.File file, java.lang.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(org.openstreetmap.josm.gui.layer.geoimage.ImageEntry geoImage)` Constructs a new image from an image entry of a `GeoImageLayer`.
    `boolean` | `equals(java.lang.Object obj)`
    `java.io.File` | `getFile()` Returns the `File` object where the picture is located.
    `java.awt.image.BufferedImage` | `getImage()` Returns the pictures of the file.
    `int` | `hashCode()`
    `private static long` | `parseTimestampElseCurrentTime(java.lang.String timestamp)`

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

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

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

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

- - ### Field Detail

    - #### file

          protected java.io.File file

      The picture file.

  - ### Constructor Detail

    - #### StreetsideImportedImage

          public StreetsideImportedImage(java.lang.String id,
                                         org.openstreetmap.josm.data.coor.LatLon latLon,
                                         double ca,
                                         java.io.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(java.lang.String id,
                                         org.openstreetmap.josm.data.coor.LatLon latLon,
                                         double ca,
                                         java.io.File file,
                                         java.lang.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(java.lang.String id,
                                         org.openstreetmap.josm.data.coor.LatLon latLon,
                                         double he,
                                         java.io.File file,
                                         long ca)

  - ### Method Detail

    - #### createInstance

          public static StreetsideImportedImage createInstance(org.openstreetmap.josm.gui.layer.geoimage.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(java.lang.String timestamp)

    - #### getImage

          public java.awt.image.BufferedImage getImage()
                                                throws java.io.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:
        `java.io.IOException` - If the file parameter of the object isn't an image.

    - #### getFile

          public java.io.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 `java.lang.Object`

    - #### equals

          public boolean equals(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`

JOSM Plugins