Salome HOME
Processing instruction is defined now in getScenarioInfo using document types mappings.
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / service / dto / DocumentDTO.java
index 6838cd5a3ef2111ae577a265f5f31b924b638acf..c7fbda68aeedcd3b28c728e899d11f839e5ac6ff 100644 (file)
@@ -97,11 +97,34 @@ public class DocumentDTO {
         *            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 String relativePath, final char state,
+                       final String processing, final boolean isResult) {
+               FileDTO fileDTO = new FileDTO(relativePath, state, processing, isResult);
                _files.add(fileDTO);
                return fileDTO;
        }
+
+       /**
+        * {@inheritDoc}
+        * 
+        * @see java.lang.Object#toString()
+        */
+       @Override
+       public String toString() {
+               StringBuffer buf = new StringBuffer();
+               String indent = "    ";
+               buf.append(indent).append("Document: ").append(getTitle()).append('\n')
+                               .append(indent).append("Document ID: ").append(getId()).append(
+                                               '\n');
+               for (FileDTO file : getFiles()) {
+                       buf.append(file);
+               }
+               return buf.toString();
+       }
 }