Subversion Repositories SmartDukaan

Rev

Rev 9427 | Rev 10564 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 9427 Rev 9619
Line 1... Line 1...
1
package in.shop2020.util;
1
package in.shop2020.util;
2
 
2
 
-
 
3
import in.shop2020.metamodel.core.Bullet;
3
import in.shop2020.metamodel.core.Entity;
4
import in.shop2020.metamodel.core.Entity;
4
import in.shop2020.metamodel.core.ExpertReview;
5
import in.shop2020.metamodel.core.ExpertReview;
5
import in.shop2020.metamodel.core.Feature;
6
import in.shop2020.metamodel.core.Feature;
6
import in.shop2020.metamodel.core.FreeformContent;
7
import in.shop2020.metamodel.core.FreeformContent;
7
import in.shop2020.metamodel.core.Media;
8
import in.shop2020.metamodel.core.Media;
Line 101... Line 102...
101
														List<ExpandedBullet> expBullets = expFeature.getExpandedBullets();
102
														List<ExpandedBullet> expBullets = expFeature.getExpandedBullets();
102
														if(expBullets != null){
103
														if(expBullets != null){
103
															for(ExpandedBullet bullet : expBullets){
104
															for(ExpandedBullet bullet : expBullets){
104
																if(bullet != null) {
105
																if(bullet != null) {
105
																	three = bullet.displayText();
106
																	three = bullet.displayText();
-
 
107
																	if(!three.equals("Not available")){
106
																	values1.add(MessageFormat.format(Utils.CAPACITY_TEMPLATE, one,two, three));
108
																		values1.add(MessageFormat.format(Utils.CAPACITY_TEMPLATE, one,two, three));
-
 
109
																	}
107
																}
110
																}
108
															}
111
															}
109
														}
112
														}
110
													}
113
													}
111
												}
114
												}
Line 126... Line 129...
126
											List<String> bulletValuesList = new ArrayList<String>();
129
											List<String> bulletValuesList = new ArrayList<String>();
127
											if(expBullets != null){
130
											if(expBullets != null){
128
												for(ExpandedBullet bullet : expBullets){
131
												for(ExpandedBullet bullet : expBullets){
129
													if(bullet != null) {
132
													if(bullet != null) {
130
														String value = bullet.displayText();
133
														String value = bullet.displayText();
131
														if(value != null && !value.trim().equals("")){
134
														if(!value.equals("Not available") && value != null && !value.trim().equals("")){
132
															bulletValuesList.add(bullet.displayText());
135
															bulletValuesList.add(value);
133
														}
136
														}
134
													}
137
													}
135
												}
138
												}
136
											}
139
											}
137
											if(bulletValuesList.size() > 0){
140
											if(bulletValuesList.size() > 0){
138
												values.add(fLabel  +  " - " + StringUtils.join(bulletValuesList, ","));
141
												values.add(fLabel  +  " - " + StringUtils.join(bulletValuesList, ", "));
139
											}
142
											}
140
										}
143
										}
141
									}
144
									}
142
								}
145
								}
143
								if(values.size()>0){
146
								if(values.size()>0){
Line 156... Line 159...
156
						List<ExpandedBullet> expBullets = expFeature.getExpandedBullets();
159
						List<ExpandedBullet> expBullets = expFeature.getExpandedBullets();
157
						if(expBullets != null){
160
						if(expBullets != null){
158
							for(ExpandedBullet bullet : expBullets){
161
							for(ExpandedBullet bullet : expBullets){
159
								if(bullet != null) {
162
								if(bullet != null) {
160
									String displayText = bullet.displayText();
163
									String displayText = bullet.displayText();
161
									if(!displayText.trim().equals("")){
164
									if(!displayText.equals("") && !displayText.equals("Not available")){
162
										sb.add(bullet.displayText());
165
										sb.add(displayText);
163
									}
166
									}
164
								}
167
								}
165
							}
168
							}
166
						}
169
						}
167
						if(sb.size()>0){
170
						if(sb.size()>0){
168
							Specification spec = new Specification(expFeature.getFeatureDefinition().getLabel(), Arrays.asList(StringUtils.join(sb,",")));
171
							Specification spec = new Specification(expFeature.getFeatureDefinition().getLabel(), Arrays.asList(StringUtils.join(sb,", ")));
169
							specs.add(spec);
172
							specs.add(spec);
170
						}
173
						}
171
					}
174
					}
