1 package org.kuali.ole.describe.form;
2
3 import org.kuali.ole.docstore.common.document.content.instance.*;
4 import org.kuali.ole.describe.bo.InstanceRecordMetaData;
5 import org.kuali.ole.describe.bo.SourceEditorForUI;
6 import org.kuali.rice.core.api.util.tree.Tree;
7 import org.kuali.rice.krad.web.form.UifFormBase;
8
9 import java.util.List;
10
11
12
13
14 public class InstanceEditorForm extends UifFormBase {
15
16 private List<Instance> oleInstanceList;
17
18 private Instance instance;
19
20 private InstanceRecordMetaData itemRecordMetaData = new InstanceRecordMetaData();
21
22 private InstanceRecordMetaData holdingRecordMetaData = new InstanceRecordMetaData();
23
24 private String uuid;
25
26 private Tree<String, String> instanceHierarchy = new Tree<String, String>();
27
28 private String existing = "false";
29
30 private String message;
31
32 private String selectedItemId;
33
34 private String treeData;
35
36 private String hdnUuid;
37
38 private int hdnIndex = 0;
39
40 private OleHoldings selectedHolding;
41
42 private SourceEditorForUI selectedSourceHolding;
43
44 private Item selectedItem;
45
46 private String hdnAddItemUUID;
47
48 private int instanceIndex;
49
50 private String selectedDocType;
51
52 private String deleteItemId;
53
54 public String getDeleteItemId() {
55 return deleteItemId;
56 }
57
58 public void setDeleteItemId(String deleteItemId) {
59 this.deleteItemId = deleteItemId;
60 }
61
62 public InstanceEditorForm() {
63 getSelectedHolding().getUri().add(new Uri());
64 getSelectedHolding().getNote().add(new Note());
65 getSelectedHolding().getExtentOfOwnership().add(new ExtentOfOwnership());
66 getSelectedHolding().getExtentOfOwnership().get(0).getNote().add(new Note());
67 }
68
69 public String getTreeData() {
70 return treeData;
71 }
72
73 public void setTreeData(String treeData) {
74 this.treeData = treeData;
75 }
76
77 public String getSelectedItemId() {
78 return selectedItemId;
79 }
80
81 public void setSelectedItemId(String selectedItemId) {
82 this.selectedItemId = selectedItemId;
83 }
84
85 public Instance getInstance() {
86 return instance;
87 }
88
89 public void setInstance(Instance instance) {
90 this.instance = instance;
91 }
92
93 public InstanceRecordMetaData getItemRecordMetaData() {
94 return itemRecordMetaData;
95 }
96
97 public void setItemRecordMetaData(InstanceRecordMetaData itemRecordMetaData) {
98 this.itemRecordMetaData = itemRecordMetaData;
99 }
100
101 public InstanceRecordMetaData getHoldingRecordMetaData() {
102 return holdingRecordMetaData;
103 }
104
105 public void setHoldingRecordMetaData(InstanceRecordMetaData holdingRecordMetaData) {
106 this.holdingRecordMetaData = holdingRecordMetaData;
107 }
108
109 public String getUuid() {
110 return uuid;
111 }
112
113 public void setUuid(String uuid) {
114 this.uuid = uuid;
115 }
116
117 public Tree<String, String> getInstanceHierarchy() {
118 return instanceHierarchy;
119 }
120
121 public void setInstanceHierarchy(Tree<String, String> instanceHierarchy) {
122 this.instanceHierarchy = instanceHierarchy;
123 }
124
125 public String getExisting() {
126 return existing;
127 }
128
129 public void setExisting(String existing) {
130 this.existing = existing;
131 }
132
133 public String getMessage() {
134 return message;
135 }
136
137 public void setMessage(String message) {
138 this.message = message;
139 }
140
141 public String getHdnUuid() {
142 return hdnUuid;
143 }
144
145 public void setHdnUuid(String hdnUuid) {
146 this.hdnUuid = hdnUuid;
147 }
148
149 public int getHdnIndex() {
150 return hdnIndex;
151 }
152
153 public void setHdnIndex(int hdnIndex) {
154 this.hdnIndex = hdnIndex;
155 }
156
157 public Item getSelectedItem() {
158 return selectedItem;
159 }
160
161 public void setSelectedItem(Item selectedItem) {
162 this.selectedItem = selectedItem;
163 }
164
165 public List<Instance> getOleInstanceList() {
166 return oleInstanceList;
167 }
168
169 public void setOleInstanceList(List<Instance> oleInstanceList) {
170 this.oleInstanceList = oleInstanceList;
171 }
172
173 public String getHdnAddItemUUID() {
174 return hdnAddItemUUID;
175 }
176
177 public void setHdnAddItemUUID(String hdnAddItemUUID) {
178 this.hdnAddItemUUID = hdnAddItemUUID;
179 }
180
181 public int getInstanceIndex() {
182 return instanceIndex;
183 }
184
185 public void setInstanceIndex(int instanceIndex) {
186 this.instanceIndex = instanceIndex;
187 }
188
189 public OleHoldings getSelectedHolding() {
190 if (null == selectedHolding) {
191 selectedHolding = new OleHoldings();
192 }
193 return selectedHolding;
194 }
195
196 public void setSelectedHolding(OleHoldings selectedHolding) {
197 this.selectedHolding = selectedHolding;
198 }
199
200 public String getSelectedDocType() {
201 return selectedDocType;
202 }
203
204 public void setSelectedDocType(String selectedDocType) {
205 this.selectedDocType = selectedDocType;
206 }
207
208 public SourceEditorForUI getSelectedSourceHolding() {
209 return selectedSourceHolding;
210 }
211
212 public void setSelectedSourceHolding(SourceEditorForUI selectedSourceHolding) {
213 this.selectedSourceHolding = selectedSourceHolding;
214 }
215 }