diff --git a/importPicture/doc/EXiF.class.violet.html b/importPicture/doc/EXiF.class.violet.html
new file mode 100644
index 0000000..5a00acf
--- /dev/null
+++ b/importPicture/doc/EXiF.class.violet.html
@@ -0,0 +1,595 @@
+
+
+
+
+
+
+
+
+ This file was generated with Violet UML Editor 2.1.0.
+ ( View Source / Download Violet )
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/importPicture/src/osm/jp/gpx/ElementMapTRKPT.java b/importPicture/src/osm/jp/gpx/ElementMapTRKPT.java
index 87cd388..d8b9c79 100644
--- a/importPicture/src/osm/jp/gpx/ElementMapTRKPT.java
+++ b/importPicture/src/osm/jp/gpx/ElementMapTRKPT.java
@@ -34,7 +34,7 @@
Node node5 = nodes4.item(i4);
if (node5 != null) {
if (node5.getNodeType() == Node.TEXT_NODE) {
- Date time = ImportPicture.dfuk.parse(node5.getNodeValue());
+ Date time = ImportPicture.toUTCDate(node5.getNodeValue());
this.put(time, value);
return time;
}
@@ -155,6 +155,6 @@
}
lastTime = new Date(key.getTime());
}
- System.out.println(String.format("| |%20s|%20s|", ImportPicture.dfuk.format(firstTime), ImportPicture.dfuk.format(lastTime)));
+ System.out.println(String.format("| |%20s|%20s|", ImportPicture.toUTCString(firstTime), ImportPicture.toUTCString(lastTime)));
}
}
diff --git a/importPicture/src/osm/jp/gpx/ImportPicture.java b/importPicture/src/osm/jp/gpx/ImportPicture.java
index 41fc070..1c2367a 100644
--- a/importPicture/src/osm/jp/gpx/ImportPicture.java
+++ b/importPicture/src/osm/jp/gpx/ImportPicture.java
@@ -2,6 +2,7 @@
import java.io.*;
import java.nio.channels.FileChannel;
+import java.text.DateFormat;
import java.text.DecimalFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
@@ -120,6 +121,22 @@
ImportPicture obj = new ImportPicture();
obj.params = new AppParameters(paramFilePath);
+ System.out.println(" - param: "+ AppParameters.IMG_TIME +"="+ obj.params.getProperty(AppParameters.IMG_TIME) );
+ System.out.println(" - param: "+ AppParameters.IMG_BASE_FILE +"="+ obj.params.getProperty(AppParameters.IMG_BASE_FILE) );
+ System.out.println(" - param: "+ AppParameters.GPX_BASETIME +"="+ obj.params.getProperty(AppParameters.GPX_BASETIME) );
+ System.out.println(" - param: "+ AppParameters.IMG_SOURCE_FOLDER +"="+ obj.params.getProperty(AppParameters.IMG_SOURCE_FOLDER) );
+ System.out.println(" - param: "+ AppParameters.IMG_OUTPUT_FOLDER +"="+ obj.params.getProperty(AppParameters.IMG_OUTPUT_FOLDER) );
+ System.out.println(" - param: "+ AppParameters.IMG_OUTPUT +"="+ obj.params.getProperty(AppParameters.IMG_OUTPUT));
+ System.out.println(" - param: "+ AppParameters.IMG_OUTPUT_ALL +"="+ obj.param_ImgOutputAll);
+ System.out.println(" - param: "+ AppParameters.IMG_OUTPUT_EXIF +"= "+ String.valueOf(obj.exif));
+ System.out.println(" - param: "+ AppParameters.GPX_SOURCE_FOLDER +"="+ obj.param_GpxSourceFolder);
+ System.out.println(" - param: "+ AppParameters.GPX_OUTPUT_WPT +"="+ obj.param_GpxOutputWpt);
+ System.out.println(" - param: "+ AppParameters.GPX_OVERWRITE_MAGVAR +"="+ Complementation.param_GpxOverwriteMagvar);
+ System.out.println(" - param: "+ AppParameters.GPX_OUTPUT_SPEED +"="+ Complementation.param_GpxOutputSpeed);
+ System.out.println(" - param: "+ AppParameters.GPX_GPXSPLIT +"="+ obj.param_GpxSplit);
+ System.out.println(" - param: "+ AppParameters.GPX_NO_FIRST_NODE +"="+ ImportPicture.param_GpxNoFirstNode);
+ System.out.println(" - param: "+ AppParameters.GPX_REUSE +"="+ obj.param_GpxReuse);
+
obj.ex = null;
// argv[0] --> AppParameters.IMG_SOURCE_FOLDER に置き換え
obj.imgDir = new File(obj.params.getProperty(AppParameters.IMG_SOURCE_FOLDER));
@@ -143,7 +160,8 @@
return;
}
String dateTimeOriginal = exif.getFieldValue(ExifTagConstants.EXIF_TAG_DATE_TIME_ORIGINAL)[0];
- long lastModifyTime = (new SimpleDateFormat("yyyy:MM:dd HH:mm:ss")).parse(dateTimeOriginal).getTime();
+ System.out.println("[ImportPicture.debug] EXIF Date and Time (orignal) = '"+ dateTimeOriginal +"'");
+ long lastModifyTime = ImportPicture.toEXIFDate(dateTimeOriginal).getTime();
imgtime = new Date(lastModifyTime);
}
else {
@@ -242,28 +260,9 @@
obj.exif = true;
}
- System.out.println(" - param: imgDir = '"+ obj.imgDir.getAbsolutePath() +"'");
- System.out.println(" - param: outDir = '"+ (obj.outDir == null ? "" : obj.outDir.getAbsolutePath()) +"'");
- System.out.println(" - param: gpxDir = '"+ (obj.gpxDir == null ? "" : obj.gpxDir.getAbsolutePath()) +"'");
- System.out.println(" - param: number of gpxFiles = '"+ obj.gpxFiles.size() +"'");
- System.out.println(" - param: "+ AppParameters.GPX_GPXSPLIT +"="+ obj.param_GpxSplit);
- System.out.println(" - param: "+ AppParameters.GPX_NO_FIRST_NODE +"="+ ImportPicture.param_GpxNoFirstNode);
- System.out.println(" - param: "+ AppParameters.GPX_REUSE +"="+ obj.param_GpxReuse);
- System.out.println(" - param: "+ AppParameters.IMG_TIME +"="+ obj.params.getProperty(AppParameters.IMG_TIME) );
- System.out.println(" - param: "+ AppParameters.IMG_BASE_FILE +"="+ obj.params.getProperty(AppParameters.IMG_BASE_FILE) );
- System.out.println(" - param: "+ AppParameters.GPX_BASETIME +"="+ obj.params.getProperty(AppParameters.GPX_BASETIME) );
- System.out.println(" - param: "+ AppParameters.IMG_OUTPUT +"="+ obj.params.getProperty(AppParameters.IMG_OUTPUT));
- System.out.println(" - param: "+ AppParameters.IMG_OUTPUT_ALL +"="+ obj.param_ImgOutputAll);
- System.out.println(" - param: "+ AppParameters.IMG_OUTPUT_EXIF +"= "+ String.valueOf(obj.exif));
- System.out.println(" - param: "+ AppParameters.GPX_SOURCE_FOLDER +"="+ obj.param_GpxSourceFolder);
- System.out.println(" - param: "+ AppParameters.GPX_OUTPUT_WPT +"="+ obj.param_GpxOutputWpt);
- System.out.println(" - param: "+ AppParameters.GPX_OVERWRITE_MAGVAR +"="+ Complementation.param_GpxOverwriteMagvar);
- System.out.println(" - param: "+ AppParameters.GPX_OUTPUT_SPEED +"="+ Complementation.param_GpxOutputSpeed);
-
String timeStr = obj.params.getProperty(AppParameters.IMG_TIME);
try {
- //dfjp.setTimeZone(TimeZone.getTimeZone("JST"));
- Date t = dfuk.parse(timeStr);
+ Date t = toUTCDate(timeStr);
obj.delta = t.getTime() - imgtime.getTime();
}
catch (ParseException e) {
@@ -296,8 +295,12 @@
public String param_GpxSourceFolder = ".";
Document document;
- public static final String TIME_FORMAT_STRING = "yyyy-MM-dd'T'HH:mm:ss";
- public static final SimpleDateFormat dfuk = new SimpleDateFormat(TIME_FORMAT_STRING +"'Z'");
+ public static final String TIME_FORMAT_STRING = "yyyy-MM-dd'T'HH:mm:ss'Z'";
+ public static final String EXIF_DATE_TIME_FORMAT_STRING = "yyyy:MM:dd HH:mm:ss";
+ //public static final SimpleDateFormat DATE_PARSE = new SimpleDateFormat(TIME_FORMAT_STRING +" Z");
+ //public static final SimpleDateFormat DATE_FORMAT = new SimpleDateFormat(TIME_FORMAT_STRING);
+ //public static final SimpleDateFormat EXIF_DATE_TIME_PARSE = new SimpleDateFormat(EXIF_DATE_TIME_FORMAT_STRING + " Z");
+ //public static final SimpleDateFormat EXIF_DATE_TIME_FORMAT = new SimpleDateFormat(EXIF_DATE_TIME_FORMAT_STRING);
@Override
public void run() {
@@ -432,6 +435,7 @@
// itime <-- 画像ファイルの撮影時刻
// ファイルの更新日時/EXIFの撮影日時
+ //Date itime = changeLocalTime2GMT(new Date(image.lastModified()));
Date itime = new Date(image.lastModified());
if (this.exifBase) {
ImageMetadata meta = Imaging.getMetadata(image);
@@ -446,14 +450,14 @@
continue;
}
String dateTimeOriginal = exif.getFieldValue(ExifTagConstants.EXIF_TAG_DATE_TIME_ORIGINAL)[0];
- long lastModifyTime = (new SimpleDateFormat("yyyy:MM:dd HH:mm:ss")).parse(dateTimeOriginal).getTime();
- itime = new Date(lastModifyTime);
+ System.out.println("[ImportPicture.debug] EXIF Date and Time (orignal) = '"+ dateTimeOriginal +"'");
+ itime = ImportPicture.toEXIFDate(dateTimeOriginal);
}
- System.out.print(String.format("%20s|", dfuk.format(itime)));
+ System.out.print(String.format("%20s|", toUTCString(itime)));
// uktime <-- 画像撮影時刻に対応するGPX時刻(補正日時)
- Date uktime = new Date(itime.getTime() + delta);
- System.out.print(String.format("%20s|", dfuk.format(uktime)));
+ Date correctedtime = new Date(itime.getTime() + delta);
+ System.out.print(String.format("%20s|", toUTCString(correctedtime)));
// 時刻uktimeにおけるをtrkptに追加する
String eleStr = "-";
@@ -466,13 +470,13 @@
for (Map.Entry map : mapTRKSEG.entrySet()) {
ElementMapTRKPT mapTRKPT = map.getValue();
- trkptE = mapTRKPT.getValue(uktime);
+ trkptE = mapTRKPT.getValue(correctedtime);
if (trkptE != null) {
break;
}
}
if (trkptE == null) {
- System.out.print(String.format("%-14s %-14s|", "", ""));
+ System.out.print(String.format("%-14s|%-14s|", "", ""));
System.out.println(String.format("%8s|%6s|%6s|", "", "", ""));
if (!this.param_ImgOutputAll) {
continue;
@@ -494,7 +498,7 @@
if (trkptT.speedStr != null) {
speedStr = new String(trkptT.speedStr);
}
- System.out.print(String.format("%-14s %-14s|", (new Double(latitude)).toString(), (new Double(longitude)).toString()));
+ System.out.print(String.format("%-14s|%-14s|", (new Double(latitude)).toString(), (new Double(longitude)).toString()));
System.out.println(String.format("%8s|%6s|%6s|", eleStr, magvarStr, speedStr));
}
@@ -523,16 +527,18 @@
TiffOutputDirectory exifDir = outputSet.getOrCreateExifDirectory();
{
Calendar cal = GregorianCalendar.getInstance();
- cal.setTime(uktime);
+ cal.setTimeZone(TimeZone.getTimeZone("UTC"));
+ cal.setTime(correctedtime);
exifDir.removeField(ExifTagConstants.EXIF_TAG_DATE_TIME_ORIGINAL);
- exifDir.add(ExifTagConstants.EXIF_TAG_DATE_TIME_ORIGINAL, new SimpleDateFormat("yyyy:MM:dd HH:mm:ss").format(cal.getTime()));
+ exifDir.add(ExifTagConstants.EXIF_TAG_DATE_TIME_ORIGINAL, ImportPicture.toEXIFString(cal.getTime()));
}
//---- EXIF GPS_TIME_STAMP ----
TiffOutputDirectory gpsDir = outputSet.getOrCreateGPSDirectory();
{
Calendar cal = GregorianCalendar.getInstance(TimeZone.getTimeZone("UTC"));
- cal.setTime(uktime);
+ cal.setTimeZone(TimeZone.getTimeZone("GMT+00"));
+ cal.setTime(correctedtime);
final String yearStr = yearFormatter.format(cal.get(Calendar.YEAR));
final String monthStr = monthFormatter.format(cal.get(Calendar.MONTH) + 1);
final String dayStr = dayFormatter.format(cal.get(Calendar.DAY_OF_MONTH));
@@ -765,6 +771,30 @@
return wpt;
}
+
+ public static String toEXIFString(Date localdate) {
+ DateFormat dfUTC = new SimpleDateFormat(EXIF_DATE_TIME_FORMAT_STRING);
+ dfUTC.setTimeZone(TimeZone.getTimeZone("UTC"));
+ return dfUTC.format(localdate);
+ }
+
+ public static Date toEXIFDate(String timeStr) throws ParseException {
+ DateFormat dfUTC = new SimpleDateFormat(EXIF_DATE_TIME_FORMAT_STRING);
+ dfUTC.setTimeZone(TimeZone.getTimeZone("UTC"));
+ return dfUTC.parse(timeStr);
+ }
+
+ public static String toUTCString(Date localdate) {
+ DateFormat dfUTC = new SimpleDateFormat(TIME_FORMAT_STRING);
+ dfUTC.setTimeZone(TimeZone.getTimeZone("UTC"));
+ return dfUTC.format(localdate);
+ }
+
+ public static Date toUTCDate(String timeStr) throws ParseException {
+ DateFormat dfUTC = new SimpleDateFormat(TIME_FORMAT_STRING);
+ dfUTC.setTimeZone(TimeZone.getTimeZone("UTC"));
+ return dfUTC.parse(timeStr);
+ }
static String getShortPathName(File dir, File iFile) {
String dirPath = dir.getAbsolutePath();
diff --git a/importPicture/src/osm/jp/gpx/TagTrkpt.java b/importPicture/src/osm/jp/gpx/TagTrkpt.java
index 453adf5..ed509f9 100644
--- a/importPicture/src/osm/jp/gpx/TagTrkpt.java
+++ b/importPicture/src/osm/jp/gpx/TagTrkpt.java
@@ -68,7 +68,7 @@
if (node2 != null) {
if (node2.getNodeType() == Node.TEXT_NODE) {
try {
- this.time = ImportPicture.dfuk.parse(node2.getNodeValue());
+ this.time = ImportPicture.toUTCDate(node2.getNodeValue());
} catch (ParseException e) {
this.time = null;
}
diff --git a/importPicture/src/osm/jp/gpx/matchtime/gui/AdjustTime.java b/importPicture/src/osm/jp/gpx/matchtime/gui/AdjustTime.java
index 10409d2..9e1a774 100644
--- a/importPicture/src/osm/jp/gpx/matchtime/gui/AdjustTime.java
+++ b/importPicture/src/osm/jp/gpx/matchtime/gui/AdjustTime.java
@@ -28,6 +28,9 @@
public static final String PROGRAM_VARSION = "3.2";
public static final String PROGRAM_UPDATE = "2017/06/28";
+ AppParameters params;
+ SimpleDateFormat dfjp = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z");
+
// Used for addNotify check.
boolean fComponentsAdjusted = false;
@@ -144,9 +147,6 @@
}
}
- AppParameters params;
- SimpleDateFormat dfjp = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-
/**
* データベース内のテーブルを一覧で表示するFrame
* @throws IOException
@@ -619,7 +619,7 @@
try {
this.params.setProperty(AppParameters.IMG_SOURCE_FOLDER, arg1_srcFolder.getText());
this.params.setProperty(AppParameters.IMG_BASE_FILE, arg2_baseTimeImg.getText());
- this.params.setProperty(AppParameters.IMG_TIME, ImportPicture.dfuk.format(dfjp.parse(arg3_basetime.getText())));
+ this.params.setProperty(AppParameters.IMG_TIME, ImportPicture.toUTCString(dfjp.parse(arg3_basetime.getText())));
this.params.setProperty(AppParameters.IMG_OUTPUT, String.valueOf(outputIMG.isSelected()));
this.params.setProperty(AppParameters.IMG_OUTPUT_FOLDER, arg5_outputFolder.getText());
this.params.setProperty(AppParameters.IMG_OUTPUT_ALL, String.valueOf(outputIMG_all.isSelected()));
diff --git a/importPicture/test/osm/jp/gpx/ElementMapTRKPTTest.java b/importPicture/test/osm/jp/gpx/ElementMapTRKPTTest.java
index 1e39f28..982a020 100644
--- a/importPicture/test/osm/jp/gpx/ElementMapTRKPTTest.java
+++ b/importPicture/test/osm/jp/gpx/ElementMapTRKPTTest.java
@@ -132,97 +132,97 @@
@Test
public void get_17() throws ParseException {
- Element ret = map.getValue(ImportPicture.dfuk.parse("2017-05-29T01:23:17Z"));
+ Element ret = map.getValue(ImportPicture.toUTCDate("2017-05-29T01:23:17Z"));
assertThat(ret, is(nullValue()));
}
@Test
public void get_18() throws ParseException {
- Element ret = map.getValue(ImportPicture.dfuk.parse("2017-05-29T01:23:18Z"));
+ Element ret = map.getValue(ImportPicture.toUTCDate("2017-05-29T01:23:18Z"));
TagTrkpt tag = new TagTrkpt(ret);
assertThat(sdf.format(tag.time), is("2017-05-29T01:23:18Z"));
}
@Test
public void get_19() throws ParseException {
- Element ret = map.getValue(ImportPicture.dfuk.parse("2017-05-29T01:23:19Z"));
+ Element ret = map.getValue(ImportPicture.toUTCDate("2017-05-29T01:23:19Z"));
TagTrkpt tag = new TagTrkpt(ret);
assertThat(sdf.format(tag.time), is("2017-05-29T01:23:18Z"));
}
@Test
public void get_20() throws ParseException {
- Element ret = map.getValue(ImportPicture.dfuk.parse("2017-05-29T01:23:20Z"));
+ Element ret = map.getValue(ImportPicture.toUTCDate("2017-05-29T01:23:20Z"));
TagTrkpt tag = new TagTrkpt(ret);
assertThat(sdf.format(tag.time), is("2017-05-29T01:23:18Z"));
}
@Test
public void get_21() throws ParseException {
- Element ret = map.getValue(ImportPicture.dfuk.parse("2017-05-29T01:23:21Z"));
+ Element ret = map.getValue(ImportPicture.toUTCDate("2017-05-29T01:23:21Z"));
TagTrkpt tag = new TagTrkpt(ret);
assertThat(sdf.format(tag.time), is("2017-05-29T01:23:21Z"));
}
@Test
public void get_22() throws ParseException {
- Element ret = map.getValue(ImportPicture.dfuk.parse("2017-05-29T01:23:22Z"));
+ Element ret = map.getValue(ImportPicture.toUTCDate("2017-05-29T01:23:22Z"));
TagTrkpt tag = new TagTrkpt(ret);
assertThat(sdf.format(tag.time), is("2017-05-29T01:23:21Z"));
}
@Test
public void get_23() throws ParseException {
- Element ret = map.getValue(ImportPicture.dfuk.parse("2017-05-29T01:23:23Z"));
+ Element ret = map.getValue(ImportPicture.toUTCDate("2017-05-29T01:23:23Z"));
TagTrkpt tag = new TagTrkpt(ret);
assertThat(sdf.format(tag.time), is("2017-05-29T01:23:21Z"));
}
@Test
public void get_24() throws ParseException {
- Element ret = map.getValue(ImportPicture.dfuk.parse("2017-05-29T01:23:24Z"));
+ Element ret = map.getValue(ImportPicture.toUTCDate("2017-05-29T01:23:24Z"));
TagTrkpt tag = new TagTrkpt(ret);
assertThat(sdf.format(tag.time), is("2017-05-29T01:23:24Z"));
}
@Test
public void get_25() throws ParseException {
- Element ret = map.getValue(ImportPicture.dfuk.parse("2017-05-29T01:23:25Z"));
+ Element ret = map.getValue(ImportPicture.toUTCDate("2017-05-29T01:23:25Z"));
TagTrkpt tag = new TagTrkpt(ret);
assertThat(sdf.format(tag.time), is("2017-05-29T01:23:24Z"));
}
@Test
public void get_26() throws ParseException {
- Element ret = map.getValue(ImportPicture.dfuk.parse("2017-05-29T01:23:26Z"));
+ Element ret = map.getValue(ImportPicture.toUTCDate("2017-05-29T01:23:26Z"));
TagTrkpt tag = new TagTrkpt(ret);
assertThat(sdf.format(tag.time), is("2017-05-29T01:23:24Z"));
}
@Test
public void get_27() throws ParseException {
- Element ret = map.getValue(ImportPicture.dfuk.parse("2017-05-29T01:23:27Z"));
+ Element ret = map.getValue(ImportPicture.toUTCDate("2017-05-29T01:23:27Z"));
TagTrkpt tag = new TagTrkpt(ret);
assertThat(sdf.format(tag.time), is("2017-05-29T01:23:27Z"));
}
@Test
public void get_28() throws ParseException {
- Element ret = map.getValue(ImportPicture.dfuk.parse("2017-05-29T01:23:28Z"));
+ Element ret = map.getValue(ImportPicture.toUTCDate("2017-05-29T01:23:28Z"));
TagTrkpt tag = new TagTrkpt(ret);
assertThat(sdf.format(tag.time), is("2017-05-29T01:23:27Z"));
}
@Test
public void get_30() throws ParseException {
- Element ret = map.getValue(ImportPicture.dfuk.parse("2017-05-29T01:23:30Z"));
+ Element ret = map.getValue(ImportPicture.toUTCDate("2017-05-29T01:23:30Z"));
TagTrkpt tag = new TagTrkpt(ret);
assertThat(sdf.format(tag.time), is("2017-05-29T01:23:27Z"));
}
@Test
public void get_31() throws ParseException {
- Element ret = map.getValue(ImportPicture.dfuk.parse("2017-05-29T01:23:31Z"));
+ Element ret = map.getValue(ImportPicture.toUTCDate("2017-05-29T01:23:31Z"));
assertThat(ret, is(nullValue()));
}
}
diff --git a/importPicture/test/osm/jp/gpx/ImportPictureTest.java b/importPicture/test/osm/jp/gpx/ImportPictureTest.java
index ef12b72..d6967d7 100644
--- a/importPicture/test/osm/jp/gpx/ImportPictureTest.java
+++ b/importPicture/test/osm/jp/gpx/ImportPictureTest.java
@@ -14,6 +14,11 @@
import org.apache.commons.compress.archivers.tar.TarArchiveEntry;
import org.apache.commons.compress.archivers.tar.TarArchiveInputStream;
import org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream;
+import org.apache.commons.imaging.Imaging;
+import org.apache.commons.imaging.common.ImageMetadata;
+import org.apache.commons.imaging.formats.jpeg.JpegImageMetadata;
+import org.apache.commons.imaging.formats.tiff.TiffImageMetadata;
+import org.apache.commons.imaging.formats.tiff.constants.ExifTagConstants;
import org.junit.runner.*;
import org.junit.experimental.theories.DataPoints;
import org.junit.experimental.theories.Theories;
@@ -24,10 +29,14 @@
static class Expecter {
String value;
boolean expect;
+ String timeStr;
+ boolean magver;
- public Expecter(String value, boolean expect){
+ public Expecter(String value, boolean expect, String timeStr, boolean magver){
this.value = value;
this.expect = expect;
+ this.timeStr = timeStr;
+ this.magver = magver;
}
}
@@ -74,12 +83,12 @@
"testdata/cameradata/20170518.gpx",
"testdata/AdjustTime.20170518.A1.ini",
new Expecter[] {
- new Expecter("10170518/20170518_.gpx", true),
- new Expecter("10170518/DSC05183.JPG", false),
- new Expecter("10170518/DSC05184.JPG", true),
- new Expecter("10170518/DSC05196.JPG", true),
- new Expecter("10170518/DSC05204.JPG", true),
- new Expecter("10170518/DSC05205.JPG", false),
+ new Expecter("10170518/20170518_.gpx", true, null, true),
+ new Expecter("10170518/DSC05183.JPG", false, null, false),
+ new Expecter("10170518/DSC05184.JPG", true, "2017:05:18 00:34:44", true),
+ new Expecter("10170518/DSC05196.JPG", true, "2017:05:18 00:37:32", true),
+ new Expecter("10170518/DSC05204.JPG", true, "2017:05:18 00:46:48", true),
+ new Expecter("10170518/DSC05205.JPG", false, null, false),
}),
new Fixture(
"[A2].SONYカメラの場合.FILE_UPDATE時間を基準にして時間外のファイルもコピーする時",
@@ -88,12 +97,12 @@
"testdata/cameradata/20170518.gpx",
"testdata/AdjustTime.20170518.A2.ini",
new Expecter[] {
- new Expecter("10170518/20170518_.gpx", true),
- new Expecter("10170518/DSC05183.JPG", true),
- new Expecter("10170518/DSC05184.JPG", true),
- new Expecter("10170518/DSC05196.JPG", true),
- new Expecter("10170518/DSC05204.JPG", true),
- new Expecter("10170518/DSC05205.JPG", true),
+ new Expecter("10170518/20170518_.gpx", true, null, true),
+ new Expecter("10170518/DSC05183.JPG", true, "2017:05:18 00:16:48", true),
+ new Expecter("10170518/DSC05184.JPG", true, "2017:05:18 00:34:44", true),
+ new Expecter("10170518/DSC05196.JPG", true, "2017:05:18 00:37:32", true),
+ new Expecter("10170518/DSC05204.JPG", true, "2017:05:18 00:46:48", true),
+ new Expecter("10170518/DSC05205.JPG", true, "2017:05:18 00:48:04", true),
}),
new Fixture(
@@ -103,11 +112,11 @@
"testdata/cameradata/20170518.gpx",
"testdata/AdjustTime.20170518.B1.ini",
new Expecter[] {
- new Expecter("cameradata/20170518_.gpx", true),
- new Expecter("cameradata/20170518_092031A.jpg", false),
- new Expecter("cameradata/20170518_094226A_snap.jpg", true),
- new Expecter("cameradata/20170518_094737A.jpg", true),
- new Expecter("cameradata/20170518_094827A.jpg", false),
+ new Expecter("cameradata/20170518_.gpx", true, null, true),
+ new Expecter("cameradata/20170518_092031A.jpg", false, null, false),
+ new Expecter("cameradata/20170518_094226A_snap.jpg", true, "2017:05:18 00:42:26", true),
+ new Expecter("cameradata/20170518_094737A.jpg", true, "2017:05:18 00:47:36", true),
+ new Expecter("cameradata/20170518_094827A.jpg", false, null, false),
}),
new Fixture(
@@ -117,11 +126,11 @@
"testdata/cameradata/20170518.gpx",
"testdata/AdjustTime.20170518.B2.ini",
new Expecter[] {
- new Expecter("cameradata/20170518_.gpx", true),
- new Expecter("cameradata/20170518_092031A.jpg", true),
- new Expecter("cameradata/20170518_094226A_snap.jpg", true),
- new Expecter("cameradata/20170518_094737A.jpg", true),
- new Expecter("cameradata/20170518_094827A.jpg", true),
+ new Expecter("cameradata/20170518_.gpx", true, null, true),
+ new Expecter("cameradata/20170518_092031A.jpg", true, "2017:05:18 00:20:30", true),
+ new Expecter("cameradata/20170518_094226A_snap.jpg", true, "2017:05:18 00:42:26", true),
+ new Expecter("cameradata/20170518_094737A.jpg", true, "2017:05:18 00:47:36", true),
+ new Expecter("cameradata/20170518_094827A.jpg", true, "2017:05:18 00:48:26", true),
}),
new Fixture(
@@ -132,32 +141,32 @@
"testdata/AdjustTime.M1a.separate.ini",
new Expecter[] {
// GPX file
- new Expecter("separate/separate_.gpx", true),
+ new Expecter("separate/separate_.gpx", true, null, true),
- // out of time ( - 2017-05-29T01:24:05)
- new Expecter("separate/20170529_102305A.jpg", false),
- new Expecter("separate/20170529_102314A.jpg", false),
+ // out of time ( - 2017-05-29T01:23:18)
+ new Expecter("separate/20170529_102305A.jpg", false, null, false),
+ new Expecter("separate/20170529_102314A.jpg", false, null, false),
- // in TRKSEG(1) (2017-05-29T01:23:05 - 2017-05-29T01:24:05)
- new Expecter("separate/20170529_102318A.jpg", true),
- new Expecter("separate/20170529_102322A.jpg", true),
- new Expecter("separate/20170529_102405A.jpg", true),
+ // in TRKSEG(1) (2017-05-29T01:23:18 - 2017-05-29T01:24:05)
+ new Expecter("separate/20170529_102318A.jpg", true, "2017:05:29 01:23:18",true),
+ new Expecter("separate/20170529_102322A.jpg", true, "2017:05:29 01:23:22",true),
+ new Expecter("separate/20170529_102405A.jpg", true, "2017:05:29 01:24:04",true),
// out of time (2017-05-29T01:24:05 - 2017-05-29T01:24:37)
- new Expecter("separate/20170529_102409A.jpg", false),
- new Expecter("separate/20170529_102418A.jpg", false),
+ new Expecter("separate/20170529_102409A.jpg", false, null, false),
+ new Expecter("separate/20170529_102418A.jpg", false, null, false),
// in TRKSEG(2) (2017-05-29T01:24:37 - 2017-05-29T01:33:03)
- new Expecter("separate/20170529_102448A.jpg", true),
- new Expecter("separate/20170529_103246A.jpg", true),
+ new Expecter("separate/20170529_102448A.jpg", true, "2017:05:29 01:24:48",true),
+ new Expecter("separate/20170529_103246A.jpg", true, "2017:05:29 01:32:46",true),
// out of time (2017-05-29T01:33:03 - 2017-05-29T01:35:53)
- new Expecter("separate/20170529_103315A.jpg", false),
- new Expecter("separate/20170529_103545A.jpg", false),
+ new Expecter("separate/20170529_103315A.jpg", false, null, false),
+ new Expecter("separate/20170529_103545A.jpg", false, null, false),
// in TRKSEG(3) (2017-05-29T01:35:53 - 2017-05-29T01:47:35)
- new Expecter("separate/20170529_102448A.jpg", true),
- new Expecter("separate/20170529_103246A.jpg", true),
+ new Expecter("separate/20170529_103615A.jpg", true, "2017:05:29 01:36:14",true),
+ new Expecter("separate/20170529_104119A.jpg", true, "2017:05:29 01:41:18",true),
}),
new Fixture(
@@ -168,32 +177,32 @@
"testdata/AdjustTime.M1b.separate.ini",
new Expecter[] {
// GPX file
- new Expecter("separate/separate_.gpx", true),
+ new Expecter("separate/separate_.gpx", true, null, true),
// out of time ( - 2017-05-29T01:23:18)
- new Expecter("separate/20170529_102305A.jpg", true),
- new Expecter("separate/20170529_102314A.jpg", true),
+ new Expecter("separate/20170529_102305A.jpg", true, "2017:05:29 01:23:06", true),
+ new Expecter("separate/20170529_102314A.jpg", true, "2017:05:29 01:23:14", true),
// in TRKSEG(1) (2017-05-29T01:23:18 - 2017-05-29T01:24:05)
- new Expecter("separate/20170529_102318A.jpg", true),
- new Expecter("separate/20170529_102322A.jpg", true),
- new Expecter("separate/20170529_102405A.jpg", true),
+ new Expecter("separate/20170529_102318A.jpg", true, "2017:05:29 01:23:18",true),
+ new Expecter("separate/20170529_102322A.jpg", true, "2017:05:29 01:23:22",true),
+ new Expecter("separate/20170529_102405A.jpg", true, "2017:05:29 01:24:04",true),
// out of time (2017-05-29T01:24:05 - 2017-05-29T01:24:37)
- new Expecter("separate/20170529_102409A.jpg", true),
- new Expecter("separate/20170529_102418A.jpg", true),
+ new Expecter("separate/20170529_102409A.jpg", true, "2017:05:29 01:24:10",true),
+ new Expecter("separate/20170529_102418A.jpg", true, "2017:05:29 01:24:18",true),
// in TRKSEG(2) (2017-05-29T01:24:37 - 2017-05-29T01:33:03)
- new Expecter("separate/20170529_102448A.jpg", true),
- new Expecter("separate/20170529_103246A.jpg", true),
+ new Expecter("separate/20170529_102448A.jpg", true, "2017:05:29 01:24:48",true),
+ new Expecter("separate/20170529_103246A.jpg", true, "2017:05:29 01:32:46",true),
// out of time (2017-05-29T01:33:03 - 2017-05-29T01:35:53)
- new Expecter("separate/20170529_103315A.jpg", true),
- new Expecter("separate/20170529_103545A.jpg", true),
+ new Expecter("separate/20170529_103315A.jpg", true, "2017:05:29 01:33:14",true),
+ new Expecter("separate/20170529_103545A.jpg", true, "2017:05:29 10:35:45",true),
// in TRKSEG(3) (2017-05-29T01:35:53 - 2017-05-29T01:47:35)
- new Expecter("separate/20170529_102448A.jpg", true),
- new Expecter("separate/20170529_103246A.jpg", true),
+ new Expecter("separate/20170529_103615A.jpg", true, "2017:05:29 01:36:14",true),
+ new Expecter("separate/20170529_104119A.jpg", true, "2017:05:29 01:41:18",true),
}),
new Fixture(
@@ -204,32 +213,32 @@
"testdata/AdjustTime.M1c.separate.ini",
new Expecter[] {
// GPX file
- new Expecter("separate/separate_.gpx", true),
+ new Expecter("separate/separate_.gpx", true, null, true),
// out of time ( - 2017-05-29T01:23:18)
- new Expecter("separate/20170529_102305A.jpg", false),
- new Expecter("separate/20170529_102314A.jpg", false),
+ new Expecter("separate/20170529_102305A.jpg", false, null, false),
+ new Expecter("separate/20170529_102314A.jpg", false, null, false),
// in TRKSEG(1) (2017-05-29T01:23:18 - 2017-05-29T01:24:05)
- new Expecter("separate/20170529_102318A.jpg", true),
- new Expecter("separate/20170529_102322A.jpg", true),
- new Expecter("separate/20170529_102405A.jpg", true),
+ new Expecter("separate/20170529_102318A.jpg", true, "2017:05:29 01:23:18",true),
+ new Expecter("separate/20170529_102322A.jpg", true, "2017:05:29 01:23:22",true),
+ new Expecter("separate/20170529_102405A.jpg", true, "2017:05:29 01:24:04",true),
// out of time (2017-05-29T01:24:05 - 2017-05-29T01:24:37)
- new Expecter("separate/20170529_102409A.jpg", false),
- new Expecter("separate/20170529_102418A.jpg", false),
+ new Expecter("separate/20170529_102409A.jpg", false, null, false),
+ new Expecter("separate/20170529_102418A.jpg", false, null, false),
// in TRKSEG(2) (2017-05-29T01:24:37 - 2017-05-29T01:33:03)
- new Expecter("separate/20170529_102448A.jpg", true),
- new Expecter("separate/20170529_103246A.jpg", true),
+ new Expecter("separate/20170529_102448A.jpg", true, "2017:05:29 01:24:48",true),
+ new Expecter("separate/20170529_103246A.jpg", true, "2017:05:29 01:32:46",true),
// out of time (2017-05-29T01:33:03 - 2017-05-29T01:35:53)
- new Expecter("separate/20170529_103315A.jpg", false),
- new Expecter("separate/20170529_103545A.jpg", false),
+ new Expecter("separate/20170529_103315A.jpg", false, null, false),
+ new Expecter("separate/20170529_103545A.jpg", false, null, false),
// in TRKSEG(3) (2017-05-29T01:35:53 - 2017-05-29T01:47:35)
- new Expecter("separate/20170529_102448A.jpg", true),
- new Expecter("separate/20170529_103246A.jpg", true),
+ new Expecter("separate/20170529_103615A.jpg", true, "2017:05:29 01:36:14",true),
+ new Expecter("separate/20170529_104119A.jpg", true, "2017:05:29 01:41:18",true),
}),
new Fixture(
@@ -240,32 +249,32 @@
"testdata/AdjustTime.M1d.separate.ini",
new Expecter[] {
// GPX file
- new Expecter("separate/separate_.gpx", true),
+ new Expecter("separate/separate_.gpx", true, null, true),
// out of time ( - 2017-05-29T01:23:18)
- new Expecter("separate/20170529_102305A.jpg", true),
- new Expecter("separate/20170529_102314A.jpg", true),
+ new Expecter("separate/20170529_102305A.jpg", true, "2017:05:29 01:23:06", true),
+ new Expecter("separate/20170529_102314A.jpg", true, "2017:05:29 01:23:14", true),
// in TRKSEG(1) (2017-05-29T01:23:18 - 2017-05-29T01:24:05)
- new Expecter("separate/20170529_102318A.jpg", true),
- new Expecter("separate/20170529_102322A.jpg", true),
- new Expecter("separate/20170529_102405A.jpg", true),
+ new Expecter("separate/20170529_102318A.jpg", true, "2017:05:29 01:23:18",true),
+ new Expecter("separate/20170529_102322A.jpg", true, "2017:05:29 01:23:22",true),
+ new Expecter("separate/20170529_102405A.jpg", true, "2017:05:29 01:24:04",true),
// out of time (2017-05-29T01:24:05 - 2017-05-29T01:24:37)
- new Expecter("separate/20170529_102409A.jpg", true),
- new Expecter("separate/20170529_102418A.jpg", true),
+ new Expecter("separate/20170529_102409A.jpg", true, "2017:05:29 01:24:10",true),
+ new Expecter("separate/20170529_102418A.jpg", true, "2017:05:29 01:24:18",true),
// in TRKSEG(2) (2017-05-29T01:24:37 - 2017-05-29T01:33:03)
- new Expecter("separate/20170529_102448A.jpg", true),
- new Expecter("separate/20170529_103246A.jpg", true),
+ new Expecter("separate/20170529_102448A.jpg", true, "2017:05:29 01:24:48",true),
+ new Expecter("separate/20170529_103246A.jpg", true, "2017:05:29 01:32:46",true),
// out of time (2017-05-29T01:33:03 - 2017-05-29T01:35:53)
- new Expecter("separate/20170529_103315A.jpg", true),
- new Expecter("separate/20170529_103545A.jpg", true),
+ new Expecter("separate/20170529_103315A.jpg", true, "2017:05:29 01:33:14",true),
+ new Expecter("separate/20170529_103545A.jpg", true, "2017:05:29 01:35:44",true),
// in TRKSEG(3) (2017-05-29T01:35:53 - 2017-05-29T01:47:35)
- new Expecter("separate/20170529_102448A.jpg", true),
- new Expecter("separate/20170529_103246A.jpg", true),
+ new Expecter("separate/20170529_103615A.jpg", true, "2017:05:29 01:36:14",true),
+ new Expecter("separate/20170529_104119A.jpg", true, "2017:05:29 01:41:18",true),
}),
@@ -277,32 +286,32 @@
"testdata/AdjustTime.M2a.separate.ini",
new Expecter[] {
// GPX file
- new Expecter("separate/separate_.gpx", true),
+ new Expecter("separate/separate_.gpx", true, null, true),
// out of time ( - 2017-05-29T01:23:18)
- new Expecter("separate/20170529_102305A.jpg", false),
- new Expecter("separate/20170529_102314A.jpg", false),
+ new Expecter("separate/20170529_102305A.jpg", false, null, false),
+ new Expecter("separate/20170529_102314A.jpg", false, null, false),
// in TRKSEG(1) (2017-05-29T01:23:18 - 2017-05-29T01:24:05)
- new Expecter("separate/20170529_102318A.jpg", true),
- new Expecter("separate/20170529_102322A.jpg", true),
- new Expecter("separate/20170529_102405A.jpg", true),
+ new Expecter("separate/20170529_102318A.jpg", true, "2017:05:29 01:23:18",true),
+ new Expecter("separate/20170529_102322A.jpg", true, "2017:05:29 01:23:22",true),
+ new Expecter("separate/20170529_102405A.jpg", true, "2017:05:29 01:24:04",true),
// out of time (2017-05-29T01:24:05 - 2017-05-29T01:24:37)
- new Expecter("separate/20170529_102409A.jpg", false),
- new Expecter("separate/20170529_102418A.jpg", false),
+ new Expecter("separate/20170529_102409A.jpg", false, null, false),
+ new Expecter("separate/20170529_102418A.jpg", false, null, false),
// in TRKSEG(2) (2017-05-29T01:24:37 - 2017-05-29T01:33:03)
- new Expecter("separate/20170529_102448A.jpg", true),
- new Expecter("separate/20170529_103246A.jpg", true),
+ new Expecter("separate/20170529_102448A.jpg", true, "2017:05:29 01:24:48",true),
+ new Expecter("separate/20170529_103246A.jpg", true, "2017:05:29 01:32:46",true),
// out of time (2017-05-29T01:33:03 - 2017-05-29T01:35:53)
- new Expecter("separate/20170529_103315A.jpg", false),
- new Expecter("separate/20170529_103545A.jpg", false),
+ new Expecter("separate/20170529_103315A.jpg", false, null, false),
+ new Expecter("separate/20170529_103545A.jpg", false, null, false),
// in TRKSEG(3) (2017-05-29T01:35:53 - 2017-05-29T01:47:35)
- new Expecter("separate/20170529_102448A.jpg", true),
- new Expecter("separate/20170529_103246A.jpg", true),
+ new Expecter("separate/20170529_103615A.jpg", true, "2017:05:29 01:36:14",true),
+ new Expecter("separate/20170529_104119A.jpg", true, "2017:05:29 01:41:18",true),
}),
new Fixture(
@@ -313,32 +322,32 @@
"testdata/AdjustTime.M2b.separate.ini",
new Expecter[] {
// GPX file
- new Expecter("separate/separate_.gpx", true),
+ new Expecter("separate/separate_.gpx", true, null, true),
// out of time ( - 2017-05-29T01:23:18)
- new Expecter("separate/20170529_102305A.jpg", true),
- new Expecter("separate/20170529_102314A.jpg", true),
+ new Expecter("separate/20170529_102305A.jpg", true, "2017:05:29 01:23:06", true),
+ new Expecter("separate/20170529_102314A.jpg", true, "2017:05:29 01:23:14", true),
// in TRKSEG(1) (2017-05-29T01:23:18 - 2017-05-29T01:24:05)
- new Expecter("separate/20170529_102318A.jpg", true),
- new Expecter("separate/20170529_102322A.jpg", true),
- new Expecter("separate/20170529_102405A.jpg", true),
+ new Expecter("separate/20170529_102318A.jpg", true, "2017:05:29 01:23:18",true),
+ new Expecter("separate/20170529_102322A.jpg", true, "2017:05:29 01:23:22",true),
+ new Expecter("separate/20170529_102405A.jpg", true, "2017:05:29 01:24:04",true),
// out of time (2017-05-29T01:24:05 - 2017-05-29T01:24:37)
- new Expecter("separate/20170529_102409A.jpg", true),
- new Expecter("separate/20170529_102418A.jpg", true),
+ new Expecter("separate/20170529_102409A.jpg", true, "2017:05:29 01:24:10",true),
+ new Expecter("separate/20170529_102418A.jpg", true, "2017:05:29 01:24:18",true),
// in TRKSEG(2) (2017-05-29T01:24:37 - 2017-05-29T01:33:03)
- new Expecter("separate/20170529_102448A.jpg", true),
- new Expecter("separate/20170529_103246A.jpg", true),
+ new Expecter("separate/20170529_102448A.jpg", true, "2017:05:29 01:24:48",true),
+ new Expecter("separate/20170529_103246A.jpg", true, "2017:05:29 01:32:46",true),
// out of time (2017-05-29T01:33:03 - 2017-05-29T01:35:53)
- new Expecter("separate/20170529_103315A.jpg", true),
- new Expecter("separate/20170529_103545A.jpg", true),
+ new Expecter("separate/20170529_103315A.jpg", true, "2017:05:29 01:33:14",true),
+ new Expecter("separate/20170529_103545A.jpg", true, "2017:05:29 01:35:44",true),
// in TRKSEG(3) (2017-05-29T01:35:53 - 2017-05-29T01:47:35)
- new Expecter("separate/20170529_102448A.jpg", true),
- new Expecter("separate/20170529_103246A.jpg", true),
+ new Expecter("separate/20170529_103615A.jpg", true, "2017:05:29 01:36:14",true),
+ new Expecter("separate/20170529_104119A.jpg", true, "2017:05:29 01:41:18",true),
}),
new Fixture(
@@ -349,32 +358,32 @@
"testdata/AdjustTime.M2c.separate.ini",
new Expecter[] {
// GPX file
- new Expecter("separate/separate_.gpx", true),
+ new Expecter("separate/separate_.gpx", true, null, true),
// out of time ( - 2017-05-29T01:23:18)
- new Expecter("separate/20170529_102305A.jpg", false),
- new Expecter("separate/20170529_102314A.jpg", false),
+ new Expecter("separate/20170529_102305A.jpg", false, null, false),
+ new Expecter("separate/20170529_102314A.jpg", false, null, false),
// in TRKSEG(1) (2017-05-29T01:23:18 - 2017-05-29T01:24:05)
- new Expecter("separate/20170529_102318A.jpg", true),
- new Expecter("separate/20170529_102322A.jpg", true),
- new Expecter("separate/20170529_102405A.jpg", true),
+ new Expecter("separate/20170529_102318A.jpg", true, "2017:05:29 01:23:18",true),
+ new Expecter("separate/20170529_102322A.jpg", true, "2017:05:29 01:23:22",true),
+ new Expecter("separate/20170529_102405A.jpg", true, "2017:05:29 01:24:04",true),
// out of time (2017-05-29T01:24:05 - 2017-05-29T01:24:37)
- new Expecter("separate/20170529_102409A.jpg", false),
- new Expecter("separate/20170529_102418A.jpg", false),
+ new Expecter("separate/20170529_102409A.jpg", false, null, false),
+ new Expecter("separate/20170529_102418A.jpg", false, null, false),
// in TRKSEG(2) (2017-05-29T01:24:37 - 2017-05-29T01:33:03)
- new Expecter("separate/20170529_102448A.jpg", true),
- new Expecter("separate/20170529_103246A.jpg", true),
+ new Expecter("separate/20170529_102448A.jpg", true, "2017:05:29 01:24:48",true),
+ new Expecter("separate/20170529_103246A.jpg", true, "2017:05:29 01:32:46",true),
// out of time (2017-05-29T01:33:03 - 2017-05-29T01:35:53)
- new Expecter("separate/20170529_103315A.jpg", false),
- new Expecter("separate/20170529_103545A.jpg", false),
+ new Expecter("separate/20170529_103315A.jpg", false, null, false),
+ new Expecter("separate/20170529_103545A.jpg", false, null, false),
// in TRKSEG(3) (2017-05-29T01:35:53 - 2017-05-29T01:47:35)
- new Expecter("separate/20170529_102448A.jpg", true),
- new Expecter("separate/20170529_103246A.jpg", true),
+ new Expecter("separate/20170529_103615A.jpg", true, "2017:05:29 01:36:14",true),
+ new Expecter("separate/20170529_104119A.jpg", true, "2017:05:29 01:41:18",true),
}),
new Fixture(
@@ -385,32 +394,32 @@
"testdata/AdjustTime.M2d.separate.ini",
new Expecter[] {
// GPX file
- new Expecter("separate/separate_.gpx", true),
+ new Expecter("separate/separate_.gpx", true, null, true),
// out of time ( - 2017-05-29T01:23:18)
- new Expecter("separate/20170529_102305A.jpg", true),
- new Expecter("separate/20170529_102314A.jpg", true),
+ new Expecter("separate/20170529_102305A.jpg", true, "2017:05:29 01:23:06", true),
+ new Expecter("separate/20170529_102314A.jpg", true, "2017:05:29 01:23:14", true),
// in TRKSEG(1) (2017-05-29T01:23:18 - 2017-05-29T01:24:05)
- new Expecter("separate/20170529_102318A.jpg", true),
- new Expecter("separate/20170529_102322A.jpg", true),
- new Expecter("separate/20170529_102405A.jpg", true),
+ new Expecter("separate/20170529_102318A.jpg", true, "2017:05:29 01:23:18",true),
+ new Expecter("separate/20170529_102322A.jpg", true, "2017:05:29 01:23:22",true),
+ new Expecter("separate/20170529_102405A.jpg", true, "2017:05:29 01:24:04",true),
// out of time (2017-05-29T01:24:05 - 2017-05-29T01:24:37)
- new Expecter("separate/20170529_102409A.jpg", true),
- new Expecter("separate/20170529_102418A.jpg", true),
+ new Expecter("separate/20170529_102409A.jpg", true, "2017:05:29 01:24:10",true),
+ new Expecter("separate/20170529_102418A.jpg", true, "2017:05:29 01:24:18",true),
// in TRKSEG(2) (2017-05-29T01:24:37 - 2017-05-29T01:33:03)
- new Expecter("separate/20170529_102448A.jpg", true),
- new Expecter("separate/20170529_103246A.jpg", true),
+ new Expecter("separate/20170529_102448A.jpg", true, "2017:05:29 01:24:48",true),
+ new Expecter("separate/20170529_103246A.jpg", true, "2017:05:29 01:32:46",true),
// out of time (2017-05-29T01:33:03 - 2017-05-29T01:35:53)
- new Expecter("separate/20170529_103315A.jpg", true),
- new Expecter("separate/20170529_103545A.jpg", true),
+ new Expecter("separate/20170529_103315A.jpg", true, "2017:05:29 01:33:14",true),
+ new Expecter("separate/20170529_103545A.jpg", true, "2017:05:29 01:35:44",true),
// in TRKSEG(3) (2017-05-29T01:35:53 - 2017-05-29T01:47:35)
- new Expecter("separate/20170529_102448A.jpg", true),
- new Expecter("separate/20170529_103246A.jpg", true),
+ new Expecter("separate/20170529_103615A.jpg", true, "2017:05:29 01:36:14",true),
+ new Expecter("separate/20170529_104119A.jpg", true, "2017:05:29 01:41:18",true),
}),
new Fixture(
@@ -421,32 +430,32 @@
"testdata/AdjustTime.M2a.separate.ini",
new Expecter[] {
// GPX file
- new Expecter("separate/separate_.gpx", true),
+ new Expecter("separate/separate_.gpx", true, null, true),
// out of time ( - 2017-05-29T01:23:18)
- new Expecter("separate/20170529_102305A.jpg", false),
- new Expecter("separate/20170529_102314A.jpg", false),
+ new Expecter("separate/20170529_102305A.jpg", false, null, false),
+ new Expecter("separate/20170529_102314A.jpg", false, null, false),
// in TRKSEG(1) (2017-05-29T01:23:18 - 2017-05-29T01:24:05)
- new Expecter("separate/20170529_102318A.jpg", true),
- new Expecter("separate/20170529_102322A.jpg", true),
- new Expecter("separate/20170529_102405A.jpg", true),
+ new Expecter("separate/20170529_102318A.jpg", true, "2017:05:29 01:23:18",true),
+ new Expecter("separate/20170529_102322A.jpg", true, "2017:05:29 01:23:22",true),
+ new Expecter("separate/20170529_102405A.jpg", true, "2017:05:29 01:24:04",true),
// out of time (2017-05-29T01:24:05 - 2017-05-29T01:24:37)
- new Expecter("separate/20170529_102409A.jpg", false),
- new Expecter("separate/20170529_102418A.jpg", false),
+ new Expecter("separate/20170529_102409A.jpg", false, null, false),
+ new Expecter("separate/20170529_102418A.jpg", false, null, false),
// in TRKSEG(2) (2017-05-29T01:24:37 - 2017-05-29T01:33:03)
- new Expecter("separate/20170529_102448A.jpg", true),
- new Expecter("separate/20170529_103246A.jpg", true),
+ new Expecter("separate/20170529_102448A.jpg", true, "2017:05:29 01:24:48",true),
+ new Expecter("separate/20170529_103246A.jpg", true, "2017:05:29 01:32:46",true),
// out of time (2017-05-29T01:33:03 - 2017-05-29T01:35:53)
- new Expecter("separate/20170529_103315A.jpg", false),
- new Expecter("separate/20170529_103545A.jpg", false),
+ new Expecter("separate/20170529_103315A.jpg", false, null, false),
+ new Expecter("separate/20170529_103545A.jpg", false, null, false),
// in TRKSEG(3) (2017-05-29T01:35:53 - 2017-05-29T01:47:35)
- new Expecter("separate/20170529_102448A.jpg", true),
- new Expecter("separate/20170529_103246A.jpg", true),
+ new Expecter("separate/20170529_103615A.jpg", true, "2017:05:29 01:36:14",true),
+ new Expecter("separate/20170529_104119A.jpg", true, "2017:05:29 01:41:18",true),
}),
new Fixture(
@@ -457,32 +466,32 @@
"testdata/AdjustTime.M2b.separate.ini",
new Expecter[] {
// GPX file
- new Expecter("separate/separate_.gpx", true),
-
+ new Expecter("separate/separate_.gpx", true, null, true),
+
// out of time ( - 2017-05-29T01:23:18)
- new Expecter("separate/20170529_102305A.jpg", true),
- new Expecter("separate/20170529_102314A.jpg", true),
+ new Expecter("separate/20170529_102305A.jpg", true, "2017:05:29 01:23:06", true),
+ new Expecter("separate/20170529_102314A.jpg", true, "2017:05:29 01:23:14", true),
// in TRKSEG(1) (2017-05-29T01:23:18 - 2017-05-29T01:24:05)
- new Expecter("separate/20170529_102318A.jpg", true),
- new Expecter("separate/20170529_102322A.jpg", true),
- new Expecter("separate/20170529_102405A.jpg", true),
+ new Expecter("separate/20170529_102318A.jpg", true, "2017:05:29 01:23:18",true),
+ new Expecter("separate/20170529_102322A.jpg", true, "2017:05:29 01:23:22",true),
+ new Expecter("separate/20170529_102405A.jpg", true, "2017:05:29 01:24:04",true),
// out of time (2017-05-29T01:24:05 - 2017-05-29T01:24:37)
- new Expecter("separate/20170529_102409A.jpg", true),
- new Expecter("separate/20170529_102418A.jpg", true),
+ new Expecter("separate/20170529_102409A.jpg", true, "2017:05:29 01:24:10",true),
+ new Expecter("separate/20170529_102418A.jpg", true, "2017:05:29 01:24:18",true),
// in TRKSEG(2) (2017-05-29T01:24:37 - 2017-05-29T01:33:03)
- new Expecter("separate/20170529_102448A.jpg", true),
- new Expecter("separate/20170529_103246A.jpg", true),
+ new Expecter("separate/20170529_102448A.jpg", true, "2017:05:29 01:24:48",true),
+ new Expecter("separate/20170529_103246A.jpg", true, "2017:05:29 01:32:46",true),
// out of time (2017-05-29T01:33:03 - 2017-05-29T01:35:53)
- new Expecter("separate/20170529_103315A.jpg", true),
- new Expecter("separate/20170529_103545A.jpg", true),
+ new Expecter("separate/20170529_103315A.jpg", true, "2017:05:29 01:33:14",true),
+ new Expecter("separate/20170529_103545A.jpg", true, "2017:05:29 01:35:44",true),
// in TRKSEG(3) (2017-05-29T01:35:53 - 2017-05-29T01:47:35)
- new Expecter("separate/20170529_102448A.jpg", true),
- new Expecter("separate/20170529_103246A.jpg", true),
+ new Expecter("separate/20170529_103615A.jpg", true, "2017:05:29 01:36:14",true),
+ new Expecter("separate/20170529_104119A.jpg", true, "2017:05:29 01:41:18",true),
}),
new Fixture(
@@ -493,32 +502,32 @@
"testdata/AdjustTime.M2c.separate.ini",
new Expecter[] {
// GPX file
- new Expecter("separate/separate_.gpx", true),
+ new Expecter("separate/separate_.gpx", true, null, true),
// out of time ( - 2017-05-29T01:23:18)
- new Expecter("separate/20170529_102305A.jpg", false),
- new Expecter("separate/20170529_102314A.jpg", false),
+ new Expecter("separate/20170529_102305A.jpg", false, null, false),
+ new Expecter("separate/20170529_102314A.jpg", false, null, false),
// in TRKSEG(1) (2017-05-29T01:23:18 - 2017-05-29T01:24:05)
- new Expecter("separate/20170529_102318A.jpg", true),
- new Expecter("separate/20170529_102322A.jpg", true),
- new Expecter("separate/20170529_102405A.jpg", true),
+ new Expecter("separate/20170529_102318A.jpg", true, "2017:05:29 01:23:18",true),
+ new Expecter("separate/20170529_102322A.jpg", true, "2017:05:29 01:23:22",true),
+ new Expecter("separate/20170529_102405A.jpg", true, "2017:05:29 01:24:04",true),
// out of time (2017-05-29T01:24:05 - 2017-05-29T01:24:37)
- new Expecter("separate/20170529_102409A.jpg", false),
- new Expecter("separate/20170529_102418A.jpg", false),
+ new Expecter("separate/20170529_102409A.jpg", false, null, false),
+ new Expecter("separate/20170529_102418A.jpg", false, null, false),
// in TRKSEG(2) (2017-05-29T01:24:37 - 2017-05-29T01:33:03)
- new Expecter("separate/20170529_102448A.jpg", true),
- new Expecter("separate/20170529_103246A.jpg", true),
+ new Expecter("separate/20170529_102448A.jpg", true, "2017:05:29 01:24:48",true),
+ new Expecter("separate/20170529_103246A.jpg", true, "2017:05:29 01:32:46",true),
// out of time (2017-05-29T01:33:03 - 2017-05-29T01:35:53)
- new Expecter("separate/20170529_103315A.jpg", false),
- new Expecter("separate/20170529_103545A.jpg", false),
+ new Expecter("separate/20170529_103315A.jpg", false, null, false),
+ new Expecter("separate/20170529_103545A.jpg", false, null, false),
// in TRKSEG(3) (2017-05-29T01:35:53 - 2017-05-29T01:47:35)
- new Expecter("separate/20170529_102448A.jpg", true),
- new Expecter("separate/20170529_103246A.jpg", true),
+ new Expecter("separate/20170529_103615A.jpg", true, "2017:05:29 01:36:14",true),
+ new Expecter("separate/20170529_104119A.jpg", true, "2017:05:29 01:41:18",true),
}),
new Fixture(
@@ -529,32 +538,32 @@
"testdata/AdjustTime.M2d.separate.ini",
new Expecter[] {
// GPX file
- new Expecter("separate/separate_.gpx", true),
+ new Expecter("separate/separate_.gpx", true, null, true),
// out of time ( - 2017-05-29T01:23:18)
- new Expecter("separate/20170529_102305A.jpg", true),
- new Expecter("separate/20170529_102314A.jpg", true),
+ new Expecter("separate/20170529_102305A.jpg", true, "2017:05:29 01:23:06", true),
+ new Expecter("separate/20170529_102314A.jpg", true, "2017:05:29 01:23:14", true),
// in TRKSEG(1) (2017-05-29T01:23:18 - 2017-05-29T01:24:05)
- new Expecter("separate/20170529_102318A.jpg", true),
- new Expecter("separate/20170529_102322A.jpg", true),
- new Expecter("separate/20170529_102405A.jpg", true),
+ new Expecter("separate/20170529_102318A.jpg", true, "2017:05:29 01:23:18",true),
+ new Expecter("separate/20170529_102322A.jpg", true, "2017:05:29 01:23:22",true),
+ new Expecter("separate/20170529_102405A.jpg", true, "2017:05:29 01:24:04",true),
// out of time (2017-05-29T01:24:05 - 2017-05-29T01:24:37)
- new Expecter("separate/20170529_102409A.jpg", true),
- new Expecter("separate/20170529_102418A.jpg", true),
+ new Expecter("separate/20170529_102409A.jpg", true, "2017:05:29 01:24:10",true),
+ new Expecter("separate/20170529_102418A.jpg", true, "2017:05:29 01:24:18",true),
// in TRKSEG(2) (2017-05-29T01:24:37 - 2017-05-29T01:33:03)
- new Expecter("separate/20170529_102448A.jpg", true),
- new Expecter("separate/20170529_103246A.jpg", true),
+ new Expecter("separate/20170529_102448A.jpg", true, "2017:05:29 01:24:48",true),
+ new Expecter("separate/20170529_103246A.jpg", true, "2017:05:29 01:32:46",true),
// out of time (2017-05-29T01:33:03 - 2017-05-29T01:35:53)
- new Expecter("separate/20170529_103315A.jpg", true),
- new Expecter("separate/20170529_103545A.jpg", true),
+ new Expecter("separate/20170529_103315A.jpg", true, "2017:05:29 01:33:14",true),
+ new Expecter("separate/20170529_103545A.jpg", true, "2017:05:29 01:35:44",true),
// in TRKSEG(3) (2017-05-29T01:35:53 - 2017-05-29T01:47:35)
- new Expecter("separate/20170529_102448A.jpg", true),
- new Expecter("separate/20170529_103246A.jpg", true),
+ new Expecter("separate/20170529_103615A.jpg", true, "2017:05:29 01:36:14",true),
+ new Expecter("separate/20170529_104119A.jpg", true, "2017:05:29 01:41:18",true),
}),
};
@@ -563,6 +572,7 @@
public void パラメータテスト(Fixture dataset) throws Exception {
ImportPictureTest.setup(dataset);
ImportPictureTest.testdo(dataset.iniFilePath);
+ //SimpleDateFormat format = new SimpleDateFormat("yyyy:MM:dd HH:mm:ss", Locale.UK);
Expecter[] es = dataset.expecters;
AppParameters params = new AppParameters(dataset.iniFilePath);
@@ -571,6 +581,25 @@
File file = new File(outDir, es[i].value);
System.out.println("[JUnit.debug] assert file='"+ file.getAbsolutePath() +"'");
assertThat(file.exists(), is(es[i].expect));
+ if (es[i].timeStr != null) {
+ // JPEG メタデータが存在すること
+ ImageMetadata meta = Imaging.getMetadata(file);
+
+ // メタデータは インスタンスJpegImageMetadata であること
+ assertThat((meta instanceof JpegImageMetadata), is(true));
+
+ JpegImageMetadata jpegMetadata = (JpegImageMetadata)meta;
+ assertNotNull(jpegMetadata);
+
+ // EXIFデータが存在すること
+ TiffImageMetadata exif = jpegMetadata.getExif();
+ assertNotNull(exif);
+
+ // EXIF-TIME が正しく設定されていること
+ String exifTime = ImportPicture.toEXIFString(ImportPicture.toEXIFDate(exif.getFieldValue(ExifTagConstants.EXIF_TAG_DATE_TIME_ORIGINAL)[0]));
+ System.out.println("[debug] exifTime = '"+ exifTime +"'");
+ assertThat(exifTime, is(es[i].timeStr));
+ }
}
}