Subversion Repositories SmartDukaan

Rev

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

Rev 67 Rev 70
Line 32... Line 32...
32
 *
32
 *
33
 */
33
 */
34
public class IR {
34
public class IR {
35
	
35
	
36
	/**
36
	/**
37
	 * Jython source path
-
 
38
	 */
-
 
39
	public static String JYTHON_SRC_PATH = "src/jython/";
-
 
40
	
-
 
41
	/**
-
 
42
	 * IR XML export path
-
 
43
	 */
-
 
44
	public static String EXPORT_IR_PATH = 
-
 
45
		"/home/naveen/workspace/eclipse/export/ir/";
-
 
46
	
-
 
47
	/**
-
 
48
	 * 
37
	 * 
49
	 */
38
	 */
50
	private long categoryID;
39
	private long categoryID;
51
	
40
	
52
	/**
41
	/**
Line 186... Line 175...
186
		
175
		
187
		String irDataXML = StringUtils.join(entityXMLSnippets, "\n");
176
		String irDataXML = StringUtils.join(entityXMLSnippets, "\n");
188
		Utils.info(irDataXML);
177
		Utils.info(irDataXML);
189
		
178
		
190
		// Write it to file
179
		// Write it to file
191
		String irDataFilename = IR.EXPORT_IR_PATH + "irdata.xml";
180
		String irDataFilename = Utils.EXPORT_IR_PATH + "irdata.xml";
192
		DBUtils.store(irDataXML, irDataFilename);
181
		DBUtils.store(irDataXML, irDataFilename);
193
	}
182
	}
194
	
183
	
195
	/**
184
	/**
196
	 * 
185
	 * 
Line 204... Line 193...
204
			ExpandedFacetDefinition expFacetDef) throws Exception {
193
			ExpandedFacetDefinition expFacetDef) throws Exception {
205
		
194
		
206
		EntityContainer ents = 
195
		EntityContainer ents = 
207
			Catalog.getInstance().getEntityContainer();
196
			Catalog.getInstance().getEntityContainer();
208
		
197
		
209
		JythonWrapper jw = new JythonWrapper();
198
		IRJythonWrapper jw = new IRJythonWrapper();
210
		
199
		
211
		jw.setExpandedEntity(expEntity);
200
		jw.setExpandedEntity(expEntity);
212
		jw.setExpandedFacetDefinition(expFacetDef);
201
		jw.setExpandedFacetDefinition(expFacetDef);
213
		
202
		
214
		// Set FeatureDefinition
203
		// Set FeatureDefinition
Line 240... Line 229...
240
			ExpandedSlide expSlide = new ExpandedSlide(slide);
229
			ExpandedSlide expSlide = new ExpandedSlide(slide);
241
			
230
			
242
			jw.setExpandedSlide(expSlide);
231
			jw.setExpandedSlide(expSlide);
243
		}
232
		}
244
		
233
		
-
 
234
		// Execute Python script
245
		jw.execIRDataRule();
235
		jw.execIRDataRule();
246
		
236
		
-
 
237
		// Parse returned Python list
247
		List<Object> values = (List<Object>)jw.getValues();
238
		List<Object> values = (List<Object>)jw.getValues();
248
		Utils.info("values=" + values);
239
		Utils.info("values=" + values);
249
		
240
		
250
		String facetXMLSnip = "";
241
		String facetXMLSnip = "";
251
		if(values != null) {
242
		if(values != null) {