Class ItemTypeExtractionStrategy
- java.lang.Object
-
- org.sakaiproject.tool.assessment.qti.helper.item.ItemTypeExtractionStrategy
-
public class ItemTypeExtractionStrategy extends Object
Encapsulates the work of figuring out what type the item is. Right now, uses static methods, later, we might want to change, add to factory. We use the QTI qmd_itemtype in itemmetadata as the preferred way to ascertain type. We fall back on title and then item structure, also attempring keyword matching. Note, this may be deprecated in favor of a vocabulary based approach. Need to investigate. Anyway, this is the form that is backwardly compatible.- Author:
- Ed Smiley
-
-
Constructor Summary
Constructors Constructor Description ItemTypeExtractionStrategy()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Longcalculate(String title, String itemIntrospect, String qmdItemtype)Obtain Long item type id from strings extracted from item.static Longcalculate(Map itemMap)static voidmain(String[] args)simple unit test
-
-
-
Method Detail
-
calculate
public static Long calculate(String title, String itemIntrospect, String qmdItemtype)
Obtain Long item type id from strings extracted from item.- Parameters:
title- the item titleitemIntrospect- hte structure based guess from XSLqmdItemtype- hte item type meta information- Returns:
- Long item type id
-
main
public static void main(String[] args)
simple unit test- Parameters:
args- not used
-
-