Datensatzklasse ShowRec

java.lang.Object
java.lang.Record
de.zocher_regel.photo.show.ShowRec
Datensatzkomponenten:
line - of a photo show as used by IrfanView, e. g. "d:\Fotos\2023\Canon\2023-04-24 Donauwörth Altisheim Gaisheim\73090ac.JPG"

public record ShowRec(String line) extends Record
Record with methods for a line of an Irfanview photo show.
  • Feldübersicht

    Felder
    Modifizierer und Typ
    Feld
    Beschreibung
    static final String
     
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
    Erstellt eine Instanz einer Datensatzklasse ShowRec.
    ShowRec(Path path)
    In an IrfanView show every photo is a qualified string.
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    boolean
    equals(Object that)
    A ShowRec equals another when its Irfanview show line equals that of the other.
    static ShowRec
    exifAssign(String key, String value)
    Create a ShowRec in format ";-Key=Value"
    Pick the key of an Exiftool option line.
    Strip the comment indicator of a line with an Exiftool comment (";-xxx=yyy" -> "-xxx=yyy").
    Pick the value of an Exiftool option line.
    (Package privat) boolean
    Check if the file exists.
    if a picture has been edited, its filename without extension is incremented by a hint which has been embellished.
    static String
    The basis name is the qualified name without embellishing suffix and extension, e. g. a/b/1234autocorrected.jpg -> a/b/1235
    The name of the photo, but the extension has been changed to "exif".
    In the show record the extesion of the entry is that of the photo (jpg, jpeg, ...).
    In the show the name of the photo is always fully qualified.
    (Package privat) String
    Each photo is in a directory.
    If the showRec is a path (directory, text file or photo) it is returned.
    final int
    Gibt einen Hashcodewert für diese Objekt zurück.
    key()
    If the ShowRec is an option for Exiftool, return the key of it.
    Gibt den Wert für die Datensatzkomponente line zurück.
    (Package privat) boolean
    matchesBasis(File dir, String name)
    Usable as FilenameFilter.
    This record wraps a line of an Irfanview show.
    A show record may contain a path, an EXIF option (";-a=b") or be uninteresting (";...").

    Von Klasse geerbte Methoden java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Felddetails

  • Konstruktordetails

    • ShowRec

      public ShowRec(Path path)
      In an IrfanView show every photo is a qualified string. This record contains this string and offers useful functions.
      Parameter:
      path - a photo file (e. g. D:\Photos\2024\mycamera\0001.jpg)
    • ShowRec

      public ShowRec(String line)
      Erstellt eine Instanz einer Datensatzklasse ShowRec.
      Parameter:
      line - Wert für die Datensatzkomponente line
  • Methodendetails

    • exifAssign

      public static ShowRec exifAssign(String key, String value)
      Create a ShowRec in format ";-Key=Value"
      Parameter:
      key - the key like "GPSLongitudeRef"
      value - its value like "W"
      Gibt zurück:
      the ShowRec that has been built from these parameters
    • equals

      public boolean equals(Object that)
      A ShowRec equals another when its Irfanview show line equals that of the other.
      Angegeben von:
      equals in Klasse Record
      Parameter:
      that - other object to be compared
    • type

      public ShowRecType type()
      A show record may contain a path, an EXIF option (";-a=b") or be uninteresting (";...").
      Gibt zurück:
      ShowRec.Type The type of this line (Path, Exif, ...)
    • key

      public String key()
      If the ShowRec is an option for Exiftool, return the key of it. ;-A=B
      Gibt zurück:
      the key, here "A"
    • getBasis

      public String getBasis()
      if a picture has been edited, its filename without extension is incremented by a hint which has been embellished. this.line with hint "ac" for "picture has been autocorrected": "d:\Fotos\2023\Canon\2023-04-24 Donauwörth Altisheim Gaisheim\73090ac.JPG"
      Gibt zurück:
      e. g. "d:\Fotos\2023\Canon\2023-04-24 Donauwörth Altisheim Gaisheim\73090"
    • getBasis

      public static String getBasis(String line)
      The basis name is the qualified name without embellishing suffix and extension, e. g. a/b/1234autocorrected.jpg -> a/b/1235
      Parameter:
      line - the qualified filename of the photo
      Gibt zurück:
      the abbreviated qualified filename
    • exists

      boolean exists()
      Check if the file exists.
      Gibt zurück:
      if the file the Irfan view show line points to exists.
    • exiftoolOption

      public String exiftoolOption()
      Strip the comment indicator of a line with an Exiftool comment (";-xxx=yyy" -> "-xxx=yyy"). ImageDescription, GPSLatitude, GPSLongitude may be abbreviated by I, La, Lo.)
      Gibt zurück:
      the Exiftool option (e. g. "-a=b") with abbreviations resolved
    • exifKey

      public String exifKey()
      Pick the key of an Exiftool option line. ";-a=b" -> "a"
      Gibt zurück:
      the EXIF keyword
    • exifValue

      public String exifValue()
      Pick the value of an Exiftool option line. ";-a=b" -> "b"
      Gibt zurück:
      the value of an Exiftool option
    • getParent

      String getParent()
      Each photo is in a directory.
      Gibt zurück:
      the directory of the file the Irfan view show line points to.
    • getName

      public String getName()
      In the show the name of the photo is always fully qualified.
      Gibt zurück:
      the filename of the file the Irfanview show line points to, without directory path.
    • getExifPathString

      public String getExifPathString()
      In the show record the extesion of the entry is that of the photo (jpg, jpeg, ...).
      Gibt zurück:
      the qualified filename of the photo but with extension "exif".
    • getExifPath

      public Path getExifPath()
      The name of the photo, but the extension has been changed to "exif".
      Gibt zurück:
      full qualified path with extension "exif"
    • matchesBasis

      boolean matchesBasis(File dir, String name)
      Usable as FilenameFilter. Test if a picture is an enhanced version of another.
      Parameter:
      dir - the directory of the file
      name - the filenname
      Gibt zurück:
      if the basis of the filename passed as parameter matches the basis of this filename (123.jpg matches 123corrected)
    • getPath

      public Path getPath()
      If the showRec is a path (directory, text file or photo) it is returned.
      Gibt zurück:
      the path or null if anything else
    • toString

      public String toString()
      This record wraps a line of an Irfanview show.
      Angegeben von:
      toString in Klasse Record
      Gibt zurück:
      the Irfaniew show line (normally a qualified filename)
    • hashCode

      public final int hashCode()
      Gibt einen Hashcodewert für diese Objekt zurück. Der Wert wird vom Hashcode jeder der Datensatzkomponenten abgeleitet.
      Angegeben von:
      hashCode in Klasse Record
      Gibt zurück:
      ein Hashcodewert für dieses Objekt
    • line

      public String line()
      Gibt den Wert für die Datensatzkomponente line zurück.
      Gibt zurück:
      Wert der Datensatzkomponente line