172
				}
175
				}
173
				spGroups.add(spGroup);
176
				spGroups.add(spGroup);
-
 
177
				if(slideDefinitionId == 130133l){
-
 
178
					List<Slide> processorChildren = slide.getChildrenSlides();
-
 
179
					if(processorChildren != null) {
-
 
180
						Slide processorSlide = processorChildren.get(0);
-
 
181
						if(processorSlide != null) {
-
 
182
							List<Feature> processorFeatures = processorSlide.getFeatures();
-
 
183
							if(processorFeatures != null && processorFeatures.size()>0){
-
 
184
								List<String> sb = new ArrayList<String>();
-
 
185
								String processorString = "";
-
 
186
								String processorFfc = "";
-
 
187
								for(Feature f : processorFeatures) {
-
 
188
									if(f!=null){
-
 
189
										ExpandedFeature ef = new ExpandedFeature(f);
-
 
190
										if(f.getFeatureDefinitionID()==120326l)
-
 
191
										{
-
 
192
											List<ExpandedBullet> bullets = ef.getExpandedBullets();
-
 
193
											if(bullets !=null && bullets.size() >0){
-
 
194
												sb.add("Family -" + bullets.get(0).displayText());
-
 
195
											}
-
 
196
										}
-
 
197
										if(f.getFeatureDefinitionID()==120327l)
-
 
198
										{
-
 
199
											List<ExpandedBullet> bullets = ef.getExpandedBullets();
-
 
200
											if(bullets !=null && bullets.size() >0){
-
 
201
												processorString = bullets.get(0).displayText();
-
 
202
											}
-
 
203
											FreeformContent ffc = f.getFreeformContent();
-
 
204
											if(ffc != null){
-
 
205
												List<String> freeformTexts = ffc.getFreeformTexts();
-
 
206
												if(freeformTexts.size()>0){
-
 
207
													processorFfc = StringUtils.join(StringUtils.join(freeformTexts, "\r\n").split("\r\n"),", ");
-
 
208
												}
-
 
209
											} 
-
 
210
										}
-
 
211
										if(f.getFeatureDefinitionID()==120163l)
-
 
212
										{
-
 
213
											List<ExpandedBullet> bullets = ef.getExpandedBullets();
-
 
214
											if(bullets !=null && bullets.size() >0){
-
 
215
												processorString += " " + bullets.get(0).displayText();
-
 
216
												sb.add(processorString);
-
 
217
											}
-
 
218
											FreeformContent ffc = f.getFreeformContent();
-
 
219
											if(ffc != null){
-
 
220
												List<String> freeformTexts = ffc.getFreeformTexts();
-
 
221
												if(freeformTexts.size()>0){
-
 
222
													processorFfc += ", " + StringUtils.join(StringUtils.join(freeformTexts, "\r\n").split("\r\n"),", ");
-
 
223
												}
-
 
224
											} 
-
 
225
										}
-
 
226
									}
-
 
227
								}
-
 
228
								if(!processorFfc.equals("")) sb.add(processorFfc);
-
 
229
								if(sb.size()>0) {
-
 
230
									Specification spec = new Specification("Processor", Arrays.asList(StringUtils.join(sb,", ")));
-
 
231
									specs.add(spec);
-
 
232
								}
-
 
233
							}
-
 
234
						}
-
 
235
					}
-
 
236
				}
174
			}
237
			}
175
		}
238
		}
176
		return spGroups;
239
		return spGroups;
177
	}
240
	}
178
 
241
 
Line 232... Line 295...
232
					expFeature.getFeatureDefinition().getLabel();
295
					expFeature.getFeatureDefinition().getLabel();
233
					List<ExpandedBullet> expBullets = expFeature.getExpandedBullets();
296
					List<ExpandedBullet> expBullets = expFeature.getExpandedBullets();
234
					if(expBullets != null){
297
					if(expBullets != null){
235
						for(ExpandedBullet bullet : expBullets){
298
						for(ExpandedBullet bullet : expBullets){
236
							if(bullet != null) {
299
							if(bullet != null) {
-
 
300
								String displayText =  bullet.displayText();
-
 
301
								if(!displayText.equals("Not available"))
237
								keySpecs.add(bullet.displayText());
302
								keySpecs.add(displayText);
238
							}
303
							}
239
						}
304
						}
240
					}
305
					}
241
					break;
306
					break;
242
				}
307
				}