* Creation date 14.11.2012
* @author $Author$
* @version $Revision$
- * @copyright OPEN CASCADE 2012
+ * @copyright OPEN CASCADE 2012-2014
*****************************************************************************/
package org.splat.service.dto;
_id = index;
_title = title;
}
+
+ /**
+ * Default constructor.
+ */
+ public DocumentDTO() {
+ // The empty constructor
+ }
/**
* Get the files.
/**
* Add a new file DTO.
*
+ * @param id
+ * file persistent id
* @param relativePath
* relative file path
* @param state
* file state
+ * @param processing
+ * processing instruction: file-download or file-import
+ * @param isResult
+ * true if the file is result
* @return the added file DTO
*/
- public FileDTO addFile(final String relativePath, final char state) {
- FileDTO fileDTO = new FileDTO(relativePath, state);
+ public FileDTO addFile(final long id, final String relativePath, final char state,
+ final String processing, final boolean isResult) {
+ FileDTO fileDTO = new FileDTO(id, relativePath, state, processing, isResult);
_files.add(fileDTO);
return fileDTO;
}
+
+ /**
+ * Add a new file DTO.
+ * @param file the file to be added.
+ **/
+ public void addFile(final FileDTO file) {
+ _files.add(file);
+ }
/**
* {@inheritDoc}
StringBuffer buf = new StringBuffer();
String indent = " ";
buf.append(indent).append("Document: ").append(getTitle()).append('\n')
- .append(indent).append(" Document ID: ").append(getId())
- .append('\n');
+ .append(indent).append("Document ID: ").append(getId()).append(
+ '\n');
for (FileDTO file : getFiles()) {
buf.append(file);
}