java.lang.Object
io.github.ajevans.dbcode.data.structures.Metadata
All Implemented Interfaces:
IMetadata

public class Metadata
extends Object
implements IMetadata
Class for generic metadata (i.e. not specific to, e.g. databases).

Relevant subset of generic metadata tags taken from Dublin Core Metadata Initiative (DCMI) terms (20th Jan 2020) with the addition of dateLastEdited, version, notes, and metametadata dateFormat.

Note that dates are stored as java.util.GregorianCalendar objects, not DCMI ISO 8601 strings

Author:
Andy Evans
Version: 1.0 01 Mar 2021
  • Field Details

    • debug

      private boolean debug
      Debugging flag, set by System variable passed in -Ddebug=true rather than setting here / with accessor.
    • standard

      private String standard
      Standard.
    • title

      private String title
      DCMI title.
    • creator

      private String creator
      DCMI creator.
    • source

      private String source
      DCMI source.
    • notes

      private String notes
      For other notes.
    • dateSubmitted

      private GregorianCalendar dateSubmitted
      DCMI dateSubmitted.
    • dateLastEdited

      private GregorianCalendar dateLastEdited
      For last edited date.
    • dateFormat

      private String dateFormat
      Date format, incase there is doubt about when zero date represents.
    • version

      private String version
      Version.
  • Constructor Details

    • Metadata

      public Metadata()
      Generic constructor.
  • Method Details

    • setStandard

      public void setStandard​(String standard)
      Sets metadata standard.
      Specified by:
      setStandard in interface IMetadata
      Parameters:
      standard - Metadata standard or equivalent description.
    • getStandard

      public String getStandard()
      Gets metadata standard.
      Specified by:
      getStandard in interface IMetadata
      Returns:
      String Metadata standard or equivalent description.
    • setTitle

      public void setTitle​(String title)
      Sets title.
      Parameters:
      title - Title to set.
    • getTitle

      public String getTitle()
      Gets title.
      Returns:
      String Title got.
    • setCreator

      public void setCreator​(String creator)
      Sets creator.
      Parameters:
      creator - Creator to set.
    • getCreator

      public String getCreator()
      Gets creator.
      Returns:
      String Creator got.
    • setSource

      public void setSource​(String source)
      Sets source.
      Parameters:
      source - Source to set.
    • getSource

      public String getSource()
      Gets source.
      Returns:
      String Source got.
    • setNotes

      public void setNotes​(String notes)
      Sets notes.
      Parameters:
      notes - Notes to set.
    • getNotes

      public String getNotes()
      Gets notes.
      Returns:
      String Notes got.
    • setDateSubmitted

      public void setDateSubmitted​(GregorianCalendar dateSubmitted)
      Sets dateSubmitted.
      Parameters:
      dateSubmitted - DateSubmitted to set.
    • getDateSubmitted

      public GregorianCalendar getDateSubmitted()
      Gets dateSubmitted.
      Returns:
      GregorianCalendar DateSubmitted got.
    • setDateLastEdited

      public void setDateLastEdited​(GregorianCalendar dateLastEdited)
      Sets dateLastEdited.
      Parameters:
      dateLastEdited - DateLastEdited to set.
    • getDateLastEdited

      public GregorianCalendar getDateLastEdited()
      Gets dateLastEdited.
      Returns:
      GregorianCalendar DateLastEdited got.
    • getDateFormat

      public String getDateFormat()
      Gets dateFormat.
      Returns:
      String DateFormat got.
    • setVersion

      public void setVersion​(String version)
      Sets version.
      Parameters:
      version - Version to set.
    • getVersion

      public String getVersion()
      Gets version.
      Returns:
      String Version got.
    • getAll

      public ArrayList[] getAll()
      Gets the metadata as an array of ArrayLists.
      • array[0] = The category names as Strings.
      • array[1] = The data types of the categories as Class
      • array[2] = The category values as objects.
      Specified by:
      getAll in interface IMetadata
      Returns:
      ArrayList[] Array of metadata.