cyverse-gis / suas-metadata

Main repository for Calliope project - see Wiki tab above for details
GNU General Public License v3.0
1 stars 2 forks source link

All-Metadata Reveal Button #42

Open JLHonors opened 5 years ago

JLHonors commented 5 years ago

Create new button for all-metadata. When button at the bottom is pressed, expands into all the metadata, but divided into readable rows. Basically, a way to make all the metadata in the file readable without clogging up the standard metadata a user might normally want to see.

JLHonors commented 5 years ago

Used "metadataTag" branch to implement this change. Now, all the image's metadata is read and converted to a string, which is added to the map produced by "readImageMetadata" in MetadataManager.java. Then, ImageEntry uses the map in "readFileMetadataFromMap" and decodes it with a function called "decodeAllMetadataString". The strings found from this are returned as a map and added to a TitledPane in CalliopeImportController, whenever an image is clicked.

One might wonder why I had Calliope get the metadata as a map through exiftool, convert to a string, and then re-convert the metadata to a map. I figured it would be best to centralize and minimize exiftool calls, so this work is necessary so that exiftool is only ever used in one place.

JLHonors commented 5 years ago

Improved visuals. Now the standard tag area doesn't shrink immensely when the all-metadata area is expanded. Tyson reviewed it and says it looks good, but I am keeping it in the Review pipeline just in case.

JLHonors commented 5 years ago

Replaced ExifTool's message about binary values with one of template [## bit binary value], where ## is the number of bits ExifTool originally reported. This retains all relevant information from ExifTool's original output, while removing the possibility that a Calliope user would confuse ExifTool's message for one we made (and try to run Calliope with a -b argument, or something.)

Note that it is possible to run ExifTool with an argument of -b with mjeanroy's ExifTool library. The tag list isn't sanitized, so asking for a tag of "b" will result in the library running ExifTool with an argument of a minus in front of the tag name (Ie, -b). This may be useful elsewhere, but wasn't here, since the ExifTool executor promptly froze.

tyson-swetnam commented 5 years ago

Let's wait to move this to Done until the OpenDistro ElasticSearch is up and running and we know that everything is working there. Then we can push some example collections and see if we can query the all metadata back out.