Class Metadata
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 Summary
Fields Modifier and Type Field Description private String
creator
DCMI creator.private String
dateFormat
Date format, incase there is doubt about when zero date represents.private GregorianCalendar
dateLastEdited
For last edited date.private GregorianCalendar
dateSubmitted
DCMI dateSubmitted.private boolean
debug
Debugging flag, set by System variable passed in-Ddebug=true
rather than setting here / with accessor.private String
notes
For other notes.private String
source
DCMI source.private String
standard
Standard.private String
title
DCMI title.private String
version
Version. -
Constructor Summary
Constructors Constructor Description Metadata()
Generic constructor. -
Method Summary
Modifier and Type Method Description ArrayList[]
getAll()
Gets the metadata as an array ofArrayLists
.String
getCreator()
Gets creator.String
getDateFormat()
Gets dateFormat.GregorianCalendar
getDateLastEdited()
Gets dateLastEdited.GregorianCalendar
getDateSubmitted()
Gets dateSubmitted.String
getNotes()
Gets notes.String
getSource()
Gets source.String
getStandard()
Gets metadata standard.String
getTitle()
Gets title.String
getVersion()
Gets version.void
setCreator(String creator)
Sets creator.void
setDateLastEdited(GregorianCalendar dateLastEdited)
Sets dateLastEdited.void
setDateSubmitted(GregorianCalendar dateSubmitted)
Sets dateSubmitted.void
setNotes(String notes)
Sets notes.void
setSource(String source)
Sets source.void
setStandard(String standard)
Sets metadata standard.void
setTitle(String title)
Sets title.void
setVersion(String version)
Sets version.
-
Field Details
-
debug
private boolean debugDebugging flag, set by System variable passed in-Ddebug=true
rather than setting here / with accessor. -
standard
Standard. -
title
DCMI title. -
creator
DCMI creator. -
source
DCMI source. -
notes
For other notes. -
dateSubmitted
DCMI dateSubmitted. -
dateLastEdited
For last edited date. -
dateFormat
Date format, incase there is doubt about when zero date represents. -
version
Version.
-
-
Constructor Details
-
Metadata
public Metadata()Generic constructor.
-
-
Method Details
-
setStandard
Sets metadata standard.- Specified by:
setStandard
in interfaceIMetadata
- Parameters:
standard
- Metadata standard or equivalent description.
-
getStandard
Gets metadata standard.- Specified by:
getStandard
in interfaceIMetadata
- Returns:
- String Metadata standard or equivalent description.
-
setTitle
Sets title.- Parameters:
title
- Title to set.
-
getTitle
Gets title.- Returns:
- String Title got.
-
setCreator
Sets creator.- Parameters:
creator
- Creator to set.
-
getCreator
Gets creator.- Returns:
- String Creator got.
-
setSource
Sets source.- Parameters:
source
- Source to set.
-
getSource
Gets source.- Returns:
- String Source got.
-
setNotes
Sets notes.- Parameters:
notes
- Notes to set.
-
getNotes
Gets notes.- Returns:
- String Notes got.
-
setDateSubmitted
Sets dateSubmitted.- Parameters:
dateSubmitted
- DateSubmitted to set.
-
getDateSubmitted
Gets dateSubmitted.- Returns:
- GregorianCalendar DateSubmitted got.
-
setDateLastEdited
Sets dateLastEdited.- Parameters:
dateLastEdited
- DateLastEdited to set.
-
getDateLastEdited
Gets dateLastEdited.- Returns:
- GregorianCalendar DateLastEdited got.
-
getDateFormat
Gets dateFormat.- Returns:
- String DateFormat got.
-
setVersion
Sets version.- Parameters:
version
- Version to set.
-
getVersion
Gets version.- Returns:
- String Version got.
-
getAll
Gets the metadata as an array ofArrayLists
.- array[0] = The category names as Strings.
- array[1] = The data types of the categories as Class
- array[2] = The category values as objects.
-