* relative file path
* @param state
* file state
+ * @param processing
+ * processing instruction: file-download or file-import
+ * @param isResult
+ * true if the file is result
*/
- public FileDTO(final String relativePath, final char state) {
+ public FileDTO(final String relativePath, final char state,
+ final String processing, final boolean isResult) {
_path = relativePath;
_state = state;
+ _processing = processing;
+ _isResult = isResult;
}
/**
public void setPath(final String path) {
_path = path;
}
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString() {
+ StringBuffer buf = new StringBuffer();
+ String indent = " ";
+ String ftype = "Source";
+ if (isResult()) {
+ ftype = "Result";
+ }
+ String fstate = "file-actual";
+ if (getState() == 'O') {
+ fstate = "file-outdated";
+ }
+ buf.append(indent).append(ftype).append(" file: ").append(getPath())
+ .append('\n').append(indent).append(
+ " Automatic processing: ").append(getProcessing())
+ .append('\n').append(indent).append(" State: ").append(
+ fstate).append('\n');
+ return buf.toString();
+ }
}