Skip to content

Commit

Permalink
Fixed METS bugs. Updated version in POM
Browse files Browse the repository at this point in the history
  • Loading branch information
victormunoz committed Aug 30, 2016
1 parent d331176 commit 710323e
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 47 deletions.
1 change: 0 additions & 1 deletion dpf_manager.iml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
<orderEntry type="library" name="Maven: org.slf4j:slf4j-log4j12:1.6.1" level="project" />
<orderEntry type="library" name="Maven: log4j:log4j:1.2.16" level="project" />
<orderEntry type="library" name="Maven: com.easyinnova:tifflibrary4java:1.2.11" level="project" />
<orderEntry type="library" name="Maven: com.easyinnova:tifflibrary4java:1.5.2" level="project" />
<orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
<orderEntry type="library" name="Maven: com.github.jai-imageio:jai-imageio-core:1.3.0" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.5" level="project" />
Expand Down
2 changes: 1 addition & 1 deletion package/linux/DPFManager.old.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Summary: DPF Manager
Name: dpf-manager
Version: 2.3
Version: 2.5
Release: 1
License: Unknown
Vendor: DPF Manager
Expand Down
2 changes: 1 addition & 1 deletion package/windows/DPF Manager.iss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{0D5B5F16-9992-49DC-AD65-D66FE249CE67}
AppName=DPF Manager
AppVersion=2.3
AppVersion=2.5
AppVerName=DPF Manager {#SetupSetting("AppVersion")}
AppPublisher=DPF Manager
AppComments=DPF Manager
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<groupId>com.easyinnova</groupId>
<artifactId>dpf_manager</artifactId>
<packaging>jar</packaging>
<version>2.4</version>
<version>2.5</version>

<!--Properties-->
<properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -352,16 +352,18 @@ public String parseIndividual(IndividualReport ir, int mode, int id) {
rows += row;
}
int nh = 1;
for (Hashtable<String, String> kv : xmp.getHistory()) {
for (String key : kv.keySet()) {
row = "<tr class='xmp xmp" + (tag.index + 1) + "'><td>##ICON##</td><td>##ID##</td><td>##KEY##</td><td>##VALUE##</td></tr>";
row = row.replace("##ICON##", "<i class=\"icon-xmphist\"></i>");
row = row.replace("##ID##", nh + "");
row = row.replace("##KEY##", key);
row = row.replace("##VALUE##", kv.get(key).toString().trim());
rows += row;
if (xmp.getHistory() != null) {
for (Hashtable<String, String> kv : xmp.getHistory()) {
for (String key : kv.keySet()) {
row = "<tr class='xmp xmp" + (tag.index + 1) + "'><td>##ICON##</td><td>##ID##</td><td>##KEY##</td><td>##VALUE##</td></tr>";
row = row.replace("##ICON##", "<i class=\"icon-xmphist\"></i>");
row = row.replace("##ID##", nh + "");
row = row.replace("##KEY##", key);
row = row.replace("##VALUE##", kv.get(key).toString().trim());
rows += row;
}
nh++;
}
nh++;
}
} catch (Exception ex) {
ex.printStackTrace();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
* &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
* &lt;enumeration value="normal*"/>
* &lt;enumeration value="normal, image flipped"/>
* &lt;enumeration value="normal, rotated 180°"/>
* &lt;enumeration value="normal, image flipped, rotated 180°"/>
* &lt;enumeration value="normal, image flipped, rotated cw 90°"/>
* &lt;enumeration value="normal, rotated ccw 90°"/>
* &lt;enumeration value="normal, image flipped, rotated ccw 90°"/>
* &lt;enumeration value="normal, rotated cw 90°"/>
* &lt;enumeration value="normal, rotated 180"/>
* &lt;enumeration value="normal, image flipped, rotated 180"/>
* &lt;enumeration value="normal, image flipped, rotated cw 90"/>
* &lt;enumeration value="normal, rotated ccw 90"/>
* &lt;enumeration value="normal, image flipped, rotated ccw 90"/>
* &lt;enumeration value="normal, rotated cw 90"/>
* &lt;enumeration value="unknown"/>
* &lt;/restriction>
* &lt;/simpleType>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1129,34 +1129,36 @@ private MdSecType.MdWrap constructTechMdWrap (IndividualReport ir){
ChangeHistoryType changeHistoryType = new ChangeHistoryType();
XMP xmp = (XMP)ifd.getTag("XMP").getValue().get(0);
List<Hashtable<String,String>> xmpHistoryList = xmp.getHistory();
Iterator<Hashtable<String,String>> iteratorXmpHistory = xmpHistoryList.iterator();
while(iteratorXmpHistory.hasNext()){
ChangeHistoryType.ImageProcessing imageProcessing = new ChangeHistoryType.ImageProcessing();
Hashtable<String,String> xmpHistory = iteratorXmpHistory.next();
if(xmpHistory.containsKey("when")){
TypeOfDateType dateType = new TypeOfDateType();
dateType.setUse("Manager");
dateType.setValue(xmpHistory.get("when"));
imageProcessing.setDateTimeProcessed(dateType);
if (xmpHistoryList != null) {
Iterator<Hashtable<String, String>> iteratorXmpHistory = xmpHistoryList.iterator();
while (iteratorXmpHistory.hasNext()) {
ChangeHistoryType.ImageProcessing imageProcessing = new ChangeHistoryType.ImageProcessing();
Hashtable<String, String> xmpHistory = iteratorXmpHistory.next();
if (xmpHistory.containsKey("when")) {
TypeOfDateType dateType = new TypeOfDateType();
dateType.setUse("Manager");
dateType.setValue(xmpHistory.get("when"));
imageProcessing.setDateTimeProcessed(dateType);
}
if (xmpHistory.containsKey("softwareAgent")) {
ChangeHistoryType.ImageProcessing.ProcessingSoftware processingSoftware = new ChangeHistoryType.ImageProcessing.ProcessingSoftware();
StringType softwareName = new StringType();
softwareName.setUse("Manager");
softwareName.setValue(xmpHistory.get("softwareAgent"));
processingSoftware.setProcessingSoftwareName(softwareName);
imageProcessing.setProcessingSoftware(processingSoftware);
}
if (xmpHistory.containsKey("action")) {
StringType action = new StringType();
action.setUse("Manager");
action.setValue(xmpHistory.get("action"));
imageProcessing.setProcessingActions(action);
}

changeHistoryType.setImageProcessing(imageProcessing);
}
if(xmpHistory.containsKey("softwareAgent")){
ChangeHistoryType.ImageProcessing.ProcessingSoftware processingSoftware = new ChangeHistoryType.ImageProcessing.ProcessingSoftware();
StringType softwareName = new StringType();
softwareName.setUse("Manager");
softwareName.setValue(xmpHistory.get("softwareAgent"));
processingSoftware.setProcessingSoftwareName(softwareName);
imageProcessing.setProcessingSoftware(processingSoftware);
}
if(xmpHistory.containsKey("action")){
StringType action = new StringType();
action.setUse("Manager");
action.setValue(xmpHistory.get("action"));
imageProcessing.setProcessingActions(action);
}

changeHistoryType.setImageProcessing(imageProcessing);
mix.setChangeHistory(changeHistoryType);
}
mix.setChangeHistory(changeHistoryType);
}


Expand Down Expand Up @@ -1443,7 +1445,7 @@ public String parseIndividual(IndividualReport ir, Configuration config) {
JAXBContext context = JAXBContext.newInstance(Mets.class);

Marshaller m = context.createMarshaller();
//for pretty-print XML in JAXB
//for pretty-print XML in JAXB
m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
StringWriter sw = new StringWriter();
m.marshal(mets, sw);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ public void fullTestPeriodicalCheck() throws Exception {
Integer lastCount = getPeriodicalChecksCount(argsList);
Assert.assertEquals(beforeCount, lastCount);


// Put things back
System.out.flush();
System.setOut(old);
Expand Down

0 comments on commit 710323e

Please sign in to comment.