Subversion Repositories SmartDukaan

Rev

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

Rev 2275 Rev 2471
Line 32... Line 32...
32
	private static final String DEFAULT_ENTITY_SCORES = "DEFAULT_ENTITY_SCORES";
32
	private static final String DEFAULT_ENTITY_SCORES = "DEFAULT_ENTITY_SCORES";
33
	private static final String FACET_VALUES = "FACET_VALUES";
33
	private static final String FACET_VALUES = "FACET_VALUES";
34
	private static final String SLIDE_SCORES = "SLIDE_SCORES";
34
	private static final String SLIDE_SCORES = "SLIDE_SCORES";
35
	private static final String CONTENT_GENERATION_TIME = "CONTENT_GENERATION_TIME";
35
	private static final String CONTENT_GENERATION_TIME = "CONTENT_GENERATION_TIME";
36
	private static final String INCONSISTENT_ENTITIES = "INCONSISTENT_ENTITIES";
36
	private static final String INCONSISTENT_ENTITIES = "INCONSISTENT_ENTITIES";
-
 
37
	private static final String HELPDOC_ENTITYIDS = "HELPDOC_ENTITYIDS";
37
	private static long helpDocId;
38
	private static long helpDocId;
38
 
39
 
39
	/**
40
	/**
40
	 * 
41
	 * 
41
	 * @param aThrowable
42
	 * @param aThrowable
Line 84... Line 85...
84
    @SuppressWarnings("unchecked")
85
    @SuppressWarnings("unchecked")
85
    public static Map<Long, List<ExpandedBullet>> getLearnedBullets() throws Exception {
86
    public static Map<Long, List<ExpandedBullet>> getLearnedBullets() throws Exception {
86
        return (Map<Long, List<ExpandedBullet>>) StorageManager.getStorageManager().getDataObject(CreationUtils.LEARNED_BULLETS);       
87
        return (Map<Long, List<ExpandedBullet>>) StorageManager.getStorageManager().getDataObject(CreationUtils.LEARNED_BULLETS);       
87
    }
88
    }
88
    
89
    
-
 
90
    /**
-
 
91
     * 
-
 
92
     * @param entity
-
 
93
     * @throws Exception
-
 
94
     */
-
 
95
    public static void storeHelpdocEntityIds(Map<Long, List<Long>> helpdocEntityIds) throws Exception {
-
 
96
        StorageManager.getStorageManager().storeDataObject(CreationUtils.HELPDOC_ENTITYIDS, helpdocEntityIds);      
-
 
97
    }
-
 
98
    
-
 
99
    /**
-
 
100
     * 
-
 
101
     * @return
-
 
102
     * @throws Exception
-
 
103
     */
-
 
104
    @SuppressWarnings("unchecked")
-
 
105
    public static Map<Long, List<Long>> getHelpdocEntityIds() throws Exception {
-
 
106
        return (Map<Long, List<Long>>) StorageManager.getStorageManager().getDataObject(CreationUtils.HELPDOC_ENTITYIDS);       
-
 
107
    }
-
 
108
 
-
 
109
    
89
	/**
110
	/**
90
	 * 
111
	 * 
91
	 * @param featureDefinitionID
112
	 * @param featureDefinitionID
92
	 * @return
113
	 * @return
93
	 * @throws Exception
114
	 * @throws Exception
Line 232... Line 253...
232
	 * 
253
	 * 
233
	 * @param entity
254
	 * @param entity
234
	 * @throws Exception
255
	 * @throws Exception
235
	 */
256
	 */
236
	public static void updateEntity(Entity entity) throws Exception {
257
	public static void updateEntity(Entity entity) throws Exception {
-
 
258
		//FIXME This should not happen here. 
237
		entity.reorderSlides(entity.getSlideSequence());
259
		entity.reorderSlides(entity.getSlideSequence());
-
 
260
		CreationUtils.learn(entity);
238
		StorageManager.getStorageManager().updateEntity(entity);
261
		StorageManager.getStorageManager().updateEntity(entity);
239
		
262
		
240
		//This should not happen here. Reordering should be done manually.
-
 
241
		 
263
		 
242
		CreationUtils.learn(entity);
264
		
243
	}
265
	}
244
 
266
 
245
	/**
267
	/**
246
	 * 
268
	 * 
247
	 * @param entity
269
	 * @param entity
Line 303... Line 325...
303
	 * @param entity
325
	 * @param entity
304
	 * @throws Exception
326
	 * @throws Exception
305
	 */
327
	 */
306
	private static void learn(Entity entity) throws Exception{
328
	private static void learn(Entity entity) throws Exception{
307
		CN cn = new CN();
329
		CN cn = new CN();
308
		cn.learn(entity);	
330
		cn.learn(entity);
-
 
331
		cn.learnHelpdocs(entity);
309
	}
332
	}
310
 
333
 
311
	/**
334
	/**
312
	 * 
335
	 * 
313
	 * @return
336
	 * @return