Interface ImageMetadata
-
- All Known Implementing Classes:
GpxImageEntry
,ImageEntry
,ImageMarker.MarkerRemoteEntry
,RemoteEntry
,WikimediaCommonsEntry
public interface ImageMetadata
An interface for images with metadata- Since:
- 18592, largely extracted from
GpxImageEntry
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
extractExif()
Extract GPS metadata from image EXIF.java.lang.String
getDisplayName()
Returns a display name for this entryjava.lang.Double
getElevation()
Returns the elevation value.ILatLon
getExifCoor()
Get the exif coordinatesjava.time.Instant
getExifGpsInstant()
Returns the EXIF GPS time.java.lang.Double
getExifImgDir()
Get the exif directionjava.time.Instant
getExifInstant()
Returns EXIF timedefault java.lang.Integer
getExifOrientation()
Returns EXIF orientationjava.time.Instant
getGpsInstant()
Returns the GPS time value.int
getHeight()
Returns height of the image this ImageMetadata represents.java.net.URI
getImageURI()
Get the image locationjava.io.InputStream
getInputStream()
Get the image input streamjava.lang.String
getIptcCaption()
Returns the IPTC caption.java.lang.String
getIptcHeadline()
Returns the IPTC headline.java.util.List<java.lang.String>
getIptcKeywords()
Returns the IPTC keywords.java.lang.String
getIptcObjectName()
Returns the IPTC object name.java.time.Instant
getLastModified()
Get the last time the source was modifiedILatLon
getPos()
Returns the position value.Projections
getProjectionType()
Get the projection type for this entryjava.lang.Double
getSpeed()
Returns the speed value.int
getWidth()
Returns width of the image this ImageMetadata represents.boolean
hasExifGpsTime()
Convenient way to determine if this entry has a EXIF GPS time, without the cost of building a defensive copy.boolean
hasExifTime()
Convenient way to determine if this entry has a EXIF time, without the cost of building a defensive copy.boolean
hasGpsTime()
Convenient way to determine if this entry has a GPS time, without the cost of building a defensive copy.void
setElevation(java.lang.Double elevation)
Sets the elevation.void
setExifCoor(ILatLon exifCoor)
Set the exif coordinatesvoid
setExifGpsTime(java.time.Instant exifGpsTime)
Sets the EXIF GPS time.void
setExifImgDir(java.lang.Double exifDir)
Set the exif directionvoid
setExifOrientation(java.lang.Integer exifOrientation)
Sets EXIF orientation.void
setExifTime(java.time.Instant exifTime)
Sets EXIF time.void
setGpsTime(java.time.Instant gpsTime)
Sets the GPS time.void
setHeight(int height)
Sets the height of this ImageMetadata.void
setIptcCaption(java.lang.String iptcCaption)
Sets the IPTC caption.void
setIptcHeadline(java.lang.String iptcHeadline)
Sets the IPTC headline.void
setIptcKeywords(java.util.List<java.lang.String> iptcKeywords)
Sets the IPTC keywords.void
setIptcObjectName(java.lang.String iptcObjectName)
Sets the IPTC object name.void
setPos(ILatLon pos)
Sets the position.void
setProjectionType(Projections newProjection)
Set the new projection typevoid
setSpeed(java.lang.Double speed)
Sets the speed.void
setWidth(int width)
Sets the width of this ImageMetadata.
-
-
-
Method Detail
-
getImageURI
java.net.URI getImageURI()
Get the image location- Returns:
- The image location
-
getWidth
int getWidth()
Returns width of the image this ImageMetadata represents.- Returns:
- width of the image this ImageMetadata represents
-
getHeight
int getHeight()
Returns height of the image this ImageMetadata represents.- Returns:
- height of the image this ImageMetadata represents
- Since:
- 18592 (interface), 13220 (GpxImageEntry)
-
getPos
ILatLon getPos()
Returns the position value. The position value from the temporary copy is returned if that copy exists.- Returns:
- the position value
-
getSpeed
java.lang.Double getSpeed()
Returns the speed value. The speed value from the temporary copy is returned if that copy exists.- Returns:
- the speed value
-
getElevation
java.lang.Double getElevation()
Returns the elevation value. The elevation value from the temporary copy is returned if that copy exists.- Returns:
- the elevation value
-
getGpsInstant
java.time.Instant getGpsInstant()
Returns the GPS time value. The GPS time value from the temporary copy is returned if that copy exists.- Returns:
- the GPS time value
-
hasGpsTime
boolean hasGpsTime()
Convenient way to determine if this entry has a GPS time, without the cost of building a defensive copy.- Returns:
true
if this entry has a GPS time- Since:
- 18592 (interface), 6450 (GpxImageEntry)
-
getDisplayName
java.lang.String getDisplayName()
Returns a display name for this entry- Returns:
- a display name for this entry
-
getExifOrientation
default java.lang.Integer getExifOrientation()
Returns EXIF orientation- Returns:
- EXIF orientation
-
getExifInstant
java.time.Instant getExifInstant()
Returns EXIF time- Returns:
- EXIF time
- Since:
- 18592 (interface), 17715 (GpxImageEntry)
-
hasExifTime
boolean hasExifTime()
Convenient way to determine if this entry has a EXIF time, without the cost of building a defensive copy.- Returns:
true
if this entry has a EXIF time- Since:
- 18592 (interface), 6450 (GpxImageEntry)
-
getExifGpsInstant
java.time.Instant getExifGpsInstant()
Returns the EXIF GPS time.- Returns:
- the EXIF GPS time
- Since:
- 18592 (interface), 17715 (GpxImageEntry)
-
hasExifGpsTime
boolean hasExifGpsTime()
Convenient way to determine if this entry has a EXIF GPS time, without the cost of building a defensive copy.- Returns:
true
if this entry has a EXIF GPS time- Since:
- 18592 (interface), 6450 (GpxImageEntry)
-
getExifCoor
ILatLon getExifCoor()
Get the exif coordinates- Returns:
- The location of the image
-
getExifImgDir
java.lang.Double getExifImgDir()
Get the exif direction- Returns:
- The image direction
-
getLastModified
java.time.Instant getLastModified()
Get the last time the source was modified- Returns:
- The last time the source was modified
-
setWidth
void setWidth(int width)
Sets the width of this ImageMetadata.- Parameters:
width
- set the width of this ImageMetadata- Since:
- 18592 (interface), 13220 (GpxImageEntry)
-
setHeight
void setHeight(int height)
Sets the height of this ImageMetadata.- Parameters:
height
- set the height of this ImageMetadata- Since:
- 18592 (interface), 13220 (GpxImageEntry)
-
setSpeed
void setSpeed(java.lang.Double speed)
Sets the speed.- Parameters:
speed
- speed
-
setElevation
void setElevation(java.lang.Double elevation)
Sets the elevation.- Parameters:
elevation
- elevation
-
setExifOrientation
void setExifOrientation(java.lang.Integer exifOrientation)
Sets EXIF orientation.- Parameters:
exifOrientation
- EXIF orientation
-
setExifTime
void setExifTime(java.time.Instant exifTime)
Sets EXIF time.- Parameters:
exifTime
- EXIF time- Since:
- 18592 (interface), 17715 (GpxImageEntry)
-
setExifGpsTime
void setExifGpsTime(java.time.Instant exifGpsTime)
Sets the EXIF GPS time.- Parameters:
exifGpsTime
- the EXIF GPS time- Since:
- 18592 (interface), 17715 (GpxImageEntry)
-
setGpsTime
void setGpsTime(java.time.Instant gpsTime)
Sets the GPS time.- Parameters:
gpsTime
- the GPS time- Since:
- 18592 (interface), 17715 (GpxImageEntry)
-
setExifCoor
void setExifCoor(ILatLon exifCoor)
Set the exif coordinates- Parameters:
exifCoor
- The exif coordinates
-
setExifImgDir
void setExifImgDir(java.lang.Double exifDir)
Set the exif direction- Parameters:
exifDir
- The direction
-
setIptcCaption
void setIptcCaption(java.lang.String iptcCaption)
Sets the IPTC caption.- Parameters:
iptcCaption
- the IPTC caption- Since:
- 18592 (interface), 15219 (GpxImageEntry)
-
setIptcHeadline
void setIptcHeadline(java.lang.String iptcHeadline)
Sets the IPTC headline.- Parameters:
iptcHeadline
- the IPTC headline- Since:
- 18592 (interface), 15219 (GpxImageEntry)
-
setIptcKeywords
void setIptcKeywords(java.util.List<java.lang.String> iptcKeywords)
Sets the IPTC keywords.- Parameters:
iptcKeywords
- the IPTC keywords- Since:
- 18592 (interface), 15219 (GpxImageEntry)
-
setIptcObjectName
void setIptcObjectName(java.lang.String iptcObjectName)
Sets the IPTC object name.- Parameters:
iptcObjectName
- the IPTC object name- Since:
- 18592 (interface), 15219 (GpxImageEntry)
-
getIptcCaption
java.lang.String getIptcCaption()
Returns the IPTC caption.- Returns:
- the IPTC caption
- Since:
- 18592 (interface), 15219 (GpxImageEntry)
-
getIptcHeadline
java.lang.String getIptcHeadline()
Returns the IPTC headline.- Returns:
- the IPTC headline
- Since:
- 18592 (interface), 15219 (GpxImageEntry)
-
getIptcKeywords
java.util.List<java.lang.String> getIptcKeywords()
Returns the IPTC keywords.- Returns:
- the IPTC keywords
- Since:
- 18592 (interface), 15219 (GpxImageEntry)
-
getIptcObjectName
java.lang.String getIptcObjectName()
Returns the IPTC object name.- Returns:
- the IPTC object name
- Since:
- 18592 (interface), 15219 (GpxImageEntry)
-
extractExif
default void extractExif()
Extract GPS metadata from image EXIF. Has no effect if the image file is not set If successful, fills in the LatLon, speed, elevation, image direction, and other attributes- Since:
- 18592 (interface), 9270 (GpxImageEntry)
-
getInputStream
java.io.InputStream getInputStream() throws java.io.IOException
Get the image input stream- Returns:
- The input stream of the image
- Throws:
java.io.IOException
- If something happens during image read. See implementation for details.
-
getProjectionType
Projections getProjectionType()
Get the projection type for this entry- Returns:
- The projection type
- Since:
- 18592 (interface), 18246 (GpxImageEntry)
-
setProjectionType
void setProjectionType(Projections newProjection)
Set the new projection type- Parameters:
newProjection
- The new type
-
-