Logic serialization#2
Merged
Merged
Conversation
- Add AUTOMATIC_DATE_GROUP_ID constant to MetadataSerializationConfiguration - Implement serializeAutomaticDateGroup() in GroupSerializer * Serializes field name * Serializes granularity (YEAR/MONTH/FULL_DATE) - Add AutomaticDateGroup case in serialization switch - Add getField() and getGranularity() methods to AutomaticDateGroup - Fix deepCopy() and hashCode() to include granularity Serialization format: AutomaticDateGroup:name;context;field;granularity;...
- Add AutomaticDateGroup and DateGranularity imports to GroupsParser - Implement automaticDateGroupFromString() method * Parse name, context, field from serialized string * Parse and convert granularity string to DateGranularity enum * Create AutomaticDateGroup with all parameters * Restore group details (color, icon, description) - Add condition check in fromString() to handle AutomaticDateGroup This enables AutomaticDateGroup to be loaded from .bib files, completing the save/load cycle with serialization.
Serialization tests (GroupSerializerTest.java): - Test YEAR granularity serialization - Test MONTH granularity serialization - Test serialization with color, icon, and description - Verify format: AutomaticDateGroup:name;context;field;granularity;... Deserialization tests (GroupsParserTest.java): - Test parsing YEAR granularity - Test parsing MONTH granularity - Test parsing FULL_DATE granularity - Test parsing with color, icon, and description - Verify correct object reconstruction from string Total: 7 new test cases covering all granularity types and edge cases.
Checkstyle reported DateGranularity as an unused import because we only use it through method return type inference (getGranularity().name()). The import is not needed since we don't declare any variables of this type.
- Document DateGranularity enum values - Add class-level documentation for DateGroup - Ensures these files are detected as changed files in CI for JBang testing
elliotgnn
approved these changes
Oct 18, 2025
elliotgnn
left a comment
Owner
There was a problem hiding this comment.
Great job, overall serilization implementation seems to be good and tests are passing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implemented Logic layer (Serialization/Deserialization) for
AutomaticDateGroupfeature.This PR adds the ability to save and load
AutomaticDateGroupobjects to/from.bibfiles, enabling persistent storage of automatic year/month/date-based grouping configurations.Changes:
AutomaticDateGroupobjects to text format for storageAutomaticDateGroupobjectsgetField()andgetGranularity()getter methods required for serializationDependencies:
model-auto-date-groupsbranchSteps to test
Automated tests (recommended):
Manual testing (after GUI integration):
.bibfileMandatory checks
CHANGELOG.md(internal PR, will be added in final merge)Technical Details
Serialization format: