Commits

P_W999  committed 19dd1d9

- more "read all" functionality

  • Participants
  • Parent commits bd1a655

Comments (0)

Files changed (4)

File src/be/pw/jexif/DemoApp.java

 
 		// tool.stop();
 		JExifInfo write1 = tool.getInfo(tmp);
-		LOG.info("ISO value is for read 1 = {}", info1.getTag(ExifIFD.ISO));
-		LOG.info("ISO value is for read 2 = {}", info2.getTag(ExifIFD.ISO));
-		LOG.info("FNUMBER value is for read 1 = {}", info1.getTag(ExifIFD.FNUMBER));
-		LOG.info("EXPOSURE_PROGRAM value is for read 1 = {}", info1.getTag(ExifIFD.EXPOSUREPROGRAM));
-		LOG.info("EXPOSURE_PROGRAM exact value is for read 1 = {}", info1.getExactTag(ExifIFD.EXPOSUREPROGRAM));
-		LOG.info("EXPOSURE_TIME value is for read 2 = {}", info2.getTag(ExifIFD.EXPOSURETIME));
-		LOG.info("EXPOSURE_TIME exact value is for read 2 = {}", info2.getExactTag(ExifIFD.EXPOSURETIME));
-		LOG.info("FNUMBER exact value is for read 1 = {}", info1.getExactTag(ExifIFD.FNUMBER));
-		LOG.info("FOCAL_LENGTH exact value is for read 4 = {}", info4.getExactTag(ExifIFD.FOCALLENGTH));
-		LOG.info("FOCAL_LENGTH exact value is for read 3 = {}", info3.getExactTag(ExifIFD.FOCALLENGTH));
+		LOG.info("ISO value is for read 1 = {}", info1.getTagValue(ExifIFD.ISO));
+		LOG.info("ISO value is for read 2 = {}", info2.getTagValue(ExifIFD.ISO));
+		LOG.info("FNUMBER value is for read 1 = {}", info1.getTagValue(ExifIFD.FNUMBER));
+		LOG.info("EXPOSURE_PROGRAM value is for read 1 = {}", info1.getTagValue(ExifIFD.EXPOSUREPROGRAM));
+		LOG.info("EXPOSURE_PROGRAM exact value is for read 1 = {}", info1.getExactTagValue(ExifIFD.EXPOSUREPROGRAM));
+		LOG.info("EXPOSURE_TIME value is for read 2 = {}", info2.getTagValue(ExifIFD.EXPOSURETIME));
+		LOG.info("EXPOSURE_TIME exact value is for read 2 = {}", info2.getExactTagValue(ExifIFD.EXPOSURETIME));
+		LOG.info("FNUMBER exact value is for read 1 = {}", info1.getExactTagValue(ExifIFD.FNUMBER));
+		LOG.info("FOCAL_LENGTH exact value is for read 4 = {}", info4.getExactTagValue(ExifIFD.FOCALLENGTH));
+		LOG.info("FOCAL_LENGTH exact value is for read 3 = {}", info3.getExactTagValue(ExifIFD.FOCALLENGTH));
 
-		LOG.info("FOCAL_LENGTH value is for read 4 = {}", info4.getTag(ExifIFD.FOCALLENGTH));
-		LOG.info("Writing 5 to FOCAL_LENGTH for write 1 -> {}", write1.setTag(ExifIFD.FOCALLENGTH, "5.0"));
-		LOG.info("FOCAL_LENGTH value is for write 1 = {}", write1.getTag(ExifIFD.FOCALLENGTH));
-		Map<String, String> all = info2.getAllTags();
+		LOG.info("FOCAL_LENGTH value is for read 4 = {}", info4.getTagValue(ExifIFD.FOCALLENGTH));
+		LOG.info("Writing 5 to FOCAL_LENGTH for write 1 -> {}", write1.setTagValue(ExifIFD.FOCALLENGTH, "5.0"));
+		LOG.info("FOCAL_LENGTH value is for write 1 = {}", write1.getTagValue(ExifIFD.FOCALLENGTH));
+		Map<String, String> all = info2.getAllTagsValues();
 		for (Entry<String, String> e : all.entrySet()) {
 			LOG.info("ALL: {} : {}", e.getKey(), e.getValue());
 		}
-		Map<String, String> allExact = info2.getAllTagsExact();
+		Map<String, String> allExact = info2.getAllExactTagsValues();
 		for (Entry<String, String> e : allExact.entrySet()) {
 			LOG.info("ALLEXACT: {} : {}", e.getKey(), e.getValue());
 		}

File src/be/pw/jexif/JExifInfo.java

      * @throws ExifError      if there was a problem in ExifTool
      */
     @Beta
-    public String getTag(final Tag tag) throws JExifException, ExifError {
+    public String getTagValue(final Tag tag) throws JExifException, ExifError {
         return exifTool.readTagInfo(file, tag);
     }
 
      * @throws ExifError      if something went wrong in ExifTool
      */
     @Beta
-    public String getExactTag(final Tag tag) throws JExifException, ExifError {
+    public String getExactTagValue(final Tag tag) throws JExifException, ExifError {
         return exifTool.readTagInfo(file, tag, true);
     }
 
      * @throws ExifError
      */
     @Beta
-    public String setTag(final Tag tag, final String value) throws ExifError, JExifException {
+    public String setTagValue(final Tag tag, final String value) throws ExifError, JExifException {
         exifTool.writeTagInfo(file, tag, value);
-        return getExactTag(tag);
+        return getExactTagValue(tag);
     }
     
-    public Map<String, String> getAllTags() throws ExifError, JExifException {
+    @Beta
+    public Map<String, String> getAllTagsValues() throws ExifError, JExifException {
     	return exifTool.getAllTagInfo(file, false);
     }
     
-    public Map<String, String> getAllTagsExact() throws ExifError, JExifException {
+    @Beta
+    public Map<String, String> getAllExactTagsValues() throws ExifError, JExifException {
     	return exifTool.getAllTagInfo(file, true);
     } 
+    
+    @Beta
+    public Map<Tag, String> getAllSupportedTagsValues() throws ExifError, JExifException {
+    	return exifTool.getAllSupportedTagInfo(file, false);
+    }
+    
+    @Beta
+    public Map<Tag, String> getAllSupportedExactTagsValues() throws ExifError, JExifException {
+    	return exifTool.getAllSupportedTagInfo(file, true);
+    }
 
 }

File src/be/pw/jexif/JExifTool.java

     }
 
     Map<String, String> getAllTagInfo(final File file, boolean exact) throws ExifError, JExifException {
+    	return (Map<String, String>) getAllTagInfo(file, exact, false);
+    }
+    
+    Map<Tag, String> getAllSupportedTagInfo(final File file, boolean exact) throws ExifError, JExifException {
+    	return (Map<Tag, String>) getAllTagInfo(file, exact, true);
+    }
+    
+    Map<? extends Object, String> getAllTagInfo(final File file, boolean exact, boolean onlySupported) throws ExifError, JExifException {
     	startIfNecessary();
     	int i = 0;
         IAction action;
         List<String> errors = handler.getErrorList();
         LOG.trace("Parsing results");
         ResultHandler.run(action, results, errors);
-        Map<String, String> tags = action.getUnsupportedTags();
-        for (Entry<Tag, String> e : action.getResult().entrySet()) {
-        	tags.put(e.getKey().getName(), e.getValue());
+        if (onlySupported) {
+        	return action.getResult();
+        } else {
+	        Map<String, String> tags = action.getUnsupportedTags();
+	        for (Entry<Tag, String> e : action.getResult().entrySet()) {
+	        	tags.put(e.getKey().getName(), e.getValue());
+	        }
+	        return tags;
         }
-        return tags;
     }
 
 }

File test/be/pw/jexif/JExifToolTest.java

 
 import be.pw.jexif.enums.tag.ExifIFD;
 import be.pw.jexif.enums.tag.IFD0;
+import be.pw.jexif.enums.tag.Tag;
 import be.pw.jexif.exception.ExifError;
 import be.pw.jexif.exception.JExifException;
 import be.pw.jexif.internal.constants.ExecutionConstant;
 	@Test(groups = { "read-human", "simple", "string" }, suiteName = "simple")
 	public void testReadSingleFileSingleTagAsStringInHumanReadableFormat() throws Exception {
 		JExifInfo info = tool.getInfo(read01);
-		assertThat(info.getTag(IFD0.MAKE)).isEqualTo("CASIO COMPUTER CO.,LTD.");
+		assertThat(info.getTagValue(IFD0.MAKE)).isEqualTo("CASIO COMPUTER CO.,LTD.");
 	}
 
 	@Test(groups = { "read-exact", "simple", "string" }, suiteName = "simple")
 	public void testReadSingleFileSingleTagAsStringInExactFormat() throws Exception {
 		JExifInfo info = tool.getInfo(read01);
-		assertThat(info.getExactTag(IFD0.MAKE)).isEqualTo("CASIO COMPUTER CO.,LTD.");
+		assertThat(info.getExactTagValue(IFD0.MAKE)).isEqualTo("CASIO COMPUTER CO.,LTD.");
 	}
 
 	@Test(groups = { "read-human", "simple", "digit" }, suiteName = "simple")
 	public void testReadSingleFileSingleTagAsDigitInHumanReadableFormat() throws Exception {
 		JExifInfo info = tool.getInfo(read02);
-		assertThat(info.getTag(ExifIFD.EXPOSURETIME)).isEqualTo("1/400");
+		assertThat(info.getTagValue(ExifIFD.EXPOSURETIME)).isEqualTo("1/400");
 	}
 
 	@Test(groups = { "read-exact", "simple", "digit" }, suiteName = "simple")
 	public void testReadSingleFileSingleTagAsDigitInExactFormat() throws Exception {
 		JExifInfo info = tool.getInfo(read02);
-		assertThat(info.getExactTag(ExifIFD.EXPOSURETIME)).isEqualTo("0.0025");
+		assertThat(info.getExactTagValue(ExifIFD.EXPOSURETIME)).isEqualTo("0.0025");
 	}
 
 	@Test(groups = { "read-human", "simple", "date" }, suiteName = "simple")
 	public void testReadSingleFileSingleTagAsDateInHumanReadableFormat() throws Exception {
 		JExifInfo info = tool.getInfo(read01);
-		assertThat(info.getTag(ExifIFD.DATETIMEORIGINAL)).isEqualTo("2010:08:12 21:19:01");
+		assertThat(info.getTagValue(ExifIFD.DATETIMEORIGINAL)).isEqualTo("2010:08:12 21:19:01");
 	}
 
 	@Test(groups = { "read-exact", "simple", "date" }, suiteName = "simple")
 	public void testReadSingleFileSingleTagAsDateInExactFormat() throws Exception {
 		JExifInfo info = tool.getInfo(read01);
-		assertThat(info.getExactTag(ExifIFD.DATETIMEORIGINAL)).isEqualTo("2010:08:12 21:19:01");
+		assertThat(info.getExactTagValue(ExifIFD.DATETIMEORIGINAL)).isEqualTo("2010:08:12 21:19:01");
 	}
 
 	@Test(groups = { "read-human", "simple" }, suiteName = "simple")
 	public void testReadSingleFileMultipleTagsInHumanReadableFormat() throws Exception {
 		JExifInfo info = tool.getInfo(read03);
-		String apertureValue = info.getTag(ExifIFD.APERTUREVALUE);
-		String focalLength = info.getTag(ExifIFD.FOCALLENGTH);
-		String fNumber = info.getTag(ExifIFD.FNUMBER);
-		String iso = info.getTag(ExifIFD.ISO);
+		String apertureValue = info.getTagValue(ExifIFD.APERTUREVALUE);
+		String focalLength = info.getTagValue(ExifIFD.FOCALLENGTH);
+		String fNumber = info.getTagValue(ExifIFD.FNUMBER);
+		String iso = info.getTagValue(ExifIFD.ISO);
 		assertThat(apertureValue).isEqualTo("4.8");
 		assertThat(focalLength).isEqualTo("8.7 mm");
 		assertThat(fNumber).isEqualTo("4.7");
 	@Test(groups = { "read-exact", "simple" }, suiteName = "simple")
 	public void testReadSingleFileMultipleTagsInExactFormat() throws Exception {
 		JExifInfo info = tool.getInfo(read03);
-		String apertureValue = info.getExactTag(ExifIFD.APERTUREVALUE);
-		String focalLength = info.getExactTag(ExifIFD.FOCALLENGTH);
-		String fNumber = info.getExactTag(ExifIFD.FNUMBER);
-		String iso = info.getExactTag(ExifIFD.ISO);
+		String apertureValue = info.getExactTagValue(ExifIFD.APERTUREVALUE);
+		String focalLength = info.getExactTagValue(ExifIFD.FOCALLENGTH);
+		String fNumber = info.getExactTagValue(ExifIFD.FNUMBER);
+		String iso = info.getExactTagValue(ExifIFD.ISO);
 		assertThat(apertureValue).isEqualTo("4.75682846001088");
 		assertThat(focalLength).isEqualTo("8.7");
 		assertThat(fNumber).isEqualTo("4.7");
 	public void testExifErrorOnFileNotFoundHumanReadable() throws Exception {
 		File nonExistingFile = new File("c:\\bla\\haha\\lol\\fail.jpg");
 		JExifInfo info = tool.getInfo(nonExistingFile);
-		info.getTag(ExifIFD.APERTUREVALUE);
+		info.getTagValue(ExifIFD.APERTUREVALUE);
 	}
 
 	@Test(groups = { "read-exact", "simple", "error" }, suiteName = "simple", expectedExceptions = { IOException.class }, expectedExceptionsMessageRegExp = "There was a problem reading the file fail.jpg")
 	public void testExifErrorOnFileNotFoundExact() throws Exception {
 		File nonExistingFile = new File("c:\\bla\\haha\\lol\\fail.jpg");
 		JExifInfo info = tool.getInfo(nonExistingFile);
-		info.getExactTag(ExifIFD.APERTUREVALUE);
+		info.getExactTagValue(ExifIFD.APERTUREVALUE);
 	}
 
 	@Test(enabled = false, groups = { "read-exact", "simple", "error" }, suiteName = "simple", expectedExceptions = { JExifException.class }, expectedExceptionsMessageRegExp = ".*Deadlocked.*")
 	public void testDeadLock() throws Exception, ExifError {
 		JExifInfo deadlock = tool.getInfo(read01);
 		tool.stop();
-		deadlock.getTag(ExifIFD.ISO);
+		deadlock.getTagValue(ExifIFD.ISO);
 	}
 
 	@Test(groups = { "simple", "write", "string" }, suiteName = "simple")
 	public void testWriteStringTag() throws Exception {
 		JExifInfo info = tool.getInfo(write01);
-		assertThat(info.getTag(IFD0.MAKE)).as("Failed to correctly read test file").isEqualTo("CASIO COMPUTER CO.,LTD.");
-		String result = info.setTag(IFD0.MAKE, "P_W999");
+		assertThat(info.getTagValue(IFD0.MAKE)).as("Failed to correctly read test file").isEqualTo("CASIO COMPUTER CO.,LTD.");
+		String result = info.setTagValue(IFD0.MAKE, "P_W999");
 		assertThat(result).as("Failed to write the tag").isEqualTo("P_W999");
-		assertThat(info.getTag(IFD0.MAKE)).isEqualTo("P_W999");
+		assertThat(info.getTagValue(IFD0.MAKE)).isEqualTo("P_W999");
 	}
 
 	@Test(groups = { "simple", "write", "digit" }, suiteName = "simple")
 	public void testWriteDoubleTagAsInt() throws Exception {
 		JExifInfo info = tool.getInfo(write02);
-		assertThat(info.getTag(ExifIFD.EXPOSURETIME)).as("Failed to correctly read test file").isEqualTo("1/400");
-		String result = info.setTag(ExifIFD.EXPOSURETIME, "1");
+		assertThat(info.getTagValue(ExifIFD.EXPOSURETIME)).as("Failed to correctly read test file").isEqualTo("1/400");
+		String result = info.setTagValue(ExifIFD.EXPOSURETIME, "1");
 		assertThat(result).as("Failed to write the tag").isEqualTo("1");
-		assertThat(info.getTag(ExifIFD.EXPOSURETIME)).isEqualTo("1");
+		assertThat(info.getTagValue(ExifIFD.EXPOSURETIME)).isEqualTo("1");
 	}
 
 	@Test(groups = { "simple", "write", "digit" }, suiteName = "simple")
 	public void testWriteDoubleTagAsDouble() throws Exception {
 		JExifInfo info = tool.getInfo(write02);
-		assertThat(info.getTag(ExifIFD.EXPOSURETIME)).as("Failed to correctly read test file").isEqualTo("1/400");
-		String result = info.setTag(ExifIFD.EXPOSURETIME, "0.05");
+		assertThat(info.getTagValue(ExifIFD.EXPOSURETIME)).as("Failed to correctly read test file").isEqualTo("1/400");
+		String result = info.setTagValue(ExifIFD.EXPOSURETIME, "0.05");
 		assertThat(result).as("Failed to write the tag").isEqualTo("0.05");
-		assertThat(info.getTag(ExifIFD.EXPOSURETIME)).isEqualTo("1/20");
+		assertThat(info.getTagValue(ExifIFD.EXPOSURETIME)).isEqualTo("1/20");
 	}
 
 	@Test(groups = { "simple", "write", "error" }, suiteName = "simple", expectedExceptions = { JExifException.class }, expectedExceptionsMessageRegExp = "Tag ExposureTime has datatype RAT64U. The value P_W999 could not be parsed as being such.")
 	public void testWriteDoubleTagAsString() throws Exception {
 		JExifInfo info = tool.getInfo(write02);
-		assertThat(info.getTag(ExifIFD.EXPOSURETIME)).as("Failed to correctly read test file").isEqualTo("1/400");
-		info.setTag(ExifIFD.EXPOSURETIME, "P_W999");
+		assertThat(info.getTagValue(ExifIFD.EXPOSURETIME)).as("Failed to correctly read test file").isEqualTo("1/400");
+		info.setTagValue(ExifIFD.EXPOSURETIME, "P_W999");
 	}
 
 	@Test(enabled = false, groups = { "simple", "write", "date" }, suiteName = "simple")
 	public void testWriteDateAsDate() throws Exception {
 		String date = DateUtil.fromDate(new Date());
 		JExifInfo info = tool.getInfo(write01);
-		assertThat(info.getTag(ExifIFD.DATETIMEORIGINAL)).as("Failed to correctly read test file").isEqualTo("2010:08:12 21:19:01");
-		String result = info.setTag(ExifIFD.DATETIMEORIGINAL, date);
+		assertThat(info.getTagValue(ExifIFD.DATETIMEORIGINAL)).as("Failed to correctly read test file").isEqualTo("2010:08:12 21:19:01");
+		String result = info.setTagValue(ExifIFD.DATETIMEORIGINAL, date);
 		assertThat(result).isEqualTo(date);
-		assertThat(info.getTag(ExifIFD.DATETIMEORIGINAL)).isEqualTo(date);
+		assertThat(info.getTagValue(ExifIFD.DATETIMEORIGINAL)).isEqualTo(date);
 	}
 
 	@Test(enabled = false, groups = { "simple", "write", "error" }, suiteName = "simple", expectedExceptions = { JExifException.class }, expectedExceptionsMessageRegExp = "An error occured while parsing the value P_W999 for Tag DATE_TIME_ORIGINAL which should be of type Date")
 	public void testWriteDateAsString() throws Exception {
 		JExifInfo info = tool.getInfo(write01);
-		assertThat(info.getTag(ExifIFD.DATETIMEORIGINAL)).as("Failed to correctly read test file").isEqualTo("2010:08:12 21:19:01");
-		info.setTag(ExifIFD.DATETIMEORIGINAL, "P_W999");
+		assertThat(info.getTagValue(ExifIFD.DATETIMEORIGINAL)).as("Failed to correctly read test file").isEqualTo("2010:08:12 21:19:01");
+		info.setTagValue(ExifIFD.DATETIMEORIGINAL, "P_W999");
 	}
 
 	/*
 		JExifInfo info3 = tool.getInfo(write01);
 		JExifInfo info4 = tool.getInfo(write02);
 
-		assertThat(info1.getTag(IFD0.MODEL)).isEqualTo("EX-FH100");
-		assertThat(info2.getTag(IFD0.MODEL)).isEqualTo("NEX-7");
-		assertThat(info3.setTag(IFD0.MODEL, info2.getTag(IFD0.MODEL))).isEqualTo("NEX-7"); // juk ! copyTag() method is coming soon ;)
-		assertThat(info3.getExactTag(ExifIFD.EXPOSUREPROGRAM)).isEqualTo("2");
-		assertThat(info4.getExactTag(ExifIFD.EXPOSUREPROGRAM)).isEqualTo("2");
-		assertThat(info1.getTag(ExifIFD.EXPOSUREPROGRAM)).isEqualTo("Program AE");
-		assertThat(info2.getTag(ExifIFD.EXPOSUREPROGRAM)).isEqualTo("Program AE");
+		assertThat(info1.getTagValue(IFD0.MODEL)).isEqualTo("EX-FH100");
+		assertThat(info2.getTagValue(IFD0.MODEL)).isEqualTo("NEX-7");
+		assertThat(info3.setTagValue(IFD0.MODEL, info2.getTagValue(IFD0.MODEL))).isEqualTo("NEX-7"); // juk ! copyTag() method is coming soon ;)
+		assertThat(info3.getExactTagValue(ExifIFD.EXPOSUREPROGRAM)).isEqualTo("2");
+		assertThat(info4.getExactTagValue(ExifIFD.EXPOSUREPROGRAM)).isEqualTo("2");
+		assertThat(info1.getTagValue(ExifIFD.EXPOSUREPROGRAM)).isEqualTo("Program AE");
+		assertThat(info2.getTagValue(ExifIFD.EXPOSUREPROGRAM)).isEqualTo("Program AE");
 		tool.stop();
-		assertThat(info3.setTag(ExifIFD.SHARPNESS, info2.getExactTag(ExifIFD.SHARPNESS))).isEqualTo("0");
-		assertThat(info4.setTag(ExifIFD.SHARPNESS, "1")).isEqualTo("1");
+		assertThat(info3.setTagValue(ExifIFD.SHARPNESS, info2.getExactTagValue(ExifIFD.SHARPNESS))).isEqualTo("0");
+		assertThat(info4.setTagValue(ExifIFD.SHARPNESS, "1")).isEqualTo("1");
 		tool.stop();
 		try {
-			assertThat(info4.setTag(ExifIFD.FNUMBER, "ERROR"));
+			assertThat(info4.setTagValue(ExifIFD.FNUMBER, "ERROR"));
 			Fail.fail("Writing a string to a double-valued tag should throw an error");
 		} catch (Exception e) {
 			assertThat(e).isInstanceOf(JExifException.class);
 		}
-		assertThat(info1.getTag(ExifIFD.USERCOMMENT)).isNull(); // info 1
-		assertThat(info2.getTag(ExifIFD.USERCOMMENT)).isNull(); // info 2
-		assertThat(info3.setTag(ExifIFD.USERCOMMENT, "P_W999 writes exif tags")).isEqualTo("P_W999 writes exif tags");
-		assertThat(info4.setTag(ExifIFD.USERCOMMENT, "P_W999 writes exif tags")).isEqualTo("P_W999 writes exif tags");
-		assertThat(info1.getTag(ExifIFD.CONTRAST)).isEqualTo("Normal");
-		assertThat(info2.getTag(ExifIFD.CONTRAST)).isEqualTo("Normal");
-		assertThat(info3.setTag(ExifIFD.CONTRAST, "1")).isEqualTo("1");
-		assertThat(info4.setTag(ExifIFD.CONTRAST, "2")).isEqualTo("2");
-		assertThat(info3.getTag(ExifIFD.CONTRAST)).isEqualTo("Low");
-		assertThat(info4.getTag(ExifIFD.CONTRAST)).isEqualTo("High");
-		assertThat(info1.getTag(IFD0.ORIENTATION)).isEqualTo("Horizontal (normal)");
-		assertThat(info2.getTag(IFD0.ORIENTATION)).isEqualTo("Horizontal (normal)");
-		assertThat(info3.setTag(IFD0.ORIENTATION, "1")).isEqualTo("1");
-		assertThat(info4.setTag(IFD0.ORIENTATION, "6")).isEqualTo("6");
-		assertThat(info3.getTag(IFD0.ORIENTATION)).isEqualTo("Horizontal (normal)");
-		assertThat(info4.getTag(IFD0.ORIENTATION)).isEqualTo("Rotate 90 CW");
-		assertThat(info1.getTag(IFD0.XRESOLUTION)).isEqualTo("72");
-		assertThat(info2.getTag(IFD0.XRESOLUTION)).isEqualTo("350");
-		assertThat(info1.getTag(IFD0.XRESOLUTION)).isEqualTo("72");
-		assertThat(info2.getTag(IFD0.XRESOLUTION)).isEqualTo("350");
-		assertThat(info1.getTag(ExifIFD.DATETIMEORIGINAL)).isEqualTo("2010:08:12 21:19:01");
-		assertThat(info2.getTag(ExifIFD.DATETIMEORIGINAL)).isEqualTo("2011:11:07 16:16:50");
+		assertThat(info1.getTagValue(ExifIFD.USERCOMMENT)).isNull(); // info 1
+		assertThat(info2.getTagValue(ExifIFD.USERCOMMENT)).isNull(); // info 2
+		assertThat(info3.setTagValue(ExifIFD.USERCOMMENT, "P_W999 writes exif tags")).isEqualTo("P_W999 writes exif tags");
+		assertThat(info4.setTagValue(ExifIFD.USERCOMMENT, "P_W999 writes exif tags")).isEqualTo("P_W999 writes exif tags");
+		assertThat(info1.getTagValue(ExifIFD.CONTRAST)).isEqualTo("Normal");
+		assertThat(info2.getTagValue(ExifIFD.CONTRAST)).isEqualTo("Normal");
+		assertThat(info3.setTagValue(ExifIFD.CONTRAST, "1")).isEqualTo("1");
+		assertThat(info4.setTagValue(ExifIFD.CONTRAST, "2")).isEqualTo("2");
+		assertThat(info3.getTagValue(ExifIFD.CONTRAST)).isEqualTo("Low");
+		assertThat(info4.getTagValue(ExifIFD.CONTRAST)).isEqualTo("High");
+		assertThat(info1.getTagValue(IFD0.ORIENTATION)).isEqualTo("Horizontal (normal)");
+		assertThat(info2.getTagValue(IFD0.ORIENTATION)).isEqualTo("Horizontal (normal)");
+		assertThat(info3.setTagValue(IFD0.ORIENTATION, "1")).isEqualTo("1");
+		assertThat(info4.setTagValue(IFD0.ORIENTATION, "6")).isEqualTo("6");
+		assertThat(info3.getTagValue(IFD0.ORIENTATION)).isEqualTo("Horizontal (normal)");
+		assertThat(info4.getTagValue(IFD0.ORIENTATION)).isEqualTo("Rotate 90 CW");
+		assertThat(info1.getTagValue(IFD0.XRESOLUTION)).isEqualTo("72");
+		assertThat(info2.getTagValue(IFD0.XRESOLUTION)).isEqualTo("350");
+		assertThat(info1.getTagValue(IFD0.XRESOLUTION)).isEqualTo("72");
+		assertThat(info2.getTagValue(IFD0.XRESOLUTION)).isEqualTo("350");
+		assertThat(info1.getTagValue(ExifIFD.DATETIMEORIGINAL)).isEqualTo("2010:08:12 21:19:01");
+		assertThat(info2.getTagValue(ExifIFD.DATETIMEORIGINAL)).isEqualTo("2011:11:07 16:16:50");
 
 	}
 	
 	@Test(groups = {"medium", "read-human"})
 	public void testReadAllTags() throws Exception {
 		JExifInfo i = tool.getInfo(read02);
-		Map<String, String> r = i.getAllTags();
+		Map<String, String> r = i.getAllTagsValues();
 		assertThat(r.get("ExifToolVersion")).isNotNull().isNotEmpty().isEqualTo("8.86");
 		assertThat(r.get("FileName")).isNotNull().isNotEmpty().isEqualTo("read02.JPG");
 		//assertThat(r.get("Directory")).isNotNull().isNotEmpty().isEqualTo(".");	//this can change ;) 
 		assertThat(r.get("HyperfocalDistance")).isNotNull().isNotEmpty().isEqualTo("4.89 m");
 	}
 
-	@Test(groups = {"medium", "read-human"})
+	@Test(groups = {"medium", "read-exact"})
 	public void testReadAllTagsExact() throws Exception {
 		JExifInfo i = tool.getInfo(read04);
-		Map<String, String> r = i.getAllTagsExact();
+		Map<String, String> r = i.getAllExactTagsValues();
 		assertThat(r.get("ExifToolVersion")).isNotNull().isNotEmpty().isEqualTo("8.86");
 		assertThat(r.get("FileName")).isNotNull().isNotEmpty().isEqualTo("read04.JPG");
 		//assertThat(r.get("Directory")).isNotNull().isNotEmpty().isEqualTo(".");
 		assertThat(r.get("FocalLength35efl")).isNotNull().isNotEmpty().isEqualTo("27");
 		assertThat(r.get("HyperfocalDistance")).isNotNull().isNotEmpty().isEqualTo("4.62144506340791");
 		assertThat(r.get("LightValue")).isNotNull().isNotEmpty().isEqualTo("9.52160043943519");
-
+	}
+	
+	@Test(groups = {"simple", "read-exact"})
+	public void testReadAllSupportedTagsExact() throws Exception {
+		JExifInfo i = tool.getInfo(read04);
+		Map<Tag, String> r = i.getAllSupportedExactTagsValues();
+		assertThat(r).isNotNull().isNotEmpty();
+	}
+	
+	@Test(groups = {"simple", "read-human"})
+	public void testReadAllSupportedTags() throws Exception {
+		JExifInfo i = tool.getInfo(read04);
+		Map<Tag, String> r = i.getAllSupportedTagsValues();
+		assertThat(r).isNotNull().isNotEmpty();
 	}
 	
 	@AfterClass