Skip to content

Commit

Permalink
Merge branch 'test' into develop
Browse files Browse the repository at this point in the history
Conflicts:
	src/test/java/dpfmanager/commandline/CommandLineTest.java
	src/test/java/dpfmanager/commandline/IsosTest.java
	src/test/java/dpfmanager/commandline/QuickCheckCmdTest.java
	src/test/java/dpfmanager/gui/ApplicationTest.java
	src/test/java/dpfmanager/gui/FileCheckFormatsTest.java
	src/test/java/dpfmanager/gui/FileCheckTransformsTest.java
	src/test/java/dpfmanager/gui/JobsTest.java
	src/test/java/dpfmanager/gui/MultiFileCheckTest.java
	src/test/java/dpfmanager/gui/OldReportsCompatibleTest.java
	src/test/java/dpfmanager/gui/QuickCheckTest.java
	src/test/java/dpfmanager/gui/RecursiveTest.java
	src/test/java/dpfmanager/gui/ReportParserTest.java
	src/test/resources/OldReports/xml/2-IMG_KO_resolution.tif.xml
  • Loading branch information
victormunoz committed Jul 28, 2017
2 parents c556744 + f91a2f2 commit de25f0e
Show file tree
Hide file tree
Showing 139 changed files with 18,904 additions and 1,114 deletions.
15 changes: 13 additions & 2 deletions package/resources/Baseline HTML.dpf
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
ISO Baseline
FORMAT HTML
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<configuration>
<version>3</version>
<isos>
<iso>TIFF_Baseline_Core_6_0</iso>
</isos>
<formats>
<format>HTML</format>
</formats>
<modified-isos/>
<rules/>
<fixes/>
</configuration>
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>com.easyinnova</groupId>
<artifactId>dpf_manager</artifactId>
<packaging>jar</packaging>
<version>3.4</version>
<version>3.5</version>

<!--Properties-->
<properties>
Expand Down Expand Up @@ -227,19 +227,19 @@
<dependency>
<groupId>com.easyinnova</groupId>
<artifactId>tifflibrary4java</artifactId>
<version>1.9.2</version>
<version>1.9.6</version>
</dependency>

<dependency>
<groupId>com.easyinnova</groupId>
<artifactId>tiffimplementationchecker</artifactId>
<version>1.2.2</version>
<version>1.2.6</version>
</dependency>

