Mercurial > hg > ismi-richfaces
comparison src/main/java/de/mpiwg/itgroup/ismi/publicView/PublicCodexList.java @ 1:2e911857a759
(none)
author | jurzua |
---|---|
date | Wed, 29 Oct 2014 14:00:28 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
0:74df02964906 | 1:2e911857a759 |
---|---|
1 package de.mpiwg.itgroup.ismi.publicView; | |
2 | |
3 import java.util.ArrayList; | |
4 import java.util.List; | |
5 | |
6 import org.apache.log4j.Logger; | |
7 import org.mpi.openmind.repository.bo.Attribute; | |
8 import org.mpi.openmind.repository.bo.Entity; | |
9 | |
10 import de.mpiwg.itgroup.ismi.entry.beans.AbstractBean; | |
11 import de.mpiwg.itgroup.ismi.entry.beans.ApplicationBean; | |
12 | |
13 public class PublicCodexList extends AbstractBean{ | |
14 private static final long serialVersionUID = 4576052953031233629L; | |
15 | |
16 private static Logger logger = Logger.getLogger(PublicCodexList.class); | |
17 /* | |
18 private static List<Long> codexIdList = new ArrayList<Long>(); | |
19 static{ | |
20 codexIdList.add(new Long(27543)); | |
21 codexIdList.add(new Long(36745)); | |
22 codexIdList.add(new Long(58453)); | |
23 codexIdList.add(new Long(87298)); | |
24 codexIdList.add(new Long(259646)); | |
25 codexIdList.add(new Long(35093)); | |
26 codexIdList.add(new Long(22863)); | |
27 codexIdList.add(new Long(34870)); | |
28 codexIdList.add(new Long(36882)); | |
29 codexIdList.add(new Long(101488)); | |
30 codexIdList.add(new Long(36696)); | |
31 codexIdList.add(new Long(31794)); | |
32 codexIdList.add(new Long(37240)); | |
33 codexIdList.add(new Long(35014)); | |
34 codexIdList.add(new Long(35583)); | |
35 codexIdList.add(new Long(37025)); | |
36 codexIdList.add(new Long(35960)); | |
37 codexIdList.add(new Long(172492)); | |
38 codexIdList.add(new Long(98286)); | |
39 codexIdList.add(new Long(165721)); | |
40 codexIdList.add(new Long(260111)); | |
41 codexIdList.add(new Long(90980)); | |
42 codexIdList.add(new Long(36316)); | |
43 codexIdList.add(new Long(260120)); | |
44 codexIdList.add(new Long(36241)); | |
45 codexIdList.add(new Long(260129)); | |
46 codexIdList.add(new Long(260138)); | |
47 codexIdList.add(new Long(38860)); | |
48 codexIdList.add(new Long(176694)); | |
49 codexIdList.add(new Long(72545)); | |
50 codexIdList.add(new Long(36185)); | |
51 codexIdList.add(new Long(36575)); | |
52 codexIdList.add(new Long(260146)); | |
53 codexIdList.add(new Long(31672)); | |
54 codexIdList.add(new Long(37739)); | |
55 codexIdList.add(new Long(89861)); | |
56 codexIdList.add(new Long(176778)); | |
57 codexIdList.add(new Long(180743)); | |
58 codexIdList.add(new Long(86328)); | |
59 codexIdList.add(new Long(260150)); | |
60 codexIdList.add(new Long(90658)); | |
61 codexIdList.add(new Long(58423)); | |
62 codexIdList.add(new Long(181058)); | |
63 codexIdList.add(new Long(105948)); | |
64 codexIdList.add(new Long(35526)); | |
65 codexIdList.add(new Long(74078)); | |
66 codexIdList.add(new Long(260158)); | |
67 codexIdList.add(new Long(181096)); | |
68 codexIdList.add(new Long(31606)); | |
69 codexIdList.add(new Long(31568)); | |
70 codexIdList.add(new Long(27872)); | |
71 codexIdList.add(new Long(36938)); | |
72 codexIdList.add(new Long(4836)); | |
73 codexIdList.add(new Long(34668)); | |
74 codexIdList.add(new Long(76866)); | |
75 codexIdList.add(new Long(102230)); | |
76 codexIdList.add(new Long(76888)); | |
77 codexIdList.add(new Long(74070)); | |
78 codexIdList.add(new Long(73757)); | |
79 codexIdList.add(new Long(182685)); | |
80 codexIdList.add(new Long(260162)); | |
81 codexIdList.add(new Long(260170)); | |
82 codexIdList.add(new Long(1102)); | |
83 codexIdList.add(new Long(172888)); | |
84 codexIdList.add(new Long(260174)); | |
85 codexIdList.add(new Long(34806)); | |
86 codexIdList.add(new Long(28088)); | |
87 codexIdList.add(new Long(36713)); | |
88 codexIdList.add(new Long(37323)); | |
89 codexIdList.add(new Long(34551)); | |
90 codexIdList.add(new Long(35943)); | |
91 codexIdList.add(new Long(98095)); | |
92 codexIdList.add(new Long(260178)); | |
93 codexIdList.add(new Long(260182)); | |
94 codexIdList.add(new Long(182770)); | |
95 codexIdList.add(new Long(260186)); | |
96 codexIdList.add(new Long(260190)); | |
97 codexIdList.add(new Long(260194)); | |
98 codexIdList.add(new Long(36114)); | |
99 codexIdList.add(new Long(85003)); | |
100 codexIdList.add(new Long(31630)); | |
101 codexIdList.add(new Long(157290)); | |
102 codexIdList.add(new Long(37153)); | |
103 codexIdList.add(new Long(37213)); | |
104 codexIdList.add(new Long(172952)); | |
105 codexIdList.add(new Long(86871)); | |
106 codexIdList.add(new Long(64406)); | |
107 codexIdList.add(new Long(102590)); | |
108 codexIdList.add(new Long(82615)); | |
109 codexIdList.add(new Long(58245)); | |
110 codexIdList.add(new Long(179791)); | |
111 codexIdList.add(new Long(179550)); | |
112 codexIdList.add(new Long(12419)); | |
113 codexIdList.add(new Long(95861)); | |
114 codexIdList.add(new Long(36429)); | |
115 codexIdList.add(new Long(36099)); | |
116 codexIdList.add(new Long(74237)); | |
117 codexIdList.add(new Long(36065)); | |
118 codexIdList.add(new Long(74822)); | |
119 codexIdList.add(new Long(87549)); | |
120 codexIdList.add(new Long(83765)); | |
121 codexIdList.add(new Long(36733)); | |
122 codexIdList.add(new Long(19259)); | |
123 codexIdList.add(new Long(260198)); | |
124 codexIdList.add(new Long(34986)); | |
125 codexIdList.add(new Long(88041)); | |
126 codexIdList.add(new Long(260202)); | |
127 codexIdList.add(new Long(36550)); | |
128 codexIdList.add(new Long(260206)); | |
129 codexIdList.add(new Long(37228)); | |
130 codexIdList.add(new Long(39880)); | |
131 codexIdList.add(new Long(36318)); | |
132 codexIdList.add(new Long(36597)); | |
133 codexIdList.add(new Long(35035)); | |
134 codexIdList.add(new Long(58328)); | |
135 codexIdList.add(new Long(80831)); | |
136 codexIdList.add(new Long(58354)); | |
137 codexIdList.add(new Long(74277)); | |
138 codexIdList.add(new Long(36529)); | |
139 codexIdList.add(new Long(36380)); | |
140 codexIdList.add(new Long(69450)); | |
141 codexIdList.add(new Long(200246)); | |
142 codexIdList.add(new Long(260222)); | |
143 codexIdList.add(new Long(81178)); | |
144 codexIdList.add(new Long(260226)); | |
145 codexIdList.add(new Long(199952)); | |
146 codexIdList.add(new Long(262557)); | |
147 codexIdList.add(new Long(87212)); | |
148 codexIdList.add(new Long(99059)); | |
149 codexIdList.add(new Long(64270)); | |
150 codexIdList.add(new Long(81811)); | |
151 codexIdList.add(new Long(65785)); | |
152 codexIdList.add(new Long(36645)); | |
153 }*/ | |
154 | |
155 private List<Entity> codexList; | |
156 | |
157 /* | |
158 public void load(){ | |
159 logger.info("************* (1) Loading Public Codex List...\n\n\n"); | |
160 this.codexList = new ArrayList<Entity>(); | |
161 | |
162 long start = System.currentTimeMillis(); | |
163 | |
164 for(Long id : codexIdList){ | |
165 Entity codex = getWrapper().getEntityById(id); | |
166 if (codex != null){ | |
167 this.codexList.add(codex); | |
168 } | |
169 } | |
170 long diff = System.currentTimeMillis() - start; | |
171 logger.info("Dif: " + diff + ", elemenst: " + this.codexList.size()); | |
172 }*/ | |
173 | |
174 public void load0(){ | |
175 this.codexList = new ArrayList<Entity>(); | |
176 | |
177 long start = System.currentTimeMillis(); | |
178 List<Attribute> attList = getWrapper().getAttributesByDefByAttName("CODEX", "public", "true", -1); | |
179 | |
180 for(Attribute att : attList){ | |
181 Entity codex = getWrapper().getEntityById(att.getSourceId()); | |
182 if (codex != null){ | |
183 this.codexList.add(codex); | |
184 } | |
185 } | |
186 | |
187 long diff = System.currentTimeMillis() - start; | |
188 logger.info("Loading Public Codex List - Time[ms]: " + diff + ", elemenst: " + this.codexList.size()); | |
189 } | |
190 | |
191 public List<Entity> getCodexList() { | |
192 if(codexList == null){ | |
193 this.load0(); | |
194 } | |
195 return codexList; | |
196 } | |
197 | |
198 public void setCodexList(List<Entity> codexList) { | |
199 this.codexList = codexList; | |
200 } | |
201 | |
202 | |
203 } |