Mercurial > hg > ismi-richfaces
annotate src/main/java/de/mpiwg/itgroup/ismi/browse/AbstractEntityRepositoryBean.java @ 81:0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
author | casties |
---|---|
date | Mon, 29 Aug 2016 20:18:04 +0200 |
parents | 20c76ff72cf2 |
children | 03dcbaf8b8cf |
rev | line source |
---|---|
1 | 1 package de.mpiwg.itgroup.ismi.browse; |
2 | |
3 import java.util.ArrayList; | |
4 import java.util.Collections; | |
5 import java.util.HashMap; | |
6 import java.util.List; | |
7 import java.util.Map; | |
8 | |
9 import javax.faces.event.ActionEvent; | |
10 import javax.faces.event.ValueChangeEvent; | |
11 import javax.faces.model.SelectItem; | |
12 | |
13 import org.apache.commons.lang.StringUtils; | |
14 import org.apache.log4j.Logger; | |
15 import org.mpi.openmind.repository.bo.Attribute; | |
16 import org.mpi.openmind.repository.bo.Entity; | |
17 import org.mpi.openmind.repository.services.utils.AttributeFilter; | |
18 | |
19 import de.mpiwg.itgroup.ismi.util.guiComponents.DataPaginator; | |
20 | |
21 public class AbstractEntityRepositoryBean extends AbstractBrowse { | |
22 | |
23 private static final long serialVersionUID = 3154642100627969159L; | |
24 | |
25 private static Logger logger = Logger.getLogger(AbstractEntityRepositoryBean.class); | |
26 | |
27 public static String MODE_ADVANCED = "advanced"; | |
28 public static String MODE_ALL = "all"; | |
29 public static String MODE_NONE = "none"; | |
30 | |
31 | |
32 private String objectClass = null; | |
33 private List<Entity> entities = new ArrayList<Entity>(); | |
34 private List<Entity> currentEntities = new ArrayList<Entity>(); | |
35 | |
36 private List<SelectItem> definitions = new ArrayList<SelectItem>(); | |
37 | |
38 private transient DataPaginator advancedPaginator = new DataPaginator(); | |
39 | |
40 private String ocTerm; | |
41 private String currentTab; | |
42 | |
43 private String textFullTitle; | |
44 private String textFullTitleTranslit; | |
45 private String textShortTitle; | |
46 | |
47 private String personName; | |
48 private String personNameTranslit; | |
49 | |
50 private String codexIdentifier; | |
51 | |
52 private String collectionName; | |
53 | |
54 private String placeName; | |
55 | |
56 private String aliasAlias; | |
57 | |
58 private String repositoryName; | |
59 | |
60 private String witnessFullTitle; | |
61 private String witnessFullTitleTranslit; | |
62 private String witnessAhlwardtNo; | |
63 | |
64 private boolean advancedSearch = false; | |
65 private String resultMode = MODE_NONE; | |
66 private String resultSummaryMsg; | |
67 | |
68 private String subjectType; | |
69 private List<SelectItem> suggestedSubjectTypes = new ArrayList<SelectItem>(); | |
81
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
70 |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
71 private String referenceBibIdNo; |
1 | 72 |
73 private String page; | |
74 private String pageMsg; | |
75 | |
76 public static String main_subject = "main_subject"; | |
77 public static String sub_subject = "sub_subject"; | |
78 | |
79 public AbstractEntityRepositoryBean(){ | |
80 suggestedSubjectTypes.add(new SelectItem(null, "-- choose --")); | |
81 suggestedSubjectTypes.add(new SelectItem(main_subject, main_subject)); | |
82 suggestedSubjectTypes.add(new SelectItem(sub_subject, sub_subject)); | |
83 this.updateDefinitions(getWrapper().getLWDefinitions()); | |
84 } | |
85 | |
86 private void updateAdvancedEntities() { | |
87 if (StringUtils.isNotEmpty(getObjectClass())) { | |
88 this.advancedPaginator.initCount(); | |
89 int startRecord = this.advancedPaginator.getCurrentPage() | |
90 * this.advancedPaginator.getItemsPerPage(); | |
91 if((this.advancedPaginator.getCurrentPage() + 1) == this.advancedPaginator.getNumberOfPages()){ | |
92 int mod = this.entities.size() % advancedPaginator.getItemsPerPage(); | |
93 if(mod == 0){ | |
94 this.currentEntities = entities.subList(startRecord, startRecord + this.advancedPaginator.getItemsPerPage()); | |
95 }else{ | |
96 this.currentEntities = entities.subList(startRecord, startRecord + mod); | |
97 } | |
98 | |
99 }else{ | |
100 this.currentEntities = entities.subList(startRecord, startRecord + this.advancedPaginator.getItemsPerPage()); | |
101 } | |
102 | |
103 } else | |
104 this.currentEntities = new ArrayList<Entity>(); | |
105 } | |
106 | |
107 public String advancedFirst() { | |
108 this.advancedPaginator.first(); | |
109 this.updateAdvancedEntities(); | |
110 return GOTO_ENTITY_REPOSITORY; | |
111 } | |
112 | |
113 public String advancedLast() { | |
114 this.advancedPaginator.last(); | |
115 this.updateAdvancedEntities(); | |
116 return GOTO_ENTITY_REPOSITORY; | |
117 } | |
118 | |
119 public String advancedFastForward() { | |
120 this.advancedPaginator.fastForward(); | |
121 this.updateAdvancedEntities(); | |
122 return GOTO_ENTITY_REPOSITORY; | |
123 } | |
124 | |
125 public String advancedFastRewind() { | |
126 this.advancedPaginator.fastRewind(); | |
127 this.updateAdvancedEntities(); | |
128 return GOTO_ENTITY_REPOSITORY; | |
129 } | |
130 | |
131 public String advancedPrevious() { | |
132 this.advancedPaginator.previous(); | |
133 this.updateAdvancedEntities(); | |
134 return GOTO_ENTITY_REPOSITORY; | |
135 } | |
136 | |
137 public String advancedNext() { | |
138 this.advancedPaginator.next(); | |
139 this.updateAdvancedEntities(); | |
140 return GOTO_ENTITY_REPOSITORY; | |
141 } | |
142 | |
143 public void reset(){ | |
144 this.entities = new ArrayList<Entity>(); | |
145 this.currentEntities = new ArrayList<Entity>(); | |
146 this.resultSummaryMsg = new String(); | |
147 } | |
148 | |
149 public void actionGoToPageAdvancedResult(ActionEvent event){ | |
150 this.pageMsg = ""; | |
151 try{ | |
152 Integer page = new Integer(getPage()); | |
153 this.advancedPaginator.goToPage(page - 1); | |
154 this.updateAdvancedEntities(); | |
155 }catch(Exception e){ | |
156 this.pageMsg = "page is invalid!"; | |
157 } | |
158 } | |
159 | |
160 public DataPaginator getAdvancedPaginator() { | |
161 return advancedPaginator; | |
162 } | |
163 | |
164 public void setAdvancedPaginator(DataPaginator advancedPaginator) { | |
165 this.advancedPaginator = advancedPaginator; | |
166 } | |
167 | |
168 public void updateDefinitions(List<Entity> defs) { | |
169 this.definitions = new ArrayList<SelectItem>(); | |
170 SelectItem option = null; | |
171 for (Entity def : defs) { | |
172 if (def.getOwnValue() != null) { | |
173 option = new SelectItem(def.getOwnValue()); | |
174 this.definitions.add(option); | |
175 } | |
176 } | |
177 this.setEntities(new ArrayList<Entity>()); | |
178 if (defs.size() > 0) { | |
179 this.objectClass = defs.get(0).getOwnValue(); | |
180 } | |
181 } | |
182 | |
183 public void actionDisplayAdvancedSearch(ActionEvent event) { | |
184 this.advancedSearch = true; | |
185 } | |
186 | |
187 public void actionHideAdvancedSearch(ActionEvent event) { | |
188 this.advancedSearch = false; | |
189 } | |
190 | |
191 public void actionChangeDefinition(ValueChangeEvent event) { | |
192 this.objectClass = (String) event.getNewValue(); | |
193 } | |
194 | |
195 public void searchByOwnvalue(){ | |
196 this.resultMode = MODE_ADVANCED; | |
197 this.setPage(""); | |
198 this.currentEntities = new ArrayList<Entity>(); | |
199 this.entities = getWrapper().searchEntityByOwnValue(objectClass, ocTerm); | |
200 this.resultSummaryMsg = ""; | |
201 | |
202 if(this.entities.size() > 0){ | |
203 | |
204 this.advancedPaginator.setCurrentPage(0); | |
205 int entitiesCount = this.entities.size(); | |
206 this.advancedPaginator.resetNumberOfPages(entitiesCount); | |
207 this.updateAdvancedEntities(); | |
208 }else { | |
209 this.resultSummaryMsg = "No items were found!"; | |
210 } | |
211 } | |
212 | |
213 | |
81
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
214 public void searchByAttributes() throws Exception { |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
215 this.resultMode = MODE_ADVANCED; |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
216 this.setPage(""); |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
217 this.entities = new ArrayList<Entity>(); |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
218 this.currentEntities = new ArrayList<Entity>(); |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
219 |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
220 List<AttributeFilter> filterList = new ArrayList<AttributeFilter>(); |
1 | 221 |
81
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
222 this.resultSummaryMsg = ""; |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
223 Map<Entity, Attribute> resultMap = new HashMap<Entity, Attribute>(); |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
224 |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
225 /* |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
226 * create list of filters for the selected attributes |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
227 */ |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
228 if (this.objectClass.equals(TEXT)) { |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
229 if (StringUtils.isNotEmpty(textFullTitle)) { |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
230 filterList.add(new AttributeFilter("full_title", this.textFullTitle, TEXT)); |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
231 } |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
232 if (StringUtils.isNotEmpty(textFullTitleTranslit)) { |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
233 filterList.add(new AttributeFilter("full_title_translit", textFullTitleTranslit, TEXT)); |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
234 } |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
235 if (StringUtils.isNotEmpty(textShortTitle)) { |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
236 List<Entity> l = getWrapper().searchEntityByAttributeOfTarRelation(TEXT, "is_prime_alias_title_of", |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
237 ALIAS, "alias", textShortTitle, 20); |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
238 for (Entity e : l) { |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
239 this.entities.add(e); |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
240 } |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
241 } |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
242 } else if (this.objectClass.equals(WITNESS)) { |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
243 // witnessAhlwardtNo |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
244 if (StringUtils.isNotEmpty(this.witnessAhlwardtNo)) { |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
245 filterList.add(new AttributeFilter("ahlwardt_no", this.witnessAhlwardtNo, WITNESS)); |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
246 } |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
247 } else if (this.objectClass.equals(SUBJECT)) { |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
248 if (StringUtils.isNotEmpty(this.subjectType)) { |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
249 filterList.add(new AttributeFilter("type", this.subjectType, SUBJECT)); |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
250 } |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
251 } else if (this.objectClass.equals(ALIAS)) { |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
252 if (StringUtils.isNotEmpty(this.aliasAlias)) { |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
253 filterList.add(new AttributeFilter("alias", this.aliasAlias, ALIAS)); |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
254 } |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
255 } else if (this.objectClass.equals(COLLECTION)) { |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
256 if (StringUtils.isNotEmpty(this.collectionName)) { |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
257 filterList.add(new AttributeFilter("name", this.collectionName, COLLECTION)); |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
258 } |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
259 } else if (this.objectClass.equals(REPOSITORY)) { |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
260 if (StringUtils.isNotEmpty(this.repositoryName)) { |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
261 filterList.add(new AttributeFilter("name", this.repositoryName, REPOSITORY)); |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
262 } |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
263 } else if (this.objectClass.equals(PLACE)) { |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
264 if (StringUtils.isNotEmpty(this.placeName)) { |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
265 filterList.add(new AttributeFilter("name", this.placeName, PLACE)); |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
266 } |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
267 } else if (this.objectClass.equals(CODEX)) { |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
268 if (StringUtils.isNotEmpty(this.codexIdentifier)) { |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
269 filterList.add(new AttributeFilter("identifier", this.codexIdentifier, CODEX)); |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
270 } |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
271 } else if (this.objectClass.equals(REFERENCE)) { |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
272 // search "#bibIdNo\W" as regex in endnote-id attribute |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
273 if (StringUtils.isNotEmpty(this.referenceBibIdNo)) { |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
274 filterList.add(new AttributeFilter("endnote-id", "#" + this.referenceBibIdNo + "[[:>:]]", REFERENCE, true)); |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
275 } |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
276 } else if (this.objectClass.equals(PERSON)) { |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
277 if (StringUtils.isNotEmpty(this.personName)) { |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
278 filterList.add(new AttributeFilter("name", this.personName, PERSON)); |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
279 } |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
280 if (StringUtils.isNotEmpty(this.personNameTranslit)) { |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
281 filterList.add(new AttributeFilter("name_translit", this.personNameTranslit, PERSON)); |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
282 } |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
283 } |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
284 |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
285 /* |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
286 * run search and sort result (by ownvalue) |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
287 */ |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
288 if (filterList.size() > 0) { |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
289 resultMap = getWrapper().searchEntityByAttributeFilter(filterList, 500); |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
290 // pack entities (Map keys) into List |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
291 for (Entity ent : resultMap.keySet()) { |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
292 this.entities.add(ent); |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
293 } |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
294 // sort List (by ownvalue) |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
295 Collections.sort(entities); |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
296 } |
1 | 297 |
81
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
298 if (resultMap.size() > 0) { |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
299 this.resultSummaryMsg = resultMap.size() + " items were found!"; |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
300 this.advancedPaginator.setCurrentPage(0); |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
301 int entitiesCount = this.entities.size(); |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
302 this.advancedPaginator.resetNumberOfPages(entitiesCount); |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
303 this.updateAdvancedEntities(); |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
304 } else { |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
305 this.resultSummaryMsg = "No items were found!"; |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
306 } |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
307 } |
1 | 308 |
309 public boolean isRenderedSearch(){ | |
310 if(StringUtils.isNotEmpty(this.objectClass) && ( | |
311 objectClass.equals(SUBJECT) || | |
312 objectClass.equals(REPOSITORY) || | |
313 objectClass.equals(ALIAS) || | |
314 objectClass.equals(COLLECTION) || | |
315 objectClass.equals(TEXT) || | |
316 objectClass.equals(PERSON) || | |
317 objectClass.equals(CODEX) || | |
318 objectClass.equals(WITNESS) || | |
81
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
319 objectClass.equals(PLACE) || |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
320 objectClass.equals(REFERENCE))) { |
1 | 321 return true; |
322 } | |
323 return false; | |
324 } | |
325 | |
326 public String actionSearchByAttributes() { | |
327 try { | |
328 this.searchByAttributes(); | |
329 } catch (Exception e) { | |
330 printInternalError(e); | |
331 logger.error(e.getMessage(), e); | |
332 } | |
333 | |
334 return GOTO_ENTITY_REPOSITORY; | |
335 } | |
336 | |
337 public String actionSearchByOwnvalue(){ | |
338 try { | |
339 this.searchByOwnvalue(); | |
340 } catch (Exception e) { | |
341 printInternalError(e); | |
342 logger.error(e.getMessage(), e); | |
343 } | |
344 | |
345 return GOTO_ENTITY_REPOSITORY; | |
346 } | |
347 | |
348 public boolean isAdvancedSearch() { | |
349 return advancedSearch; | |
350 } | |
351 | |
352 public void setAdvancedSearch(boolean advancedSearch) { | |
353 this.advancedSearch = advancedSearch; | |
354 } | |
355 | |
356 public String getTextFullTitle() { | |
357 return textFullTitle; | |
358 } | |
359 | |
360 public void setTextFullTitle(String textFullTitle) { | |
361 this.textFullTitle = textFullTitle; | |
362 } | |
363 | |
364 public String getTextFullTitleTranslit() { | |
365 return textFullTitleTranslit; | |
366 } | |
367 | |
368 public void setTextFullTitleTranslit(String textFullTitleTranslit) { | |
369 this.textFullTitleTranslit = textFullTitleTranslit; | |
370 } | |
371 | |
372 public String getTextShortTitle() { | |
373 return textShortTitle; | |
374 } | |
375 | |
376 public void setTextShortTitle(String textShortTitle) { | |
377 this.textShortTitle = textShortTitle; | |
378 } | |
379 | |
380 public String getPersonName() { | |
381 return personName; | |
382 } | |
383 | |
384 public void setPersonName(String personName) { | |
385 this.personName = personName; | |
386 } | |
387 | |
388 public String getPersonNameTranslit() { | |
389 return personNameTranslit; | |
390 } | |
391 | |
392 public void setPersonNameTranslit(String personNameTranslit) { | |
393 this.personNameTranslit = personNameTranslit; | |
394 } | |
395 | |
396 public String getObjectClass() { | |
397 return objectClass; | |
398 } | |
399 | |
400 public void setObjectClass(String objectClass) { | |
401 this.objectClass = objectClass; | |
402 } | |
403 | |
404 public List<Entity> getEntities() { | |
405 return this.entities; | |
406 } | |
407 | |
408 public void setEntities(List<Entity> entities) { | |
409 this.entities = entities; | |
410 } | |
411 | |
412 public List<SelectItem> getDefinitions() { | |
413 return definitions; | |
414 } | |
415 | |
416 public void setDefinitions(List<SelectItem> definitions) { | |
417 this.definitions = definitions; | |
418 } | |
419 | |
420 public String getResultMode() { | |
421 return resultMode; | |
422 } | |
423 | |
424 public void setResultMode(String resultMode) { | |
425 this.resultMode = resultMode; | |
426 } | |
427 | |
428 public String getResultSummaryMsg() { | |
429 return resultSummaryMsg; | |
430 } | |
431 | |
432 public void setResultSummaryMsg(String resultSummaryMsg) { | |
433 this.resultSummaryMsg = resultSummaryMsg; | |
434 } | |
435 | |
436 public String getPage() { | |
437 return page; | |
438 } | |
439 | |
440 public void setPage(String page) { | |
441 this.page = page; | |
442 } | |
443 | |
444 public String getPageMsg() { | |
445 return pageMsg; | |
446 } | |
447 | |
448 public void setPageMsg(String pageMsg) { | |
449 this.pageMsg = pageMsg; | |
450 } | |
451 public String getCodexIdentifier() { | |
452 return codexIdentifier; | |
453 } | |
454 public void setCodexIdentifier(String codexIdentifier) { | |
455 this.codexIdentifier = codexIdentifier; | |
456 } | |
457 public String getPlaceName() { | |
458 return placeName; | |
459 } | |
460 public void setPlaceName(String placeName) { | |
461 this.placeName = placeName; | |
462 } | |
463 | |
464 public String getCollectionName() { | |
465 return collectionName; | |
466 } | |
467 | |
468 public void setCollectionName(String collectionName) { | |
469 this.collectionName = collectionName; | |
470 } | |
471 | |
472 public String getAliasAlias() { | |
473 return aliasAlias; | |
474 } | |
475 | |
476 public void setAliasAlias(String aliasAlias) { | |
477 this.aliasAlias = aliasAlias; | |
478 } | |
479 | |
480 public String getRepositoryName() { | |
481 return repositoryName; | |
482 } | |
483 | |
484 public void setRepositoryName(String repositoryName) { | |
485 this.repositoryName = repositoryName; | |
486 } | |
487 | |
488 public String getSubjectType() { | |
489 return subjectType; | |
490 } | |
491 | |
492 public void setSubjectType(String subjectType) { | |
493 this.subjectType = subjectType; | |
494 } | |
495 | |
496 public List<SelectItem> getSuggestedSubjectTypes() { | |
497 return suggestedSubjectTypes; | |
498 } | |
499 | |
500 public void setSuggestedSubjectTypes(List<SelectItem> suggestedTypes) { | |
501 this.suggestedSubjectTypes = suggestedTypes; | |
502 } | |
503 public List<Entity> getCurrentEntities() { | |
504 return currentEntities; | |
505 } | |
506 | |
507 public void setCurrentEntities(List<Entity> currentEntities) { | |
508 this.currentEntities = currentEntities; | |
509 } | |
510 | |
511 public String getWitnessFullTitle() { | |
512 return witnessFullTitle; | |
513 } | |
514 | |
515 public void setWitnessFullTitle(String witnessFullTitle) { | |
516 this.witnessFullTitle = witnessFullTitle; | |
517 } | |
518 | |
519 public String getWitnessFullTitleTranslit() { | |
520 return witnessFullTitleTranslit; | |
521 } | |
522 | |
523 public void setWitnessFullTitleTranslit(String witnessFullTitleTranslit) { | |
524 this.witnessFullTitleTranslit = witnessFullTitleTranslit; | |
525 } | |
526 | |
527 public String getWitnessAhlwardtNo() { | |
528 return witnessAhlwardtNo; | |
529 } | |
530 | |
531 public void setWitnessAhlwardtNo(String witnessAhlwardtNo) { | |
532 this.witnessAhlwardtNo = witnessAhlwardtNo; | |
533 } | |
534 | |
81
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
535 /** |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
536 * @return the referenceBibIdNo |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
537 */ |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
538 public String getReferenceBibIdNo() { |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
539 return referenceBibIdNo; |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
540 } |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
541 |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
542 /** |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
543 * @param referenceBibIdNo the referenceBibIdNo to set |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
544 */ |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
545 public void setReferenceBibIdNo(String referenceBibIdNo) { |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
546 this.referenceBibIdNo = referenceBibIdNo; |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
547 } |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
548 |
0d5d36c83e77
added search for bibliography id attribute for REFERENCEs.
casties
parents:
78
diff
changeset
|
549 public String getOcTerm() { |
1 | 550 return ocTerm; |
551 } | |
552 | |
553 public void setOcTerm(String ocTerm) { | |
554 this.ocTerm = ocTerm; | |
555 } | |
556 | |
557 public String getCurrentTab() { | |
558 return currentTab; | |
559 } | |
560 | |
561 public void setCurrentTab(String currentTab) { | |
562 this.currentTab = currentTab; | |
563 } | |
564 | |
565 | |
566 } |