Debugging aid.
This commit is contained in:
parent
70c928b703
commit
83b02293af
2 changed files with 13 additions and 0 deletions
|
|
@ -8,6 +8,8 @@ package org.forkalsrud.album.exif;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
|
import org.apache.commons.lang.builder.ToStringBuilder;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents one item inside the album, typically file or directory, aka photo or album
|
* Represents one item inside the album, typically file or directory, aka photo or album
|
||||||
|
|
@ -125,4 +127,11 @@ public abstract class Entry {
|
||||||
public boolean groupByYear() {
|
public boolean groupByYear() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return ToStringBuilder.reflectionToString(this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -387,6 +387,7 @@ public class AlbumServlet
|
||||||
out.println(" \"contents\": [");
|
out.println(" \"contents\": [");
|
||||||
int n = 0;
|
int n = 0;
|
||||||
for (Entry e : entry.getContents()) {
|
for (Entry e : entry.getContents()) {
|
||||||
|
try {
|
||||||
if (n++ > 0) out.println(",");
|
if (n++ > 0) out.println(",");
|
||||||
out.println(" {");
|
out.println(" {");
|
||||||
out.println(" \"name\": " + jsStr(e.getName()) + ",");
|
out.println(" \"name\": " + jsStr(e.getName()) + ",");
|
||||||
|
|
@ -397,6 +398,9 @@ public class AlbumServlet
|
||||||
out.println(" \"height\": " + e.getThumbnail().getSize().getHeight() + ",");
|
out.println(" \"height\": " + e.getThumbnail().getSize().getHeight() + ",");
|
||||||
out.println(" \"caption\": " + jsStr(e.getCaption()));
|
out.println(" \"caption\": " + jsStr(e.getCaption()));
|
||||||
out.print(" }");
|
out.print(" }");
|
||||||
|
} catch (Exception ex) {
|
||||||
|
throw new Exception(e.toString(), ex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
out.println();
|
out.println();
|
||||||
out.println(" ]");
|
out.println(" ]");
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue