Subversion Repositories SmartDukaan

Rev

Rev 1165 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1165 Rev 1229
Line 331... Line 331...
331
			// Facet IDs
331
			// Facet IDs
332
			xmlSnip += this.xmlTabIndentation[indent+1] + "<Facets>\n";
332
			xmlSnip += this.xmlTabIndentation[indent+1] + "<Facets>\n";
333
			
333
			
334
			List<Long> facetDefIDs = 
334
			List<Long> facetDefIDs = 
335
				defs.getFacetDefinitionIDs(category.getID());
335
				defs.getFacetDefinitionIDs(category.getID());
336
			Utils.info("facetDefIDs=" + facetDefIDs);
336
			//Utils.info("facetDefIDs=" + facetDefIDs);
337
			
337
			
338
			
338
			
339
			
339
			
340
			if( facetDefIDs != null && !facetDefIDs.isEmpty() ){
340
			if( facetDefIDs != null && !facetDefIDs.isEmpty() ){
341
					for(Long facetDefID : facetDefIDs) {
341
					for(Long facetDefID : facetDefIDs) {
Line 350... Line 350...
350
			// Feature IDs
350
			// Feature IDs
351
			xmlSnip += this.xmlTabIndentation[indent+1] + "<Properties>\n";
351
			xmlSnip += this.xmlTabIndentation[indent+1] + "<Properties>\n";
352
 
352
 
353
			List<Long> featureDefIDs = 
353
			List<Long> featureDefIDs = 
354
				defs.getFeatureDefinitionIDs(category.getID());
354
				defs.getFeatureDefinitionIDs(category.getID());
355
			Utils.info("featureDefIDs=" + featureDefIDs);
355
			//Utils.info("featureDefIDs=" + featureDefIDs);
356
			
356
			
357
			for(Long featureDefID : featureDefIDs) {
357
			for(Long featureDefID : featureDefIDs) {
358
				xmlSnip += this.xmlTabIndentation[indent+2] + 
358
				xmlSnip += this.xmlTabIndentation[indent+2] + 
359
					"<FeatureID>" + featureDefID + "</FeatureID>\n";
359
					"<FeatureID>" + featureDefID + "</FeatureID>\n";
360
			}
360
			}
Line 659... Line 659...
659
		
659
		
660
		// Get IR Data Rule
660
		// Get IR Data Rule
661
		FacetRuleDefinition facetRuleDef = 
661
		FacetRuleDefinition facetRuleDef = 
662
			defs.getFacetRuleDefinitionForSlide(borrowedCategoryID, slideDefID);
662
			defs.getFacetRuleDefinitionForSlide(borrowedCategoryID, slideDefID);
663
		
663
		
664
		Utils.info("borrowed facetRuleDef=" + facetRuleDef);
664
		//Utils.info("borrowed facetRuleDef=" + facetRuleDef);
665
		String facetXMLSnippet = null; 
665
		String facetXMLSnippet = null; 
666
		
666
		
667
		// If there is direct IR data rule defined for borrowed slide
667
		// If there is direct IR data rule defined for borrowed slide
668
		if(facetRuleDef != null) {
668
		if(facetRuleDef != null) {
669
			ExpandedFacetRuleDefinition expFacetRuleDef = 
669
			ExpandedFacetRuleDefinition expFacetRuleDef = 
Line 737... Line 737...
737
			defs.getFacetRuleDefinitionForFeature(borrowedCategoryID, 
737
			defs.getFacetRuleDefinitionForFeature(borrowedCategoryID, 
738
				featureDefID);
738
				featureDefID);
739
		
739
		
740
		List<String> facetXMLSnippets = new ArrayList<String>();
740
		List<String> facetXMLSnippets = new ArrayList<String>();
741
		
741
		
742
		Utils.info("borrowed facetRuleDefForFeature=" + 
742
		//Utils.info("borrowed facetRuleDefForFeature=" +facetRuleDefForFeature);
743
				facetRuleDefForFeature);
-
 
744
		
743
		
745
		if(facetRuleDefForFeature != null) {
744
		if(facetRuleDefForFeature != null) {
746
			ExpandedFacetRuleDefinition expFacetRuleDefForFeature = 
745
			ExpandedFacetRuleDefinition expFacetRuleDefForFeature = 
747
				new ExpandedFacetRuleDefinition(facetRuleDefForFeature);
746
				new ExpandedFacetRuleDefinition(facetRuleDefForFeature);
748
			if(!processedFacets.contains(expFacetRuleDefForFeature.getFacetDefinitionID())){
747
			if(!processedFacets.contains(expFacetRuleDefForFeature.getFacetDefinitionID())){
Line 788... Line 787...
788
			
787
			
789
			FacetRuleDefinition facetRuleDefForSlide = 
788
			FacetRuleDefinition facetRuleDefForSlide = 
790
				defs.getFacetRuleDefinitionForSlide(borrowedCategoryID, 
789
				defs.getFacetRuleDefinitionForSlide(borrowedCategoryID, 
791
						childSlideDefID);
790
						childSlideDefID);
792
			
791
			
793
			Utils.info("borrowed facetRuleDefForSlide=" + 
792
			//Utils.info("borrowed facetRuleDefForSlide=" +facetRuleDefForSlide);
794
					facetRuleDefForSlide);
-
 
795
			
793
			
796
			if(facetRuleDefForSlide != null) {
794
			if(facetRuleDefForSlide != null) {
797
				ExpandedFacetRuleDefinition expFacetRuleDefForSlide = 
795
				ExpandedFacetRuleDefinition expFacetRuleDefForSlide = 
798
					new ExpandedFacetRuleDefinition(
796
					new ExpandedFacetRuleDefinition(
799
							facetRuleDefForSlide);
797
							facetRuleDefForSlide);
Line 861... Line 859...
861
	 */
859
	 */
862
	@SuppressWarnings("unchecked")
860
	@SuppressWarnings("unchecked")
863
	private String processFacet(ExpandedEntity expEntity, 
861
	private String processFacet(ExpandedEntity expEntity, 
864
			ExpandedFacetRuleDefinition expFacetRuleDef) throws Exception {
862
			ExpandedFacetRuleDefinition expFacetRuleDef) throws Exception {
865
		
863
		
866
		Utils.info("expFacetRuleDef=" + expFacetRuleDef);
864
		//Utils.info("expFacetRuleDef=" + expFacetRuleDef);
867
 
865
 
868
		Utils.info("expEntity.getID()=" + expEntity.getID());
866
		Utils.info("expEntity.getID()=" + expEntity.getID());
869
		
867
		
870
		// to get the price from services and pass it on to fill in solr
868
		// to get the price from services and pass it on to fill in solr
871
		
869
		
Line 923... Line 921...
923
			// of a borrowed slide
921
			// of a borrowed slide
924
			else if(feature != null) {
922
			else if(feature != null) {
925
				
923
				
926
				// Normalize
924
				// Normalize
927
				if(defs.needsNormalization(feature.getFeatureDefinitionID())) {
925
				if(defs.needsNormalization(feature.getFeatureDefinitionID())) {
928
					Utils.info("needsNormalization feature=" + feature);
926
					Utils.info("needsNormalization feature=" + feature.getFeatureDefinitionID());
929
					
927
					
930
					feature = this.normalize(feature);
928
					feature = this.normalize(feature);
931
				}
929
				}
932
				
930
				
933
				ExpandedFeature expFeature = new ExpandedFeature(feature);
931
				ExpandedFeature expFeature = new ExpandedFeature(feature);