1 /*****************************************************************************
5 * Creation date 14.11.2012
8 * @copyright OPEN CASCADE 2012-2015
9 *****************************************************************************/
11 package org.splat.service.dto;
13 import java.util.ArrayList;
14 import java.util.List;
17 * Study activity (step) DTO. This is a container of step documents.
19 public class StepDTO {
21 * The step's key name.
25 * The sequential number of the step.
29 * Executable module for this step.
31 private String _module;
33 * Documents of the step.
35 private List<DocumentDTO> _docs = new ArrayList<DocumentDTO>();
42 public List<DocumentDTO> getDocs() {
52 public void setDocs(final List<DocumentDTO> docs) {
57 * Add a document DTO to the step DTO.
60 * the document persistent id
63 * @return the added document DTO
65 public DocumentDTO addDoc(final long index, final String title) {
66 DocumentDTO doc = new DocumentDTO(index, title);
72 * Add a document DTO to the step DTO.
75 * the document to be added
77 public void addDoc(final DocumentDTO document) {
86 public String getKey() {
96 public void setKey(final String key) {
105 public Integer getNumber() {
115 public void setNumber(final int number) {
124 public String getModule() {
134 public void setModule(final String module) {
141 * @see java.lang.Object#toString()
144 public String toString() {
145 StringBuffer buf = new StringBuffer();
146 buf.append("Activity ID: " + getNumber() + "\nSALOME module: "
147 + getModule() + "\n");
148 for (DocumentDTO doc : getDocs()) {
151 return buf.toString();