org.sakaiproject.tool.assessment.qti.helper.item
Class ItemTypeExtractionStrategy

java.lang.Object
  extended by 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
ItemTypeExtractionStrategy()
           
 
Method Summary
static Long calculate(Map itemMap)
           
static Long calculate(String title, String itemIntrospect, String qmdItemtype)
          Obtain Long item type id from strings extracted from item.
static void main(String[] args)
          simple unit test
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ItemTypeExtractionStrategy

public ItemTypeExtractionStrategy()
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 title
itemIntrospect - hte structure based guess from XSL
qmdItemtype - 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-2012 Sakai Project. All Rights Reserved.