StringBuffer sb = new StringBuffer();
ListingAnalyzerRecommendationsType listingAnalyzerRecoms = getListinAnalyzerRecommendations(response);
PricingRecommendationsType pricingRecoms = getPricingRecommendations(response);
ProductRecommendationsType productRecoms = getProductRecommendations(response);
AttributeRecommendationsType attribRecoms = getAttributeRecommendations(response);
if(listingAnalyzerRecoms != null) {
sb.append("Listing Analyzer Recommendation Engine:\n");
ListingTipType[] listingTips = listingAnalyzerRecoms.getListingTipArray().getListingTip();
sb.append("\tListing Tips:\n");
for(int i = 0; i < listingTips.length; i++) {
sb.append("\t\tTip ID: ").append(listingTips[i].getListingTipID()).append(" Priority: ").append(listingTips[i].getPriority());
sb.append(" *** Help URL: ").append(listingTips[i].getMessage().getHelpURLPath()).append("\n\t\t\t");
sb.append(listingTips[i].getMessage().getLongMessage()).append("\n");
}
} if(pricingRecoms != null) {
sb.append("\nProduct Pricing Engine Recommendations:\n");
ProductInfoType productInfo = pricingRecoms.getProductInfo();
sb.append("\tTitle: ").append(productInfo.getTitle());
sb.append("\n\tProduct ID: ").append(productInfo.getProductInfoID());
sb.append("\n\tAvg Start Price:").append(productInfo.getAverageStartPrice().getValue());
sb.append("\n\tAvg Sold Price:").append(productInfo.getAverageSoldPrice().getValue());
} if(productRecoms != null) {
sb.append("\nProduct Recommendations:\n");
ProductInfoType[] productInfos = productRecoms.getProduct();
for(int i = 0; i < productInfos.length; i++) {
sb.append("\tTitle: ").append(productInfos[i].getTitle());
sb.append("\n\tProduct ID: ").append(productInfos[i].getProductInfoID());
sb.append("\n\tAvg Start Price:").append(productInfos[i].getAverageStartPrice().getValue());
sb.append("\n\tAvg Sold Price:").append(productInfos[i].getAverageSoldPrice().getValue());
sb.append("\n");
}
}
if(attribRecoms != null) {
sb.append("\nSuggested Attributes Engine Recommendations:\n");
AttributeSetType[] attribs = attribRecoms.getAttributeSetArray().getAttributeSet();
if(attribs != null) {
for(int i = 0; i < attribs.length; i++) {
sb.append("\n\tATTR Set ID: ").append(attribs[i].getAttributeSetID());
AttributeType[] attrTypes = attribs[i].getAttribute();
if(attrTypes != null) {