Interface ExpressionMetadataChangelogFileService
- All Known Implementing Classes:
ExpressionMetadataChangelogFileServiceImpl
public interface ExpressionMetadataChangelogFileService
Service for reading and appending to changelog files.
External metadata files are not under Gemma's management, so the changes they go through is not kept track of in the
AuditTrail of an experiment. Instead, a changelog file is maintained
under ${gemma.appdata.home}/metadata/GSEnnnnn/CHANGELOG.md.
The format of the changelog follows that of GNU.
- Author:
- poirigui
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddChangelogEntry(ExpressionExperiment expressionExperiment, String changelogEntry) voidaddChangelogEntry(ExpressionExperiment expressionExperiment, String changelogEntry, LocalDate date) Add a changelog entry to the changelog file of the given experiment.getChangelogFilePath(ExpressionExperiment expressionExperiment) Absolute path of the changelog file forexpressionExperiment, whether or not it exists yet.readChangelog(ExpressionExperiment expressionExperiment) Read the content of the changelog file of the given experiment.
-
Method Details
-
readChangelog
Read the content of the changelog file of the given experiment.If no changelog file is found, an empty string is returned.
- Throws:
IOException
-
getChangelogFilePath
Absolute path of the changelog file forexpressionExperiment, whether or not it exists yet.Exposed so a caller can say where its write landed. The path derives from
gemma.appdata.home, which resolves differently for a CLI running on the host than for gemma-rest reading a mounted volume — and a changelog written to the wrong tree is unrecoverable, since nothing reconstructs it and the reader looks elsewhere. -
addChangelogEntry
void addChangelogEntry(ExpressionExperiment expressionExperiment, String changelogEntry) throws IOException - Throws:
IOException- See Also:
-
addChangelogEntry
void addChangelogEntry(ExpressionExperiment expressionExperiment, String changelogEntry, LocalDate date) throws IOException Add a changelog entry to the changelog file of the given experiment.- Parameters:
expressionExperiment- the experiment to add the entry tochangelogEntry- the content of the entry, the date and author are automatically addeddate- the date of the entry. This is a local date because the changelog format does not include a timezone.- Throws:
IOException
-