| Line 116... |
Line 116... |
| 116 |
}
|
116 |
}
|
| 117 |
|
117 |
|
| 118 |
String entityName = EntityUtils.getProductName(expandedEntity);
|
118 |
String entityName = EntityUtils.getProductName(expandedEntity);
|
| 119 |
String hyphendatedName = entityName.replaceAll(" +", "-").replaceAll("/+", "-").replaceAll("-+", "-").toLowerCase();
|
119 |
String hyphendatedName = entityName.replaceAll(" +", "-").replaceAll("/+", "-").replaceAll("-+", "-").toLowerCase();
|
| 120 |
sbProds.append(indentation[1] + "<div>\n");
|
120 |
sbProds.append(indentation[1] + "<div>\n");
|
| 121 |
sbProds.append(indentation[2] + "<a href='http://www.saholic.com/generated/compare-" + hyphendatedName
|
121 |
sbProds.append(indentation[2] + "<a href='/generated/compare-" + hyphendatedName
|
| 122 |
+"?p1=" + entityId + "'>Compare " + entityName +"</a>\n");
|
122 |
+"?p1=" + entityId + "'>Compare " + entityName +"</a>\n");
|
| 123 |
sbProds.append(indentation[1] + "</div>\n");
|
123 |
sbProds.append(indentation[1] + "</div>\n");
|
| 124 |
StringBuffer sbProds1 = new StringBuffer();
|
124 |
StringBuffer sbProds1 = new StringBuffer();
|
| 125 |
StringBuffer sbProds2 = new StringBuffer();
|
125 |
StringBuffer sbProds2 = new StringBuffer();
|
| 126 |
for (Long anotherEntityId : entry.getValue().keySet()) {
|
126 |
for (Long anotherEntityId : entry.getValue().keySet()) {
|
| Line 168... |
Line 168... |
| 168 |
}
|
168 |
}
|
| 169 |
String anotherEntityName = EntityUtils.getProductName(anotherExpandedEntity);
|
169 |
String anotherEntityName = EntityUtils.getProductName(anotherExpandedEntity);
|
| 170 |
String anotherHyphenatedName = anotherEntityName.replaceAll(" +", "-").replaceAll("/+", "-").replaceAll("-+", "-").toLowerCase();
|
170 |
String anotherHyphenatedName = anotherEntityName.replaceAll(" +", "-").replaceAll("/+", "-").replaceAll("-+", "-").toLowerCase();
|
| 171 |
|
171 |
|
| 172 |
sbProds1.append(indentation[1] + "<div>\n");
|
172 |
sbProds1.append(indentation[1] + "<div>\n");
|
| 173 |
sbProds1.append(indentation[2] + "<a href='http://www.saholic.com/compare-mobile-phones/" + hyphendatedName + "-vs-" + anotherHyphenatedName
|
173 |
sbProds1.append(indentation[2] + "<a href='/compare-mobile-phones/" + hyphendatedName + "-vs-" + anotherHyphenatedName
|
| 174 |
+"?p1=" + entityId +"&p2="+ anotherEntityId+"'>" + entityName + " Vs "+ anotherEntityName + "</a>\n");
|
174 |
+"?p1=" + entityId +"&p2="+ anotherEntityId+"'>" + entityName + " Vs "+ anotherEntityName + "</a>\n");
|
| 175 |
sbProds1.append(indentation[1] + "</div>\n");
|
175 |
sbProds1.append(indentation[1] + "</div>\n");
|
| 176 |
sbProds2.append(indentation[1] + "<div>\n");
|
176 |
sbProds2.append(indentation[1] + "<div>\n");
|
| 177 |
sbProds2.append(indentation[2] + "<a href='http://www.saholic.com/generated/" + hyphendatedName + "-vs-" + anotherHyphenatedName
|
177 |
sbProds2.append(indentation[2] + "<a href='/generated/" + hyphendatedName + "-vs-" + anotherHyphenatedName
|
| 178 |
+"?p1=" + entityId +"&p2="+ anotherEntityId+" '>" + entityName + " Vs "+ anotherEntityName + "</a>\n");
|
178 |
+"?p1=" + entityId +"&p2="+ anotherEntityId+" '>" + entityName + " Vs "+ anotherEntityName + "</a>\n");
|
| 179 |
sbProds2.append(indentation[1] + "</div>\n");
|
179 |
sbProds2.append(indentation[1] + "</div>\n");
|
| 180 |
|
180 |
|
| 181 |
StringBuffer sb = new StringBuffer();
|
181 |
StringBuffer sb = new StringBuffer();
|
| 182 |
for(String br : getBrandSynonyms(expandedEntity.getBrand())){
|
182 |
for(String br : getBrandSynonyms(expandedEntity.getBrand())){
|