Subversion Repositories SmartDukaan

Rev

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

Rev 5019 Rev 5074
Line 523... Line 523...
523
					}
523
					}
524
				}
524
				}
525
			}
525
			}
526
			
526
			
527
			// Collect PROPERTIES
527
			// Collect PROPERTIES
-
 
528
			List<Long>facetFeatureIds = new ArrayList<Long>();
-
 
529
			facetFeatureIds.add(Utils.BRAND_FEATURE_DEFINITION_ID);
-
 
530
			facetFeatureIds.add(Utils.MAIN_CAT_FEATURE_DEFINITION_ID);
-
 
531
			facetFeatureIds.add(Utils.SUB_CAT_FEATURE_DEFINITION_ID);
-
 
532
			facetFeatureIds.add(Utils.PRICE_FEATURE_DEFINITION_ID);
528
			String propertiesXMLSnippetsStr = this.getPropertiesXMLSnippet(expEntity, new ArrayList<Long>(), 2);
533
			String propertiesXMLSnippetsStr = this.getPropertiesXMLSnippet(expEntity, facetFeatureIds, 2);
529
			entityXMLSnippets.add(propertiesXMLSnippetsStr);
534
			entityXMLSnippets.add(propertiesXMLSnippetsStr);
530
			entityXMLSnippets.add(this.xmlIndentation[1] + "</Entity>");
535
			entityXMLSnippets.add(this.xmlIndentation[1] + "</Entity>");
531
			System.out.println(entityXMLSnippets);
536
			System.out.println(entityXMLSnippets);
532
			irDataXMLSnippets.addAll(entityXMLSnippets);
537
			irDataXMLSnippets.addAll(entityXMLSnippets);
533
			irDataXMLSnippets.add("</IRData>");
538
			irDataXMLSnippets.add("</IRData>");
Line 575... Line 580...
575
		List<Bullet> subCategoryBullets = new ArrayList<Bullet>();
580
		List<Bullet> subCategoryBullets = new ArrayList<Bullet>();
576
		subCategoryBullets.add(subCategoryBullet);
581
		subCategoryBullets.add(subCategoryBullet);
577
		subCategoryFeature.setBullets(subCategoryBullets);
582
		subCategoryFeature.setBullets(subCategoryBullets);
578
		zeroSlideFeatures.add(subCategoryFeature);
583
		zeroSlideFeatures.add(subCategoryFeature);
579
		
584
		
-
 
585
		
-
 
586
		try {
-
 
587
			Map<String, Map<String, String>> synonymMap = CreationUtils.getSynonyms();
-
 
588
			String brandSynonyms = synonymMap.get("brand").get(brand);
-
 
589
			String subCategorySynonyms = synonymMap.get("subcategory").get(subCategory);
-
 
590
			
-
 
591
			if(brandSynonyms != null){
-
 
592
				Feature brandSynonymFeature = new Feature(Utils.BRAND_SYNONYMS_FEATURE_DEFINITION_ID);
-
 
593
				List<Bullet> brandSynonymBullets = new ArrayList<Bullet>();
-
 
594
				for(String brSyn : brandSynonyms.split(",")){
-
 
595
					Bullet brandSynonymBullet = new Bullet(new PrimitiveDataObject(brSyn));
-
 
596
					brandSynonymBullets.add(brandSynonymBullet);
-
 
597
				}
-
 
598
				brandSynonymFeature.setBullets(brandSynonymBullets);
-
 
599
				zeroSlideFeatures.add(brandSynonymFeature);
-
 
600
			}
-
 
601
			
-
 
602
			if(subCategorySynonyms != null){
-
 
603
				Feature subCategorySynonymFeature = new Feature(Utils.SUB_CATEGORY_SYNONYMS_FEATURE_DEFINITION_ID);
-
 
604
				List<Bullet> subCategorySynonymBullets = new ArrayList<Bullet>();
-
 
605
				for(String subCatSyn : subCategorySynonyms.split(",")){
-
 
606
					Bullet subCategorySynonymBullet = new Bullet(new PrimitiveDataObject(subCatSyn));
-
 
607
					subCategorySynonymBullets.add(subCategorySynonymBullet);
-
 
608
				}
-
 
609
				subCategorySynonymFeature.setBullets(subCategorySynonymBullets);
-
 
610
				zeroSlideFeatures.add(subCategorySynonymFeature);
-
 
611
			}
-
 
612
		} catch (Exception e) {
-
 
613
			e.printStackTrace();
-
 
614
		}
-
 
615
		
-
 
616
 
-
 
617
		
580
		zeroSlide.setFeatures(zeroSlideFeatures);
618
		zeroSlide.setFeatures(zeroSlideFeatures);
581
		return zeroSlide;
619
		return zeroSlide;
582
	}
620
	}
583
 
621
 
584
	
622
	
Line 638... Line 676...
638
		
676
		
639
		// Features
677
		// Features
640
		List<ExpandedSlide> expSlides = expEntity.getExpandedSlides();
678
		List<ExpandedSlide> expSlides = expEntity.getExpandedSlides();
641
		
679
		
642
		for(ExpandedSlide expSlide : expSlides) {
680
		for(ExpandedSlide expSlide : expSlides) {
643
			if(expSlide.getSlideDefinitionID() == Utils.ZERO_SLIDE_DEFINITION_ID){
-
 
644
				continue;
-
 
645
			}
681
			
646
			List<ExpandedFeature> expFeatures = expSlide.getExpandedFeatures();
682
			List<ExpandedFeature> expFeatures = expSlide.getExpandedFeatures();
647
			
683
			
648
			if(expSlide.getFreeformContent() != null) {
684
			if(expSlide.getFreeformContent() != null) {
649
				ffc.add(expSlide.getFreeformContent().getFreeformText());
685
				ffc.add(expSlide.getFreeformContent().getFreeformText());
650
			}
686
			}
Line 722... Line 758...
722
			xmlSnippet.add(this.xmlIndentation[indent] + "</Property>");
758
			xmlSnippet.add(this.xmlIndentation[indent] + "</Property>");
723
		}
759
		}
724
		
760
		
725
		// Children slides
761
		// Children slides
726
		// TODO
762
		// TODO
727
		
763
			
728
		return StringUtils.join(xmlSnippet, "\n");
764
		return StringUtils.join(xmlSnippet, "\n");
729
	}
765
	}
730
	
766
	
731
}
767
}