| Line 140... |
Line 140... |
| 140 |
|
140 |
|
| 141 |
private void testProd() throws Exception{
|
141 |
private void testProd() throws Exception{
|
| 142 |
Map<Long, EntityState> es1 = StorageManager.getStorageManager().getEntitiesMetadata();
|
142 |
Map<Long, EntityState> es1 = StorageManager.getStorageManager().getEntitiesMetadata();
|
| 143 |
for(Map.Entry<Long, EntityState> estate : es1.entrySet()){
|
143 |
for(Map.Entry<Long, EntityState> estate : es1.entrySet()){
|
| 144 |
EntityState es = estate.getValue();
|
144 |
EntityState es = estate.getValue();
|
| 145 |
if(es.getBrand().equals("Spice") && es.getCategoryID()==10006l) {
|
145 |
if(es.getBrand().equals("Spice") && es.getCategoryID()==10006l && es.getStatus().equals(EntityStatus.READY)) {
|
| 146 |
ContentPojo cp = StorageManager.getById(StorageManager.views.siteContent, estate.getKey(), ContentPojo.class);
|
146 |
ContentPojo cp = StorageManager.getById(StorageManager.views.siteContent, estate.getKey(), ContentPojo.class);
|
| - |
|
147 |
if(cp.getDetailedSpecs()!= null){
|
| 147 |
List<SpecificationGroup> sgs = cp.getDetailedSpecs();
|
148 |
List<SpecificationGroup> sgs = cp.getDetailedSpecs();
|
| 148 |
System.out.println(es.getBrand() + " " + es.getModelName() + " " +es.getModelNumber());
|
149 |
System.out.println(es.getBrand() + " " + es.getModelName() + " " +es.getModelNumber());
|
| 149 |
for(SpecificationGroup sg : sgs) {
|
150 |
for(SpecificationGroup sg : sgs) {
|
| 150 |
String title = sg.getTitle();
|
151 |
String title = sg.getTitle();
|
| 151 |
if(title.equals("Look n feel")){
|
152 |
if(title.equals("Look n feel")){
|
| 152 |
title = "Appearance";
|
153 |
title = "Appearance";
|
| 153 |
}else if (title.equals("Display")){
|
154 |
}else if (title.equals("Display")){
|
| 154 |
title = "Screen";
|
155 |
title = "Screen";
|
| 155 |
}else if (title.equals("Hardware")){
|
156 |
}else if (title.equals("Hardware")){
|
| 156 |
title = "Processor";
|
157 |
title = "Processor";
|
| 157 |
}else if (title.equals("Communication")){
|
158 |
}else if (title.equals("Communication")){
|
| 158 |
title = "Network";
|
159 |
title = "Network";
|
| 159 |
}else if (title.equals("Software")){
|
160 |
}else if (title.equals("Software")){
|
| 160 |
title = "Operating System";
|
161 |
title = "Operating System";
|
| 161 |
}else if (title.equals("Battery")){
|
162 |
}else if (title.equals("Battery")){
|
| 162 |
title = "Power";
|
163 |
title = "Power";
|
| 163 |
}else if (title.equals("Music")){
|
164 |
}else if (title.equals("Music")){
|
| 164 |
title = "Audio";
|
165 |
title = "Audio";
|
| 165 |
}else if (title.equals("Miscellaneous")){
|
166 |
}else if (title.equals("Miscellaneous")){
|
| 166 |
title = "Other features";
|
167 |
title = "Other features";
|
| 167 |
}else if (title.equals("Package content")){
|
168 |
}else if (title.equals("Package content")){
|
| 168 |
title = "Box content";
|
169 |
title = "Box content";
|
| 169 |
}
|
170 |
}
|
| 170 |
System.out.println(title);
|
171 |
System.out.println(title);
|
| 171 |
for(Specification spec : sg.getSpecs()){
|
172 |
for(Specification spec : sg.getSpecs()){
|
| 172 |
System.out.println("\t" + spec.getName() + "\t" + StringUtils.join(spec.getValues().toArray(), ", "));
|
173 |
System.out.println("\t" + spec.getName() + "\t" + StringUtils.join(spec.getValues().toArray(), ", "));
|
| - |
|
174 |
}
|
| 173 |
}
|
175 |
}
|
| - |
|
176 |
|
| - |
|
177 |
System.out.println("Box content");
|
| - |
|
178 |
if(cp.getPackageContents()!=null) System.out.println("\t" + StringUtils.join(cp.getPackageContents().toArray(), ", "));
|
| 174 |
}
|
179 |
}
|
| 175 |
System.out.println("Box content");
|
- |
|
| 176 |
if(cp.getPackageContents()!=null)
|
- |
|
| 177 |
System.out.println("\t" + StringUtils.join(cp.getPackageContents().toArray(), ", "));
|
- |
|
| 178 |
}
|
180 |
}
|
| 179 |
}
|
181 |
}
|
| 180 |
}
|
182 |
}
|
| 181 |
|
183 |
|
| 182 |
//Full run for monge Mobile content
|
184 |
//Full run for monge Mobile content
|