org.sakaiproject.tool.assessment.qti.helper.item
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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ItemTypeExtractionStrategy
public ItemTypeExtractionStrategy()
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
calculate
public static Long calculate(Map itemMap)
main
public static void main(String[] args)
- simple unit test
- Parameters:
args - not used
Copyright © 2005-2013 Sakai Project. All Rights Reserved.