<dependency>
<groupId>com.easyinnova</groupId>
<artifactId>tiffpolicychecker</artifactId>
<version>1.1</version>
<version>1.1.4</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@
})
@XmlRootElement(name = "configuration")
public class Configuration implements Serializable {

/**
* Do not modify!
*/
private static final long serialVersionUID = -1010943725602839341L;

private ArrayList<String> isos;
private Map<String, ArrayList<String>> modifiedIsos;
private Rules rules;
Expand Down Expand Up @@ -125,6 +131,23 @@ public Configuration(Rules rules, Fixes fixes, ArrayList<String> formats) {
modifiedIsos = new HashMap<>();
}

/**
* Instantiates a new clone Configuration.
*/
public Configuration(Configuration c) {
this.isos = new ArrayList<>(c.isos);
this.modifiedIsos = new HashMap<>(c.modifiedIsos);
this.rules = c.rules;
this.formats = new ArrayList<>(c.formats);
this.fixes = c.fixes;
this.output = c.output;
this.description = c.description;
this.version = c.version;
this.quick = c.quick;
this.bundle = c.bundle;
this.isDefault = c.isDefault;
}

/**
* Set the default values for a new configuration
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ private Map<String, ValidationResult> getValidationResults(TiffReader tr, Config

@Override
public Configuration getDefaultConfiguration() {
return checkConfig;
return new Configuration(checkConfig);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ private String generateTagsDivs(IndividualReport ir) {
row = row.replace("##LINE##", "");
}
row = row.replace("##ATTR##", key);
row = row.replace("##VALUE##", value);
row = row.replace("##VALUE##", value.replaceAll("<!--", "").replaceAll("-->", ""));
String rows = tagsMap.containsKey(mapIdH) ? tagsMap.get(mapIdH) : "";
tagsMap.put(mapIdH, rows + row);
}
Expand Down Expand Up @@ -568,7 +568,7 @@ private String generateTagsDivs(IndividualReport ir) {
row = row.replace("##ICON##", "<i class=\"image-default icon-" + tv.getName().toLowerCase() + "\"></i>");
row = row.replace("##ID##", tv.getId() + "");
row = row.replace("##KEY##", (tv.getName().equals(tv.getId() + "") ? "Private tag" : tv.getName()));
row = row.replace("##VALUE##", tv.getFirstTextReadValue());
row = row.replace("##VALUE##", tv.getFirstTextReadValue().replaceAll("<!--", "").replaceAll("-->", ""));
String rows = tagsMap.containsKey(mapId) ? tagsMap.get(mapId) : "";
tagsMap.put(mapId, rows + row);
}
Expand Down Expand Up @@ -617,7 +617,7 @@ else if (tag.dif > 0) {
String val = (tag.isDefault) ? tag.defaultValue : tag.tv.getFirstTextReadValue();
if (val.length() > 200)
val = val.substring(0, 200) + "...";
row = row.replace("##VALUE##", val);
row = row.replace("##VALUE##", val.replaceAll("<!--", "").replaceAll("-->", ""));
String rows = tagsMap.containsKey(mapId) ? tagsMap.get(mapId) : "";
tagsMap.put(mapId, rows + row);
}
Expand All @@ -626,13 +626,7 @@ else if (tag.dif > 0) {
* Generate divs
*/
String finalResult = "";
String expertCheckTmpl = "<input type=\"checkbox\" id=\"checkSelected##INDEX##\" onchange=\"filterChanged('##INDEX##')\">" +
"<label for=\"checkSelected##INDEX##\"><span></span> Expert mode</label>";
String defaultCheckTmpl = "<input type=\"checkbox\" id=\"defaultSelected##INDEX##\" onchange=\"filterChanged('##INDEX##')\">" +
"<label for=\"defaultSelected##INDEX##\" style=\"margin-left: 10px;\"><span></span> Default values</label>";
String checkBoxTmpl = "<div class=\"clexpert\">##CHECK_EXPERT####CHECK_DEFAULT##</div>";
String genTmpl = "<div id=\"div##INDEX##\" class=\"tags-divs col-md-8\" style='display: ##DISPLAY##'>\n" +
"\t\t\t\t\t##CHECKBOXS##\n" +
String genTmpl = "<div id=\"div##INDEX##\" class=\"tags-divs\" style='display: ##DISPLAY##'>\n" +
"\t\t\t\t\t<h4 class='bold'><i class=\"fa fa-tags\"></i> ##TITLE##</h4>\n" +
"\t\t\t\t\t<table class=\"CustomTable3\">\n" +
"\t\t\t\t <tr>\n" +
Expand All @@ -647,8 +641,7 @@ else if (tag.dif > 0) {
String subTmpl = StringUtils.replace(genTmpl, "##TITLE##", "Sub IFD Tags");
String ifdTmpl = StringUtils.replace(genTmpl, "##TITLE##", "IFD Tags");
String exifTmpl = StringUtils.replace(genTmpl, "##TITLE##", "EXIF");
String iptcTmpl = "<div id=\"div##INDEX##\" class=\"tags-divs col-md-8\" style='display: ##DISPLAY##'>\n" +
"\t\t\t\t\t##CHECKBOXS##\n" +
String iptcTmpl = "<div id=\"div##INDEX##\" class=\"tags-divs\" style='display: ##DISPLAY##'>\n" +
"\t\t\t\t\t<h4 class='bold'><i class=\"fa fa-tags\"></i> IPTC</h4>\n" +
"\t\t\t\t\t<table class=\"CustomTable3\">\n" +
"\t\t\t\t <tr>\n" +
Expand All @@ -658,8 +651,7 @@ else if (tag.dif > 0) {
"\t\t\t\t ##ROWS##\n" +
"\t\t\t\t\t</table>\n" +
"\t\t\t\t</div>";
String xmpTmpl = "<div id=\"div##INDEX##\" class=\"tags-divs col-md-8\" style='display: ##DISPLAY##'>\n" +
"\t\t\t\t\t##CHECKBOXS##\n" +
String xmpTmpl = "<div id=\"div##INDEX##\" class=\"tags-divs\" style='display: ##DISPLAY##'>\n" +
"\t\t\t\t\t<h4 class='bold'><i class=\"fa fa-tags\"></i> XMP</h4>\n" +
"\t\t\t\t\t<table class=\"CustomTable3\">\n" +
"\t\t\t\t <tr>\n" +
Expand Down Expand Up @@ -692,16 +684,9 @@ else if (tag.dif > 0) {
for (String key : tagsMap.keySet()) {
if (key.endsWith("h")) continue;
String type = key.substring(0, 3);
String display = "none;", checkBoxs = "";
String display = "none;";
if (key.equals("ifd0")) display = "block;";
String expert = (hasExpert.containsKey(key)) ? expertCheckTmpl : "";
String defaultCheck = (hasDefault.containsKey(key)) ? defaultCheckTmpl : "";
if (expert.length() > 0 || defaultCheck.length() > 0) {
checkBoxs = StringUtils.replace(checkBoxTmpl, "##CHECK_EXPERT##", expert);
checkBoxs = StringUtils.replace(checkBoxs, "##CHECK_DEFAULT##", defaultCheck);
}
String tmpl = templates.get(type);
tmpl = StringUtils.replace(tmpl, "##CHECKBOXS##", checkBoxs);
tmpl = StringUtils.replace(tmpl, "##INDEX##", key);
tmpl = StringUtils.replace(tmpl, "##DISPLAY##", display);
if (key.startsWith("ipt")) {
Expand Down
Loading

0 comments on commit de25f0e

Please sign in to comment.