Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exploration: Make Locale configurable for formatting of tags (not to be merged) #538

Open
wants to merge 35 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
bab48fb
Initial work on configurable Locale, works for Longitude/Latitude and…
rdvdijk May 21, 2021
ed768a5
Restore Javadoc.
rdvdijk May 21, 2021
c594940
Fix missing import.
rdvdijk May 21, 2021
e93e7df
Add Nullable annotation to new Locale parameter.
rdvdijk May 21, 2021
bbf2cf9
Add Nullable annotation to new Locale parameter in interface.
rdvdijk May 21, 2021
2fe5f8f
Fix missing import.
rdvdijk May 21, 2021
60e67a6
Fix comment in test.
rdvdijk May 21, 2021
44aaa41
Introduce MetadataContext class to hold Locale to use for formatting …
rdvdijk May 28, 2021
63532a6
Replace Locale with MetadataContext class, which supplies the Locale.
rdvdijk May 28, 2021
9608080
Add missing Javadoc for new parameter.
rdvdijk May 28, 2021
88497e2
Apply Locale in Directory and TagDescriptor base classes.
rdvdijk May 28, 2021
aa71ef4
Add TODOs for two non-EXIF Locale use cases.
rdvdijk May 28, 2021
ffc5c93
Use context Locale in ExifDescriptorBase.
rdvdijk May 28, 2021
a0b3508
Fix locale passing to String.format.
rdvdijk Jun 18, 2021
06904a9
Provide Locale to all GpsDescriptor and related classes.
rdvdijk Jun 25, 2021
0e567cf
Pass Locale instead of full MetadataContext to Gps related classes.
rdvdijk Jun 25, 2021
e1bcae9
Provide Locale to all JpegReader and related classes.
rdvdijk Jun 25, 2021
4b51770
Provide MetadataContext to all JpegCommentReader and related classes.
rdvdijk Jun 25, 2021
0d1b49b
Initialize a default MetadataContext in JpegMetadataReader.
rdvdijk Jun 25, 2021
ffb1829
Provide MetadataContext to all JpegDhtReader and related classes.
rdvdijk Jun 25, 2021
dcae803
Provide MetadataContext to JpegDnlReader extract method.
rdvdijk Jun 25, 2021
88f8fa9
Provide MetadataContext to all JfifReader and related classes.
rdvdijk Jun 25, 2021
1b1ed9d
Provide MetadataContext to all IccReader and related classes.
rdvdijk Jun 25, 2021
15e6bb7
Provide MetadataContext to all JfxxReader and related classes.
rdvdijk Jun 25, 2021
a38da78
Provide MetadataContext to all XmpReader and related classes.
rdvdijk Jun 25, 2021
6d9c38d
Provide MetadataContext to all PhotoshopReader and related classes.
rdvdijk Jun 25, 2021
0e3655b
Make MetadataContext @NotNull instead of @Nullable in JpegSegmentMeta…
rdvdijk Jun 25, 2021
17f839c
Provide MetadataContext to all DuckyReader and related classes.
rdvdijk Jun 25, 2021
f8035fb
Provide MetadataContext to all IptcReader and related classes.
rdvdijk Jun 25, 2021
866081c
Remove unused imports.
rdvdijk Jun 25, 2021
3b6dbe7
Provide MetadataContext to all AdobeJpegReader and related classes.
rdvdijk Jun 25, 2021
dfea3db
Miscellaneous changes after self-review: remove or address TODOs, add…
rdvdijk Jun 25, 2021
a314058
Minor changes after self-review: inline variables, address or move TO…
rdvdijk Jun 25, 2021
37ff824
Merge remote-tracking branch 'drewnoakes/master' into configure-locale
rdvdijk Jun 25, 2021
02cf06f
Add TODOs to a few more default contexts. Remove unused constructor.
rdvdijk Jun 25, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Provide MetadataContext to JpegDnlReader extract method.
  • Loading branch information
rdvdijk committed Jun 25, 2021
commit dcae803c0ac1805188c83eeb09a07fc84b49e7ec
4 changes: 2 additions & 2 deletions Source/com/drew/metadata/jpeg/JpegDnlReader.java
Original file line number Diff line number Diff line change
@@ -49,11 +49,11 @@ public Iterable<JpegSegmentType> getSegmentTypes()
public void readJpegSegments(@NotNull Iterable<byte[]> segments, @NotNull Metadata metadata, @NotNull JpegSegmentType segmentType, @Nullable MetadataContext context)
{
for (byte[] segmentBytes : segments) {
extract(segmentBytes, metadata, segmentType);
extract(segmentBytes, metadata, segmentType, context);
}
}

public void extract(byte[] segmentBytes, Metadata metadata, JpegSegmentType segmentType)
public void extract(byte[] segmentBytes, Metadata metadata, JpegSegmentType segmentType, MetadataContext context)
{
JpegDirectory directory = metadata.getFirstDirectoryOfType(JpegDirectory.class);
if (directory == null) {